hubspot-api-client 20.0.0.pre.beta.1 → 20.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (180) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +33 -1
  3. data/Gemfile.lock +2 -2
  4. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +91 -22
  5. data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +25 -17
  6. data/lib/hubspot/codegen/crm/companies/api/search_api.rb +4 -0
  7. data/lib/hubspot/codegen/crm/companies/models/association_spec.rb +12 -0
  8. data/lib/hubspot/codegen/crm/companies/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  9. data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +1 -0
  10. data/lib/hubspot/codegen/crm/companies/models/public_associations_for_object.rb +10 -0
  11. data/lib/hubspot/codegen/crm/companies/models/public_merge_input.rb +2 -0
  12. data/lib/hubspot/codegen/crm/companies/models/public_object_id.rb +6 -0
  13. data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +10 -1
  14. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input.rb +4 -0
  15. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input_for_create.rb +250 -0
  16. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input_upsert.rb +4 -0
  17. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input.rb +2 -10
  18. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input_for_create.rb +2 -10
  19. data/lib/hubspot/codegen/crm/companies/models/simple_public_object_with_associations.rb +10 -1
  20. data/lib/hubspot/codegen/crm/companies/models/simple_public_upsert_object.rb +10 -1
  21. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +163 -26
  22. data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +27 -19
  23. data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +4 -0
  24. data/lib/hubspot/codegen/crm/contacts/models/association_spec.rb +10 -0
  25. data/lib/hubspot/codegen/crm/contacts/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  26. data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +1 -0
  27. data/lib/hubspot/codegen/crm/contacts/models/public_associations_for_object.rb +10 -0
  28. data/lib/hubspot/codegen/crm/contacts/models/public_gdpr_delete_input.rb +2 -0
  29. data/lib/hubspot/codegen/crm/contacts/models/public_object_id.rb +5 -0
  30. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +10 -1
  31. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input.rb +2 -0
  32. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input_for_create.rb +250 -0
  33. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input_upsert.rb +1 -0
  34. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input.rb +1 -10
  35. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input_for_create.rb +1 -10
  36. data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_with_associations.rb +13 -1
  37. data/lib/hubspot/codegen/crm/contacts/models/simple_public_upsert_object.rb +10 -1
  38. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +67 -0
  39. data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +11 -9
  40. data/lib/hubspot/codegen/crm/deals/models/association_spec.rb +10 -0
  41. data/lib/hubspot/codegen/crm/deals/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  42. data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +1 -0
  43. data/lib/hubspot/codegen/crm/deals/models/public_associations_for_object.rb +10 -0
  44. data/lib/hubspot/codegen/crm/deals/models/public_object_id.rb +5 -0
  45. data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +10 -1
  46. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input.rb +2 -0
  47. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input_for_create.rb +250 -0
  48. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input_upsert.rb +1 -0
  49. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input.rb +1 -10
  50. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input_for_create.rb +1 -10
  51. data/lib/hubspot/codegen/crm/deals/models/simple_public_object_with_associations.rb +10 -1
  52. data/lib/hubspot/codegen/crm/deals/models/simple_public_upsert_object.rb +10 -1
  53. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +3 -2
  54. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +2 -0
  55. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id.rb +1 -0
  56. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object.rb +10 -1
  57. data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations.rb +10 -1
  58. data/lib/hubspot/codegen/crm/objects/goals/api/basic_api.rb +1 -0
  59. data/lib/hubspot/codegen/crm/objects/goals/api/batch_api.rb +11 -9
  60. data/lib/hubspot/codegen/crm/objects/goals/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  61. data/lib/hubspot/codegen/crm/objects/goals/models/batch_read_input_simple_public_object_id.rb +1 -0
  62. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object.rb +10 -1
  63. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input.rb +2 -0
  64. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input_for_create.rb +252 -0
  65. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input_upsert.rb +1 -0
  66. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input.rb +1 -10
  67. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input_for_create.rb +1 -15
  68. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_with_associations.rb +10 -1
  69. data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_upsert_object.rb +10 -1
  70. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +5 -4
  71. data/lib/hubspot/codegen/crm/products/api/batch_api.rb +11 -9
  72. data/lib/hubspot/codegen/crm/products/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  73. data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +1 -1
  74. data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +10 -1
  75. data/lib/hubspot/codegen/crm/products/models/simple_public_object_batch_input_for_create.rb +250 -0
  76. data/lib/hubspot/codegen/crm/products/models/simple_public_object_input.rb +1 -10
  77. data/lib/hubspot/codegen/crm/products/models/simple_public_object_input_for_create.rb +6 -10
  78. data/lib/hubspot/codegen/crm/products/models/simple_public_object_with_associations.rb +10 -1
  79. data/lib/hubspot/codegen/crm/products/models/simple_public_upsert_object.rb +10 -1
  80. data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +73 -4
  81. data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +17 -9
  82. data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +4 -0
  83. data/lib/hubspot/codegen/crm/tickets/models/association_spec.rb +10 -0
  84. data/lib/hubspot/codegen/crm/tickets/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
  85. data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +1 -0
  86. data/lib/hubspot/codegen/crm/tickets/models/public_associations_for_object.rb +10 -0
  87. data/lib/hubspot/codegen/crm/tickets/models/public_object_id.rb +5 -0
  88. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object.rb +10 -1
  89. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input.rb +2 -0
  90. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input_for_create.rb +250 -0
  91. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input_upsert.rb +1 -0
  92. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input.rb +1 -10
  93. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input_for_create.rb +1 -10
  94. data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_with_associations.rb +10 -1
  95. data/lib/hubspot/codegen/crm/tickets/models/simple_public_upsert_object.rb +10 -1
  96. data/lib/hubspot/codegen/files/api/files_api.rb +144 -104
  97. data/lib/hubspot/codegen/files/api/folders_api.rb +142 -57
  98. data/lib/hubspot/codegen/files/api_client.rb +1 -1
  99. data/lib/hubspot/codegen/files/api_error.rb +1 -1
  100. data/lib/hubspot/codegen/files/configuration.rb +1 -1
  101. data/lib/hubspot/codegen/files/models/collection_response_file.rb +2 -1
  102. data/lib/hubspot/codegen/files/models/collection_response_folder.rb +1 -1
  103. data/lib/hubspot/codegen/files/models/error.rb +1 -1
  104. data/lib/hubspot/codegen/files/models/error_detail.rb +1 -1
  105. data/lib/hubspot/codegen/files/models/file.rb +33 -14
  106. data/lib/hubspot/codegen/files/models/file_action_response.rb +1 -1
  107. data/lib/hubspot/codegen/files/models/file_stat.rb +1 -1
  108. data/lib/hubspot/codegen/files/models/file_update_input.rb +15 -5
  109. data/lib/hubspot/codegen/files/models/folder.rb +12 -12
  110. data/lib/hubspot/codegen/files/models/folder_action_response.rb +1 -1
  111. data/lib/hubspot/codegen/files/models/folder_input.rb +2 -1
  112. data/lib/hubspot/codegen/files/models/folder_update_input.rb +6 -20
  113. data/lib/hubspot/codegen/files/models/folder_update_input_with_id.rb +244 -0
  114. data/lib/hubspot/codegen/files/models/folder_update_task_locator.rb +2 -1
  115. data/lib/hubspot/codegen/files/models/import_from_url_input.rb +13 -4
  116. data/lib/hubspot/codegen/files/models/import_from_url_task_locator.rb +2 -1
  117. data/lib/hubspot/codegen/files/models/next_page.rb +1 -1
  118. data/lib/hubspot/codegen/files/models/paging.rb +1 -1
  119. data/lib/hubspot/codegen/files/models/previous_page.rb +1 -1
  120. data/lib/hubspot/codegen/files/models/signed_url.rb +18 -17
  121. data/lib/hubspot/codegen/files/models/standard_error.rb +1 -1
  122. data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +7 -3
  123. data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +13 -5
  124. data/lib/hubspot/codegen/oauth/api/tokens_api.rb +5 -1
  125. data/lib/hubspot/codegen/oauth/api_client.rb +2 -2
  126. data/lib/hubspot/codegen/oauth/api_error.rb +1 -1
  127. data/lib/hubspot/codegen/oauth/configuration.rb +1 -1
  128. data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +4 -4
  129. data/lib/hubspot/codegen/oauth/models/error.rb +4 -4
  130. data/lib/hubspot/codegen/oauth/models/error_detail.rb +4 -4
  131. data/lib/hubspot/codegen/oauth/models/refresh_token_info_response.rb +4 -4
  132. data/lib/hubspot/codegen/oauth/models/token_response_if.rb +4 -4
  133. data/lib/hubspot/discovery/cms/client.rb +0 -1
  134. data/lib/hubspot/discovery/crm/companies/client.rb +0 -1
  135. data/lib/hubspot/discovery/crm/contacts/client.rb +0 -2
  136. data/lib/hubspot/discovery/crm/deals/client.rb +0 -1
  137. data/lib/hubspot/discovery/crm/tickets/client.rb +0 -1
  138. data/lib/hubspot/discovery/oauth/api/access_tokens_api.rb +1 -1
  139. data/lib/hubspot/discovery/oauth/api/refresh_tokens_api.rb +1 -1
  140. data/lib/hubspot/discovery/oauth/api/tokens_api.rb +1 -1
  141. data/lib/hubspot/discovery/oauth/client.rb +1 -1
  142. data/lib/hubspot/helpers/camel_case.rb +0 -4
  143. data/lib/hubspot/version.rb +1 -1
  144. data/spec/discovery/cms/client_spec.rb +0 -1
  145. data/spec/discovery/crm/companies/basic_api_spec.rb +1 -0
  146. data/spec/discovery/crm/contacts/basic_api_spec.rb +1 -0
  147. data/spec/discovery/crm/deals/basic_api_spec.rb +1 -0
  148. data/spec/discovery/crm/tickets/basic_api_spec.rb +1 -0
  149. data/spec/discovery/files/files_api_spec.rb +2 -1
  150. data/spec/discovery/files/folders_api_spec.rb +1 -0
  151. data/spec/discovery/oauth/access_tokens_api_spec.rb +1 -1
  152. data/spec/discovery/oauth/refresh_tokens_api_spec.rb +1 -1
  153. data/spec/discovery/oauth/tokens_api_spec.rb +1 -1
  154. metadata +17 -42
  155. data/lib/hubspot/codegen/cms/performance/api/public_performance_api.rb +0 -188
  156. data/lib/hubspot/codegen/cms/performance/api_client.rb +0 -410
  157. data/lib/hubspot/codegen/cms/performance/api_error.rb +0 -61
  158. data/lib/hubspot/codegen/cms/performance/configuration.rb +0 -287
  159. data/lib/hubspot/codegen/cms/performance/models/error.rb +0 -305
  160. data/lib/hubspot/codegen/cms/performance/models/error_detail.rb +0 -271
  161. data/lib/hubspot/codegen/cms/performance/models/performance_view.rb +0 -526
  162. data/lib/hubspot/codegen/cms/performance/models/public_performance_response.rb +0 -345
  163. data/lib/hubspot/codegen/crm/companies/api/merge_api.rb +0 -92
  164. data/lib/hubspot/codegen/crm/contacts/api/gdpr_api.rb +0 -94
  165. data/lib/hubspot/codegen/crm/contacts/api/merge_api.rb +0 -92
  166. data/lib/hubspot/codegen/crm/deals/api/merge_api.rb +0 -92
  167. data/lib/hubspot/codegen/crm/tickets/api/merge_api.rb +0 -92
  168. data/lib/hubspot/discovery/cms/performance/api/public_performance_api.rb +0 -13
  169. data/lib/hubspot/discovery/cms/performance/client.rb +0 -19
  170. data/lib/hubspot/discovery/crm/companies/api/merge_api.rb +0 -13
  171. data/lib/hubspot/discovery/crm/contacts/api/gdpr_api.rb +0 -13
  172. data/lib/hubspot/discovery/crm/contacts/api/merge_api.rb +0 -13
  173. data/lib/hubspot/discovery/crm/deals/api/merge_api.rb +0 -13
  174. data/lib/hubspot/discovery/crm/tickets/api/merge_api.rb +0 -13
  175. data/spec/discovery/cms/performance/public_performance_api_spec.rb +0 -8
  176. data/spec/discovery/crm/companies/merge_api_spec.rb +0 -7
  177. data/spec/discovery/crm/contacts/gdpr_api_spec.rb +0 -7
  178. data/spec/discovery/crm/contacts/merge_api_spec.rb +0 -7
  179. data/spec/discovery/crm/deals/merge_api_spec.rb +0 -7
  180. data/spec/discovery/crm/tickets/merge_api_spec.rb +0 -7
