hubspot-api-client 17.0.0.pre.beta.1 → 17.0.0.pre.beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +20 -1
  3. data/Gemfile.lock +1 -1
  4. data/lib/hubspot/codegen/crm/associations/schema/api/types_api.rb +97 -0
  5. data/lib/hubspot/codegen/crm/associations/schema/api_client.rb +412 -0
  6. data/lib/hubspot/codegen/crm/associations/schema/api_error.rb +63 -0
  7. data/lib/hubspot/codegen/crm/associations/schema/configuration.rb +296 -0
  8. data/lib/hubspot/codegen/crm/associations/schema/models/associated_id.rb +244 -0
  9. data/lib/hubspot/codegen/crm/associations/schema/models/batch_input_public_association.rb +232 -0
  10. data/lib/hubspot/codegen/crm/associations/schema/models/batch_input_public_object_id.rb +232 -0
  11. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association.rb +328 -0
  12. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_multi.rb +328 -0
  13. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_multi_with_errors.rb +348 -0
  14. data/lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_with_errors.rb +348 -0
  15. data/lib/hubspot/codegen/crm/associations/schema/models/collection_response_public_association_definition_no_paging.rb +232 -0
  16. data/lib/hubspot/codegen/crm/associations/schema/models/error.rb +307 -0
  17. data/lib/hubspot/codegen/crm/associations/schema/models/error_category.rb +278 -0
  18. data/lib/hubspot/codegen/crm/associations/schema/models/error_detail.rb +273 -0
  19. data/lib/hubspot/codegen/crm/associations/schema/models/next_page.rb +239 -0
  20. data/lib/hubspot/codegen/crm/associations/schema/models/paging.rb +234 -0
  21. data/lib/hubspot/codegen/crm/associations/schema/models/previous_page.rb +239 -0
  22. data/lib/hubspot/codegen/crm/associations/schema/models/public_association.rb +258 -0
  23. data/lib/hubspot/codegen/crm/associations/schema/models/public_association_definition.rb +244 -0
  24. data/lib/hubspot/codegen/crm/associations/schema/models/public_association_multi.rb +256 -0
  25. data/lib/hubspot/codegen/crm/associations/schema/models/public_object_id.rb +231 -0
  26. data/lib/hubspot/codegen/crm/associations/schema/models/standard_error.rb +324 -0
  27. data/lib/hubspot/codegen/crm/associations/v4/api/basic_api.rb +365 -0
  28. data/lib/hubspot/codegen/crm/associations/v4/api/batch_api.rb +1 -1
  29. data/lib/hubspot/codegen/crm/associations/v4/api_client.rb +1 -1
  30. data/lib/hubspot/codegen/crm/associations/v4/api_error.rb +1 -1
  31. data/lib/hubspot/codegen/crm/associations/v4/configuration.rb +1 -1
  32. data/lib/hubspot/codegen/crm/associations/v4/models/associated_id.rb +244 -0
  33. data/lib/hubspot/codegen/crm/associations/v4/models/association_spec.rb +1 -1
  34. data/lib/hubspot/codegen/crm/associations/v4/models/association_spec_with_label.rb +1 -1
  35. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_association_multi_archive.rb +1 -1
  36. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_association_multi_post.rb +1 -1
  37. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_default_association_multi_post.rb +1 -1
  38. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_fetch_associations_batch_request.rb +1 -1
  39. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_batch_input.rb +232 -0
  40. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_id.rb +232 -0
  41. data/lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  42. data/lib/hubspot/codegen/crm/associations/v4/models/batch_read_input_simple_public_object_id.rb +273 -0
  43. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_labels_between_object_pair.rb +1 -1
  44. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_labels_between_object_pair_with_errors.rb +1 -1
  45. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_association_multi_with_label.rb +1 -1
  46. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_association_multi_with_label_with_errors.rb +1 -1
  47. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_default_association.rb +1 -1
  48. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_simple_public_object.rb +328 -0
  49. data/lib/hubspot/codegen/crm/associations/v4/models/batch_response_simple_public_object_with_errors.rb +348 -0
  50. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_associated_id.rb +241 -0
  51. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_association_spec_with_label_no_paging.rb +1 -1
  52. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_multi_associated_object_with_label_forward_paging.rb +241 -0
  53. data/lib/hubspot/codegen/crm/associations/v4/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  54. data/lib/hubspot/codegen/crm/associations/v4/models/error.rb +1 -1
  55. data/lib/hubspot/codegen/crm/associations/v4/models/error_category.rb +1 -1
  56. data/lib/hubspot/codegen/crm/associations/v4/models/error_detail.rb +1 -1
  57. data/lib/hubspot/codegen/crm/associations/v4/models/forward_paging.rb +225 -0
  58. data/lib/hubspot/codegen/crm/associations/v4/models/labels_between_object_pair.rb +1 -1
  59. data/lib/hubspot/codegen/crm/associations/v4/models/multi_associated_object_with_label.rb +1 -1
  60. data/lib/hubspot/codegen/crm/associations/v4/models/next_page.rb +1 -1
  61. data/lib/hubspot/codegen/crm/associations/v4/models/paging.rb +1 -1
  62. data/lib/hubspot/codegen/crm/associations/v4/models/previous_page.rb +1 -1
  63. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_definition_create_request.rb +1 -1
  64. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_definition_update_request.rb +1 -1
  65. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_archive.rb +1 -1
  66. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_post.rb +1 -1
  67. data/lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_with_label.rb +1 -1
  68. data/lib/hubspot/codegen/crm/associations/v4/models/public_associations_for_object.rb +246 -0
  69. data/lib/hubspot/codegen/crm/associations/v4/models/public_default_association.rb +1 -1
  70. data/lib/hubspot/codegen/crm/associations/v4/models/public_default_association_multi_post.rb +1 -1
  71. data/lib/hubspot/codegen/crm/associations/v4/models/public_fetch_associations_batch_request.rb +1 -1
  72. data/lib/hubspot/codegen/crm/associations/v4/models/public_gdpr_delete_input.rb +239 -0
  73. data/lib/hubspot/codegen/crm/associations/v4/models/public_object_id.rb +1 -1
  74. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object.rb +303 -0
  75. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_batch_input.rb +246 -0
  76. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_id.rb +230 -0
  77. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_input.rb +232 -0
  78. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_input_for_create.rb +248 -0
  79. data/lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_with_associations.rb +314 -0
  80. data/lib/hubspot/codegen/crm/associations/v4/models/standard_error.rb +1 -1
  81. data/lib/hubspot/codegen/crm/associations/v4/models/value_with_timestamp.rb +285 -0
  82. data/lib/hubspot/codegen/crm/associations/v4/schema/api/definitions_api.rb +334 -0
  83. data/lib/hubspot/codegen/crm/associations/v4/schema/api_client.rb +414 -0
  84. data/lib/hubspot/codegen/crm/associations/v4/schema/api_error.rb +65 -0
  85. data/lib/hubspot/codegen/crm/associations/v4/schema/configuration.rb +298 -0
  86. data/lib/hubspot/codegen/crm/associations/v4/schema/models/association_spec.rb +280 -0
  87. data/lib/hubspot/codegen/crm/associations/v4/schema/models/association_spec_with_label.rb +289 -0
  88. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_association_multi_archive.rb +234 -0
  89. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_association_multi_post.rb +234 -0
  90. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_default_association_multi_post.rb +234 -0
  91. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_fetch_associations_batch_request.rb +234 -0
  92. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_labels_between_object_pair.rb +330 -0
  93. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_labels_between_object_pair_with_errors.rb +350 -0
  94. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_association_multi_with_label.rb +330 -0
  95. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_association_multi_with_label_with_errors.rb +350 -0
  96. data/lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_default_association.rb +350 -0
  97. data/lib/hubspot/codegen/crm/associations/v4/schema/models/collection_response_association_spec_with_label_no_paging.rb +234 -0
  98. data/lib/hubspot/codegen/crm/associations/v4/schema/models/error.rb +309 -0
  99. data/lib/hubspot/codegen/crm/associations/v4/schema/models/error_category.rb +280 -0
  100. data/lib/hubspot/codegen/crm/associations/v4/schema/models/error_detail.rb +275 -0
  101. data/lib/hubspot/codegen/crm/associations/v4/schema/models/labels_between_object_pair.rb +290 -0
  102. data/lib/hubspot/codegen/crm/associations/v4/schema/models/multi_associated_object_with_label.rb +248 -0
  103. data/lib/hubspot/codegen/crm/associations/v4/schema/models/next_page.rb +241 -0
  104. data/lib/hubspot/codegen/crm/associations/v4/schema/models/paging.rb +236 -0
  105. data/lib/hubspot/codegen/crm/associations/v4/schema/models/previous_page.rb +241 -0
  106. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_definition_create_request.rb +246 -0
  107. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_definition_update_request.rb +246 -0
  108. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_archive.rb +248 -0
  109. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_post.rb +262 -0
  110. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_with_label.rb +257 -0
  111. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_default_association.rb +260 -0
  112. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_default_association_multi_post.rb +246 -0
  113. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_fetch_associations_batch_request.rb +241 -0
  114. data/lib/hubspot/codegen/crm/associations/v4/schema/models/public_object_id.rb +232 -0
  115. data/lib/hubspot/codegen/crm/associations/v4/schema/models/standard_error.rb +326 -0
  116. data/lib/hubspot/codegen/crm/objects/communications/api/basic_api.rb +391 -0
  117. data/lib/hubspot/codegen/crm/objects/communications/api/batch_api.rb +295 -0
  118. data/lib/hubspot/codegen/crm/objects/communications/api/public_object_api.rb +94 -0
  119. data/lib/hubspot/codegen/crm/objects/communications/api/search_api.rb +92 -0
  120. data/lib/hubspot/codegen/crm/objects/communications/api_client.rb +412 -0
  121. data/lib/hubspot/codegen/crm/objects/communications/api_error.rb +63 -0
  122. data/lib/hubspot/codegen/crm/objects/communications/configuration.rb +296 -0
  123. data/lib/hubspot/codegen/crm/objects/communications/models/associated_id.rb +244 -0
  124. data/lib/hubspot/codegen/crm/objects/communications/models/association_spec.rb +278 -0
  125. data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_batch_input.rb +232 -0
  126. data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_id.rb +232 -0
  127. data/lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_input_for_create.rb +232 -0
  128. data/lib/hubspot/codegen/crm/objects/communications/models/batch_read_input_simple_public_object_id.rb +273 -0
  129. data/lib/hubspot/codegen/crm/objects/communications/models/batch_response_simple_public_object.rb +328 -0
  130. data/lib/hubspot/codegen/crm/objects/communications/models/batch_response_simple_public_object_with_errors.rb +348 -0
  131. data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_associated_id.rb +241 -0
  132. data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_simple_public_object_with_associations_forward_paging.rb +241 -0
  133. data/lib/hubspot/codegen/crm/objects/communications/models/collection_response_with_total_simple_public_object_forward_paging.rb +255 -0
  134. data/lib/hubspot/codegen/crm/objects/communications/models/error.rb +307 -0
  135. data/lib/hubspot/codegen/crm/objects/communications/models/error_category.rb +278 -0
  136. data/lib/hubspot/codegen/crm/objects/communications/models/error_detail.rb +273 -0
  137. data/lib/hubspot/codegen/crm/objects/communications/models/filter.rb +308 -0
  138. data/lib/hubspot/codegen/crm/objects/communications/models/filter_group.rb +232 -0
  139. data/lib/hubspot/codegen/crm/objects/communications/models/forward_paging.rb +225 -0
  140. data/lib/hubspot/codegen/crm/objects/communications/models/next_page.rb +239 -0
  141. data/lib/hubspot/codegen/crm/objects/communications/models/paging.rb +234 -0
  142. data/lib/hubspot/codegen/crm/objects/communications/models/previous_page.rb +239 -0
  143. data/lib/hubspot/codegen/crm/objects/communications/models/public_associations_for_object.rb +246 -0
  144. data/lib/hubspot/codegen/crm/objects/communications/models/public_merge_input.rb +244 -0
  145. data/lib/hubspot/codegen/crm/objects/communications/models/public_object_id.rb +230 -0
  146. data/lib/hubspot/codegen/crm/objects/communications/models/public_object_search_request.rb +301 -0
  147. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object.rb +303 -0
  148. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_batch_input.rb +246 -0
  149. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_id.rb +230 -0
  150. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_input.rb +232 -0
  151. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_input_for_create.rb +248 -0
  152. data/lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_with_associations.rb +314 -0
  153. data/lib/hubspot/codegen/crm/objects/communications/models/standard_error.rb +324 -0
  154. data/lib/hubspot/codegen/crm/objects/communications/models/value_with_timestamp.rb +285 -0
  155. data/lib/hubspot/codegen/webhooks/models/error_category.rb +18 -18
  156. data/lib/hubspot/codegen/webhooks/models/subscription_create_request.rb +2 -2
  157. data/lib/hubspot/codegen/webhooks/models/subscription_response.rb +2 -2
  158. data/lib/hubspot/discovery/crm/associations/client.rb +4 -2
  159. data/lib/hubspot/discovery/crm/associations/schema/api/types_api.rb +15 -0
  160. data/lib/hubspot/discovery/crm/associations/schema/client.rb +20 -0
  161. data/lib/hubspot/discovery/crm/associations/v4/api/{definitions_api.rb → basic_api.rb} +1 -1
  162. data/lib/hubspot/discovery/crm/associations/v4/client.rb +6 -1
  163. data/lib/hubspot/discovery/crm/associations/v4/schema/api/definitions_api.rb +17 -0
  164. data/lib/hubspot/discovery/crm/associations/v4/schema/client.rb +22 -0
  165. data/lib/hubspot/discovery/crm/objects/client.rb +1 -0
  166. data/lib/hubspot/discovery/crm/objects/communications/api/basic_api.rb +15 -0
  167. data/lib/hubspot/discovery/crm/objects/communications/api/batch_api.rb +15 -0
  168. data/lib/hubspot/discovery/crm/objects/communications/api/public_object_api.rb +15 -0
  169. data/lib/hubspot/discovery/crm/objects/communications/api/search_api.rb +15 -0
  170. data/lib/hubspot/discovery/crm/objects/communications/client.rb +24 -0
  171. data/lib/hubspot/version.rb +1 -1
  172. data/spec/discovery/crm/associations/client_spec.rb +1 -0
  173. data/spec/discovery/crm/associations/schema/types_api_spec.rb +7 -0
  174. data/spec/discovery/crm/associations/v4/basic_api_spec.rb +10 -0
  175. data/spec/discovery/crm/associations/v4/client_spec.rb +7 -0
  176. data/spec/discovery/crm/associations/v4/{definitions_api_spec.rb → schema/definitions_api_spec.rb} +3 -3
  177. data/spec/discovery/crm/objects/client_spec.rb +1 -0
  178. data/spec/discovery/crm/objects/communications/basic_api_spec.rb +10 -0
  179. data/spec/discovery/crm/objects/communications/batch_api_spec.rb +10 -0
  180. data/spec/discovery/crm/objects/communications/public_object_api_spec.rb +7 -0
  181. data/spec/discovery/crm/objects/communications/search_api_spec.rb +7 -0
  182. metadata +145 -10
  183. data/lib/hubspot/codegen/crm/associations/api/types_api.rb +0 -95
  184. data/lib/hubspot/codegen/crm/associations/v4/api/definitions_api.rb +0 -332
  185. data/lib/hubspot/discovery/crm/associations/api/types_api.rb +0 -13
  186. data/spec/discovery/crm/associations/types_api_spec.rb +0 -7
