hubspot-api-client 17.0.0.pre.beta.2 → 17.0.0.pre.beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +24 -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/discovery/crm/associations/client.rb +4 -2
  156. data/lib/hubspot/discovery/crm/associations/schema/api/types_api.rb +15 -0
  157. data/lib/hubspot/discovery/crm/associations/schema/client.rb +20 -0
  158. data/lib/hubspot/discovery/crm/associations/v4/api/{definitions_api.rb → basic_api.rb} +1 -1
  159. data/lib/hubspot/discovery/crm/associations/v4/client.rb +6 -1
  160. data/lib/hubspot/discovery/crm/associations/v4/schema/api/definitions_api.rb +17 -0
  161. data/lib/hubspot/discovery/crm/associations/v4/schema/client.rb +22 -0
  162. data/lib/hubspot/discovery/crm/objects/client.rb +1 -0
  163. data/lib/hubspot/discovery/crm/objects/communications/api/basic_api.rb +15 -0
  164. data/lib/hubspot/discovery/crm/objects/communications/api/batch_api.rb +15 -0
  165. data/lib/hubspot/discovery/crm/objects/communications/api/public_object_api.rb +15 -0
  166. data/lib/hubspot/discovery/crm/objects/communications/api/search_api.rb +15 -0
  167. data/lib/hubspot/discovery/crm/objects/communications/client.rb +24 -0
  168. data/lib/hubspot/exceptions.rb +9 -7
  169. data/lib/hubspot/helpers/association_type.rb +92 -0
  170. data/lib/hubspot/helpers/signature.rb +2 -2
  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. data/spec/helpers/signature_spec.rb +4 -3
  183. metadata +146 -11
  184. data/lib/hubspot/codegen/crm/associations/api/types_api.rb +0 -95
  185. data/lib/hubspot/codegen/crm/associations/v4/api/definitions_api.rb +0 -332
  186. data/lib/hubspot/discovery/crm/associations/api/types_api.rb +0 -13
  187. data/lib/hubspot/helpers/webhooks_helper.rb +0 -32
  188. data/spec/discovery/crm/associations/types_api_spec.rb +0 -7
@@ -1,10 +1,10 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe 'Hubspot::Discovery::Crm::Associations::V4::DefinitionsApi' do
4
- subject(:definitions_api) { Hubspot::Client.new(access_token: 'test').crm.associations.v4.definitions_api }
3
+ describe 'Hubspot::Discovery::Crm::Associations::V4::Schema::DefinitionsApi' do
4
+ subject(:definitions_api) { Hubspot::Client.new(access_token: 'test').crm.associations.v4.schema.definitions_api }
5
5
 
6
6
  it { is_expected.to respond_to(:get_all) }
7
- it { is_expected.to respond_to(:archive) }
7
+ it { is_expected.to respond_to(:delete) }
8
8
  it { is_expected.to respond_to(:create) }
9
9
  it { is_expected.to respond_to(:update) }
10
10
  end
@@ -4,6 +4,7 @@ describe 'Hubspot::Client' do
4
4
  subject(:client) { Hubspot::Client.new(access_token: 'test').crm.objects }
5
5
 
6
6
  it { is_expected.to respond_to(:calls) }
7
+ it { is_expected.to respond_to(:communications) }
7
8
  it { is_expected.to respond_to(:emails) }
8
9
  it { is_expected.to respond_to(:feedback_submissions) }