@@ -29,6 +29,8 @@ module Hubspot
29
29
 
30
30
  attr_accessor :id
31
31
 
32
+ attr_accessor :object_write_trace_id
33
+
32
34
  attr_accessor :properties
33
35
 
34
36
  attr_accessor :updated_at
@@ -42,6 +44,7 @@ module Hubspot
42
44
  :'archived_at' => :'archivedAt',
43
45
  :'properties_with_history' => :'propertiesWithHistory',
44
46
  :'id' => :'id',
47
+ :'object_write_trace_id' => :'objectWriteTraceId',
45
48
  :'properties' => :'properties',
46
49
  :'updated_at' => :'updatedAt'
47
50
  }
@@ -61,6 +64,7 @@ module Hubspot
61
64
  :'archived_at' => :'Time',
62
65
  :'properties_with_history' => :'Hash<String, Array<ValueWithTimestamp>>',
63
66
  :'id' => :'String',
67
+ :'object_write_trace_id' => :'String',
64
68
  :'properties' => :'Hash<String, String>',
65
69
  :'updated_at' => :'Time'
66
70
  }
@@ -115,6 +119,10 @@ module Hubspot
115
119
  self.id = attributes[:'id']
116
120
  end
117
121
 
122
+ if attributes.key?(:'object_write_trace_id')
123
+ self.object_write_trace_id = attributes[:'object_write_trace_id']
124
+ end
125
+
118
126
  if attributes.key?(:'properties')
