From 76c34ef5e22b76a449395fef08bcfb42263a03bd Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 31 Jul 2025 10:50:59 +0000 Subject: [PATCH] Regenerate client from commit b75095c of spec repo --- .generated-info | 4 +- .generator/schemas/v2/openapi.yaml | 76 ++++++++- .../v2_case-management_UpdateAttributes.rs | 33 ++++ src/datadogV2/api/api_case_management.rs | 160 ++++++++++++++++++ src/datadogV2/model/mod.rs | 6 + src/datadogV2/model/model_case.rs | 2 +- src/datadogV2/model/model_case_attributes.rs | 19 ++- .../model/model_case_update_attributes.rs | 117 +++++++++++++ ...model_case_update_attributes_attributes.rs | 94 ++++++++++ .../model_case_update_attributes_request.rs | 92 ++++++++++ ...e-case-returns-Bad-Request-response.frozen | 2 +- ...ive-case-returns-Bad-Request-response.json | 8 +- ...ive-case-returns-Not-Found-response.frozen | 2 +- ...chive-case-returns-Not-Found-response.json | 2 +- .../Archive-case-returns-OK-response.frozen | 2 +- .../Archive-case-returns-OK-response.json | 10 +- ...n-case-returns-Bad-Request-response.frozen | 2 +- ...ign-case-returns-Bad-Request-response.json | 10 +- ...ign-case-returns-Not-Found-response.frozen | 2 +- ...ssign-case-returns-Not-Found-response.json | 14 +- .../Assign-case-returns-OK-response.frozen | 2 +- .../Assign-case-returns-OK-response.json | 22 +-- ...a-case-returns-Bad-Request-response.frozen | 2 +- ...e-a-case-returns-Bad-Request-response.json | 2 +- ...ate-a-case-returns-CREATED-response.frozen | 2 +- ...reate-a-case-returns-CREATED-response.json | 16 +- ...f-a-case-returns-Not-Found-response.frozen | 2 +- ...-of-a-case-returns-Not-Found-response.json | 2 +- ...tails-of-a-case-returns-OK-response.frozen | 2 +- ...details-of-a-case-returns-OK-response.json | 10 +- ...e-case-returns-Bad-Request-response.frozen | 2 +- ...ive-case-returns-Bad-Request-response.json | 8 +- ...ive-case-returns-Not-Found-response.frozen | 2 +- ...chive-case-returns-Not-Found-response.json | 2 +- .../Unarchive-case-returns-OK-response.frozen | 2 +- .../Unarchive-case-returns-OK-response.json | 10 +- ...n-case-returns-Bad-Request-response.frozen | 2 +- ...ign-case-returns-Bad-Request-response.json | 8 +- ...ign-case-returns-Not-Found-response.frozen | 2 +- ...ssign-case-returns-Not-Found-response.json | 2 +- .../Unassign-case-returns-OK-response.frozen | 2 +- .../Unassign-case-returns-OK-response.json | 10 +- ...ibutes-returns-Bad-Request-response.frozen | 1 + ...tributes-returns-Bad-Request-response.json | 73 ++++++++ ...tributes-returns-Not-Found-response.frozen | 1 + ...attributes-returns-Not-Found-response.json | 39 +++++ ...case-attributes-returns-OK-response.frozen | 1 + ...e-case-attributes-returns-OK-response.json | 73 ++++++++ ...iority-returns-Bad-Request-response.frozen | 2 +- ...priority-returns-Bad-Request-response.json | 10 +- ...priority-returns-Not-Found-response.frozen | 2 +- ...e-priority-returns-Not-Found-response.json | 2 +- ...e-case-priority-returns-OK-response.frozen | 2 +- ...ate-case-priority-returns-OK-response.json | 10 +- ...status-returns-Bad-Request-response.frozen | 2 +- ...e-status-returns-Bad-Request-response.json | 10 +- ...e-status-returns-Not-Found-response.frozen | 2 +- ...ase-status-returns-Not-Found-response.json | 2 +- ...ate-case-status-returns-OK-response.frozen | 2 +- ...pdate-case-status-returns-OK-response.json | 10 +- .../features/v2/case_management.feature | 26 +++ tests/scenarios/features/v2/undo.json | 6 + tests/scenarios/function_mappings.rs | 29 ++++ 63 files changed, 959 insertions(+), 117 deletions(-) create mode 100644 examples/v2_case-management_UpdateAttributes.rs create mode 100644 src/datadogV2/model/model_case_update_attributes.rs create mode 100644 src/datadogV2/model/model_case_update_attributes_attributes.rs create mode 100644 src/datadogV2/model/model_case_update_attributes_request.rs create mode 100644 tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Bad-Request-response.frozen create mode 100644 tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Bad-Request-response.json create mode 100644 tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Not-Found-response.frozen create mode 100644 tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Not-Found-response.json create mode 100644 tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-OK-response.frozen create mode 100644 tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-OK-response.json diff --git a/.generated-info b/.generated-info index 25567e5cb..7d31455ea 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "dcf594e", - "generated": "2025-07-31 10:00:30.229" + "spec_repo_commit": "b75095c", + "generated": "2025-07-31 10:50:58.895" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4ae32284e..b125b71c6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -6891,7 +6891,7 @@ components: - data type: object CaseAttributes: - description: Case attributes + description: Case resource attributes properties: archived_at: description: Timestamp of when the case was archived @@ -6899,6 +6899,8 @@ components: nullable: true readOnly: true type: string + attributes: + $ref: '#/components/schemas/CaseObjectAttributes' closed_at: description: Timestamp of when the case was closed format: date-time @@ -7003,6 +7005,13 @@ components: required: - data type: object + CaseObjectAttributes: + additionalProperties: + items: + type: string + type: array + description: The definition of `CaseObjectAttributes` object. + type: object CasePriority: default: NOT_DEFINED description: Case priority @@ -7098,6 +7107,33 @@ components: type: string x-enum-varnames: - STANDARD + CaseUpdateAttributes: + description: Case update attributes + properties: + attributes: + $ref: '#/components/schemas/CaseUpdateAttributesAttributes' + type: + $ref: '#/components/schemas/CaseResourceType' + required: + - attributes + - type + type: object + CaseUpdateAttributesAttributes: + description: Case update attributes attributes + properties: + attributes: + $ref: '#/components/schemas/CaseObjectAttributes' + required: + - attributes + type: object + CaseUpdateAttributesRequest: + description: Case update attributes request + properties: + data: + $ref: '#/components/schemas/CaseUpdateAttributes' + required: + - data + type: object CaseUpdatePriority: description: Case priority status properties: @@ -45579,6 +45615,44 @@ paths: summary: Assign case tags: - Case Management + /api/v2/cases/{case_id}/attributes: + post: + description: Update case attributes + operationId: UpdateAttributes + parameters: + - $ref: '#/components/parameters/CaseIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaseUpdateAttributesRequest' + description: Case attributes update payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cases_write + summary: Update case attributes + tags: + - Case Management /api/v2/cases/{case_id}/priority: post: description: Update case priority diff --git a/examples/v2_case-management_UpdateAttributes.rs b/examples/v2_case-management_UpdateAttributes.rs new file mode 100644 index 000000000..46a553ef5 --- /dev/null +++ b/examples/v2_case-management_UpdateAttributes.rs @@ -0,0 +1,33 @@ +// Update case attributes returns "OK" response +use datadog_api_client::datadog; +use datadog_api_client::datadogV2::api_case_management::CaseManagementAPI; +use datadog_api_client::datadogV2::model::CaseResourceType; +use datadog_api_client::datadogV2::model::CaseUpdateAttributes; +use datadog_api_client::datadogV2::model::CaseUpdateAttributesAttributes; +use datadog_api_client::datadogV2::model::CaseUpdateAttributesRequest; +use std::collections::BTreeMap; + +#[tokio::main] +async fn main() { + // there is a valid "case" in the system + let case_id = std::env::var("CASE_ID").unwrap(); + let body = CaseUpdateAttributesRequest::new(CaseUpdateAttributes::new( + CaseUpdateAttributesAttributes::new(BTreeMap::from([ + ("env".to_string(), vec!["test".to_string()]), + ( + "service".to_string(), + vec!["web-store".to_string(), "web-api".to_string()], + ), + ("team".to_string(), vec!["engineer".to_string()]), + ])), + CaseResourceType::CASE, + )); + let configuration = datadog::Configuration::new(); + let api = CaseManagementAPI::with_config(configuration); + let resp = api.update_attributes(case_id.clone(), body).await; + if let Ok(value) = resp { + println!("{:#?}", value); + } else { + println!("{:#?}", resp.unwrap_err()); + } +} diff --git a/src/datadogV2/api/api_case_management.rs b/src/datadogV2/api/api_case_management.rs index 5bca0c573..563f2ce56 100644 --- a/src/datadogV2/api/api_case_management.rs +++ b/src/datadogV2/api/api_case_management.rs @@ -144,6 +144,14 @@ pub enum UnassignCaseError { UnknownValue(serde_json::Value), } +/// UpdateAttributesError is a struct for typed errors of method [`CaseManagementAPI::update_attributes`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateAttributesError { + APIErrorResponse(crate::datadogV2::model::APIErrorResponse), + UnknownValue(serde_json::Value), +} + /// UpdatePriorityError is a struct for typed errors of method [`CaseManagementAPI::update_priority`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -1685,6 +1693,158 @@ impl CaseManagementAPI { } } + /// Update case attributes + pub async fn update_attributes( + &self, + case_id: String, + body: crate::datadogV2::model::CaseUpdateAttributesRequest, + ) -> Result> { + match self.update_attributes_with_http_info(case_id, body).await { + Ok(response_content) => { + if let Some(e) = response_content.entity { + Ok(e) + } else { + Err(datadog::Error::Serde(serde::de::Error::custom( + "response content was None", + ))) + } + } + Err(err) => Err(err), + } + } + + /// Update case attributes + pub async fn update_attributes_with_http_info( + &self, + case_id: String, + body: crate::datadogV2::model::CaseUpdateAttributesRequest, + ) -> Result< + datadog::ResponseContent, + datadog::Error, + > { + let local_configuration = &self.config; + let operation_id = "v2.update_attributes"; + + let local_client = &self.client; + + let local_uri_str = format!( + "{}/api/v2/cases/{case_id}/attributes", + local_configuration.get_operation_host(operation_id), + case_id = datadog::urlencode(case_id) + ); + let mut local_req_builder = + local_client.request(reqwest::Method::POST, local_uri_str.as_str()); + + // build headers + let mut headers = HeaderMap::new(); + headers.insert("Content-Type", HeaderValue::from_static("application/json")); + headers.insert("Accept", HeaderValue::from_static("application/json")); + + // build user agent + match HeaderValue::from_str(local_configuration.user_agent.as_str()) { + Ok(user_agent) => headers.insert(reqwest::header::USER_AGENT, user_agent), + Err(e) => { + log::warn!("Failed to parse user agent header: {e}, falling back to default"); + headers.insert( + reqwest::header::USER_AGENT, + HeaderValue::from_static(datadog::DEFAULT_USER_AGENT.as_str()), + ) + } + }; + + // build auth + if let Some(local_key) = local_configuration.auth_keys.get("apiKeyAuth") { + headers.insert( + "DD-API-KEY", + HeaderValue::from_str(local_key.key.as_str()) + .expect("failed to parse DD-API-KEY header"), + ); + }; + if let Some(local_key) = local_configuration.auth_keys.get("appKeyAuth") { + headers.insert( + "DD-APPLICATION-KEY", + HeaderValue::from_str(local_key.key.as_str()) + .expect("failed to parse DD-APPLICATION-KEY header"), + ); + }; + + // build body parameters + let output = Vec::new(); + let mut ser = serde_json::Serializer::with_formatter(output, datadog::DDFormatter); + if body.serialize(&mut ser).is_ok() { + if let Some(content_encoding) = headers.get("Content-Encoding") { + match content_encoding.to_str().unwrap_or_default() { + "gzip" => { + let mut enc = GzEncoder::new(Vec::new(), Compression::default()); + let _ = enc.write_all(ser.into_inner().as_slice()); + match enc.finish() { + Ok(buf) => { + local_req_builder = local_req_builder.body(buf); + } + Err(e) => return Err(datadog::Error::Io(e)), + } + } + "deflate" => { + let mut enc = ZlibEncoder::new(Vec::new(), Compression::default()); + let _ = enc.write_all(ser.into_inner().as_slice()); + match enc.finish() { + Ok(buf) => { + local_req_builder = local_req_builder.body(buf); + } + Err(e) => return Err(datadog::Error::Io(e)), + } + } + "zstd1" => { + let mut enc = zstd::stream::Encoder::new(Vec::new(), 0).unwrap(); + let _ = enc.write_all(ser.into_inner().as_slice()); + match enc.finish() { + Ok(buf) => { + local_req_builder = local_req_builder.body(buf); + } + Err(e) => return Err(datadog::Error::Io(e)), + } + } + _ => { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + } + } else { + local_req_builder = local_req_builder.body(ser.into_inner()); + } + } + + local_req_builder = local_req_builder.headers(headers); + let local_req = local_req_builder.build()?; + log::debug!("request content: {:?}", local_req.body()); + let local_resp = local_client.execute(local_req).await?; + + let local_status = local_resp.status(); + let local_content = local_resp.text().await?; + log::debug!("response content: {}", local_content); + + if !local_status.is_client_error() && !local_status.is_server_error() { + match serde_json::from_str::(&local_content) { + Ok(e) => { + return Ok(datadog::ResponseContent { + status: local_status, + content: local_content, + entity: Some(e), + }) + } + Err(e) => return Err(datadog::Error::Serde(e)), + }; + } else { + let local_entity: Option = + serde_json::from_str(&local_content).ok(); + let local_error = datadog::ResponseContent { + status: local_status, + content: local_content, + entity: local_entity, + }; + Err(datadog::Error::ResponseError(local_error)) + } + } + /// Update case priority pub async fn update_priority( &self, diff --git a/src/datadogV2/model/mod.rs b/src/datadogV2/model/mod.rs index d2d2ead3d..681c57aa6 100644 --- a/src/datadogV2/model/mod.rs +++ b/src/datadogV2/model/mod.rs @@ -704,6 +704,12 @@ pub mod model_case_assign; pub use self::model_case_assign::CaseAssign; pub mod model_case_assign_attributes; pub use self::model_case_assign_attributes::CaseAssignAttributes; +pub mod model_case_update_attributes_request; +pub use self::model_case_update_attributes_request::CaseUpdateAttributesRequest; +pub mod model_case_update_attributes; +pub use self::model_case_update_attributes::CaseUpdateAttributes; +pub mod model_case_update_attributes_attributes; +pub use self::model_case_update_attributes_attributes::CaseUpdateAttributesAttributes; pub mod model_case_update_priority_request; pub use self::model_case_update_priority_request::CaseUpdatePriorityRequest; pub mod model_case_update_priority; diff --git a/src/datadogV2/model/model_case.rs b/src/datadogV2/model/model_case.rs index 7ff3e2823..7365d15db 100644 --- a/src/datadogV2/model/model_case.rs +++ b/src/datadogV2/model/model_case.rs @@ -11,7 +11,7 @@ use std::fmt::{self, Formatter}; #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] pub struct Case { - /// Case attributes + /// Case resource attributes #[serde(rename = "attributes")] pub attributes: crate::datadogV2::model::CaseAttributes, /// Case's identifier diff --git a/src/datadogV2/model/model_case_attributes.rs b/src/datadogV2/model/model_case_attributes.rs index 2f609b5fc..e43106b06 100644 --- a/src/datadogV2/model/model_case_attributes.rs +++ b/src/datadogV2/model/model_case_attributes.rs @@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize}; use serde_with::skip_serializing_none; use std::fmt::{self, Formatter}; -/// Case attributes +/// Case resource attributes #[non_exhaustive] #[skip_serializing_none] #[derive(Clone, Debug, PartialEq, Serialize)] @@ -18,6 +18,9 @@ pub struct CaseAttributes { with = "::serde_with::rust::double_option" )] pub archived_at: Option>>, + /// The definition of `CaseObjectAttributes` object. + #[serde(rename = "attributes")] + pub attributes: Option>>, /// Timestamp of when the case was closed #[serde( rename = "closed_at", @@ -78,6 +81,7 @@ impl CaseAttributes { pub fn new() -> CaseAttributes { CaseAttributes { archived_at: None, + attributes: None, closed_at: None, created_at: None, description: None, @@ -99,6 +103,11 @@ impl CaseAttributes { self } + pub fn attributes(mut self, value: std::collections::BTreeMap>) -> Self { + self.attributes = Some(value); + self + } + pub fn closed_at(mut self, value: Option>) -> Self { self.closed_at = Some(value); self @@ -190,6 +199,7 @@ impl<'de> Deserialize<'de> for CaseAttributes { M: MapAccess<'a>, { let mut archived_at: Option>> = None; + let mut attributes: Option>> = None; let mut closed_at: Option>> = None; let mut created_at: Option> = None; let mut description: Option = None; @@ -215,6 +225,12 @@ impl<'de> Deserialize<'de> for CaseAttributes { archived_at = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } + "attributes" => { + if v.is_null() { + continue; + } + attributes = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } "closed_at" => { closed_at = Some(serde_json::from_value(v).map_err(M::Error::custom)?); } @@ -310,6 +326,7 @@ impl<'de> Deserialize<'de> for CaseAttributes { let content = CaseAttributes { archived_at, + attributes, closed_at, created_at, description, diff --git a/src/datadogV2/model/model_case_update_attributes.rs b/src/datadogV2/model/model_case_update_attributes.rs new file mode 100644 index 000000000..895bfbba0 --- /dev/null +++ b/src/datadogV2/model/model_case_update_attributes.rs @@ -0,0 +1,117 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Case update attributes +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct CaseUpdateAttributes { + /// Case update attributes attributes + #[serde(rename = "attributes")] + pub attributes: crate::datadogV2::model::CaseUpdateAttributesAttributes, + /// Case resource type + #[serde(rename = "type")] + pub type_: crate::datadogV2::model::CaseResourceType, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl CaseUpdateAttributes { + pub fn new( + attributes: crate::datadogV2::model::CaseUpdateAttributesAttributes, + type_: crate::datadogV2::model::CaseResourceType, + ) -> CaseUpdateAttributes { + CaseUpdateAttributes { + attributes, + type_, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl<'de> Deserialize<'de> for CaseUpdateAttributes { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct CaseUpdateAttributesVisitor; + impl<'a> Visitor<'a> for CaseUpdateAttributesVisitor { + type Value = CaseUpdateAttributes; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut attributes: Option< + crate::datadogV2::model::CaseUpdateAttributesAttributes, + > = None; + let mut type_: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "attributes" => { + attributes = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + "type" => { + type_ = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + if let Some(ref _type_) = type_ { + match _type_ { + crate::datadogV2::model::CaseResourceType::UnparsedObject( + _type_, + ) => { + _unparsed = true; + } + _ => {} + } + } + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + let attributes = attributes.ok_or_else(|| M::Error::missing_field("attributes"))?; + let type_ = type_.ok_or_else(|| M::Error::missing_field("type_"))?; + + let content = CaseUpdateAttributes { + attributes, + type_, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(CaseUpdateAttributesVisitor) + } +} diff --git a/src/datadogV2/model/model_case_update_attributes_attributes.rs b/src/datadogV2/model/model_case_update_attributes_attributes.rs new file mode 100644 index 000000000..28d781c94 --- /dev/null +++ b/src/datadogV2/model/model_case_update_attributes_attributes.rs @@ -0,0 +1,94 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Case update attributes attributes +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct CaseUpdateAttributesAttributes { + /// The definition of `CaseObjectAttributes` object. + #[serde(rename = "attributes")] + pub attributes: std::collections::BTreeMap>, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl CaseUpdateAttributesAttributes { + pub fn new( + attributes: std::collections::BTreeMap>, + ) -> CaseUpdateAttributesAttributes { + CaseUpdateAttributesAttributes { + attributes, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl<'de> Deserialize<'de> for CaseUpdateAttributesAttributes { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct CaseUpdateAttributesAttributesVisitor; + impl<'a> Visitor<'a> for CaseUpdateAttributesAttributesVisitor { + type Value = CaseUpdateAttributesAttributes; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut attributes: Option>> = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "attributes" => { + attributes = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + let attributes = attributes.ok_or_else(|| M::Error::missing_field("attributes"))?; + + let content = CaseUpdateAttributesAttributes { + attributes, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(CaseUpdateAttributesAttributesVisitor) + } +} diff --git a/src/datadogV2/model/model_case_update_attributes_request.rs b/src/datadogV2/model/model_case_update_attributes_request.rs new file mode 100644 index 000000000..f606d5739 --- /dev/null +++ b/src/datadogV2/model/model_case_update_attributes_request.rs @@ -0,0 +1,92 @@ +// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2019-Present Datadog, Inc. +use serde::de::{Error, MapAccess, Visitor}; +use serde::{Deserialize, Deserializer, Serialize}; +use serde_with::skip_serializing_none; +use std::fmt::{self, Formatter}; + +/// Case update attributes request +#[non_exhaustive] +#[skip_serializing_none] +#[derive(Clone, Debug, PartialEq, Serialize)] +pub struct CaseUpdateAttributesRequest { + /// Case update attributes + #[serde(rename = "data")] + pub data: crate::datadogV2::model::CaseUpdateAttributes, + #[serde(flatten)] + pub additional_properties: std::collections::BTreeMap, + #[serde(skip)] + #[serde(default)] + pub(crate) _unparsed: bool, +} + +impl CaseUpdateAttributesRequest { + pub fn new(data: crate::datadogV2::model::CaseUpdateAttributes) -> CaseUpdateAttributesRequest { + CaseUpdateAttributesRequest { + data, + additional_properties: std::collections::BTreeMap::new(), + _unparsed: false, + } + } + + pub fn additional_properties( + mut self, + value: std::collections::BTreeMap, + ) -> Self { + self.additional_properties = value; + self + } +} + +impl<'de> Deserialize<'de> for CaseUpdateAttributesRequest { + fn deserialize(deserializer: D) -> Result + where + D: Deserializer<'de>, + { + struct CaseUpdateAttributesRequestVisitor; + impl<'a> Visitor<'a> for CaseUpdateAttributesRequestVisitor { + type Value = CaseUpdateAttributesRequest; + + fn expecting(&self, f: &mut Formatter<'_>) -> fmt::Result { + f.write_str("a mapping") + } + + fn visit_map(self, mut map: M) -> Result + where + M: MapAccess<'a>, + { + let mut data: Option = None; + let mut additional_properties: std::collections::BTreeMap< + String, + serde_json::Value, + > = std::collections::BTreeMap::new(); + let mut _unparsed = false; + + while let Some((k, v)) = map.next_entry::()? { + match k.as_str() { + "data" => { + data = Some(serde_json::from_value(v).map_err(M::Error::custom)?); + } + &_ => { + if let Ok(value) = serde_json::from_value(v.clone()) { + additional_properties.insert(k, value); + } + } + } + } + let data = data.ok_or_else(|| M::Error::missing_field("data"))?; + + let content = CaseUpdateAttributesRequest { + data, + additional_properties, + _unparsed, + }; + + Ok(content) + } + } + + deserializer.deserialize_any(CaseUpdateAttributesRequestVisitor) + } +} diff --git a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Bad-Request-response.frozen index 02ebd0b91..081a252da 100644 --- a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:15.159Z \ No newline at end of file +2025-07-21T13:52:40.919Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Bad-Request-response.json index 046f100f7..91c25f2b2 100644 --- a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Bad-Request-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"4e49aede-4c04-42d3-b5bc-f8eb4c1340df\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:15.280494299Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"4e49aede-4c04-42d3-b5bc-f8eb4c1340df\",\"key\":\"DDFC-182\",\"priority\":\"P4\",\"public_id\":\"242\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"6706fe66-cabd-4b22-b4c5-dd478bba421a\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:41.25066Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"6706fe66-cabd-4b22-b4c5-dd478bba421a\",\"key\":\"DDFC-72317\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72377\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:15 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:40 GMT" }, { "request": { @@ -49,7 +49,7 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/4e49aede-4c04-42d3-b5bc-f8eb4c1340df/archive" + "uri": "https://api.datadoghq.com/api/v2/cases/6706fe66-cabd-4b22-b4c5-dd478bba421a/archive" }, "response": { "body": { @@ -66,7 +66,7 @@ "message": "Bad Request" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:15 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:40 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Not-Found-response.frozen index 16674248e..59cf7189d 100644 --- a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Not-Found-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Not-Found-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:15.378Z \ No newline at end of file +2025-07-21T13:52:41.730Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Not-Found-response.json index 1a31061ad..d1c8de28f 100644 --- a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-Not-Found-response.json @@ -32,7 +32,7 @@ "message": "Not Found" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:15 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:41 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-OK-response.frozen index f8ce6d98b..57508d485 100644 --- a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-OK-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:15.466Z \ No newline at end of file +2025-07-21T13:52:42.155Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-OK-response.json b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-OK-response.json index 9a40c5687..a31a35686 100644 --- a/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Archive-case-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"3752309b-6a77-4015-845a-02ff88647b4b\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:15.546103234Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"3752309b-6a77-4015-845a-02ff88647b4b\",\"key\":\"DDFC-183\",\"priority\":\"P4\",\"public_id\":\"243\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"b074b409-24f8-42ae-b545-b1486429630d\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:42.51392Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"b074b409-24f8-42ae-b545-b1486429630d\",\"key\":\"DDFC-72318\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72378\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:15 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:42 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/3752309b-6a77-4015-845a-02ff88647b4b/archive" + "uri": "https://api.datadoghq.com/api/v2/cases/b074b409-24f8-42ae-b545-b1486429630d/archive" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"3752309b-6a77-4015-845a-02ff88647b4b\",\"type\":\"case\",\"attributes\":{\"archived_at\":\"2024-02-14T18:55:15.641594121Z\",\"attributes\":{},\"created_at\":\"2024-02-14T18:55:15.546103Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"3752309b-6a77-4015-845a-02ff88647b4b\",\"key\":\"DDFC-183\",\"priority\":\"P4\",\"public_id\":\"243\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"b074b409-24f8-42ae-b545-b1486429630d\",\"type\":\"case\",\"attributes\":{\"archived_at\":\"2025-07-21T13:52:42.933945716Z\",\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:42.51392Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"b074b409-24f8-42ae-b545-b1486429630d\",\"key\":\"DDFC-72318\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-07-21T13:52:42.933946Z\",\"priority\":\"P4\",\"public_id\":\"72378\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:15 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:42 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Bad-Request-response.frozen index 2749371a9..7decaaaea 100644 --- a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:15.651Z \ No newline at end of file +2025-07-21T13:52:43.015Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Bad-Request-response.json index f478c4f2e..42b3f6095 100644 --- a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Bad-Request-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"cf2e3b59-d504-4714-9853-38e4ceddb858\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:15.728783622Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"cf2e3b59-d504-4714-9853-38e4ceddb858\",\"key\":\"DDFC-184\",\"priority\":\"P4\",\"public_id\":\"244\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"510b0121-1477-43c0-8986-78f011016d48\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:43.335245Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"510b0121-1477-43c0-8986-78f011016d48\",\"key\":\"DDFC-72319\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72379\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:15 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:43 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/cf2e3b59-d504-4714-9853-38e4ceddb858/assign" + "uri": "https://api.datadoghq.com/api/v2/cases/510b0121-1477-43c0-8986-78f011016d48/assign" }, "response": { "body": { - "string": "{\"errors\":[{\"code\":\"invalid_command\",\"title\":\"error when validating input command: 'assigneeid' field must be an uuid\",\"meta\":{\"entity\":\"assigneeid\",\"rule\":\"uuid\"}}]}", + "string": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\"}]}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "Bad Request" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:15 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:43 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Not-Found-response.frozen index dac002f7f..067940f74 100644 --- a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Not-Found-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Not-Found-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:15.832Z \ No newline at end of file +2025-07-21T13:52:43.820Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Not-Found-response.json index e718cb62d..89d1a54dc 100644 --- a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-Not-Found-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Assign_case_returns_Not_Found_response-1707936915@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Assign_case_returns_Not_Found_response-1753105963@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"type\":\"users\",\"id\":\"9740b08d-cb6a-11ee-8bd8-2a1a3c7b5bdd\",\"attributes\":{\"name\":null,\"handle\":\"test-assign_case_returns_not_found_response-1707936915@datadoghq.com\",\"created_at\":\"2024-02-14T18:55:15.963542+00:00\",\"modified_at\":\"2024-02-14T18:55:15.963542+00:00\",\"email\":\"test-assign_case_returns_not_found_response-1707936915@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/379ecb2d1d9ca2e9ce66fa109609c256?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", + "string": "{\"data\":{\"type\":\"users\",\"id\":\"fa033cd0-6639-11f0-b658-96290b93dbfc\",\"attributes\":{\"name\":null,\"handle\":\"test-assign_case_returns_not_found_response-1753105963@datadoghq.com\",\"created_at\":\"2025-07-21T13:52:44.217086+00:00\",\"modified_at\":\"2025-07-21T13:52:44.217086+00:00\",\"email\":\"test-assign_case_returns_not_found_response-1753105963@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/de9eda912656e39d585005ddc0880775?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:15 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:43 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"assignee_id\":\"9740b08d-cb6a-11ee-8bd8-2a1a3c7b5bdd\"},\"type\":\"case\"}}", + "string": "{\"data\":{\"attributes\":{\"assignee_id\":\"fa033cd0-6639-11f0-b658-96290b93dbfc\"},\"type\":\"case\"}}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "Not Found" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:15 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:43 GMT" }, { "request": { @@ -77,7 +77,7 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/users/9740b08d-cb6a-11ee-8bd8-2a1a3c7b5bdd" + "uri": "https://api.datadoghq.com/api/v2/users/fa033cd0-6639-11f0-b658-96290b93dbfc" }, "response": { "body": { @@ -90,7 +90,7 @@ "message": "No Content" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:15 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:43 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-OK-response.frozen index 63999feda..4e634aa5c 100644 --- a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-OK-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:16.362Z \ No newline at end of file +2025-07-21T13:52:45.309Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-OK-response.json b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-OK-response.json index 9bcbfa283..336848c8d 100644 --- a/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Assign-case-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:16.445823452Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c\",\"key\":\"DDFC-185\",\"priority\":\"P4\",\"public_id\":\"245\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"fd1228dc-d475-4a0b-8677-7a9ce3b50b3d\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:45.654592Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"fd1228dc-d475-4a0b-8677-7a9ce3b50b3d\",\"key\":\"DDFC-72320\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72380\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:16 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:45 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Assign_case_returns_OK_response-1707936916@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Assign_case_returns_OK_response-1753105965@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"type\":\"users\",\"id\":\"97a38d32-cb6a-11ee-9645-0a530ef9b7d3\",\"attributes\":{\"name\":null,\"handle\":\"test-assign_case_returns_ok_response-1707936916@datadoghq.com\",\"created_at\":\"2024-02-14T18:55:16.611469+00:00\",\"modified_at\":\"2024-02-14T18:55:16.611469+00:00\",\"email\":\"test-assign_case_returns_ok_response-1707936916@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/982f69dc821d8ef307cfc8907452899b?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", + "string": "{\"data\":{\"type\":\"users\",\"id\":\"fb218c6d-6639-11f0-a2d3-1a819e56f795\",\"attributes\":{\"name\":null,\"handle\":\"test-assign_case_returns_ok_response-1753105965@datadoghq.com\",\"created_at\":\"2025-07-21T13:52:46.093451+00:00\",\"modified_at\":\"2025-07-21T13:52:46.093451+00:00\",\"email\":\"test-assign_case_returns_ok_response-1753105965@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/a6015cb53f5ee1693a8a69c8f6904fae?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", "encoding": null }, "headers": { @@ -66,12 +66,12 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:16 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:45 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"assignee_id\":\"97a38d32-cb6a-11ee-9645-0a530ef9b7d3\"},\"type\":\"case\"}}", + "string": "{\"data\":{\"attributes\":{\"assignee_id\":\"fb218c6d-6639-11f0-a2d3-1a819e56f795\"},\"type\":\"case\"}}", "encoding": null }, "headers": { @@ -83,11 +83,11 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c/assign" + "uri": "https://api.datadoghq.com/api/v2/cases/fd1228dc-d475-4a0b-8677-7a9ce3b50b3d/assign" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:16.445823Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"2d07d89b-2f91-47c2-b3ea-ee28ffee5b4c\",\"key\":\"DDFC-185\",\"modified_at\":\"2024-02-14T18:55:16.737803Z\",\"priority\":\"P4\",\"public_id\":\"245\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"97a38d32-cb6a-11ee-9645-0a530ef9b7d3\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}},{\"id\":\"97a38d32-cb6a-11ee-9645-0a530ef9b7d3\",\"type\":\"user\",\"attributes\":{\"email\":\"test-assign_case_returns_ok_response-1707936916@datadoghq.com\",\"handle\":\"test-assign_case_returns_ok_response-1707936916@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"fd1228dc-d475-4a0b-8677-7a9ce3b50b3d\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:45.654592Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"fd1228dc-d475-4a0b-8677-7a9ce3b50b3d\",\"key\":\"DDFC-72320\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-07-21T13:52:46.52116Z\",\"priority\":\"P4\",\"public_id\":\"72380\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"fb218c6d-6639-11f0-a2d3-1a819e56f795\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}},{\"id\":\"fb218c6d-6639-11f0-a2d3-1a819e56f795\",\"type\":\"user\",\"attributes\":{\"active\":false,\"email\":\"test-assign_case_returns_ok_response-1753105965@datadoghq.com\",\"handle\":\"test-assign_case_returns_ok_response-1753105965@datadoghq.com\",\"name\":\"\"}}]}", "encoding": null }, "headers": { @@ -100,7 +100,7 @@ "message": "OK" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:16 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:45 GMT" }, { "request": { @@ -111,7 +111,7 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/users/97a38d32-cb6a-11ee-9645-0a530ef9b7d3" + "uri": "https://api.datadoghq.com/api/v2/users/fb218c6d-6639-11f0-a2d3-1a819e56f795" }, "response": { "body": { @@ -124,7 +124,7 @@ "message": "No Content" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:16 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:45 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-Bad-Request-response.frozen index 3d4309137..4494f306b 100644 --- a/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:16.995Z \ No newline at end of file +2025-07-21T13:52:47.155Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-Bad-Request-response.json index a4e022cb3..dd9e635dc 100644 --- a/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-Bad-Request-response.json @@ -32,7 +32,7 @@ "message": "Bad Request" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:16 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:47 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-CREATED-response.frozen b/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-CREATED-response.frozen index d0a1a57a4..c1e8fb0c3 100644 --- a/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-CREATED-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-CREATED-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:17.074Z \ No newline at end of file +2025-07-21T13:52:47.527Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-CREATED-response.json b/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-CREATED-response.json index cbca42220..45d6c8972 100644 --- a/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-CREATED-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Create-a-case-returns-CREATED-response.json @@ -3,7 +3,7 @@ { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_a_case_returns_CREATED_response-1707936917@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", + "string": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_a_case_returns_CREATED_response-1753105967@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}", "encoding": null }, "headers": { @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"type\":\"users\",\"id\":\"97fb5e7f-cb6a-11ee-8de6-d2393b962484\",\"attributes\":{\"name\":null,\"handle\":\"test-create_a_case_returns_created_response-1707936917@datadoghq.com\",\"created_at\":\"2024-02-14T18:55:17.186960+00:00\",\"modified_at\":\"2024-02-14T18:55:17.186960+00:00\",\"email\":\"test-create_a_case_returns_created_response-1707936917@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/04ba872d0c124a11691bb75e2b774d08?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", + "string": "{\"data\":{\"type\":\"users\",\"id\":\"fc35a29f-6639-11f0-8bee-a24ce66fd256\",\"attributes\":{\"name\":null,\"handle\":\"test-create_a_case_returns_created_response-1753105967@datadoghq.com\",\"created_at\":\"2025-07-21T13:52:47.902815+00:00\",\"modified_at\":\"2025-07-21T13:52:47.902815+00:00\",\"email\":\"test-create_a_case_returns_created_response-1753105967@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/600ad64c52b4a9b6a9f2a46d8fa9ec0a?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n", "encoding": null }, "headers": { @@ -32,12 +32,12 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:17 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:47 GMT" }, { "request": { "body": { - "string": "{\"data\":{\"attributes\":{\"priority\":\"NOT_DEFINED\",\"title\":\"Security breach investigation in 8216c516b64665ce\",\"type\":\"STANDARD\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"97fb5e7f-cb6a-11ee-8de6-d2393b962484\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}", + "string": "{\"data\":{\"attributes\":{\"priority\":\"NOT_DEFINED\",\"title\":\"Security breach investigation in 20df485fb3942e6f\",\"type\":\"STANDARD\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"fc35a29f-6639-11f0-8bee-a24ce66fd256\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}", "encoding": null }, "headers": { @@ -53,7 +53,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"93237ca1-b5ee-4116-9bfc-d94f99cd9629\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:17.301872096Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"93237ca1-b5ee-4116-9bfc-d94f99cd9629\",\"key\":\"DDFC-186\",\"priority\":\"NOT_DEFINED\",\"public_id\":\"246\",\"status\":\"OPEN\",\"title\":\"Security breach investigation in 8216c516b64665ce\",\"type\":\"STANDARD\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"97fb5e7f-cb6a-11ee-8de6-d2393b962484\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}},{\"id\":\"97fb5e7f-cb6a-11ee-8de6-d2393b962484\",\"type\":\"user\",\"attributes\":{\"email\":\"test-create_a_case_returns_created_response-1707936917@datadoghq.com\",\"handle\":\"test-create_a_case_returns_created_response-1707936917@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"2275ce7b-781b-4539-b0f3-2cc1b2140565\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:48.320633Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"2275ce7b-781b-4539-b0f3-2cc1b2140565\",\"key\":\"DDFC-72321\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"NOT_DEFINED\",\"public_id\":\"72381\",\"status\":\"OPEN\",\"title\":\"Security breach investigation in 20df485fb3942e6f\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"fc35a29f-6639-11f0-8bee-a24ce66fd256\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}},{\"id\":\"fc35a29f-6639-11f0-8bee-a24ce66fd256\",\"type\":\"user\",\"attributes\":{\"active\":false,\"email\":\"test-create_a_case_returns_created_response-1753105967@datadoghq.com\",\"handle\":\"test-create_a_case_returns_created_response-1753105967@datadoghq.com\",\"name\":\"\"}}]}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:17 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:47 GMT" }, { "request": { @@ -77,7 +77,7 @@ ] }, "method": "delete", - "uri": "https://api.datadoghq.com/api/v2/users/97fb5e7f-cb6a-11ee-8de6-d2393b962484" + "uri": "https://api.datadoghq.com/api/v2/users/fc35a29f-6639-11f0-8bee-a24ce66fd256" }, "response": { "body": { @@ -90,7 +90,7 @@ "message": "No Content" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:17 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:47 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.frozen index 1f1e9770d..65a7dda98 100644 --- a/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:17.678Z \ No newline at end of file +2025-07-21T13:52:48.953Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.json index 7ea49c213..76bcce108 100644 --- a/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-Not-Found-response.json @@ -26,7 +26,7 @@ "message": "Not Found" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:17 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:48 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-OK-response.frozen index ce3e1d89d..683f8abed 100644 --- a/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-OK-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:17.758Z \ No newline at end of file +2025-07-21T13:52:49.345Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-OK-response.json b/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-OK-response.json index 833c08e28..bfa9f8b5c 100644 --- a/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Get-the-details-of-a-case-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"d981cc6f-654e-4528-8451-d3d99259d4d6\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:17.837538892Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"d981cc6f-654e-4528-8451-d3d99259d4d6\",\"key\":\"DDFC-187\",\"priority\":\"P4\",\"public_id\":\"247\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"5e66536f-3946-41fd-9e0f-183e719d7128\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:49.694835Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"5e66536f-3946-41fd-9e0f-183e719d7128\",\"key\":\"DDFC-72322\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72382\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:17 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:49 GMT" }, { "request": { @@ -43,11 +43,11 @@ ] }, "method": "get", - "uri": "https://api.datadoghq.com/api/v2/cases/d981cc6f-654e-4528-8451-d3d99259d4d6" + "uri": "https://api.datadoghq.com/api/v2/cases/5e66536f-3946-41fd-9e0f-183e719d7128" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"d981cc6f-654e-4528-8451-d3d99259d4d6\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:17.837539Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"d981cc6f-654e-4528-8451-d3d99259d4d6\",\"key\":\"DDFC-187\",\"priority\":\"P4\",\"public_id\":\"247\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"5e66536f-3946-41fd-9e0f-183e719d7128\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:49.694835Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"5e66536f-3946-41fd-9e0f-183e719d7128\",\"key\":\"DDFC-72322\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72382\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -60,7 +60,7 @@ "message": "OK" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:17 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:49 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Bad-Request-response.frozen index 5b768a1c8..22ddf6aec 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:17.936Z \ No newline at end of file +2025-07-21T13:52:50.131Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Bad-Request-response.json index 69b3b67d4..323524b61 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Bad-Request-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"7c588891-1486-4cf6-992f-f0c3a97f0245\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:18.021909299Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"7c588891-1486-4cf6-992f-f0c3a97f0245\",\"key\":\"DDFC-188\",\"priority\":\"P4\",\"public_id\":\"248\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"5fd92551-50b8-46e9-899d-5846cf3eab9e\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:50.459513Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"5fd92551-50b8-46e9-899d-5846cf3eab9e\",\"key\":\"DDFC-72323\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72383\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:17 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:50 GMT" }, { "request": { @@ -49,7 +49,7 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/7c588891-1486-4cf6-992f-f0c3a97f0245/unarchive" + "uri": "https://api.datadoghq.com/api/v2/cases/5fd92551-50b8-46e9-899d-5846cf3eab9e/unarchive" }, "response": { "body": { @@ -66,7 +66,7 @@ "message": "Bad Request" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:17 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:50 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Not-Found-response.frozen index 034f1d4aa..091e5f169 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Not-Found-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Not-Found-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.130Z \ No newline at end of file +2025-07-21T13:52:50.895Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Not-Found-response.json index 5196689a8..1780bf68d 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-Not-Found-response.json @@ -32,7 +32,7 @@ "message": "Not Found" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:18 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:50 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-OK-response.frozen index df7e85e9f..c118a3ee0 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-OK-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.220Z \ No newline at end of file +2025-07-21T13:52:51.279Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-OK-response.json b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-OK-response.json index 3576e2708..f5e9d5268 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Unarchive-case-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"56b03839-5199-4207-94e6-648f5c363d1d\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:18.285988591Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"56b03839-5199-4207-94e6-648f5c363d1d\",\"key\":\"DDFC-189\",\"priority\":\"P4\",\"public_id\":\"249\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"b6a0f192-9be6-4898-b05b-f4cc308de679\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:51.610535Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"b6a0f192-9be6-4898-b05b-f4cc308de679\",\"key\":\"DDFC-72324\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72384\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:18 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:51 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/56b03839-5199-4207-94e6-648f5c363d1d/unarchive" + "uri": "https://api.datadoghq.com/api/v2/cases/b6a0f192-9be6-4898-b05b-f4cc308de679/unarchive" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"56b03839-5199-4207-94e6-648f5c363d1d\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:18.285989Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"56b03839-5199-4207-94e6-648f5c363d1d\",\"key\":\"DDFC-189\",\"priority\":\"P4\",\"public_id\":\"249\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"b6a0f192-9be6-4898-b05b-f4cc308de679\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:51.610535Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"b6a0f192-9be6-4898-b05b-f4cc308de679\",\"key\":\"DDFC-72324\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72384\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:18 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:51 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Bad-Request-response.frozen index 5c53ccfe4..7b3f4dbd1 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.364Z \ No newline at end of file +2025-07-21T13:52:52.067Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Bad-Request-response.json index a7f751076..a29d3c338 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Bad-Request-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"4c89618c-11cc-40ba-bc6c-000e862910b1\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:18.434117143Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"4c89618c-11cc-40ba-bc6c-000e862910b1\",\"key\":\"DDFC-190\",\"priority\":\"P4\",\"public_id\":\"250\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"6e4af4e8-67fd-461a-9664-adf910673121\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:52.413703Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"6e4af4e8-67fd-461a-9664-adf910673121\",\"key\":\"DDFC-72325\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72385\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:18 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:52 GMT" }, { "request": { @@ -49,7 +49,7 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/4c89618c-11cc-40ba-bc6c-000e862910b1/unassign" + "uri": "https://api.datadoghq.com/api/v2/cases/6e4af4e8-67fd-461a-9664-adf910673121/unassign" }, "response": { "body": { @@ -66,7 +66,7 @@ "message": "Bad Request" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:18 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:52 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Not-Found-response.frozen index 6a08f9742..d41e392f8 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Not-Found-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Not-Found-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.522Z \ No newline at end of file +2025-07-21T13:52:52.854Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Not-Found-response.json index 56684f5cd..be734f52c 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-Not-Found-response.json @@ -32,7 +32,7 @@ "message": "Not Found" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:18 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:52 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-OK-response.frozen index e57766f0d..f5e55d102 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-OK-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.613Z \ No newline at end of file +2025-07-21T13:52:53.249Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-OK-response.json b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-OK-response.json index e77fc81b7..0cd51eaa1 100644 --- a/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Unassign-case-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"fa3c26fc-fada-4308-8888-4067d97acf06\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:18.689935858Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"fa3c26fc-fada-4308-8888-4067d97acf06\",\"key\":\"DDFC-191\",\"priority\":\"P4\",\"public_id\":\"251\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"b222e3e7-19fe-434f-ab26-7e0845775ccd\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:53.581415Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"b222e3e7-19fe-434f-ab26-7e0845775ccd\",\"key\":\"DDFC-72326\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72386\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:18 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:53 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/fa3c26fc-fada-4308-8888-4067d97acf06/unassign" + "uri": "https://api.datadoghq.com/api/v2/cases/b222e3e7-19fe-434f-ab26-7e0845775ccd/unassign" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"fa3c26fc-fada-4308-8888-4067d97acf06\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:18.689936Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"fa3c26fc-fada-4308-8888-4067d97acf06\",\"key\":\"DDFC-191\",\"priority\":\"P4\",\"public_id\":\"251\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"b222e3e7-19fe-434f-ab26-7e0845775ccd\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:53.581415Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"b222e3e7-19fe-434f-ab26-7e0845775ccd\",\"key\":\"DDFC-72326\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72386\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:18 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:53 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Bad-Request-response.frozen new file mode 100644 index 000000000..323ed8c60 --- /dev/null +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Bad-Request-response.frozen @@ -0,0 +1 @@ +2025-07-21T08:23:41.749Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Bad-Request-response.json new file mode 100644 index 000000000..3a11ac9d7 --- /dev/null +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Bad-Request-response.json @@ -0,0 +1,73 @@ +{ + "http_interactions": [ + { + "request": { + "body": { + "string": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}", + "encoding": null + }, + "headers": { + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json" + ] + }, + "method": "post", + "uri": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "body": { + "string": "{\"data\":{\"id\":\"0fac8699-2b39-4acb-b290-05a0fd19eb95\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T08:23:42.090561Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"0fac8699-2b39-4acb-b290-05a0fd19eb95\",\"key\":\"DDFC-72247\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72307\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "status": { + "code": 201, + "message": "Created" + } + }, + "recorded_at": "Mon, 21 Jul 2025 08:23:41 GMT" + }, + { + "request": { + "body": { + "string": "{\"data\":{\"attributes\":{\"attributes\":{\"service\":\"web-store\"}},\"type\":\"case\"}}", + "encoding": null + }, + "headers": { + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json" + ] + }, + "method": "post", + "uri": "https://api.datadoghq.com/api/v2/cases/0fac8699-2b39-4acb-b290-05a0fd19eb95/attributes" + }, + "response": { + "body": { + "string": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"error decoding attribute \\\"attributes\\\": invalid type string\"}]}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "status": { + "code": 400, + "message": "Bad Request" + } + }, + "recorded_at": "Mon, 21 Jul 2025 08:23:41 GMT" + } + ], + "recorded_with": "VCR 6.0.0" +} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Not-Found-response.frozen new file mode 100644 index 000000000..9cc9365f1 --- /dev/null +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Not-Found-response.frozen @@ -0,0 +1 @@ +2025-07-21T08:23:42.266Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Not-Found-response.json new file mode 100644 index 000000000..759ce56cc --- /dev/null +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-Not-Found-response.json @@ -0,0 +1,39 @@ +{ + "http_interactions": [ + { + "request": { + "body": { + "string": "{\"data\":{\"attributes\":{\"attributes\":{}},\"type\":\"case\"}}", + "encoding": null + }, + "headers": { + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json" + ] + }, + "method": "post", + "uri": "https://api.datadoghq.com/api/v2/cases/67d80aa3-36ff-44b9-a694-c501a7591737/attributes" + }, + "response": { + "body": { + "string": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"case not found\"}]}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "status": { + "code": 404, + "message": "Not Found" + } + }, + "recorded_at": "Mon, 21 Jul 2025 08:23:42 GMT" + } + ], + "recorded_with": "VCR 6.0.0" +} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-OK-response.frozen new file mode 100644 index 000000000..d438f1b5b --- /dev/null +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-OK-response.frozen @@ -0,0 +1 @@ +2025-07-21T18:43:31.851Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-OK-response.json b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-OK-response.json new file mode 100644 index 000000000..575f8e391 --- /dev/null +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-attributes-returns-OK-response.json @@ -0,0 +1,73 @@ +{ + "http_interactions": [ + { + "request": { + "body": { + "string": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}", + "encoding": null + }, + "headers": { + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json" + ] + }, + "method": "post", + "uri": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "body": { + "string": "{\"data\":{\"id\":\"f396c907-777d-4985-9e9d-2a420a0c0515\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T18:42:41.549781Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"f396c907-777d-4985-9e9d-2a420a0c0515\",\"key\":\"DDFC-72342\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72402\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "status": { + "code": 201, + "message": "Created" + } + }, + "recorded_at": "Mon, 21 Jul 2025 18:43:31 GMT" + }, + { + "request": { + "body": { + "string": "{\"data\":{\"attributes\":{\"attributes\":{\"env\":[\"test\"],\"service\":[\"web-store\",\"web-api\"],\"team\":[\"engineer\"]}},\"type\":\"case\"}}", + "encoding": null + }, + "headers": { + "Accept": [ + "application/json" + ], + "Content-Type": [ + "application/json" + ] + }, + "method": "post", + "uri": "https://api.datadoghq.com/api/v2/cases/f396c907-777d-4985-9e9d-2a420a0c0515/attributes" + }, + "response": { + "body": { + "string": "{\"data\":{\"id\":\"f396c907-777d-4985-9e9d-2a420a0c0515\",\"type\":\"case\",\"attributes\":{\"attributes\":{\"env\":[\"test\"],\"service\":[\"web-store\",\"web-api\"],\"team\":[\"engineer\"]},\"comment_count\":0,\"created_at\":\"2025-07-21T18:42:41.549781Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"f396c907-777d-4985-9e9d-2a420a0c0515\",\"key\":\"DDFC-72342\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-07-21T18:42:41.694883Z\",\"priority\":\"P4\",\"public_id\":\"72402\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", + "encoding": null + }, + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "status": { + "code": 200, + "message": "OK" + } + }, + "recorded_at": "Mon, 21 Jul 2025 18:43:31 GMT" + } + ], + "recorded_with": "VCR 6.0.0" +} \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Bad-Request-response.frozen index b44760c04..34a73d972 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.767Z \ No newline at end of file +2025-07-21T13:52:56.000Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Bad-Request-response.json index 21a6c7a2e..d5b659e3b 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Bad-Request-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"683c81be-fa27-42c8-957c-897923a2f660\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:18.846163387Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"683c81be-fa27-42c8-957c-897923a2f660\",\"key\":\"DDFC-192\",\"priority\":\"P4\",\"public_id\":\"252\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"57868e9a-2697-4384-b724-8e118b20a7f3\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:56.317328Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"57868e9a-2697-4384-b724-8e118b20a7f3\",\"key\":\"DDFC-72329\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72389\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:18 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:56 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/683c81be-fa27-42c8-957c-897923a2f660/priority" + "uri": "https://api.datadoghq.com/api/v2/cases/57868e9a-2697-4384-b724-8e118b20a7f3/priority" }, "response": { "body": { - "string": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid priority P1234. Must be one of P1, P2, P3, P4, P5, NOT_DEFINED\"}]}", + "string": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid priority P1234. Must be one of P2, P3, P4, P5, NOT_DEFINED, P1\"}]}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "Bad Request" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:18 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:56 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Not-Found-response.frozen index e6fee30e9..f6b3d2f69 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Not-Found-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Not-Found-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:18.927Z \ No newline at end of file +2025-07-21T13:52:56.765Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Not-Found-response.json index 048c4404b..332d082fb 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-Not-Found-response.json @@ -32,7 +32,7 @@ "message": "Not Found" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:18 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:56 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-OK-response.frozen index 42fe59de7..9b134590a 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-OK-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:19.004Z \ No newline at end of file +2025-07-21T13:52:57.162Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-OK-response.json b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-OK-response.json index 0197920d8..37888aa61 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-priority-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"c55de906-a08b-4916-ade3-5f1b268379c3\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:19.080339451Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"c55de906-a08b-4916-ade3-5f1b268379c3\",\"key\":\"DDFC-193\",\"priority\":\"P4\",\"public_id\":\"253\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"18014b24-6e64-4ca5-8cac-7ccbdd65258b\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:57.488697Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"18014b24-6e64-4ca5-8cac-7ccbdd65258b\",\"key\":\"DDFC-72330\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72390\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:19 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:57 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/c55de906-a08b-4916-ade3-5f1b268379c3/priority" + "uri": "https://api.datadoghq.com/api/v2/cases/18014b24-6e64-4ca5-8cac-7ccbdd65258b/priority" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"c55de906-a08b-4916-ade3-5f1b268379c3\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:19.080339Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"c55de906-a08b-4916-ade3-5f1b268379c3\",\"key\":\"DDFC-193\",\"modified_at\":\"2024-02-14T18:55:19.160763Z\",\"priority\":\"P3\",\"public_id\":\"253\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"18014b24-6e64-4ca5-8cac-7ccbdd65258b\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:57.488697Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"18014b24-6e64-4ca5-8cac-7ccbdd65258b\",\"key\":\"DDFC-72330\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-07-21T13:52:57.885095Z\",\"priority\":\"P3\",\"public_id\":\"72390\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:19 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:57 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Bad-Request-response.frozen b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Bad-Request-response.frozen index 1c1c338c0..f149d8dad 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Bad-Request-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Bad-Request-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:19.178Z \ No newline at end of file +2025-07-21T13:52:57.959Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Bad-Request-response.json b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Bad-Request-response.json index a24276848..e50d40b62 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Bad-Request-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Bad-Request-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"1732a7a1-667c-45e4-ad8c-73a1c1f9f6f0\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:19.251201316Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"1732a7a1-667c-45e4-ad8c-73a1c1f9f6f0\",\"key\":\"DDFC-194\",\"priority\":\"P4\",\"public_id\":\"254\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"98319575-b53b-43be-96b2-7595a5f1be6c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:58.293018Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"98319575-b53b-43be-96b2-7595a5f1be6c\",\"key\":\"DDFC-72331\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72391\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:19 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:57 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/1732a7a1-667c-45e4-ad8c-73a1c1f9f6f0/status" + "uri": "https://api.datadoghq.com/api/v2/cases/98319575-b53b-43be-96b2-7595a5f1be6c/status" }, "response": { "body": { - "string": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid status OPENED. Must be one of SUNKNOWN, OPEN, IN_PROGRESS, CLOSED\"}]}", + "string": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid status OPENED. Must be one of PENDING_APPROVAL, APPROVED, IMPLEMENTING, CANCELLED, SUNKNOWN, ACKNOWLEDGED, TRIGGERED, RESOLVED, COMPLETED, DECLINED, OPEN, IN_PROGRESS, CLOSED\"}]}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "Bad Request" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:19 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:57 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Not-Found-response.frozen b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Not-Found-response.frozen index 3725bea8b..ca65b4f9c 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Not-Found-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Not-Found-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:19.338Z \ No newline at end of file +2025-07-21T13:52:58.721Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Not-Found-response.json b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Not-Found-response.json index 896f80e9e..5eda968f8 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Not-Found-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-Not-Found-response.json @@ -32,7 +32,7 @@ "message": "Not Found" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:19 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:58 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-OK-response.frozen b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-OK-response.frozen index a7c1161cd..086a7bba2 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-OK-response.frozen +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-OK-response.frozen @@ -1 +1 @@ -2024-02-14T18:55:19.415Z \ No newline at end of file +2025-07-21T13:52:59.116Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-OK-response.json b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-OK-response.json index 6371842f7..cf34573f9 100644 --- a/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-OK-response.json +++ b/tests/scenarios/cassettes/v2/case_management/Update-case-status-returns-OK-response.json @@ -19,7 +19,7 @@ }, "response": { "body": { - "string": "{\"data\":{\"id\":\"d1633979-1770-4e5b-a2d0-2ede9f2a8f43\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:19.487094769Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"d1633979-1770-4e5b-a2d0-2ede9f2a8f43\",\"key\":\"DDFC-195\",\"priority\":\"P4\",\"public_id\":\"255\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"6d09fb31-6357-4f35-b1af-eaa0047f19f0\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:59.449985Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"6d09fb31-6357-4f35-b1af-eaa0047f19f0\",\"key\":\"DDFC-72332\",\"merge_status\":\"NOT_MERGED\",\"priority\":\"P4\",\"public_id\":\"72392\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -32,7 +32,7 @@ "message": "Created" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:19 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:59 GMT" }, { "request": { @@ -49,11 +49,11 @@ ] }, "method": "post", - "uri": "https://api.datadoghq.com/api/v2/cases/d1633979-1770-4e5b-a2d0-2ede9f2a8f43/status" + "uri": "https://api.datadoghq.com/api/v2/cases/6d09fb31-6357-4f35-b1af-eaa0047f19f0/status" }, "response": { "body": { - "string": "{\"data\":{\"id\":\"d1633979-1770-4e5b-a2d0-2ede9f2a8f43\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-14T18:55:19.487095Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"d1633979-1770-4e5b-a2d0-2ede9f2a8f43\",\"key\":\"DDFC-195\",\"modified_at\":\"2024-02-14T18:55:19.559421Z\",\"priority\":\"P4\",\"public_id\":\"255\",\"status\":\"IN_PROGRESS\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"\"}}]}", + "string": "{\"data\":{\"id\":\"6d09fb31-6357-4f35-b1af-eaa0047f19f0\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"comment_count\":0,\"created_at\":\"2025-07-21T13:52:59.449985Z\",\"creation_source\":\"MANUAL\",\"custom_attributes\":{},\"description\":\"\",\"insights\":[],\"internal_id\":\"6d09fb31-6357-4f35-b1af-eaa0047f19f0\",\"key\":\"DDFC-72332\",\"merge_status\":\"NOT_MERGED\",\"modified_at\":\"2025-07-21T13:52:59.835103Z\",\"priority\":\"P4\",\"public_id\":\"72392\",\"status\":\"IN_PROGRESS\",\"title\":\"My new case\",\"type\":\"STANDARD\",\"type_id\":\"00000000-0000-0000-0000-000000000001\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\",\"attributes\":{\"active\":true,\"email\":\"frog@datadoghq.com\",\"handle\":\"frog@datadoghq.com\",\"name\":\"frog\"}}]}", "encoding": null }, "headers": { @@ -66,7 +66,7 @@ "message": "OK" } }, - "recorded_at": "Wed, 14 Feb 2024 18:55:19 GMT" + "recorded_at": "Mon, 21 Jul 2025 13:52:59 GMT" } ], "recorded_with": "VCR 6.0.0" diff --git a/tests/scenarios/features/v2/case_management.feature b/tests/scenarios/features/v2/case_management.feature index e95b1dc1c..58c95f716 100644 --- a/tests/scenarios/features/v2/case_management.feature +++ b/tests/scenarios/features/v2/case_management.feature @@ -263,6 +263,32 @@ Feature: Case Management When the request is sent Then the response status is 200 OK + @skip @team:DataDog/case-management + Scenario: Update case attributes returns "Bad Request" response + Given new "UpdateAttributes" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value { "data": { "type": "case", "attributes": { "attributes": { "service": "web-store"}}}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Update case attributes returns "Not Found" response + Given new "UpdateAttributes" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value { "data": { "type": "case", "attributes": { "attributes": {} } } } + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Update case attributes returns "OK" response + Given new "UpdateAttributes" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"attributes": {"env": ["test"], "service": ["web-store", "web-api"], "team": ["engineer"]}}, "type": "case"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/case-management Scenario: Update case priority returns "Bad Request" response Given new "UpdatePriority" request diff --git a/tests/scenarios/features/v2/undo.json b/tests/scenarios/features/v2/undo.json index a1fe13fed..53bef5692 100644 --- a/tests/scenarios/features/v2/undo.json +++ b/tests/scenarios/features/v2/undo.json @@ -446,6 +446,12 @@ "type": "idempotent" } }, + "UpdateAttributes": { + "tag": "Case Management", + "undo": { + "type": "idempotent" + } + }, "UpdatePriority": { "tag": "Case Management", "undo": { diff --git a/tests/scenarios/function_mappings.rs b/tests/scenarios/function_mappings.rs index c70751eab..f6020c076 100644 --- a/tests/scenarios/function_mappings.rs +++ b/tests/scenarios/function_mappings.rs @@ -1965,6 +1965,9 @@ pub fn collect_function_calls(world: &mut DatadogWorld) { world .function_mappings .insert("v2.AssignCase".into(), test_v2_assign_case); + world + .function_mappings + .insert("v2.UpdateAttributes".into(), test_v2_update_attributes); world .function_mappings .insert("v2.UpdatePriority".into(), test_v2_update_priority); @@ -13285,6 +13288,32 @@ fn test_v2_assign_case(world: &mut DatadogWorld, _parameters: &HashMap) { + let api = world + .api_instances + .v2_api_case_management + .as_ref() + .expect("api instance not found"); + let case_id = serde_json::from_value(_parameters.get("case_id").unwrap().clone()).unwrap(); + let body = serde_json::from_value(_parameters.get("body").unwrap().clone()).unwrap(); + let response = match block_on(api.update_attributes_with_http_info(case_id, body)) { + Ok(response) => response, + Err(error) => { + return match error { + Error::ResponseError(e) => { + world.response.code = e.status.as_u16(); + if let Some(entity) = e.entity { + world.response.object = serde_json::to_value(entity).unwrap(); + } + } + _ => panic!("error parsing response: {error}"), + }; + } + }; + world.response.object = serde_json::to_value(response.entity).unwrap(); + world.response.code = response.status.as_u16(); +} + fn test_v2_update_priority(world: &mut DatadogWorld, _parameters: &HashMap) { let api = world .api_instances