@@ -0,0 +1,295 @@
1
+ =begin
2
+ #Communications
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Hubspot
16
+ module Crm
17
+ module Objects
18
+ module Communications
19
+ class BatchApi
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = ApiClient.default)
23
+ @api_client = api_client
24
+ end
25
+ # Archive a batch of Communications by ID
26
+ # @param batch_input_simple_public_object_id [BatchInputSimplePublicObjectId]
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [nil]
29
+ def archive(batch_input_simple_public_object_id, opts = {})
30
+ archive_with_http_info(batch_input_simple_public_object_id, opts)
31
+ nil
32
+ end
33
+
34
+ # Archive a batch of Communications by ID
35
+ # @param batch_input_simple_public_object_id [BatchInputSimplePublicObjectId]
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
38
+ def archive_with_http_info(batch_input_simple_public_object_id, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug 'Calling API: BatchApi.archive ...'
41
+ end
42
+ # verify the required parameter 'batch_input_simple_public_object_id' is set
43
+ if @api_client.config.client_side_validation && batch_input_simple_public_object_id.nil?
44
+ fail ArgumentError, "Missing the required parameter 'batch_input_simple_public_object_id' when calling BatchApi.archive"
45
+ end
46
+ # resource path
47
+ local_var_path = '/crm/v3/objects/Communications/batch/archive'
48
+
49
+ # query parameters
50
+ query_params = opts[:query_params] || {}
51
+
52
+ # header parameters
53
+ header_params = opts[:header_params] || {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
56
+ # HTTP header 'Content-Type'
57
+ content_type = @api_client.select_header_content_type(['application/json'])
58
+ if !content_type.nil?
59
+ header_params['Content-Type'] = content_type
60
+ end
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_simple_public_object_id)
67
+
68
+ # return_type
69
+ return_type = opts[:debug_return_type]
70
+
71
+ # auth_names
72
+ auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']
73
+
74
+ new_options = opts.merge(
75
+ :operation => :"BatchApi.archive",
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => return_type
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: BatchApi#archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+
91
+ # Create a batch of Communications
92
+ # @param batch_input_simple_public_object_input_for_create [BatchInputSimplePublicObjectInputForCreate]
93
+ # @param [Hash] opts the optional parameters
94
+ # @return [BatchResponseSimplePublicObject]
95
+ def create(batch_input_simple_public_object_input_for_create, opts = {})
96
+ data, _status_code, _headers = create_with_http_info(batch_input_simple_public_object_input_for_create, opts)
97
+ data
98
+ end
99
+
100
+ # Create a batch of Communications
101
+ # @param batch_input_simple_public_object_input_for_create [BatchInputSimplePublicObjectInputForCreate]
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [Array<(BatchResponseSimplePublicObject, Integer, Hash)>] BatchResponseSimplePublicObject data, response status code and response headers
104
+ def create_with_http_info(batch_input_simple_public_object_input_for_create, opts = {})
105
+ if @api_client.config.debugging
106
+ @api_client.config.logger.debug 'Calling API: BatchApi.create ...'
107
+ end
108
+ # verify the required parameter 'batch_input_simple_public_object_input_for_create' is set
109
+ if @api_client.config.client_side_validation && batch_input_simple_public_object_input_for_create.nil?
110
+ fail ArgumentError, "Missing the required parameter 'batch_input_simple_public_object_input_for_create' when calling BatchApi.create"
111
+ end
112
+ # resource path
113
+ local_var_path = '/crm/v3/objects/Communications/batch/create'
114
+
115
+ # query parameters
116
+ query_params = opts[:query_params] || {}
117
+
118
+ # header parameters
119
+ header_params = opts[:header_params] || {}
120
+ # HTTP header 'Accept' (if needed)
121
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
122
+ # HTTP header 'Content-Type'
123
+ content_type = @api_client.select_header_content_type(['application/json'])
124
+ if !content_type.nil?
125
+ header_params['Content-Type'] = content_type
126
+ end
127
+
128
+ # form parameters
129
+ form_params = opts[:form_params] || {}
130
+
131
+ # http body (model)
132
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_simple_public_object_input_for_create)
133
+
134
+ # return_type
135
+ return_type = opts[:debug_return_type] || 'BatchResponseSimplePublicObject'
136
+
137
+ # auth_names
138
+ auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']
139
+
140
+ new_options = opts.merge(
141
+ :operation => :"BatchApi.create",
142
+ :header_params => header_params,
143
+ :query_params => query_params,
144
+ :form_params => form_params,
145
+ :body => post_body,
146
+ :auth_names => auth_names,
147
+ :return_type => return_type
148
+ )
149
+
150
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
151
+ if @api_client.config.debugging
152
+ @api_client.config.logger.debug "API called: BatchApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
153
+ end
154
+ return data, status_code, headers
155
+ end
156
+
157
+ # Read a batch of Communications by internal ID, or unique property values
158
+ # @param batch_read_input_simple_public_object_id [BatchReadInputSimplePublicObjectId]
159
+ # @param [Hash] opts the optional parameters
160
+ # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false)
161
+ # @return [BatchResponseSimplePublicObject]
162
+ def read(batch_read_input_simple_public_object_id, opts = {})
163
+ data, _status_code, _headers = read_with_http_info(batch_read_input_simple_public_object_id, opts)
164
+ data
165
+ end
166
+
167
+ # Read a batch of Communications by internal ID, or unique property values
168
+ # @param batch_read_input_simple_public_object_id [BatchReadInputSimplePublicObjectId]
169
+ # @param [Hash] opts the optional parameters
170
+ # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false)
171
+ # @return [Array<(BatchResponseSimplePublicObject, Integer, Hash)>] BatchResponseSimplePublicObject data, response status code and response headers
172
+ def read_with_http_info(batch_read_input_simple_public_object_id, opts = {})
173
+ if @api_client.config.debugging
174
+ @api_client.config.logger.debug 'Calling API: BatchApi.read ...'
175
+ end
176
+ # verify the required parameter 'batch_read_input_simple_public_object_id' is set
177
+ if @api_client.config.client_side_validation && batch_read_input_simple_public_object_id.nil?
178
+ fail ArgumentError, "Missing the required parameter 'batch_read_input_simple_public_object_id' when calling BatchApi.read"
179
+ end
180
+ # resource path
181
+ local_var_path = '/crm/v3/objects/Communications/batch/read'
182
+
183
+ # query parameters
184
+ query_params = opts[:query_params] || {}
185
+ query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
186
+
187
+ # header parameters
188
+ header_params = opts[:header_params] || {}
189
+ # HTTP header 'Accept' (if needed)
190
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
191
+ # HTTP header 'Content-Type'
192
+ content_type = @api_client.select_header_content_type(['application/json'])
193
+ if !content_type.nil?
194
+ header_params['Content-Type'] = content_type
195
+ end
196
+
197
+ # form parameters
198
+ form_params = opts[:form_params] || {}
199
+
200
+ # http body (model)
201
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_read_input_simple_public_object_id)
202
+
203
+ # return_type
204
+ return_type = opts[:debug_return_type] || 'BatchResponseSimplePublicObject'
205
+
206
+ # auth_names
207
+ auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']
208
+
209
+ new_options = opts.merge(
210
+ :operation => :"BatchApi.read",
211
+ :header_params => header_params,
212
+ :query_params => query_params,
213
+ :form_params => form_params,
214
+ :body => post_body,
215
+ :auth_names => auth_names,
216
+ :return_type => return_type
217
+ )
218
+
219
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug "API called: BatchApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
222
+ end
223
+ return data, status_code, headers
224
+ end
225
+
226
+ # Update a batch of Communications
227
+ # @param batch_input_simple_public_object_batch_input [BatchInputSimplePublicObjectBatchInput]
228
+ # @param [Hash] opts the optional parameters
229
+ # @return [BatchResponseSimplePublicObject]
230
+ def update(batch_input_simple_public_object_batch_input, opts = {})
231
+ data, _status_code, _headers = update_with_http_info(batch_input_simple_public_object_batch_input, opts)
232
+ data
233
+ end
234
+
235
+ # Update a batch of Communications
236
+ # @param batch_input_simple_public_object_batch_input [BatchInputSimplePublicObjectBatchInput]
237
+ # @param [Hash] opts the optional parameters
238
+ # @return [Array<(BatchResponseSimplePublicObject, Integer, Hash)>] BatchResponseSimplePublicObject data, response status code and response headers
239
+ def update_with_http_info(batch_input_simple_public_object_batch_input, opts = {})
240
+ if @api_client.config.debugging
241
+ @api_client.config.logger.debug 'Calling API: BatchApi.update ...'
242
+ end
243
+ # verify the required parameter 'batch_input_simple_public_object_batch_input' is set
244
+ if @api_client.config.client_side_validation && batch_input_simple_public_object_batch_input.nil?
245
+ fail ArgumentError, "Missing the required parameter 'batch_input_simple_public_object_batch_input' when calling BatchApi.update"
246
+ end
247
+ # resource path
248
+ local_var_path = '/crm/v3/objects/Communications/batch/update'
249
+
250
+ # query parameters
251
+ query_params = opts[:query_params] || {}
252
+
253
+ # header parameters
254
+ header_params = opts[:header_params] || {}
255
+ # HTTP header 'Accept' (if needed)
256
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
257
+ # HTTP header 'Content-Type'
258
+ content_type = @api_client.select_header_content_type(['application/json'])
259
+ if !content_type.nil?
260
+ header_params['Content-Type'] = content_type
261
+ end
262
+
263
+ # form parameters
264
+ form_params = opts[:form_params] || {}
265
+
266
+ # http body (model)
267
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_simple_public_object_batch_input)
268
+
269
+ # return_type
270
+ return_type = opts[:debug_return_type] || 'BatchResponseSimplePublicObject'
271
+
272
+ # auth_names
273
+ auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']
274
+
275
+ new_options = opts.merge(
276
+ :operation => :"BatchApi.update",
277
+ :header_params => header_params,
278
+ :query_params => query_params,
279
+ :form_params => form_params,
280
+ :body => post_body,
281
+ :auth_names => auth_names,
282
+ :return_type => return_type
283
+ )
284
+
285
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
286
+ if @api_client.config.debugging
287
+ @api_client.config.logger.debug "API called: BatchApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
288
+ end
289
+ return data, status_code, headers
290
+ end
291
+ end
292
+ end
293
+ end
294
+ end
295
+ end
@@ -0,0 +1,94 @@
1
+ =begin
2
+ #Communications
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Hubspot
16
+ module Crm
17
+ module Objects
18
+ module Communications
19
+ class PublicObjectApi
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = ApiClient.default)
23
+ @api_client = api_client
24
+ end
25
+ # Merge two Communications with same type
26
+ # @param public_merge_input [PublicMergeInput]
27
+ # @param [Hash] opts the optional parameters
28
+ # @return [SimplePublicObject]
29
+ def merge(public_merge_input, opts = {})
30
+ data, _status_code, _headers = merge_with_http_info(public_merge_input, opts)
31
+ data
32
+ end
33
+
34
+ # Merge two Communications with same type
35
+ # @param public_merge_input [PublicMergeInput]
36
+ # @param [Hash] opts the optional parameters
37
+ # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
38
+ def merge_with_http_info(public_merge_input, opts = {})
39
+ if @api_client.config.debugging
40
+ @api_client.config.logger.debug 'Calling API: PublicObjectApi.merge ...'
41
+ end
42
+ # verify the required parameter 'public_merge_input' is set
43
+ if @api_client.config.client_side_validation && public_merge_input.nil?
44
+ fail ArgumentError, "Missing the required parameter 'public_merge_input' when calling PublicObjectApi.merge"
45
+ end
46
+ # resource path
47
+ local_var_path = '/crm/v3/objects/Communications/merge'
48
+
49
+ # query parameters
50
+ query_params = opts[:query_params] || {}
51
+
52
+ # header parameters
53
+ header_params = opts[:header_params] || {}
54
+ # HTTP header 'Accept' (if needed)
55
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
56
+ # HTTP header 'Content-Type'
57
+ content_type = @api_client.select_header_content_type(['application/json'])
58
+ if !content_type.nil?
59
+ header_params['Content-Type'] = content_type
60
+ end
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(public_merge_input)
67
+
68
+ # return_type
69
+ return_type = opts[:debug_return_type] || 'SimplePublicObject'
70
+
71
+ # auth_names
72
+ auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']
73
+
74
+ new_options = opts.merge(
75
+ :operation => :"PublicObjectApi.merge",
76
+ :header_params => header_params,
77
+ :query_params => query_params,
78
+ :form_params => form_params,
79
+ :body => post_body,
80
+ :auth_names => auth_names,
81
+ :return_type => return_type
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "API called: PublicObjectApi#merge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
87
+ end
88
+ return data, status_code, headers
89
+ end
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,92 @@
1
+ =begin
2
+ #Communications
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.2.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Hubspot
16
+ module Crm
17
+ module Objects
18
+ module Communications
19
+ class SearchApi
20
+ attr_accessor :api_client
21
+
22
+ def initialize(api_client = ApiClient.default)
23
+ @api_client = api_client
24
+ end
25
+ # @param public_object_search_request [PublicObjectSearchRequest]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [CollectionResponseWithTotalSimplePublicObjectForwardPaging]
28
+ def do_search(public_object_search_request, opts = {})
29
+ data, _status_code, _headers = do_search_with_http_info(public_object_search_request, opts)
30
+ data
31
+ end
32
+
33
+ # @param public_object_search_request [PublicObjectSearchRequest]
34
+ # @param [Hash] opts the optional parameters
35
+ # @return [Array<(CollectionResponseWithTotalSimplePublicObjectForwardPaging, Integer, Hash)>] CollectionResponseWithTotalSimplePublicObjectForwardPaging data, response status code and response headers
36
+ def do_search_with_http_info(public_object_search_request, opts = {})
37
+ if @api_client.config.debugging
38
+ @api_client.config.logger.debug 'Calling API: SearchApi.do_search ...'
39
+ end
40
+ # verify the required parameter 'public_object_search_request' is set
41
+ if @api_client.config.client_side_validation && public_object_search_request.nil?
42
+ fail ArgumentError, "Missing the required parameter 'public_object_search_request' when calling SearchApi.do_search"
43
+ end
44
+ # resource path
45
+ local_var_path = '/crm/v3/objects/Communications/search'
46
+
47
+ # query parameters
48
+ query_params = opts[:query_params] || {}
49
+
50
+ # header parameters
51
+ header_params = opts[:header_params] || {}
52
+ # HTTP header 'Accept' (if needed)
53
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
54
+ # HTTP header 'Content-Type'
55
+ content_type = @api_client.select_header_content_type(['application/json'])
56
+ if !content_type.nil?
57
+ header_params['Content-Type'] = content_type
58
+ end
59
+
60
+ # form parameters
61
+ form_params = opts[:form_params] || {}
62
+
63
+ # http body (model)
64
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(public_object_search_request)
65
+
66
+ # return_type
67
+ return_type = opts[:debug_return_type] || 'CollectionResponseWithTotalSimplePublicObjectForwardPaging'
68
+
69
+ # auth_names
70
+ auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']
71
+
72
+ new_options = opts.merge(
73
+ :operation => :"SearchApi.do_search",
74
+ :header_params => header_params,
75
+ :query_params => query_params,
76
+ :form_params => form_params,
77
+ :body => post_body,
78
+ :auth_names => auth_names,
79
+ :return_type => return_type
80
+ )
81
+
82
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: SearchApi#do_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end