119
127
  if (value = attributes[:'properties']).is_a?(Hash)
120
128
  self.properties = value
@@ -170,6 +178,7 @@ module Hubspot
170
178
  archived_at == o.archived_at &&
171
179
  properties_with_history == o.properties_with_history &&
172
180
  id == o.id &&
181
+ object_write_trace_id == o.object_write_trace_id &&
173
182
  properties == o.properties &&
174
183
  updated_at == o.updated_at
175
184
  end
@@ -183,7 +192,7 @@ module Hubspot
183
192
  # Calculates hash code according to all attributes.
184
193
  # @return [Integer] Hash code
185
194
  def hash
186
- [associations, created_at, archived, archived_at, properties_with_history, id, properties, updated_at].hash
195
+ [associations, created_at, archived, archived_at, properties_with_history, id, object_write_trace_id, properties, updated_at].hash
187
196
  end
188
197
 
189
198
  # Builds the object from hash
@@ -29,6 +29,8 @@ module Hubspot
29
29
 
30
30
  attr_accessor :id
31
31
 
32
+ attr_accessor :object_write_trace_id
33
+
32
34
  attr_accessor :properties
33
35
 
34
36
  attr_accessor :updated_at
@@ -42,6 +44,7 @@ module Hubspot
42
44
  :'new' => :'new',