9
10
  it { is_expected.to respond_to(:meetings) }
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Hubspot::Discovery::Crm::Objects::Communications::BasicApi' do
4
+ subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.basic_api }
5
+
6
+ it { is_expected.to respond_to(:archive) }
7
+ it { is_expected.to respond_to(:create) }
8
+ it { is_expected.to respond_to(:get_by_id) }
9
+ it { is_expected.to respond_to(:get_page) }
10
+ end
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Hubspot::Discovery::Crm::Objects::Communications::BatchApi' do
4
+ subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.batch_api }
5
+
6
+ it { is_expected.to respond_to(:archive) }
7
+ it { is_expected.to respond_to(:create) }
8
+ it { is_expected.to respond_to(:read) }
9
+ it { is_expected.to respond_to(:update) }
10
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Hubspot::Discovery::Crm::Objects::Communications::PublicObjectApi' do
4
+ subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.public_object_api }
5
+
6
+ it { is_expected.to respond_to(:merge) }
7
+ end
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Hubspot::Discovery::Crm::Objects::Communications::SearchApi' do
4
+ subject(:api) { Hubspot::Client.new(access_token: 'test').crm.objects.communications.search_api }
5
+
6
+ it { is_expected.to respond_to(:do_search) }
7
+ end
@@ -1,5 +1,6 @@
1
1
  require 'date'
2
2
  require_relative "../../lib/hubspot/helpers/signature"
3
+ require_relative "../../lib/hubspot/exceptions"
3
4
 
4
5
  TEST_DATA = {
5
6
  :client_secret=> "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
@@ -49,7 +50,7 @@ describe "Hubspot::Helpers::Signature.get_signature" do
49
50
  client_secret: TEST_DATA[:client_secret],
50
51
  request_body: TEST_DATA[:request_body],
51
52
  signature_version: "wrong_signature_version"
52
- ) }.to raise_error(StandardError)
53
+ ) }.to raise_error(Hubspot::InvalidSignatureVersionError)
53
54
  end
54
55
 
55
56
  end
@@ -102,7 +103,7 @@ describe "Hubspot::Helpers::Signature.is_valid" do
102
103
  request_body: TEST_DATA[:request_body],
103
104
  http_uri: TEST_DATA[:http_uri],
104
105
  signature_version: "v3"
105
- ) }.to raise_error(StandardError)
106
+ ) }.to raise_error(Hubspot::InvalidSignatureTimestampError)
106
107
  end
107
108
  it "should raise exception if :signature_version=>v3 and :timestamp=>wrong_timestamp" do
108
109
  expect { signature.is_valid(
@@ -112,6 +113,6 @@ describe "Hubspot::Helpers::Signature.is_valid" do
112
113
  http_uri: TEST_DATA[:http_uri],
113
114
  timestamp: "wrong_timestamp",
114
115
  signature_version: "v3"
115
- ) }.to raise_error(StandardError)
116
+ ) }.to raise_error(Hubspot::InvalidSignatureTimestampError)
116
117
  end
117
118
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubspot-api-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 17.0.0.pre.beta.2
4
+ version: 17.0.0.pre.beta.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - HubSpot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-28 00:00:00.000000000 Z
11
+ date: 2023-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -429,7 +429,6 @@ files:
429
429
  - lib/hubspot/codegen/conversations/visitor_identification/models/identification_token_generation_request.rb
430
430
  - lib/hubspot/codegen/conversations/visitor_identification/models/identification_token_response.rb
431
431
  - lib/hubspot/codegen/crm/associations/api/batch_api.rb
432
- - lib/hubspot/codegen/crm/associations/api/types_api.rb
433
432
  - lib/hubspot/codegen/crm/associations/api_client.rb
434
433
  - lib/hubspot/codegen/crm/associations/api_error.rb
435
434
  - lib/hubspot/codegen/crm/associations/configuration.rb
@@ -452,26 +451,60 @@ files:
452
451
  - lib/hubspot/codegen/crm/associations/models/public_association_multi.rb
453
452
  - lib/hubspot/codegen/crm/associations/models/public_object_id.rb
454
453
  - lib/hubspot/codegen/crm/associations/models/standard_error.rb
