datadog_api_client 2.20.0 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/.apigentools-info +4 -4
  3. data/.generator/conftest.py +5 -0
  4. data/.generator/schemas/v1/openapi.yaml +333 -128
  5. data/.generator/schemas/v2/openapi.yaml +2450 -131
  6. data/CHANGELOG.md +28 -0
  7. data/examples/v1/gcp-integration/CreateGCPIntegration.rb +3 -0
  8. data/examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.rb +25 -0
  9. data/examples/v1/synthetics/CreateSyntheticsAPITest_1279271422.rb +29 -0
  10. data/examples/v1/synthetics/UpdateBrowserTest.rb +1 -0
  11. data/examples/v2/case-management/ArchiveCase.rb +14 -0
  12. data/examples/v2/case-management/AssignCase.rb +20 -0
  13. data/examples/v2/case-management/CreateCase.rb +33 -0
  14. data/examples/v2/case-management/CreateProject.rb +15 -0
  15. data/examples/v2/case-management/DeleteProject.rb +5 -0
  16. data/examples/v2/case-management/GetCase.rb +8 -0
  17. data/examples/v2/case-management/GetProject.rb +5 -0
  18. data/examples/v2/case-management/GetProjects.rb +5 -0
  19. data/examples/v2/case-management/SearchCases.rb +5 -0
  20. data/examples/v2/case-management/SearchCases_3433960044.rb +5 -0
  21. data/examples/v2/case-management/UnarchiveCase.rb +14 -0
  22. data/examples/v2/case-management/UnassignCase.rb +14 -0
  23. data/examples/v2/case-management/UpdatePriority.rb +17 -0
  24. data/examples/v2/case-management/UpdateStatus.rb +17 -0
  25. data/examples/v2/cloud-workload-security/CreateCSMThreatsAgentRule.rb +17 -0
  26. data/examples/v2/cloud-workload-security/DeleteCSMThreatsAgentRule.rb +8 -0
  27. data/examples/v2/cloud-workload-security/DownloadCSMThreatsPolicy.rb +5 -0
  28. data/examples/v2/cloud-workload-security/GetCSMThreatsAgentRule.rb +8 -0
  29. data/examples/v2/cloud-workload-security/ListCSMThreatsAgentRules.rb +5 -0
  30. data/examples/v2/cloud-workload-security/UpdateCSMThreatsAgentRule.rb +20 -0
  31. data/examples/v2/dora-metrics/CreateDORAIncident.rb +6 -3
  32. data/examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.rb +18 -0
  33. data/examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.rb +21 -0
  34. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination.rb +31 -0
  35. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1091442807.rb +31 -0
  36. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_1288180912.rb +27 -0
  37. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_141236188.rb +32 -0
  38. data/examples/v2/logs-custom-destinations/CreateLogsCustomDestination_2184123765.rb +31 -0
  39. data/examples/v2/logs-custom-destinations/DeleteLogsCustomDestination.rb +8 -0
  40. data/examples/v2/logs-custom-destinations/GetLogsCustomDestination.rb +8 -0
  41. data/examples/v2/logs-custom-destinations/ListLogsCustomDestinations.rb +5 -0
  42. data/examples/v2/logs-custom-destinations/UpdateLogsCustomDestination.rb +18 -0
  43. data/examples/v2/metrics/ListMetricAssets.rb +5 -0
  44. data/lib/datadog_api_client/inflector.rb +112 -0
  45. data/lib/datadog_api_client/v1/api/monitors_api.rb +1 -3
  46. data/lib/datadog_api_client/v1/api/usage_metering_api.rb +5 -5
  47. data/lib/datadog_api_client/v1/models/gcp_account.rb +14 -1
  48. data/lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb +6 -0
  49. data/lib/datadog_api_client/v1/models/monitor_formula_and_function_events_data_source.rb +1 -0
  50. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_supported_metrics.rb +8 -0
  51. data/lib/datadog_api_client/v1/models/monthly_usage_attribution_values.rb +84 -4
  52. data/lib/datadog_api_client/v1/models/synthetics_api_step_subtype.rb +1 -0
  53. data/lib/datadog_api_client/v1/models/synthetics_test_request.rb +11 -1
  54. data/lib/datadog_api_client/v1/models/usage_attribution_body.rb +1 -1
  55. data/lib/datadog_api_client/v1/models/usage_attribution_sort.rb +2 -0
  56. data/lib/datadog_api_client/v1/models/usage_attribution_supported_metrics.rb +2 -0
  57. data/lib/datadog_api_client/v1/models/usage_summary_date.rb +81 -1
  58. data/lib/datadog_api_client/v1/models/usage_summary_date_org.rb +83 -3
  59. data/lib/datadog_api_client/v1/models/usage_summary_response.rb +182 -102
  60. data/lib/datadog_api_client/v2/api/case_management_api.rb +942 -0
  61. data/lib/datadog_api_client/v2/api/ci_visibility_tests_api.rb +2 -2
  62. data/lib/datadog_api_client/v2/api/cloud_workload_security_api.rb +392 -0
  63. data/lib/datadog_api_client/v2/api/incident_services_api.rb +15 -0
  64. data/lib/datadog_api_client/v2/api/logs_custom_destinations_api.rb +355 -0
  65. data/lib/datadog_api_client/v2/api/metrics_api.rb +69 -1
  66. data/lib/datadog_api_client/v2/api/service_definition_api.rb +2 -1
  67. data/lib/datadog_api_client/v2/api/usage_metering_api.rb +3 -3
  68. data/lib/datadog_api_client/v2/models/case.rb +150 -0
  69. data/lib/datadog_api_client/v2/models/case3rd_party_ticket_status.rb +28 -0
  70. data/lib/datadog_api_client/v2/models/case_assign.rb +119 -0
  71. data/lib/datadog_api_client/v2/models/case_assign_attributes.rb +98 -0
  72. data/lib/datadog_api_client/v2/models/case_assign_request.rb +98 -0
  73. data/lib/datadog_api_client/v2/models/case_attributes.rb +202 -0
  74. data/lib/datadog_api_client/v2/models/case_create.rb +129 -0
  75. data/lib/datadog_api_client/v2/models/case_create_attributes.rb +139 -0
  76. data/lib/datadog_api_client/v2/models/case_create_relationships.rb +116 -0
  77. data/lib/datadog_api_client/v2/models/case_create_request.rb +98 -0
  78. data/lib/datadog_api_client/v2/models/case_empty.rb +98 -0
  79. data/lib/datadog_api_client/v2/models/case_empty_request.rb +98 -0
  80. data/lib/datadog_api_client/v2/models/case_priority.rb +31 -0
  81. data/lib/datadog_api_client/v2/models/case_relationships.rb +120 -0
  82. data/lib/datadog_api_client/v2/models/case_resource_type.rb +26 -0
  83. data/lib/datadog_api_client/v2/models/case_response.rb +80 -0
  84. data/lib/datadog_api_client/v2/models/case_sortable_field.rb +28 -0
  85. data/lib/datadog_api_client/v2/models/case_status.rb +28 -0
  86. data/lib/datadog_api_client/v2/models/case_type.rb +26 -0
  87. data/lib/datadog_api_client/v2/models/case_update_priority.rb +119 -0
  88. data/lib/datadog_api_client/v2/models/case_update_priority_attributes.rb +98 -0
  89. data/lib/datadog_api_client/v2/models/case_update_priority_request.rb +98 -0
  90. data/lib/datadog_api_client/v2/models/case_update_status.rb +119 -0
  91. data/lib/datadog_api_client/v2/models/case_update_status_attributes.rb +98 -0
  92. data/lib/datadog_api_client/v2/models/case_update_status_request.rb +98 -0
  93. data/lib/datadog_api_client/v2/models/cases_response.rb +92 -0
  94. data/lib/datadog_api_client/v2/models/cases_response_meta.rb +80 -0
  95. data/lib/datadog_api_client/v2/models/cases_response_meta_pagination.rb +100 -0
  96. data/lib/datadog_api_client/v2/models/ci_app_aggregate_sort.rb +1 -1
  97. data/lib/datadog_api_client/v2/models/ci_app_pipelines_group_by.rb +1 -1
  98. data/lib/datadog_api_client/v2/models/ci_app_tests_group_by.rb +1 -1
  99. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_action.rb +90 -0
  100. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_attributes.rb +21 -1
  101. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_kill.rb +80 -0
  102. data/lib/datadog_api_client/v2/models/cloud_workload_security_agent_rule_update_data.rb +11 -1
  103. data/lib/datadog_api_client/v2/models/custom_destination_attribute_tags_restriction_list_type.rb +31 -0
  104. data/lib/datadog_api_client/v2/models/custom_destination_create_request.rb +80 -0
  105. data/lib/datadog_api_client/v2/models/custom_destination_create_request_attributes.rb +193 -0
  106. data/lib/datadog_api_client/v2/models/custom_destination_create_request_definition.rb +119 -0
  107. data/lib/datadog_api_client/v2/models/custom_destination_elasticsearch_destination_auth.rb +119 -0
  108. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination.rb +64 -0
  109. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch.rb +181 -0
  110. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_elasticsearch_type.rb +26 -0
  111. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http.rb +141 -0
  112. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_http_type.rb +26 -0
  113. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk.rb +141 -0
  114. data/lib/datadog_api_client/v2/models/custom_destination_forward_destination_splunk_type.rb +26 -0
  115. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth.rb +63 -0
  116. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic.rb +140 -0
  117. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_basic_type.rb +26 -0
  118. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header.rb +140 -0
  119. data/lib/datadog_api_client/v2/models/custom_destination_http_destination_auth_custom_header_type.rb +26 -0
  120. data/lib/datadog_api_client/v2/models/custom_destination_response.rb +80 -0
  121. data/lib/datadog_api_client/v2/models/custom_destination_response_attributes.rb +171 -0
  122. data/lib/datadog_api_client/v2/models/custom_destination_response_definition.rb +100 -0
  123. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination.rb +64 -0
  124. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch.rb +181 -0
  125. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_elasticsearch_type.rb +26 -0
  126. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http.rb +141 -0
  127. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_http_type.rb +26 -0
  128. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk.rb +120 -0
  129. data/lib/datadog_api_client/v2/models/custom_destination_response_forward_destination_splunk_type.rb +26 -0
  130. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth.rb +63 -0
  131. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic.rb +98 -0
  132. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_basic_type.rb +26 -0
  133. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header.rb +119 -0
  134. data/lib/datadog_api_client/v2/models/custom_destination_response_http_destination_auth_custom_header_type.rb +26 -0
  135. data/lib/datadog_api_client/v2/models/custom_destination_type.rb +26 -0
  136. data/lib/datadog_api_client/v2/models/custom_destination_update_request.rb +80 -0
  137. data/lib/datadog_api_client/v2/models/custom_destination_update_request_attributes.rb +169 -0
  138. data/lib/datadog_api_client/v2/models/custom_destination_update_request_definition.rb +129 -0
  139. data/lib/datadog_api_client/v2/models/custom_destinations_response.rb +82 -0
  140. data/lib/datadog_api_client/v2/models/dora_incident_request_attributes.rb +21 -20
  141. data/lib/datadog_api_client/v2/models/gcpsts_service_account_attributes.rb +14 -1
  142. data/lib/datadog_api_client/v2/models/jira_issue.rb +90 -0
  143. data/lib/datadog_api_client/v2/models/jira_issue_result.rb +110 -0
  144. data/lib/datadog_api_client/v2/models/logs_archive_integration_gcs.rb +1 -12
  145. data/lib/datadog_api_client/v2/models/metric_asset_attributes.rb +80 -0
  146. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationship.rb +90 -0
  147. data/lib/datadog_api_client/v2/models/metric_asset_dashboard_relationships.rb +82 -0
  148. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationship.rb +90 -0
  149. data/lib/datadog_api_client/v2/models/metric_asset_monitor_relationships.rb +82 -0
  150. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationship.rb +90 -0
  151. data/lib/datadog_api_client/v2/models/metric_asset_notebook_relationships.rb +82 -0
  152. data/lib/datadog_api_client/v2/models/metric_asset_response_data.rb +129 -0
  153. data/lib/datadog_api_client/v2/models/metric_asset_response_included.rb +65 -0
  154. data/lib/datadog_api_client/v2/models/metric_asset_response_relationships.rb +110 -0
  155. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationship.rb +90 -0
  156. data/lib/datadog_api_client/v2/models/metric_asset_slo_relationships.rb +82 -0
  157. data/lib/datadog_api_client/v2/models/metric_assets_response.rb +92 -0
  158. data/lib/datadog_api_client/v2/models/metric_dashboard_asset.rb +129 -0
  159. data/lib/datadog_api_client/v2/models/metric_dashboard_attributes.rb +112 -0
  160. data/lib/datadog_api_client/v2/models/metric_dashboard_type.rb +26 -0
  161. data/lib/datadog_api_client/v2/models/metric_monitor_asset.rb +129 -0
  162. data/lib/datadog_api_client/v2/models/metric_monitor_type.rb +26 -0
  163. data/lib/datadog_api_client/v2/models/metric_notebook_asset.rb +129 -0
  164. data/lib/datadog_api_client/v2/models/metric_notebook_type.rb +26 -0
  165. data/lib/datadog_api_client/v2/models/metric_slo_asset.rb +129 -0
  166. data/lib/datadog_api_client/v2/models/metric_slo_type.rb +26 -0
  167. data/lib/datadog_api_client/v2/models/nullable_user_relationship.rb +88 -0
  168. data/lib/datadog_api_client/v2/models/nullable_user_relationship_data.rb +119 -0
  169. data/lib/datadog_api_client/v2/models/project.rb +150 -0
  170. data/lib/datadog_api_client/v2/models/project_attributes.rb +90 -0
  171. data/lib/datadog_api_client/v2/models/project_create.rb +119 -0
  172. data/lib/datadog_api_client/v2/models/project_create_attributes.rb +119 -0
  173. data/lib/datadog_api_client/v2/models/project_create_request.rb +98 -0
  174. data/lib/datadog_api_client/v2/models/project_relationship.rb +98 -0
  175. data/lib/datadog_api_client/v2/models/project_relationship_data.rb +119 -0
  176. data/lib/datadog_api_client/v2/models/project_relationships.rb +90 -0
  177. data/lib/datadog_api_client/v2/models/project_resource_type.rb +26 -0
  178. data/lib/datadog_api_client/v2/models/project_response.rb +80 -0
  179. data/lib/datadog_api_client/v2/models/projects_response.rb +82 -0
  180. data/lib/datadog_api_client/v2/models/sensitive_data_scanner_standard_pattern_attributes.rb +1 -1
  181. data/lib/datadog_api_client/v2/models/service_now_ticket.rb +90 -0
  182. data/lib/datadog_api_client/v2/models/service_now_ticket_result.rb +80 -0
  183. data/lib/datadog_api_client/v2/models/user_relationship_data.rb +119 -0
  184. data/lib/datadog_api_client/v2/models/user_resource_type.rb +26 -0
  185. data/lib/datadog_api_client/v2/models/user_team_included.rb +62 -0
  186. data/lib/datadog_api_client/v2/models/user_team_response.rb +16 -4
  187. data/lib/datadog_api_client/v2/models/users_relationship.rb +100 -0
  188. data/lib/datadog_api_client/version.rb +1 -1
  189. metadata +147 -2