43
45
  :'properties_with_history' => :'propertiesWithHistory',
44
46
  :'id' => :'id',
47
+ :'object_write_trace_id' => :'objectWriteTraceId',
45
48
  :'properties' => :'properties',
46
49
  :'updated_at' => :'updatedAt'
47
50
  }
@@ -61,6 +64,7 @@ module Hubspot
61
64
  :'new' => :'Boolean',
62
65
  :'properties_with_history' => :'Hash<String, Array<ValueWithTimestamp>>',
63
66
  :'id' => :'String',
67
+ :'object_write_trace_id' => :'String',
64
68
  :'properties' => :'Hash<String, String>',
65
69
  :'updated_at' => :'Time'
66
70
  }
@@ -113,6 +117,10 @@ module Hubspot
113
117
  self.id = attributes[:'id']
114
118
  end
115
119
 
120
+ if attributes.key?(:'object_write_trace_id')
121
+ self.object_write_trace_id = attributes[:'object_write_trace_id']
122
+ end
123
+
116
124
  if attributes.key?(:'properties')
117
125
  if (value = attributes[:'properties']).is_a?(Hash)
118
126
  self.properties = value
@@ -173,6 +181,7 @@ module Hubspot
173
181
  new == o.new &&
174
182
  properties_with_history == o.properties_with_history &&
175
183
  id == o.id &&
184
+ object_write_trace_id == o.object_write_trace_id &&
176
185
  properties == o.properties &&
177
186
  updated_at == o.updated_at
178
187
  end
@@ -186,7 +195,7 @@ module Hubspot
186
195
  # Calculates hash code according to all attributes.
187
196
  # @return [Integer] Hash code
188
197
  def hash
189
- [created_at, archived, archived_at, new, properties_with_history, id, properties, updated_at].hash
198
+ [created_at, archived, archived_at, new, properties_with_history, id, object_write_trace_id, properties, updated_at].hash
190
199
  end
191
200
 
192
201
  # Builds the object from hash
@@ -16,6 +16,7 @@ module Hubspot
16
16
  module Crm
17
17
  module Tickets
18
18
  class BasicApi
19
+ require 'hubspot/helpers/get_all_helper'
19
20
  include Hubspot::Helpers::GetAllHelper
20
21
 
21
22
  attr_accessor :api_client
@@ -25,7 +26,7 @@ module Hubspot
25
26
  end
26
27
  # Archive
27
28
  # Move an Object identified by `{ticketId}` to the recycling bin.
28
- # @param ticket_id [String]
29
+ # @param ticket_id [String] The ID of the ticket to delete.
29
30
  # @param [Hash] opts the optional parameters
30
31
  # @return [nil]
31
32
  def archive(ticket_id, opts = {})
@@ -35,7 +36,7 @@ module Hubspot
35
36
 
36
37
  # Archive
37
38
  # Move an Object identified by &#x60;{ticketId}&#x60; to the recycling bin.
38
- # @param ticket_id [String]
39
+ # @param ticket_id [String] The ID of the ticket to delete.
39
40
  # @param [Hash] opts the optional parameters
40
41
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
41
42
  def archive_with_http_info(ticket_id, opts = {})
@@ -156,7 +157,7 @@ module Hubspot
156
157
 
157
158
  # Read
158
159
  # Read an Object identified by `{ticketId}`. `{ticketId}` refers to the internal object ID by default, or optionally any unique property value as specified by the `idProperty` query param. Control what is returned via the `properties` query param.