454
+ - lib/hubspot/codegen/crm/associations/schema/api/types_api.rb
455
+ - lib/hubspot/codegen/crm/associations/schema/api_client.rb
456
+ - lib/hubspot/codegen/crm/associations/schema/api_error.rb
457
+ - lib/hubspot/codegen/crm/associations/schema/configuration.rb
458
+ - lib/hubspot/codegen/crm/associations/schema/models/associated_id.rb
459
+ - lib/hubspot/codegen/crm/associations/schema/models/batch_input_public_association.rb
460
+ - lib/hubspot/codegen/crm/associations/schema/models/batch_input_public_object_id.rb
461
+ - lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association.rb
462
+ - lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_multi.rb
463
+ - lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_multi_with_errors.rb
464
+ - lib/hubspot/codegen/crm/associations/schema/models/batch_response_public_association_with_errors.rb
465
+ - lib/hubspot/codegen/crm/associations/schema/models/collection_response_public_association_definition_no_paging.rb
466
+ - lib/hubspot/codegen/crm/associations/schema/models/error.rb
467
+ - lib/hubspot/codegen/crm/associations/schema/models/error_category.rb
468
+ - lib/hubspot/codegen/crm/associations/schema/models/error_detail.rb
469
+ - lib/hubspot/codegen/crm/associations/schema/models/next_page.rb
470
+ - lib/hubspot/codegen/crm/associations/schema/models/paging.rb
471
+ - lib/hubspot/codegen/crm/associations/schema/models/previous_page.rb
472
+ - lib/hubspot/codegen/crm/associations/schema/models/public_association.rb
473
+ - lib/hubspot/codegen/crm/associations/schema/models/public_association_definition.rb
474
+ - lib/hubspot/codegen/crm/associations/schema/models/public_association_multi.rb
475
+ - lib/hubspot/codegen/crm/associations/schema/models/public_object_id.rb
476
+ - lib/hubspot/codegen/crm/associations/schema/models/standard_error.rb
477
+ - lib/hubspot/codegen/crm/associations/v4/api/basic_api.rb
455
478
  - lib/hubspot/codegen/crm/associations/v4/api/batch_api.rb
456
- - lib/hubspot/codegen/crm/associations/v4/api/definitions_api.rb
457
479
  - lib/hubspot/codegen/crm/associations/v4/api_client.rb
458
480
  - lib/hubspot/codegen/crm/associations/v4/api_error.rb
459
481
  - lib/hubspot/codegen/crm/associations/v4/configuration.rb
482
+ - lib/hubspot/codegen/crm/associations/v4/models/associated_id.rb
460
483
  - lib/hubspot/codegen/crm/associations/v4/models/association_spec.rb
461
484
  - lib/hubspot/codegen/crm/associations/v4/models/association_spec_with_label.rb
462
485
  - lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_association_multi_archive.rb
463
486
  - lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_association_multi_post.rb
464
487
  - lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_default_association_multi_post.rb
465
488
  - lib/hubspot/codegen/crm/associations/v4/models/batch_input_public_fetch_associations_batch_request.rb
489
+ - lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_batch_input.rb
490
+ - lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_id.rb
491
+ - lib/hubspot/codegen/crm/associations/v4/models/batch_input_simple_public_object_input_for_create.rb
492
+ - lib/hubspot/codegen/crm/associations/v4/models/batch_read_input_simple_public_object_id.rb
466
493
  - lib/hubspot/codegen/crm/associations/v4/models/batch_response_labels_between_object_pair.rb
467
494
  - lib/hubspot/codegen/crm/associations/v4/models/batch_response_labels_between_object_pair_with_errors.rb
468
495
  - lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_association_multi_with_label.rb
469
496
  - lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_association_multi_with_label_with_errors.rb
470
497
  - lib/hubspot/codegen/crm/associations/v4/models/batch_response_public_default_association.rb