@@ -0,0 +1,942 @@
1
+ =begin
2
+ #Datadog API V2 Collection
3
+
4
+ #Collection of all Datadog Public endpoints.
5
+
6
+ The version of the OpenAPI document: 1.0
7
+ Contact: support@datadoghq.com
8
+ Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator
9
+
10
+ Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
11
+ This product includes software developed at Datadog (https://www.datadoghq.com/).
12
+ Copyright 2020-Present Datadog, Inc.
13
+
14
+ =end
15
+
16
+ require 'cgi'
17
+
18
+ module DatadogAPIClient::V2
19
+ class CaseManagementAPI
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = DatadogAPIClient::APIClient.default)
23
+ @api_client = api_client
24
+ end
25
+
26
+ # Archive case.
27
+ #
28
+ # @see #archive_case_with_http_info
29
+ def archive_case(case_id, body, opts = {})
30
+ data, _status_code, _headers = archive_case_with_http_info(case_id, body, opts)
31
+ data
32
+ end
33
+
34
+ # Archive case.
35
+ #
36
+ # Archive case
37
+ #
38
+ # @param case_id [String] Case's UUID or key
39
+ # @param body [CaseEmptyRequest] Archive case payload
40
+ # @param opts [Hash] the optional parameters
41
+ # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers
42
+ def archive_case_with_http_info(case_id, body, opts = {})
43
+
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.archive_case ...'
46
+ end
47
+ # verify the required parameter 'case_id' is set
48
+ if @api_client.config.client_side_validation && case_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.archive_case"
50
+ end
51
+ # verify the required parameter 'body' is set
52
+ if @api_client.config.client_side_validation && body.nil?
53
+ fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.archive_case"
54
+ end
55
+ # resource path
56
+ local_var_path = '/api/v2/cases/{case_id}/archive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/'))
57
+
58
+ # query parameters
59
+ query_params = opts[:query_params] || {}
60
+
61
+ # header parameters
62
+ header_params = opts[:header_params] || {}
63
+ # HTTP header 'Accept' (if needed)
64
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
65
+ # HTTP header 'Content-Type'
66
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
67
+
68
+ # form parameters
69
+ form_params = opts[:form_params] || {}
70
+
71
+ # http body (model)
72
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
73
+
74
+ # return_type
75
+ return_type = opts[:debug_return_type] || 'CaseResponse'
76
+
77
+ # auth_names
78
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
79
+
80
+ new_options = opts.merge(
81
+ :operation => :archive_case,
82
+ :header_params => header_params,
83
+ :query_params => query_params,
84
+ :form_params => form_params,
85
+ :body => post_body,
86
+ :auth_names => auth_names,
87
+ :return_type => return_type,
88
+ :api_version => "V2"
89
+ )
90
+
91
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
92
+ if @api_client.config.debugging
93
+ @api_client.config.logger.debug "API called: CaseManagementAPI#archive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
94
+ end
95
+ return data, status_code, headers
96
+ end
97
+
98
+ # Assign case.
99
+ #
100
+ # @see #assign_case_with_http_info
101
+ def assign_case(case_id, body, opts = {})
102
+ data, _status_code, _headers = assign_case_with_http_info(case_id, body, opts)
103
+ data
104
+ end
105
+
106
+ # Assign case.
107
+ #
108
+ # Assign case to a user
109
+ #
110
+ # @param case_id [String] Case's UUID or key
111
+ # @param body [CaseAssignRequest] Assign case payload
112
+ # @param opts [Hash] the optional parameters
113
+ # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers
114
+ def assign_case_with_http_info(case_id, body, opts = {})
115
+
116
+ if @api_client.config.debugging
117
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.assign_case ...'
118
+ end
119
+ # verify the required parameter 'case_id' is set
120
+ if @api_client.config.client_side_validation && case_id.nil?
121
+ fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.assign_case"
122
+ end
123
+ # verify the required parameter 'body' is set
124
+ if @api_client.config.client_side_validation && body.nil?
125
+ fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.assign_case"
126
+ end
127
+ # resource path
128
+ local_var_path = '/api/v2/cases/{case_id}/assign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/'))
129
+
130
+ # query parameters
131
+ query_params = opts[:query_params] || {}
132
+
133
+ # header parameters
134
+ header_params = opts[:header_params] || {}
135
+ # HTTP header 'Accept' (if needed)
136
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
137
+ # HTTP header 'Content-Type'
138
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
139
+
140
+ # form parameters
141
+ form_params = opts[:form_params] || {}
142
+
143
+ # http body (model)
144
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
145
+
146
+ # return_type
147
+ return_type = opts[:debug_return_type] || 'CaseResponse'
148
+
149
+ # auth_names
150
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
151
+
152
+ new_options = opts.merge(
153
+ :operation => :assign_case,
154
+ :header_params => header_params,
155
+ :query_params => query_params,
156
+ :form_params => form_params,
157
+ :body => post_body,
158
+ :auth_names => auth_names,
159
+ :return_type => return_type,
160
+ :api_version => "V2"
161
+ )
162
+
163
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "API called: CaseManagementAPI#assign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
166
+ end
167
+ return data, status_code, headers
168
+ end
169
+
170
+ # Create a case.
171
+ #
172
+ # @see #create_case_with_http_info
173
+ def create_case(body, opts = {})
174
+ data, _status_code, _headers = create_case_with_http_info(body, opts)
175
+ data
176
+ end
177
+
178
+ # Create a case.
179
+ #
180
+ # Create a Case
181
+ #
182
+ # @param body [CaseCreateRequest] Case payload
183
+ # @param opts [Hash] the optional parameters
184
+ # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers
185
+ def create_case_with_http_info(body, opts = {})
186
+
187
+ if @api_client.config.debugging
188
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_case ...'
189
+ end
190
+ # verify the required parameter 'body' is set
191
+ if @api_client.config.client_side_validation && body.nil?
192
+ fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_case"
193
+ end
194
+ # resource path
195
+ local_var_path = '/api/v2/cases'
196
+
197
+ # query parameters
198
+ query_params = opts[:query_params] || {}
199
+
200
+ # header parameters
201
+ header_params = opts[:header_params] || {}
202
+ # HTTP header 'Accept' (if needed)
203
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
204
+ # HTTP header 'Content-Type'
205
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
206
+
207
+ # form parameters
208
+ form_params = opts[:form_params] || {}
209
+
210
+ # http body (model)
211
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
212
+
213
+ # return_type
214
+ return_type = opts[:debug_return_type] || 'CaseResponse'
215
+
216
+ # auth_names
217
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
218
+
219
+ new_options = opts.merge(
220
+ :operation => :create_case,
221
+ :header_params => header_params,
222
+ :query_params => query_params,
223
+ :form_params => form_params,
224
+ :body => post_body,
225
+ :auth_names => auth_names,
226
+ :return_type => return_type,
227
+ :api_version => "V2"
228
+ )
229
+
230
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
231
+ if @api_client.config.debugging
232
+ @api_client.config.logger.debug "API called: CaseManagementAPI#create_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
233
+ end
234
+ return data, status_code, headers
235
+ end
236
+
237
+ # Create a project.
238
+ #
239
+ # @see #create_project_with_http_info
240
+ def create_project(body, opts = {})
241
+ data, _status_code, _headers = create_project_with_http_info(body, opts)
242
+ data
243
+ end
244
+
245
+ # Create a project.
246
+ #
247
+ # Create a project.
248
+ #
249
+ # @param body [ProjectCreateRequest] Project payload
250
+ # @param opts [Hash] the optional parameters
251
+ # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers
252
+ def create_project_with_http_info(body, opts = {})
253
+
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.create_project ...'
256
+ end
257
+ # verify the required parameter 'body' is set
258
+ if @api_client.config.client_side_validation && body.nil?
259
+ fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.create_project"
260
+ end
261
+ # resource path
262
+ local_var_path = '/api/v2/cases/projects'
263
+
264
+ # query parameters
265
+ query_params = opts[:query_params] || {}
266
+
267
+ # header parameters
268
+ header_params = opts[:header_params] || {}
269
+ # HTTP header 'Accept' (if needed)
270
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
271
+ # HTTP header 'Content-Type'
272
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
273
+
274
+ # form parameters
275
+ form_params = opts[:form_params] || {}
276
+
277
+ # http body (model)
278
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
279
+
280
+ # return_type
281
+ return_type = opts[:debug_return_type] || 'ProjectResponse'
282
+
283
+ # auth_names
284
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
285
+
286
+ new_options = opts.merge(
287
+ :operation => :create_project,
288
+ :header_params => header_params,
289
+ :query_params => query_params,
290
+ :form_params => form_params,
291
+ :body => post_body,
292
+ :auth_names => auth_names,
293
+ :return_type => return_type,
294
+ :api_version => "V2"
295
+ )
296
+
297
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
298
+ if @api_client.config.debugging
299
+ @api_client.config.logger.debug "API called: CaseManagementAPI#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
300
+ end
301
+ return data, status_code, headers
302
+ end
303
+
304
+ # Remove a project.
305
+ #
306
+ # @see #delete_project_with_http_info
307
+ def delete_project(project_id, opts = {})
308
+ delete_project_with_http_info(project_id, opts)
309
+ nil
310
+ end
311
+
312
+ # Remove a project.
313
+ #
314
+ # Remove a project using the project's `id`.
315
+ #
316
+ # @param project_id [String] Project UUID
317
+ # @param opts [Hash] the optional parameters
318
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
319
+ def delete_project_with_http_info(project_id, opts = {})
320
+
321
+ if @api_client.config.debugging
322
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.delete_project ...'
323
+ end
324
+ # verify the required parameter 'project_id' is set
325
+ if @api_client.config.client_side_validation && project_id.nil?
326
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.delete_project"
327
+ end
328
+ # resource path
329
+ local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/'))
330
+
331
+ # query parameters
332
+ query_params = opts[:query_params] || {}
333
+
334
+ # header parameters
335
+ header_params = opts[:header_params] || {}
336
+ # HTTP header 'Accept' (if needed)
337
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
338
+
339
+ # form parameters
340
+ form_params = opts[:form_params] || {}
341
+
342
+ # http body (model)
343
+ post_body = opts[:debug_body]
344
+
345
+ # return_type
346
+ return_type = opts[:debug_return_type]
347
+
348
+ # auth_names
349
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
350
+
351
+ new_options = opts.merge(
352
+ :operation => :delete_project,
353
+ :header_params => header_params,
354
+ :query_params => query_params,
355
+ :form_params => form_params,
356
+ :body => post_body,
357
+ :auth_names => auth_names,
358
+ :return_type => return_type,
359
+ :api_version => "V2"
360
+ )
361
+
362
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
363
+ if @api_client.config.debugging
364
+ @api_client.config.logger.debug "API called: CaseManagementAPI#delete_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
365
+ end
366
+ return data, status_code, headers
367
+ end
368
+
369
+ # Get the details of a case.
370
+ #
371
+ # @see #get_case_with_http_info
372
+ def get_case(case_id, opts = {})
373
+ data, _status_code, _headers = get_case_with_http_info(case_id, opts)
374
+ data
375
+ end
376
+
377
+ # Get the details of a case.
378
+ #
379
+ # Get the details of case by `case_id`
380
+ #
381
+ # @param case_id [String] Case's UUID or key
382
+ # @param opts [Hash] the optional parameters
383
+ # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers
384
+ def get_case_with_http_info(case_id, opts = {})
385
+
386
+ if @api_client.config.debugging
387
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_case ...'
388
+ end
389
+ # verify the required parameter 'case_id' is set
390
+ if @api_client.config.client_side_validation && case_id.nil?
391
+ fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.get_case"
392
+ end
393
+ # resource path
394
+ local_var_path = '/api/v2/cases/{case_id}'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/'))
395
+
396
+ # query parameters
397
+ query_params = opts[:query_params] || {}
398
+
399
+ # header parameters
400
+ header_params = opts[:header_params] || {}
401
+ # HTTP header 'Accept' (if needed)
402
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
403
+
404
+ # form parameters
405
+ form_params = opts[:form_params] || {}
406
+
407
+ # http body (model)
408
+ post_body = opts[:debug_body]
409
+
410
+ # return_type
411
+ return_type = opts[:debug_return_type] || 'CaseResponse'
412
+
413
+ # auth_names
414
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
415
+
416
+ new_options = opts.merge(
417
+ :operation => :get_case,
418
+ :header_params => header_params,
419
+ :query_params => query_params,
420
+ :form_params => form_params,
421
+ :body => post_body,
422
+ :auth_names => auth_names,
423
+ :return_type => return_type,
424
+ :api_version => "V2"
425
+ )
426
+
427
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
428
+ if @api_client.config.debugging
429
+ @api_client.config.logger.debug "API called: CaseManagementAPI#get_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
430
+ end
431
+ return data, status_code, headers
432
+ end
433
+
434
+ # Get the details of a project.
435
+ #
436
+ # @see #get_project_with_http_info
437
+ def get_project(project_id, opts = {})
438
+ data, _status_code, _headers = get_project_with_http_info(project_id, opts)
439
+ data
440
+ end
441
+
442
+ # Get the details of a project.
443
+ #
444
+ # Get the details of a project by `project_id`.
445
+ #
446
+ # @param project_id [String] Project UUID
447
+ # @param opts [Hash] the optional parameters
448
+ # @return [Array<(ProjectResponse, Integer, Hash)>] ProjectResponse data, response status code and response headers
449
+ def get_project_with_http_info(project_id, opts = {})
450
+
451
+ if @api_client.config.debugging
452
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_project ...'
453
+ end
454
+ # verify the required parameter 'project_id' is set
455
+ if @api_client.config.client_side_validation && project_id.nil?
456
+ fail ArgumentError, "Missing the required parameter 'project_id' when calling CaseManagementAPI.get_project"
457
+ end
458
+ # resource path
459
+ local_var_path = '/api/v2/cases/projects/{project_id}'.sub('{project_id}', CGI.escape(project_id.to_s).gsub('%2F', '/'))
460
+
461
+ # query parameters
462
+ query_params = opts[:query_params] || {}
463
+
464
+ # header parameters
465
+ header_params = opts[:header_params] || {}
466
+ # HTTP header 'Accept' (if needed)
467
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
468
+
469
+ # form parameters
470
+ form_params = opts[:form_params] || {}
471
+
472
+ # http body (model)
473
+ post_body = opts[:debug_body]
474
+
475
+ # return_type
476
+ return_type = opts[:debug_return_type] || 'ProjectResponse'
477
+
478
+ # auth_names
479
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
480
+
481
+ new_options = opts.merge(
482
+ :operation => :get_project,
483
+ :header_params => header_params,
484
+ :query_params => query_params,
485
+ :form_params => form_params,
486
+ :body => post_body,
487
+ :auth_names => auth_names,
488
+ :return_type => return_type,
489
+ :api_version => "V2"
490
+ )
491
+
492
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
493
+ if @api_client.config.debugging
494
+ @api_client.config.logger.debug "API called: CaseManagementAPI#get_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
495
+ end
496
+ return data, status_code, headers
497
+ end
498
+
499
+ # Get all projects.
500
+ #
501
+ # @see #get_projects_with_http_info
502
+ def get_projects(opts = {})
503
+ data, _status_code, _headers = get_projects_with_http_info(opts)
504
+ data
505
+ end
506
+
507
+ # Get all projects.
508
+ #
509
+ # Get all projects.
510
+ #
511
+ # @param opts [Hash] the optional parameters
512
+ # @return [Array<(ProjectsResponse, Integer, Hash)>] ProjectsResponse data, response status code and response headers
513
+ def get_projects_with_http_info(opts = {})
514
+
515
+ if @api_client.config.debugging
516
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.get_projects ...'
517
+ end
518
+ # resource path
519
+ local_var_path = '/api/v2/cases/projects'
520
+
521
+ # query parameters
522
+ query_params = opts[:query_params] || {}
523
+
524
+ # header parameters
525
+ header_params = opts[:header_params] || {}
526
+ # HTTP header 'Accept' (if needed)
527
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
528
+
529
+ # form parameters
530
+ form_params = opts[:form_params] || {}
531
+
532
+ # http body (model)
533
+ post_body = opts[:debug_body]
534
+
535
+ # return_type
536
+ return_type = opts[:debug_return_type] || 'ProjectsResponse'
537
+
538
+ # auth_names
539
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
540
+
541
+ new_options = opts.merge(
542
+ :operation => :get_projects,
543
+ :header_params => header_params,
544
+ :query_params => query_params,
545
+ :form_params => form_params,
546
+ :body => post_body,
547
+ :auth_names => auth_names,
548
+ :return_type => return_type,
549
+ :api_version => "V2"
550
+ )
551
+
552
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
553
+ if @api_client.config.debugging
554
+ @api_client.config.logger.debug "API called: CaseManagementAPI#get_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
555
+ end
556
+ return data, status_code, headers
557
+ end
558
+
559
+ # Search cases.
560
+ #
561
+ # @see #search_cases_with_http_info
562
+ def search_cases(opts = {})
563
+ data, _status_code, _headers = search_cases_with_http_info(opts)
564
+ data
565
+ end
566
+
567
+ # Search cases.
568
+ #
569
+ # Search cases.
570
+ #
571
+ # @param opts [Hash] the optional parameters
572
+ # @option opts [Integer] :page_size Size for a given page. The maximum allowed value is 100.
573
+ # @option opts [Integer] :page_offset Specific offset to use as the beginning of the returned page.
574
+ # @option opts [CaseSortableField] :sort_field Specify which field to sort
575
+ # @option opts [String] :filter Search query
576
+ # @option opts [Boolean] :sort_asc Specify if order is ascending or not
577
+ # @return [Array<(CasesResponse, Integer, Hash)>] CasesResponse data, response status code and response headers
578
+ def search_cases_with_http_info(opts = {})
579
+
580
+ if @api_client.config.debugging
581
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.search_cases ...'
582
+ end
583
+ allowable_values = ['created_at', 'priority', 'status']
584
+ if @api_client.config.client_side_validation && opts[:'sort_field'] && !allowable_values.include?(opts[:'sort_field'])
585
+ fail ArgumentError, "invalid value for \"sort_field\", must be one of #{allowable_values}"
586
+ end
587
+ # resource path
588
+ local_var_path = '/api/v2/cases'
589
+
590
+ # query parameters
591
+ query_params = opts[:query_params] || {}
592
+ query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
593
+ query_params[:'page[offset]'] = opts[:'page_offset'] if !opts[:'page_offset'].nil?
594
+ query_params[:'sort[field]'] = opts[:'sort_field'] if !opts[:'sort_field'].nil?
595
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
596
+ query_params[:'sort[asc]'] = opts[:'sort_asc'] if !opts[:'sort_asc'].nil?
597
+
598
+ # header parameters
599
+ header_params = opts[:header_params] || {}
600
+ # HTTP header 'Accept' (if needed)
601
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
602
+
603
+ # form parameters
604
+ form_params = opts[:form_params] || {}
605
+
606
+ # http body (model)
607
+ post_body = opts[:debug_body]
608
+
609
+ # return_type
610
+ return_type = opts[:debug_return_type] || 'CasesResponse'
611
+
612
+ # auth_names
613
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
614
+
615
+ new_options = opts.merge(
616
+ :operation => :search_cases,
617
+ :header_params => header_params,
618
+ :query_params => query_params,
619
+ :form_params => form_params,
620
+ :body => post_body,
621
+ :auth_names => auth_names,
622
+ :return_type => return_type,
623
+ :api_version => "V2"
624
+ )
625
+
626
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
627
+ if @api_client.config.debugging
628
+ @api_client.config.logger.debug "API called: CaseManagementAPI#search_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
629
+ end
630
+ return data, status_code, headers
631
+ end
632
+
633
+ # Search cases.
634
+ #
635
+ # Provide a paginated version of {#search_cases}, returning all items.
636
+ #
637
+ # To use it you need to use a block: search_cases_with_pagination { |item| p item }
638
+ #
639
+ # @yield [Case] Paginated items
640
+ def search_cases_with_pagination(opts = {})
641
+ api_version = "V2"
642
+ page_size = @api_client.get_attribute_from_path(opts, "page_size", 10)
643
+ @api_client.set_attribute_from_path(api_version, opts, "page_size", Integer, page_size)
644
+ while true do
645
+ response = search_cases(opts)
646
+ @api_client.get_attribute_from_path(response, "data").each { |item| yield(item) }
647
+ if @api_client.get_attribute_from_path(response, "data").length < page_size
648
+ break
649
+ end
650
+ @api_client.set_attribute_from_path(api_version, opts, "page_offset", Integer, @api_client.get_attribute_from_path(opts, "page_offset", 0) + page_size)
651
+ end
652
+ end
653
+
654
+ # Unarchive case.
655
+ #
656
+ # @see #unarchive_case_with_http_info
657
+ def unarchive_case(case_id, body, opts = {})
658
+ data, _status_code, _headers = unarchive_case_with_http_info(case_id, body, opts)
659
+ data
660
+ end
661
+
662
+ # Unarchive case.
663
+ #
664
+ # Unarchive case
665
+ #
666
+ # @param case_id [String] Case's UUID or key
667
+ # @param body [CaseEmptyRequest] Unarchive case payload
668
+ # @param opts [Hash] the optional parameters
669
+ # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers
670
+ def unarchive_case_with_http_info(case_id, body, opts = {})
671
+
672
+ if @api_client.config.debugging
673
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unarchive_case ...'
674
+ end
675
+ # verify the required parameter 'case_id' is set
676
+ if @api_client.config.client_side_validation && case_id.nil?
677
+ fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unarchive_case"
678
+ end
679
+ # verify the required parameter 'body' is set
680
+ if @api_client.config.client_side_validation && body.nil?
681
+ fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unarchive_case"
682
+ end
683
+ # resource path
684
+ local_var_path = '/api/v2/cases/{case_id}/unarchive'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/'))
685
+
686
+ # query parameters
687
+ query_params = opts[:query_params] || {}
688
+
689
+ # header parameters
690
+ header_params = opts[:header_params] || {}
691
+ # HTTP header 'Accept' (if needed)
692
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
693
+ # HTTP header 'Content-Type'
694
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
695
+
696
+ # form parameters
697
+ form_params = opts[:form_params] || {}
698
+
699
+ # http body (model)
700
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
701
+
702
+ # return_type
703
+ return_type = opts[:debug_return_type] || 'CaseResponse'
704
+
705
+ # auth_names
706
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
707
+
708
+ new_options = opts.merge(
709
+ :operation => :unarchive_case,
710
+ :header_params => header_params,
711
+ :query_params => query_params,
712
+ :form_params => form_params,
713
+ :body => post_body,
714
+ :auth_names => auth_names,
715
+ :return_type => return_type,
716
+ :api_version => "V2"
717
+ )
718
+
719
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
720
+ if @api_client.config.debugging
721
+ @api_client.config.logger.debug "API called: CaseManagementAPI#unarchive_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
722
+ end
723
+ return data, status_code, headers
724
+ end
725
+
726
+ # Unassign case.
727
+ #
728
+ # @see #unassign_case_with_http_info
729
+ def unassign_case(case_id, body, opts = {})
730
+ data, _status_code, _headers = unassign_case_with_http_info(case_id, body, opts)
731
+ data
732
+ end
733
+
734
+ # Unassign case.
735
+ #
736
+ # Unassign case
737
+ #
738
+ # @param case_id [String] Case's UUID or key
739
+ # @param body [CaseEmptyRequest] Unassign case payload
740
+ # @param opts [Hash] the optional parameters
741
+ # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers
742
+ def unassign_case_with_http_info(case_id, body, opts = {})
743
+
744
+ if @api_client.config.debugging
745
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.unassign_case ...'
746
+ end
747
+ # verify the required parameter 'case_id' is set
748
+ if @api_client.config.client_side_validation && case_id.nil?
749
+ fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.unassign_case"
750
+ end
751
+ # verify the required parameter 'body' is set
752
+ if @api_client.config.client_side_validation && body.nil?
753
+ fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.unassign_case"
754
+ end
755
+ # resource path
756
+ local_var_path = '/api/v2/cases/{case_id}/unassign'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/'))
757
+
758
+ # query parameters
759
+ query_params = opts[:query_params] || {}
760
+
761
+ # header parameters
762
+ header_params = opts[:header_params] || {}
763
+ # HTTP header 'Accept' (if needed)
764
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
765
+ # HTTP header 'Content-Type'
766
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
767
+
768
+ # form parameters
769
+ form_params = opts[:form_params] || {}
770
+
771
+ # http body (model)
772
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
773
+
774
+ # return_type
775
+ return_type = opts[:debug_return_type] || 'CaseResponse'
776
+
777
+ # auth_names
778
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
779
+
780
+ new_options = opts.merge(
781
+ :operation => :unassign_case,
782
+ :header_params => header_params,
783
+ :query_params => query_params,
784
+ :form_params => form_params,
785
+ :body => post_body,
786
+ :auth_names => auth_names,
787
+ :return_type => return_type,
788
+ :api_version => "V2"
789
+ )
790
+
791
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
792
+ if @api_client.config.debugging
793
+ @api_client.config.logger.debug "API called: CaseManagementAPI#unassign_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
794
+ end
795
+ return data, status_code, headers
796
+ end
797
+
798
+ # Update case priority.
799
+ #
800
+ # @see #update_priority_with_http_info
801
+ def update_priority(case_id, body, opts = {})
802
+ data, _status_code, _headers = update_priority_with_http_info(case_id, body, opts)
803
+ data
804
+ end
805
+
806
+ # Update case priority.
807
+ #
808
+ # Update case priority
809
+ #
810
+ # @param case_id [String] Case's UUID or key
811
+ # @param body [CaseUpdatePriorityRequest] Case priority update payload
812
+ # @param opts [Hash] the optional parameters
813
+ # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers
814
+ def update_priority_with_http_info(case_id, body, opts = {})
815
+
816
+ if @api_client.config.debugging
817
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_priority ...'
818
+ end
819
+ # verify the required parameter 'case_id' is set
820
+ if @api_client.config.client_side_validation && case_id.nil?
821
+ fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_priority"
822
+ end
823
+ # verify the required parameter 'body' is set
824
+ if @api_client.config.client_side_validation && body.nil?
825
+ fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_priority"
826
+ end
827
+ # resource path
828
+ local_var_path = '/api/v2/cases/{case_id}/priority'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/'))
829
+
830
+ # query parameters
831
+ query_params = opts[:query_params] || {}
832
+
833
+ # header parameters
834
+ header_params = opts[:header_params] || {}
835
+ # HTTP header 'Accept' (if needed)
836
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
837
+ # HTTP header 'Content-Type'
838
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
839
+
840
+ # form parameters
841
+ form_params = opts[:form_params] || {}
842
+
843
+ # http body (model)
844
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
845
+
846
+ # return_type
847
+ return_type = opts[:debug_return_type] || 'CaseResponse'
848
+
849
+ # auth_names
850
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
851
+
852
+ new_options = opts.merge(
853
+ :operation => :update_priority,
854
+ :header_params => header_params,
855
+ :query_params => query_params,
856
+ :form_params => form_params,
857
+ :body => post_body,
858
+ :auth_names => auth_names,
859
+ :return_type => return_type,
860
+ :api_version => "V2"
861
+ )
862
+
863
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
864
+ if @api_client.config.debugging
865
+ @api_client.config.logger.debug "API called: CaseManagementAPI#update_priority\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
866
+ end
867
+ return data, status_code, headers
868
+ end
869
+
870
+ # Update case status.
871
+ #
872
+ # @see #update_status_with_http_info
873
+ def update_status(case_id, body, opts = {})
874
+ data, _status_code, _headers = update_status_with_http_info(case_id, body, opts)
875
+ data
876
+ end
877
+
878
+ # Update case status.
879
+ #
880
+ # Update case status
881
+ #
882
+ # @param case_id [String] Case's UUID or key
883
+ # @param body [CaseUpdateStatusRequest] Case status update payload
884
+ # @param opts [Hash] the optional parameters
885
+ # @return [Array<(CaseResponse, Integer, Hash)>] CaseResponse data, response status code and response headers
886
+ def update_status_with_http_info(case_id, body, opts = {})
887
+
888
+ if @api_client.config.debugging
889
+ @api_client.config.logger.debug 'Calling API: CaseManagementAPI.update_status ...'
890
+ end
891
+ # verify the required parameter 'case_id' is set
892
+ if @api_client.config.client_side_validation && case_id.nil?
893
+ fail ArgumentError, "Missing the required parameter 'case_id' when calling CaseManagementAPI.update_status"
894
+ end
895
+ # verify the required parameter 'body' is set
896
+ if @api_client.config.client_side_validation && body.nil?
897
+ fail ArgumentError, "Missing the required parameter 'body' when calling CaseManagementAPI.update_status"
898
+ end
899
+ # resource path
900
+ local_var_path = '/api/v2/cases/{case_id}/status'.sub('{case_id}', CGI.escape(case_id.to_s).gsub('%2F', '/'))
901
+
902
+ # query parameters
903
+ query_params = opts[:query_params] || {}
904
+
905
+ # header parameters
906
+ header_params = opts[:header_params] || {}
907
+ # HTTP header 'Accept' (if needed)
908
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
909
+ # HTTP header 'Content-Type'
910
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
911
+
912
+ # form parameters
913
+ form_params = opts[:form_params] || {}
914
+
915
+ # http body (model)
916
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
917
+
918
+ # return_type
919
+ return_type = opts[:debug_return_type] || 'CaseResponse'
920
+
921
+ # auth_names
922
+ auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
923
+
924
+ new_options = opts.merge(
925
+ :operation => :update_status,
926
+ :header_params => header_params,
927
+ :query_params => query_params,
928
+ :form_params => form_params,
929
+ :body => post_body,
930
+ :auth_names => auth_names,
931
+ :return_type => return_type,
932
+ :api_version => "V2"
933
+ )
934
+
935
+ data, status_code, headers = @api_client.call_api(Net::HTTP::Post, local_var_path, new_options)
936
+ if @api_client.config.debugging
937
+ @api_client.config.logger.debug "API called: CaseManagementAPI#update_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
938
+ end
939
+ return data, status_code, headers
940
+ end
941
+ end
942
+ end