159
- # @param ticket_id [String]
160
+ # @param ticket_id [String] The ID of the ticket.
160
161
  # @param [Hash] opts the optional parameters
161
162
  # @option opts [Array<String>] :properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored.
162
163
  # @option opts [Array<String>] :properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored.
@@ -171,7 +172,7 @@ module Hubspot
171
172
 
172
173
  # Read
173
174
  # Read an Object identified by &#x60;{ticketId}&#x60;. &#x60;{ticketId}&#x60; refers to the internal object ID by default, or optionally any unique property value as specified by the &#x60;idProperty&#x60; query param. Control what is returned via the &#x60;properties&#x60; query param.
174
- # @param ticket_id [String]
175
+ # @param ticket_id [String] The ID of the ticket.
175
176
  # @param [Hash] opts the optional parameters
176
177
  # @option opts [Array<String>] :properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored.
177
178
  # @option opts [Array<String>] :properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored.
@@ -307,6 +308,74 @@ module Hubspot
307
308
  return data, status_code, headers
308
309
  end
309
310
 
311
+ # Merge two tickets
312
+ # Merge two tickets, combining them into one ticket record.
313
+ # @param public_merge_input [PublicMergeInput]
314
+ # @param [Hash] opts the optional parameters
315
+ # @return [SimplePublicObject]
316
+ def merge(public_merge_input, opts = {})
317
+ data, _status_code, _headers = merge_with_http_info(public_merge_input, opts)
318
+ data
319
+ end
320
+
321
+ # Merge two tickets
322
+ # Merge two tickets, combining them into one ticket record.
323
+ # @param public_merge_input [PublicMergeInput]
324
+ # @param [Hash] opts the optional parameters
325
+ # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
326
+ def merge_with_http_info(public_merge_input, opts = {})
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug 'Calling API: BasicApi.merge ...'
329
+ end
330
+ # verify the required parameter 'public_merge_input' is set
331
+ if @api_client.config.client_side_validation && public_merge_input.nil?
332
+ fail ArgumentError, "Missing the required parameter 'public_merge_input' when calling BasicApi.merge"
333
+ end
334
+ # resource path
335
+ local_var_path = '/crm/v3/objects/tickets/merge'
336
+
337
+ # query parameters
338
+ query_params = opts[:query_params] || {}
339
+
340
+ # header parameters
341
+ header_params = opts[:header_params] || {}
342
+ # HTTP header 'Accept' (if needed)
343
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
344
+ # HTTP header 'Content-Type'
345
+ content_type = @api_client.select_header_content_type(['application/json'])
346
+ if !content_type.nil?
347
+ header_params['Content-Type'] = content_type
348
+ end
349
+
350
+ # form parameters
351
+ form_params = opts[:form_params] || {}
352
+
353
+ # http body (model)
354
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(public_merge_input)
355
+
356
+ # return_type
357
+ return_type = opts[:debug_return_type] || 'SimplePublicObject'
358
+
359
+ # auth_names
360
+ auth_names = opts[:debug_auth_names] || ['oauth2']
361
+
362
+ new_options = opts.merge(
363
+ :operation => :"BasicApi.merge",
364
+ :header_params => header_params,
365
+ :query_params => query_params,
366
+ :form_params => form_params,
367
+ :body => post_body,
368
+ :auth_names => auth_names,
369
+ :return_type => return_type
370
+ )
371
+
372
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
373
+ if @api_client.config.debugging
374
+ @api_client.config.logger.debug "API called: BasicApi#merge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
375
+ end
376
+ return data, status_code, headers
377
+ end
378
+
310
379
  # Update
311
380
  # Perform a partial update of an Object identified by `{ticketId}`or optionally a unique property value as specified by the `idProperty` query param. `{ticketId}` refers to the internal object ID by default, and the `idProperty` query param refers to a property whose values are unique for the object. Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string.
312
381
  # @param ticket_id [String]
@@ -22,6 +22,7 @@ module Hubspot
22
22
  @api_client = api_client
23
23
  end
24
24
  # Archive a batch of tickets by ID
25
+ # Delete a batch of tickets by ID. Deleted tickets can be restored within 90 days of deletion. Learn more about [restoring records](https://knowledge.hubspot.com/records/restore-deleted-records).
25
26
  # @param batch_input_simple_public_object_id [BatchInputSimplePublicObjectId]
26
27
  # @param [Hash] opts the optional parameters
27
28
  # @return [nil]
@@ -31,6 +32,7 @@ module Hubspot
31
32
  end
32
33
 
33
34
  # Archive a batch of tickets by ID
35
+ # Delete a batch of tickets by ID. Deleted tickets can be restored within 90 days of deletion. Learn more about [restoring records](https://knowledge.hubspot.com/records/restore-deleted-records).
34
36
  # @param batch_input_simple_public_object_id [BatchInputSimplePublicObjectId]