498
+ - lib/hubspot/codegen/crm/associations/v4/models/batch_response_simple_public_object.rb
499
+ - lib/hubspot/codegen/crm/associations/v4/models/batch_response_simple_public_object_with_errors.rb
500
+ - lib/hubspot/codegen/crm/associations/v4/models/collection_response_associated_id.rb
471
501
  - lib/hubspot/codegen/crm/associations/v4/models/collection_response_association_spec_with_label_no_paging.rb
502
+ - lib/hubspot/codegen/crm/associations/v4/models/collection_response_multi_associated_object_with_label_forward_paging.rb
503
+ - lib/hubspot/codegen/crm/associations/v4/models/collection_response_simple_public_object_with_associations_forward_paging.rb
472
504
  - lib/hubspot/codegen/crm/associations/v4/models/error.rb
473
505
  - lib/hubspot/codegen/crm/associations/v4/models/error_category.rb
474
506
  - lib/hubspot/codegen/crm/associations/v4/models/error_detail.rb
507
+ - lib/hubspot/codegen/crm/associations/v4/models/forward_paging.rb
475
508
  - lib/hubspot/codegen/crm/associations/v4/models/labels_between_object_pair.rb
476
509
  - lib/hubspot/codegen/crm/associations/v4/models/multi_associated_object_with_label.rb
477
510
  - lib/hubspot/codegen/crm/associations/v4/models/next_page.rb
@@ -482,11 +515,54 @@ files:
482
515
  - lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_archive.rb
483
516
  - lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_post.rb
484
517
  - lib/hubspot/codegen/crm/associations/v4/models/public_association_multi_with_label.rb
518
+ - lib/hubspot/codegen/crm/associations/v4/models/public_associations_for_object.rb
485
519
  - lib/hubspot/codegen/crm/associations/v4/models/public_default_association.rb
486
520
  - lib/hubspot/codegen/crm/associations/v4/models/public_default_association_multi_post.rb
487
521
  - lib/hubspot/codegen/crm/associations/v4/models/public_fetch_associations_batch_request.rb
522
+ - lib/hubspot/codegen/crm/associations/v4/models/public_gdpr_delete_input.rb
488
523
  - lib/hubspot/codegen/crm/associations/v4/models/public_object_id.rb
524
+ - lib/hubspot/codegen/crm/associations/v4/models/simple_public_object.rb
525
+ - lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_batch_input.rb
526
+ - lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_id.rb
527
+ - lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_input.rb
528
+ - lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_input_for_create.rb
529
+ - lib/hubspot/codegen/crm/associations/v4/models/simple_public_object_with_associations.rb
489
530
  - lib/hubspot/codegen/crm/associations/v4/models/standard_error.rb
531
+ - lib/hubspot/codegen/crm/associations/v4/models/value_with_timestamp.rb
532
+ - lib/hubspot/codegen/crm/associations/v4/schema/api/definitions_api.rb
533
+ - lib/hubspot/codegen/crm/associations/v4/schema/api_client.rb
534
+ - lib/hubspot/codegen/crm/associations/v4/schema/api_error.rb
535
+ - lib/hubspot/codegen/crm/associations/v4/schema/configuration.rb
536
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/association_spec.rb
537
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/association_spec_with_label.rb
538
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_association_multi_archive.rb
539
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_association_multi_post.rb
540
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_default_association_multi_post.rb
541
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/batch_input_public_fetch_associations_batch_request.rb
542
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_labels_between_object_pair.rb
543
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_labels_between_object_pair_with_errors.rb
544
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_association_multi_with_label.rb
545
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_association_multi_with_label_with_errors.rb
546
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/batch_response_public_default_association.rb
547
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/collection_response_association_spec_with_label_no_paging.rb
548
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/error.rb
549
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/error_category.rb
550
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/error_detail.rb
551
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/labels_between_object_pair.rb
552
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/multi_associated_object_with_label.rb
553
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/next_page.rb
554
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/paging.rb
555
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/previous_page.rb
556
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_definition_create_request.rb
557
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_definition_update_request.rb
558
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_archive.rb
559
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_post.rb
560
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/public_association_multi_with_label.rb
561
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/public_default_association.rb
562
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/public_default_association_multi_post.rb
563
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/public_fetch_associations_batch_request.rb
564
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/public_object_id.rb
565
+ - lib/hubspot/codegen/crm/associations/v4/schema/models/standard_error.rb
490
566
  - lib/hubspot/codegen/crm/companies/api/basic_api.rb
491
567
  - lib/hubspot/codegen/crm/companies/api/batch_api.rb
492
568
  - lib/hubspot/codegen/crm/companies/api/public_object_api.rb
@@ -797,6 +873,45 @@ files:
797
873
  - lib/hubspot/codegen/crm/objects/calls/models/simple_public_object_with_associations.rb
798
874
  - lib/hubspot/codegen/crm/objects/calls/models/standard_error.rb
799
875
  - lib/hubspot/codegen/crm/objects/calls/models/value_with_timestamp.rb
876
+ - lib/hubspot/codegen/crm/objects/communications/api/basic_api.rb
877
+ - lib/hubspot/codegen/crm/objects/communications/api/batch_api.rb
878
+ - lib/hubspot/codegen/crm/objects/communications/api/public_object_api.rb
879
+ - lib/hubspot/codegen/crm/objects/communications/api/search_api.rb
880
+ - lib/hubspot/codegen/crm/objects/communications/api_client.rb
881
+ - lib/hubspot/codegen/crm/objects/communications/api_error.rb
882
+ - lib/hubspot/codegen/crm/objects/communications/configuration.rb
883
+ - lib/hubspot/codegen/crm/objects/communications/models/associated_id.rb
884
+ - lib/hubspot/codegen/crm/objects/communications/models/association_spec.rb
885
+ - lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_batch_input.rb
886
+ - lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_id.rb
887
+ - lib/hubspot/codegen/crm/objects/communications/models/batch_input_simple_public_object_input_for_create.rb
888
+ - lib/hubspot/codegen/crm/objects/communications/models/batch_read_input_simple_public_object_id.rb
889
+ - lib/hubspot/codegen/crm/objects/communications/models/batch_response_simple_public_object.rb
890
+ - lib/hubspot/codegen/crm/objects/communications/models/batch_response_simple_public_object_with_errors.rb
891
+ - lib/hubspot/codegen/crm/objects/communications/models/collection_response_associated_id.rb
892
+ - lib/hubspot/codegen/crm/objects/communications/models/collection_response_simple_public_object_with_associations_forward_paging.rb
893
+ - lib/hubspot/codegen/crm/objects/communications/models/collection_response_with_total_simple_public_object_forward_paging.rb
894
+ - lib/hubspot/codegen/crm/objects/communications/models/error.rb
895
+ - lib/hubspot/codegen/crm/objects/communications/models/error_category.rb
896
+ - lib/hubspot/codegen/crm/objects/communications/models/error_detail.rb
897
+ - lib/hubspot/codegen/crm/objects/communications/models/filter.rb
898
+ - lib/hubspot/codegen/crm/objects/communications/models/filter_group.rb
899
+ - lib/hubspot/codegen/crm/objects/communications/models/forward_paging.rb
900
+ - lib/hubspot/codegen/crm/objects/communications/models/next_page.rb
901
+ - lib/hubspot/codegen/crm/objects/communications/models/paging.rb
902
+ - lib/hubspot/codegen/crm/objects/communications/models/previous_page.rb
903
+ - lib/hubspot/codegen/crm/objects/communications/models/public_associations_for_object.rb
904
+ - lib/hubspot/codegen/crm/objects/communications/models/public_merge_input.rb
905
+ - lib/hubspot/codegen/crm/objects/communications/models/public_object_id.rb
906
+ - lib/hubspot/codegen/crm/objects/communications/models/public_object_search_request.rb
907
+ - lib/hubspot/codegen/crm/objects/communications/models/simple_public_object.rb
908
+ - lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_batch_input.rb
909
+ - lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_id.rb
910
+ - lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_input.rb
911
+ - lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_input_for_create.rb
912
+ - lib/hubspot/codegen/crm/objects/communications/models/simple_public_object_with_associations.rb
913
+ - lib/hubspot/codegen/crm/objects/communications/models/standard_error.rb
914
+ - lib/hubspot/codegen/crm/objects/communications/models/value_with_timestamp.rb
800
915
  - lib/hubspot/codegen/crm/objects/configuration.rb