35
37
  # @param [Hash] opts the optional parameters
36
38
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -88,25 +90,27 @@ module Hubspot
88
90
  end
89
91
 
90
92
  # Create a batch of tickets
91
- # @param batch_input_simple_public_object_input_for_create [BatchInputSimplePublicObjectInputForCreate]
93
+ # Create a batch of tickets. The `inputs` array can contain a `properties` object to define property values for the ticket, along with an `associations` array to define [associations](https://developers.hubspot.com/docs/guides/api/crm/associations/associations-v4) with other CRM records.
94
+ # @param batch_input_simple_public_object_batch_input_for_create [BatchInputSimplePublicObjectBatchInputForCreate]
92
95
  # @param [Hash] opts the optional parameters
93
96
  # @return [BatchResponseSimplePublicObject]
94
- def create(batch_input_simple_public_object_input_for_create, opts = {})
95
- data, _status_code, _headers = create_with_http_info(batch_input_simple_public_object_input_for_create, opts)
97
+ def create(batch_input_simple_public_object_batch_input_for_create, opts = {})
98
+ data, _status_code, _headers = create_with_http_info(batch_input_simple_public_object_batch_input_for_create, opts)
96
99
  data
97
100
  end
98
101
 
99
102
  # Create a batch of tickets
100
- # @param batch_input_simple_public_object_input_for_create [BatchInputSimplePublicObjectInputForCreate]
103
+ # Create a batch of tickets. The &#x60;inputs&#x60; array can contain a &#x60;properties&#x60; object to define property values for the ticket, along with an &#x60;associations&#x60; array to define [associations](https://developers.hubspot.com/docs/guides/api/crm/associations/associations-v4) with other CRM records.
104
+ # @param batch_input_simple_public_object_batch_input_for_create [BatchInputSimplePublicObjectBatchInputForCreate]
101
105
  # @param [Hash] opts the optional parameters
102
106
  # @return [Array<(BatchResponseSimplePublicObject, Integer, Hash)>] BatchResponseSimplePublicObject data, response status code and response headers
103
- def create_with_http_info(batch_input_simple_public_object_input_for_create, opts = {})
107
+ def create_with_http_info(batch_input_simple_public_object_batch_input_for_create, opts = {})
104
108
  if @api_client.config.debugging
105
109
  @api_client.config.logger.debug 'Calling API: BatchApi.create ...'
106
110
  end
107
- # verify the required parameter 'batch_input_simple_public_object_input_for_create' is set
108
- if @api_client.config.client_side_validation && batch_input_simple_public_object_input_for_create.nil?
109
- fail ArgumentError, "Missing the required parameter 'batch_input_simple_public_object_input_for_create' when calling BatchApi.create"
111
+ # verify the required parameter 'batch_input_simple_public_object_batch_input_for_create' is set
112
+ if @api_client.config.client_side_validation && batch_input_simple_public_object_batch_input_for_create.nil?
113
+ fail ArgumentError, "Missing the required parameter 'batch_input_simple_public_object_batch_input_for_create' when calling BatchApi.create"
110
114
  end
111
115
  # resource path
112
116
  local_var_path = '/crm/v3/objects/tickets/batch/create'
@@ -128,7 +132,7 @@ module Hubspot
128
132
  form_params = opts[:form_params] || {}
129
133
 
130
134
  # http body (model)
131
- post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_simple_public_object_input_for_create)
135
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(batch_input_simple_public_object_batch_input_for_create)
132
136
 
133
137
  # return_type
134
138
  return_type = opts[:debug_return_type] || 'BatchResponseSimplePublicObject'
@@ -154,6 +158,7 @@ module Hubspot
154
158
  end
155
159
 
156
160
  # Read a batch of tickets by internal ID, or unique property values
161
+ # Retrieve a batch of tickets by ID (`ticketId`) or unique property value (`idProperty`).
157
162
  # @param batch_read_input_simple_public_object_id [BatchReadInputSimplePublicObjectId]
158
163
  # @param [Hash] opts the optional parameters
159
164
  # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false)
@@ -164,6 +169,7 @@ module Hubspot
164
169
  end
165
170
 
166
171
  # Read a batch of tickets by internal ID, or unique property values
172
+ # Retrieve a batch of tickets by ID (&#x60;ticketId&#x60;) or unique property value (&#x60;idProperty&#x60;).
167
173
  # @param batch_read_input_simple_public_object_id [BatchReadInputSimplePublicObjectId]
168
174
  # @param [Hash] opts the optional parameters
169
175
  # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false)
@@ -223,6 +229,7 @@ module Hubspot
223
229
  end
224
230
 
225
231
  # Update a batch of tickets by internal ID, or unique property values