801
916
  - lib/hubspot/codegen/crm/objects/emails/api/basic_api.rb
802
917
  - lib/hubspot/codegen/crm/objects/emails/api/batch_api.rb
@@ -1508,11 +1623,14 @@ files:
1508
1623
  - lib/hubspot/discovery/conversations/visitor_identification/api/generate_api.rb
1509
1624
  - lib/hubspot/discovery/conversations/visitor_identification/client.rb
1510
1625
  - lib/hubspot/discovery/crm/associations/api/batch_api.rb
1511
- - lib/hubspot/discovery/crm/associations/api/types_api.rb
1512
1626
  - lib/hubspot/discovery/crm/associations/client.rb
1627
+ - lib/hubspot/discovery/crm/associations/schema/api/types_api.rb
1628
+ - lib/hubspot/discovery/crm/associations/schema/client.rb
1629
+ - lib/hubspot/discovery/crm/associations/v4/api/basic_api.rb
1513
1630
  - lib/hubspot/discovery/crm/associations/v4/api/batch_api.rb
1514
- - lib/hubspot/discovery/crm/associations/v4/api/definitions_api.rb
1515
1631
  - lib/hubspot/discovery/crm/associations/v4/client.rb
1632
+ - lib/hubspot/discovery/crm/associations/v4/schema/api/definitions_api.rb
1633
+ - lib/hubspot/discovery/crm/associations/v4/schema/client.rb
1516
1634
  - lib/hubspot/discovery/crm/client.rb
1517
1635
  - lib/hubspot/discovery/crm/companies/api/basic_api.rb
1518
1636
  - lib/hubspot/discovery/crm/companies/api/batch_api.rb
@@ -1564,6 +1682,11 @@ files:
1564
1682
  - lib/hubspot/discovery/crm/objects/calls/api/search_api.rb
1565
1683
  - lib/hubspot/discovery/crm/objects/calls/client.rb
1566
1684
  - lib/hubspot/discovery/crm/objects/client.rb
1685
+ - lib/hubspot/discovery/crm/objects/communications/api/basic_api.rb
1686
+ - lib/hubspot/discovery/crm/objects/communications/api/batch_api.rb
1687
+ - lib/hubspot/discovery/crm/objects/communications/api/public_object_api.rb
1688
+ - lib/hubspot/discovery/crm/objects/communications/api/search_api.rb
1689
+ - lib/hubspot/discovery/crm/objects/communications/client.rb
1567
1690
  - lib/hubspot/discovery/crm/objects/emails/api/basic_api.rb
1568
1691
  - lib/hubspot/discovery/crm/objects/emails/api/batch_api.rb
1569
1692
  - lib/hubspot/discovery/crm/objects/emails/api/public_object_api.rb
@@ -1660,12 +1783,12 @@ files:
1660
1783
  - lib/hubspot/discovery/webhooks/api/subscriptions_api.rb
1661
1784
  - lib/hubspot/discovery/webhooks/client.rb
1662
1785
  - lib/hubspot/exceptions.rb
1786
+ - lib/hubspot/helpers/association_type.rb
1663
1787
  - lib/hubspot/helpers/camel_case.rb
1664
1788
  - lib/hubspot/helpers/get_all_helper.rb
1665
1789
  - lib/hubspot/helpers/path.rb