232
+ # Update a batch of tickets by ID (`ticketId`) or unique property value (`idProperty`). Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string.
226
233
  # @param batch_input_simple_public_object_batch_input [BatchInputSimplePublicObjectBatchInput]
227
234
  # @param [Hash] opts the optional parameters
228
235
  # @return [BatchResponseSimplePublicObject]
@@ -232,6 +239,7 @@ module Hubspot
232
239
  end
233
240
 
234
241
  # Update a batch of tickets by internal ID, or unique property values
242
+ # Update a batch of tickets by ID (&#x60;ticketId&#x60;) or unique property value (&#x60;idProperty&#x60;). Provided property values will be overwritten. Read-only and non-existent properties will result in an error. Properties values can be cleared by passing an empty string.
235
243
  # @param batch_input_simple_public_object_batch_input [BatchInputSimplePublicObjectBatchInput]
236
244
  # @param [Hash] opts the optional parameters
237
245
  # @return [Array<(BatchResponseSimplePublicObject, Integer, Hash)>] BatchResponseSimplePublicObject data, response status code and response headers
@@ -21,6 +21,8 @@ module Hubspot
21
21
  def initialize(api_client = ApiClient.default)
22
22
  @api_client = api_client
23
23
  end
24
+ # Search for tickets
25
+ # Search for tickets by filtering on properties, searching through associations, and sorting results. Learn more about [CRM search](https://developers.hubspot.com/docs/guides/api/crm/search#make-a-search-request).
24
26
  # @param public_object_search_request [PublicObjectSearchRequest]
25
27
  # @param [Hash] opts the optional parameters
26
28
  # @return [CollectionResponseWithTotalSimplePublicObjectForwardPaging]
@@ -29,6 +31,8 @@ module Hubspot
29
31
  data
30
32
  end
31
33
 
34
+ # Search for tickets
35
+ # Search for tickets by filtering on properties, searching through associations, and sorting results. Learn more about [CRM search](https://developers.hubspot.com/docs/guides/api/crm/search#make-a-search-request).
32
36
  # @param public_object_search_request [PublicObjectSearchRequest]
33
37
  # @param [Hash] opts the optional parameters
34
38
  # @return [Array<(CollectionResponseWithTotalSimplePublicObjectForwardPaging, Integer, Hash)>] CollectionResponseWithTotalSimplePublicObjectForwardPaging data, response status code and response headers
@@ -98,14 +98,24 @@ module Hubspot
98
98
  # @return Array for valid properties with the reasons
99
99
  def list_invalid_properties
100
100
  invalid_properties = Array.new
101
+ if @association_category.nil?
102
+ invalid_properties.push('invalid value for "association_category", association_category cannot be nil.')
103
+ end
104
+
105
+ if @association_type_id.nil?
106
+ invalid_properties.push('invalid value for "association_type_id", association_type_id cannot be nil.')
107
+ end
108
+
101
109
  invalid_properties
102
110
  end
103
111
 
104
112
  # Check to see if the all the properties in the model are valid
105
113
  # @return true if the model is valid
106
114
  def valid?
115
+ return false if @association_category.nil?
107
116
  association_category_validator = EnumAttributeValidator.new('String', ["HUBSPOT_DEFINED", "USER_DEFINED", "INTEGRATOR_DEFINED"])
108
117
  return false unless association_category_validator.valid?(@association_category)
118
+ return false if @association_type_id.nil?
109
119
  true
110
120
  end
111
121
 
@@ -16,7 +16,7 @@ require 'time'
16
16
  module Hubspot
17
17
  module Crm
18
18
  module Tickets
19
- class BatchInputSimplePublicObjectInputForCreate
19
+ class BatchInputSimplePublicObjectBatchInputForCreate
20
20
  attr_accessor :inputs
21
21
 
22
22
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -34,7 +34,7 @@ module Hubspot
34
34
  # Attribute type mapping.
35
35
  def self.openapi_types
36
36
  {
37
- :'inputs' => :'Array<SimplePublicObjectInputForCreate>'
37
+ :'inputs' => :'Array<SimplePublicObjectBatchInputForCreate>'
38
38
  }
39
39
  end
40
40
 
@@ -48,13 +48,13 @@ module Hubspot
48
48
  # @param [Hash] attributes Model attributes in the form of hash
49
49
  def initialize(attributes = {})
50
50
  if (!attributes.is_a?(Hash))
51
- fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Tickets::BatchInputSimplePublicObjectInputForCreate` initialize method"
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Tickets::BatchInputSimplePublicObjectBatchInputForCreate` initialize method"
52
52
  end
53
53
 
54
54
  # check to see if the attribute exists and convert string to symbol for hash key