1666
1790
  - lib/hubspot/helpers/signature.rb
1667
1791
  - lib/hubspot/helpers/snake_case.rb
1668
- - lib/hubspot/helpers/webhooks_helper.rb
1669
1792
  - lib/hubspot/oauth_helper.rb
1670
1793
  - lib/hubspot/version.rb
1671
1794
  - spec/discovery/automation/actions/callbacks_api_spec.rb
@@ -1698,9 +1821,11 @@ files:
1698
1821
  - spec/discovery/conversations/visitor-identification/generate_api_spec.rb
1699
1822
  - spec/discovery/crm/associations/batch_api_spec.rb
1700
1823
  - spec/discovery/crm/associations/client_spec.rb
1701
- - spec/discovery/crm/associations/types_api_spec.rb
1824
+ - spec/discovery/crm/associations/schema/types_api_spec.rb
1825
+ - spec/discovery/crm/associations/v4/basic_api_spec.rb
1702
1826
  - spec/discovery/crm/associations/v4/batch_api_spec.rb
1703
- - spec/discovery/crm/associations/v4/definitions_api_spec.rb
1827
+ - spec/discovery/crm/associations/v4/client_spec.rb
1828
+ - spec/discovery/crm/associations/v4/schema/definitions_api_spec.rb
1704
1829
  - spec/discovery/crm/client_spec.rb
1705
1830
  - spec/discovery/crm/companies/basic_api_spec.rb
1706
1831
  - spec/discovery/crm/companies/batch_api_spec.rb
@@ -1739,6 +1864,10 @@ files:
1739
1864
  - spec/discovery/crm/objects/calls/public_object_api_spec.rb
1740
1865
  - spec/discovery/crm/objects/calls/search_api_spec.rb
1741
1866
  - spec/discovery/crm/objects/client_spec.rb
1867
+ - spec/discovery/crm/objects/communications/basic_api_spec.rb
1868
+ - spec/discovery/crm/objects/communications/batch_api_spec.rb
1869
+ - spec/discovery/crm/objects/communications/public_object_api_spec.rb
1870
+ - spec/discovery/crm/objects/communications/search_api_spec.rb
1742
1871
  - spec/discovery/crm/objects/emails/basic_api_spec.rb
1743
1872
  - spec/discovery/crm/objects/emails/batch_api_spec.rb
1744
1873
  - spec/discovery/crm/objects/emails/public_object_api_spec.rb
@@ -1852,8 +1981,10 @@ test_files:
1852
1981
  - spec/discovery/crm/tickets/public_object_api_spec.rb
1853
1982
  - spec/discovery/crm/tickets/batch_api_spec.rb
1854
1983
  - spec/discovery/crm/associations/client_spec.rb
1855
- - spec/discovery/crm/associations/types_api_spec.rb
1856
- - spec/discovery/crm/associations/v4/definitions_api_spec.rb
1984
+ - spec/discovery/crm/associations/schema/types_api_spec.rb
1985
+ - spec/discovery/crm/associations/v4/client_spec.rb
1986
+ - spec/discovery/crm/associations/v4/basic_api_spec.rb
1987
+ - spec/discovery/crm/associations/v4/schema/definitions_api_spec.rb
1857
1988
  - spec/discovery/crm/associations/v4/batch_api_spec.rb
1858
1989
  - spec/discovery/crm/associations/batch_api_spec.rb
1859
1990
  - spec/discovery/crm/client_spec.rb
@@ -1905,6 +2036,10 @@ test_files:
1905
2036
  - spec/discovery/crm/objects/meetings/batch_api_spec.rb
1906
2037
  - spec/discovery/crm/objects/gdpr_api_spec.rb
1907
2038
  - spec/discovery/crm/objects/batch_api_spec.rb
2039
+ - spec/discovery/crm/objects/communications/search_api_spec.rb
2040
+ - spec/discovery/crm/objects/communications/basic_api_spec.rb
2041
+ - spec/discovery/crm/objects/communications/public_object_api_spec.rb
2042
+ - spec/discovery/crm/objects/communications/batch_api_spec.rb
1908
2043
  - spec/discovery/crm/deals/search_api_spec.rb
1909
2044
  - spec/discovery/crm/deals/basic_api_spec.rb
1910
2045
  - spec/discovery/crm/deals/public_object_api_spec.rb
@@ -1,95 +0,0 @@
1
- =begin
2
- #Associations
3
-
4
- #Associations define the relationships between objects in HubSpot. These endpoints allow you to create, read, and remove associations.
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 Associations
18
- class TypesApi
19
- attr_accessor :api_client
20
-
21
- def initialize(api_client = ApiClient.default)
22
- @api_client = api_client
23
- end
24
- # List association types
25
- # List all the valid association types available between two object types
26
- # @param from_object_type [String]
27
- # @param to_object_type [String]
28
- # @param [Hash] opts the optional parameters
29
- # @return [CollectionResponsePublicAssociationDefinitionNoPaging]
30
- def get_all(from_object_type, to_object_type, opts = {})
31
- data, _status_code, _headers = get_all_with_http_info(from_object_type, to_object_type, opts)
32
- data
33
- end
34
-
35
- # List association types
36
- # List all the valid association types available between two object types
37
- # @param from_object_type [String]
38
- # @param to_object_type [String]
39
- # @param [Hash] opts the optional parameters
40
- # @return [Array<(CollectionResponsePublicAssociationDefinitionNoPaging, Integer, Hash)>] CollectionResponsePublicAssociationDefinitionNoPaging data, response status code and response headers
41
- def get_all_with_http_info(from_object_type, to_object_type, opts = {})
42
- if @api_client.config.debugging
43
- @api_client.config.logger.debug 'Calling API: TypesApi.get_all ...'
44
- end
45
- # verify the required parameter 'from_object_type' is set
46
- if @api_client.config.client_side_validation && from_object_type.nil?
47
- fail ArgumentError, "Missing the required parameter 'from_object_type' when calling TypesApi.get_all"
48
- end
49
- # verify the required parameter 'to_object_type' is set
50
- if @api_client.config.client_side_validation && to_object_type.nil?
51
- fail ArgumentError, "Missing the required parameter 'to_object_type' when calling TypesApi.get_all"
52
- end
53
- # resource path
54
- local_var_path = '/crm/v3/associations/{fromObjectType}/{toObjectType}/types'.sub('{' + 'fromObjectType' + '}', CGI.escape(from_object_type.to_s)).sub('{' + 'toObjectType' + '}', CGI.escape(to_object_type.to_s))
55
-
56
- # query parameters
57
- query_params = opts[:query_params] || {}
58
-
59
- # header parameters
60
- header_params = opts[:header_params] || {}
61
- # HTTP header 'Accept' (if needed)
62
- header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
63
-
64
- # form parameters
65
- form_params = opts[:form_params] || {}
66
-
67
- # http body (model)
68
- post_body = opts[:debug_body]
69
-
70
- # return_type
71
- return_type = opts[:debug_return_type] || 'CollectionResponsePublicAssociationDefinitionNoPaging'
72
-
73
- # auth_names
74
- auth_names = opts[:debug_auth_names] || ['hapikey', 'oauth2']
75
-
76
- new_options = opts.merge(
77
- :operation => :"TypesApi.get_all",
78
- :header_params => header_params,
79
- :query_params => query_params,
80
- :form_params => form_params,
81
- :body => post_body,
82
- :auth_names => auth_names,
83
- :return_type => return_type
84
- )
85
-
86
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
87
- if @api_client.config.debugging
88
- @api_client.config.logger.debug "API called: TypesApi#get_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
- end
90
- return data, status_code, headers
91
- end
92
- end
93
- end
94
- end
95
- end