55
55
  attributes = attributes.each_with_object({}) { |(k, v), h|
56
56
  if (!self.class.attribute_map.key?(k.to_sym))
57
- fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Tickets::BatchInputSimplePublicObjectInputForCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Tickets::BatchInputSimplePublicObjectBatchInputForCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
58
  end
59
59
  h[k.to_sym] = v
60
60
  }
@@ -19,6 +19,7 @@ module Hubspot
19
19
  class BatchReadInputSimplePublicObjectId
20
20
  attr_accessor :properties_with_history
21
21
 
22
+ # When using a custom unique value property to retrieve records, the name of the property. Do not include this parameter if retrieving by record ID.
22
23
  attr_accessor :id_property
23
24
 
24
25
  attr_accessor :inputs
@@ -78,12 +78,22 @@ module Hubspot
78
78
  # @return Array for valid properties with the reasons
79
79
  def list_invalid_properties
80
80
  invalid_properties = Array.new
81
+ if @types.nil?
82
+ invalid_properties.push('invalid value for "types", types cannot be nil.')
83
+ end
84
+
85
+ if @to.nil?
86
+ invalid_properties.push('invalid value for "to", to cannot be nil.')
87
+ end
88
+
81
89
  invalid_properties
82
90
  end
83
91
 
84
92
  # Check to see if the all the properties in the model are valid
85
93
  # @return true if the model is valid
86
94
  def valid?
95
+ return false if @types.nil?
96
+ return false if @to.nil?
87
97
  true
88
98
  end
89
99
 
@@ -68,12 +68,17 @@ module Hubspot
68
68
  # @return Array for valid properties with the reasons
69
69
  def list_invalid_properties
70
70
  invalid_properties = Array.new
71
+ if @id.nil?
72
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
73
+ end
74
+
71
75
  invalid_properties
72
76
  end
73
77
 
74
78
  # Check to see if the all the properties in the model are valid
75
79
  # @return true if the model is valid
76
80
  def valid?
81
+ return false if @id.nil?
77
82
  true
78
83
  end
79
84
 
@@ -27,6 +27,8 @@ module Hubspot
27
27
 
28
28
  attr_accessor :id
29
29
 
30
+ attr_accessor :object_write_trace_id
31
+
30
32
  attr_accessor :properties
31
33
 
32
34
  attr_accessor :updated_at
@@ -39,6 +41,7 @@ module Hubspot
39
41
  :'archived_at' => :'archivedAt',
40
42
  :'properties_with_history' => :'propertiesWithHistory',
41
43
  :'id' => :'id',
44
+ :'object_write_trace_id' => :'objectWriteTraceId',
42
45
  :'properties' => :'properties',
43
46
  :'updated_at' => :'updatedAt'
44
47
  }
@@ -57,6 +60,7 @@ module Hubspot
57
60
  :'archived_at' => :'Time',
58
61
  :'properties_with_history' => :'Hash<String, Array<ValueWithTimestamp>>',
59
62
  :'id' => :'String',
63
+ :'object_write_trace_id' => :'String',
60
64
  :'properties' => :'Hash<String, String>',
61
65
  :'updated_at' => :'Time'
62
66
  }
@@ -105,6 +109,10 @@ module Hubspot
105
109
  self.id = attributes[:'id']
106
110
  end
107
111
 
112
+ if attributes.key?(:'object_write_trace_id')
113
+ self.object_write_trace_id = attributes[:'object_write_trace_id']
114
+ end
115
+
108
116
  if attributes.key?(:'properties')
109
117
  if (value = attributes[:'properties']).is_a?(Hash)
110
118
  self.properties = value
@@ -159,6 +167,7 @@ module Hubspot
159
167
  archived_at == o.archived_at &&
160
168
  properties_with_history == o.properties_with_history &&
161
169
  id == o.id &&
170
+ object_write_trace_id == o.object_write_trace_id &&
162
171
  properties == o.properties &&
163
172
  updated_at == o.updated_at
164
173
  end
@@ -172,7 +181,7 @@ module Hubspot
172
181
  # Calculates hash code according to all attributes.
173
182
  # @return [Integer] Hash code
174
183
  def hash
175
- [created_at, archived, archived_at, properties_with_history, id, properties, updated_at].hash
184
+ [created_at, archived, archived_at, properties_with_history, id, object_write_trace_id, properties, updated_at].hash
176
185
  end
177
186
 
178
187
  # Builds the object from hash
@@ -17,10 +17,12 @@ module Hubspot
17
17
  module Crm
18
18
  module Tickets
19
19
  class SimplePublicObjectBatchInput
20
+ # The name of a property whose values are unique for this object
20
21
  attr_accessor :id_property
21
22
 
22
23
  attr_accessor :object_write_trace_id
23
24
 
25
+ # The id to be updated. This can be the object id, or the unique property value of the idProperty property
24
26
  attr_accessor :id
25
27
 
26
28
  attr_accessor :properties