hubspot-api-client 12.0.0 → 13.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5ff629a854da5d963046bc1d7703246bc2cf4f08980b8a8d0000e6610ad409f
4
- data.tar.gz: 0f9041fd119d7fb7a0d2bde9fe4a0e1856e975db0d3dfa15fd772bda45edc490
3
+ metadata.gz: f008ac88a61c76cec04ee11d2230e1f1278aaa5ed5b478116158380d050bfe00
4
+ data.tar.gz: 8ed33bc9aceb5fe322d3e6479588b39eeb2319353e2a62f035bb81e5f94fb47f
5
5
  SHA512:
6
- metadata.gz: 0e5da46c5e9b71ead841c5436cd857c6804e356f4c1c6145bc24ca3dc705bff8deab52bae437260066b47c03e6f9ecd6640db8037b9b38f9e266092fad44d5c1
7
- data.tar.gz: d24ddc20e17dca70b0f9381715cb5d980144ffbe64dde19a9072ae81d246409b1d5be757a5c623ceda4fa01d26e423a46436ff27125e0fdfd50b819a6648613f
6
+ metadata.gz: be9db5880ec10d6370d00682d0b5d6cd15be21adf1bd50da91af226d08d5cf1834d3be51ed845e508f674d67b4973ef7b9c5ba23deab4bdac7b57b673d4f0a92
7
+ data.tar.gz: 9cd45ee4f8c2a1f604ec8101e07a0f48231eee4436aa5d650e1689648537a1769907738ca66afd5243b13e0989a9e8130ce68c724d87f4b4e84693a9077b7244
data/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [13.0.0] - 2022-06-29
9
+ ### Changed (Breaking changes)
10
+
11
+ - crm.objects.feedback_submissions API
12
+
13
+ ### Fixed
14
+
15
+ - crm.contacts.basic_api id_property
16
+
8
17
  ## [12.0.0] - 2022-06-09
9
18
  ### Added
10
19
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hubspot-api-client (12.0.0)
4
+ hubspot-api-client (13.0.0)
5
5
  json (~> 2.1, >= 2.1.0)
6
6
  require_all (~> 3.0.0)
7
7
  typhoeus (~> 1.4.0)
@@ -10,14 +10,15 @@ GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
12
  ZenTest (4.12.0)
13
- addressable (2.7.0)
13
+ addressable (2.8.0)
14
14
  public_suffix (>= 2.0.2, < 5.0)
15
15
  autotest (4.4.6)
16
16
  ZenTest (>= 4.4.1)
17
17
  autotest-growl (0.2.16)
18
18
  autotest-rails-pure (4.1.2)
19
19
  coderay (1.1.3)
20
- crack (0.4.4)
20
+ crack (0.4.5)
21
+ rexml
21
22
  diff-lcs (1.4.4)
22
23
  ethon (0.15.0)
23
24
  ffi (>= 1.15.0)
@@ -28,11 +29,12 @@ GEM
28
29
  pry (0.14.1)
29
30
  coderay (~> 1.1)
30
31
  method_source (~> 1.0)
31
- public_suffix (4.0.6)
32
+ public_suffix (4.0.7)
32
33
  rake (12.3.3)
33
34
  rake-release (1.2.1)
34
35
  bundler (>= 1.11, < 3)
35
36
  require_all (3.0.0)
37
+ rexml (3.2.5)
36
38
  rspec (3.10.0)
37
39
  rspec-core (~> 3.10.0)
38
40
  rspec-expectations (~> 3.10.0)
@@ -49,10 +51,10 @@ GEM
49
51
  typhoeus (1.4.0)
50
52
  ethon (>= 0.9.0)
51
53
  vcr (3.0.3)
52
- webmock (1.24.6)
53
- addressable (>= 2.3.6)
54
+ webmock (3.14.0)
55
+ addressable (>= 2.8.0)
54
56
  crack (>= 0.3.2)
55
- hashdiff
57
+ hashdiff (>= 0.4.0, < 2.0.0)
56
58
 
57
59
  PLATFORMS
58
60
  ruby
@@ -67,7 +69,7 @@ DEPENDENCIES
67
69
  rake-release
68
70
  rspec (~> 3.6, >= 3.6.0)
69
71
  vcr (~> 3.0, >= 3.0.1)
70
- webmock (~> 1.24, >= 1.24.3)
72
+ webmock (~> 3.14)
71
73
 
72
74
  BUNDLED WITH
73
75
  2.1.4
data/README.md CHANGED
@@ -26,14 +26,12 @@ require 'hubspot-api-client'
26
26
 
27
27
  # Setup authorization
28
28
  Hubspot.configure do |config|
29
- # Configure API key authorization: hapikey
30
- config.api_key['hapikey'] = 'demo'
29
+ config.access_token = 'your_access_token'
31
30
  end
32
31
 
33
32
  # Get contacts
34
33
  basic_api = Hubspot::Crm::Contacts::BasicApi.new
35
- basic_api.get_page(auth_names: 'hapikey')
36
-
34
+ basic_api.get_page(auth_names: 'oauth2')
37
35
  ```
38
36
 
39
37
  for new discovery classes since version 11.2
@@ -41,13 +39,11 @@ for new discovery classes since version 11.2
41
39
  # Load the gem
42
40
  require 'hubspot-api-client'
43
41
 
44
- # Setup client with hapikey authorization
45
- client = Hubspot::Client.new(api_key: 'demo')
42
+ # Setup client
43
+ client = Hubspot::Client.new(access_token: 'your_access_token')
46
44
 
47
45
  # Get contacts
48
- basic_api = client.crm.contacts.basic_api
49
- basic_api.get_page
50
-
46
+ contacts = client.crm.contacts.basic_api.get_page
51
47
  ```
52
48
 
53
49
  ### Usage
@@ -62,10 +58,12 @@ all_contacts = basic_api.get_all(auth_names: 'oauth2')
62
58
 
63
59
  for new discovery classes since version 11.2
64
60
  ```ruby
65
- client = Hubspot::Client(access_token: 'your_oauth2_access_token')
61
+ client = Hubspot::Client.new(access_token: 'your_oauth2_access_token')
66
62
  all_contacts = client.crm.contacts.basic_api.get_all
67
63
  ```
68
64
 
65
+ You'll need to create a [private app](https://developers.hubspot.com/docs/api/private-apps) to get your access token or you can obtain OAuth2 access token.
66
+
69
67
  Please note that pagination is used under the hood to get all results.
70
68
 
71
69
 
@@ -75,38 +73,43 @@ Please note that pagination is used under the hood to get all results.
75
73
 
76
74
  ```ruby
77
75
  config = ::Hubspot::Crm::Schemas::Configuration.new do |config|
78
- config.api_key = { 'hapikey' => 'your_hapikey' }
79
- end
80
- api_client = ::Hubspot::Crm::Schemas::ApiClient.new(config)
81
- api = ::Hubspot::Crm::Schemas::CoreApi.new(api_client)
82
- labels = ::Hubspot::Crm::Schemas::ObjectTypeDefinitionLabels.new(singular: 'My object', plural: 'My objects')
83
- option = ::Hubspot::Crm::Schemas::OptionInput.new(
84
- label: 'Option A',
85
- value: 'A',
86
- description: 'Choice number one',
87
- display_order: 1,
88
- hidden: false
89
- )
90
- property = ::Hubspot::Crm::Schemas::ObjectTypePropertyCreate.new(
91
- name: 'property001',
92
- label: 'My object property',
93
- group_name: 'my_object_information',
94
- options: [option],
95
- display_order: 2,
96
- type: 'enumeration',
97
- field_type: 'select'
98
- )
99
- object_schema_egg = ::Hubspot::Crm::Schemas::ObjectSchemaEgg.new(
100
- labels: labels,
101
- required_properties: ['property001'],
102
- searchable_properties: [],
103
- primary_display_property: 'property001',
104
- secondary_display_properties: [],
105
- properties: [property],
106
- associated_objects: ['CONTACT'],
107
- name: 'my_object'
108
- )
109
- api_response = api.create(object_schema_egg)
76
+ config.access_token = 'your_access_token'
77
+ end
78
+
79
+ api_client = ::Hubspot::Crm::Schemas::ApiClient.new(config)
80
+ api = ::Hubspot::Crm::Schemas::CoreApi.new(api_client)
81
+ labels = ::Hubspot::Crm::Schemas::ObjectTypeDefinitionLabels.new(singular: 'My object', plural: 'My objects')
82
+
83
+ option = ::Hubspot::Crm::Schemas::OptionInput.new(
84
+ label: 'Option A',
85
+ value: 'A',
86
+ description: 'Choice number one',
87
+ display_order: 1,
88
+ hidden: false
89
+ )
90
+
91
+ property = ::Hubspot::Crm::Schemas::ObjectTypePropertyCreate.new(
92
+ name: 'property001',
93
+ label: 'My object property',
94
+ group_name: 'my_object_information',
95
+ options: [option],
96
+ display_order: 2,
97
+ type: 'enumeration',
98
+ field_type: 'select'
99
+ )
100
+
101
+ object_schema_egg = ::Hubspot::Crm::Schemas::ObjectSchemaEgg.new(
102
+ labels: labels,
103
+ required_properties: ['property001'],
104
+ searchable_properties: [],
105
+ primary_display_property: 'property001',
106
+ secondary_display_properties: [],
107
+ properties: [property],
108
+ associated_objects: ['CONTACT'],
109
+ name: 'my_object'
110
+ )
111
+
112
+ api_response = api.create(object_schema_egg)
110
113
  ```
111
114
 
112
115
 
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
 
20
20
  s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
21
21
  s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
22
- s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
22
+ s.add_development_dependency 'webmock', '~> 3.14'
23
23
  s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
24
24
  s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
25
25
  s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
@@ -157,6 +157,7 @@ module Hubspot
157
157
  # @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.
158
158
  # @option opts [Array<String>] :associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored.
159
159
  # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false)
160
+ # @option opts [String] :id_property The name of a property whose values are unique for this object type
160
161
  # @return [SimplePublicObjectWithAssociations]
161
162
  def get_by_id(contact_id, opts = {})
162
163
  data, _status_code, _headers = get_by_id_with_http_info(contact_id, opts)
@@ -171,6 +172,7 @@ module Hubspot
171
172
  # @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.
172
173
  # @option opts [Array<String>] :associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored.
173
174
  # @option opts [Boolean] :archived Whether to return only results that have been archived.
175
+ # @option opts [String] :id_property The name of a property whose values are unique for this object type
174
176
  # @return [Array<(SimplePublicObjectWithAssociations, Integer, Hash)>] SimplePublicObjectWithAssociations data, response status code and response headers
175
177
  def get_by_id_with_http_info(contact_id, opts = {})
176
178
  if @api_client.config.debugging
@@ -189,6 +191,7 @@ module Hubspot
189
191
  query_params[:'propertiesWithHistory'] = @api_client.build_collection_param(opts[:'properties_with_history'], :multi) if !opts[:'properties_with_history'].nil?
190
192
  query_params[:'associations'] = @api_client.build_collection_param(opts[:'associations'], :multi) if !opts[:'associations'].nil?
191
193
  query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
194
+ query_params[:'idProperty'] = opts[:'id_property'] if !opts[:'id_property'].nil?
192
195
 
193
196
  # header parameters
194
197
  header_params = opts[:header_params] || {}
@@ -302,6 +305,7 @@ module Hubspot
302
305
  # @param contact_id [String]
303
306
  # @param simple_public_object_input [SimplePublicObjectInput]
304
307
  # @param [Hash] opts the optional parameters
308
+ # @option opts [String] :id_property The name of a property whose values are unique for this object type
305
309
  # @return [SimplePublicObject]
306
310
  def update(contact_id, simple_public_object_input, opts = {})
307
311
  data, _status_code, _headers = update_with_http_info(contact_id, simple_public_object_input, opts)
@@ -313,6 +317,7 @@ module Hubspot
313
317
  # @param contact_id [String]
314
318
  # @param simple_public_object_input [SimplePublicObjectInput]
315
319
  # @param [Hash] opts the optional parameters
320
+ # @option opts [String] :id_property The name of a property whose values are unique for this object type
316
321
  # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
317
322
  def update_with_http_info(contact_id, simple_public_object_input, opts = {})
318
323
  if @api_client.config.debugging
@@ -331,6 +336,7 @@ module Hubspot
331
336
 
332
337
  # query parameters
333
338
  query_params = opts[:query_params] || {}
339
+ query_params[:'idProperty'] = opts[:'id_property'] if !opts[:'id_property'].nil?
334
340
 
335
341
  # header parameters
336
342
  header_params = opts[:header_params] || {}
@@ -22,49 +22,55 @@ module Hubspot
22
22
  def initialize(api_client = ApiClient.default)
23
23
  @api_client = api_client
24
24
  end
25
- # List associations of a feedback submission by type
25
+ # Remove an association between two feedback submissions
26
26
  # @param feedback_submission_id [String]
27
27
  # @param to_object_type [String]
28
+ # @param to_object_id [String]
29
+ # @param association_type [String]
28
30
  # @param [Hash] opts the optional parameters
29
- # @option opts [String] :after The paging cursor token of the last successfully read resource will be returned as the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.
30
- # @option opts [Integer] :limit The maximum number of results to display per page. (default to 500)
31
- # @return [CollectionResponseAssociatedIdForwardPaging]
32
- def get_all(feedback_submission_id, to_object_type, opts = {})
33
- data, _status_code, _headers = get_all_with_http_info(feedback_submission_id, to_object_type, opts)
34
- data
31
+ # @return [nil]
32
+ def archive(feedback_submission_id, to_object_type, to_object_id, association_type, opts = {})
33
+ archive_with_http_info(feedback_submission_id, to_object_type, to_object_id, association_type, opts)
34
+ nil
35
35
  end
36
36
 
37
- # List associations of a feedback submission by type
37
+ # Remove an association between two feedback submissions
38
38
  # @param feedback_submission_id [String]
39
39
  # @param to_object_type [String]
40
+ # @param to_object_id [String]
41
+ # @param association_type [String]
40
42
  # @param [Hash] opts the optional parameters
41
- # @option opts [String] :after The paging cursor token of the last successfully read resource will be returned as the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.
42
- # @option opts [Integer] :limit The maximum number of results to display per page.
43
- # @return [Array<(CollectionResponseAssociatedIdForwardPaging, Integer, Hash)>] CollectionResponseAssociatedIdForwardPaging data, response status code and response headers
44
- def get_all_with_http_info(feedback_submission_id, to_object_type, opts = {})
43
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
44
+ def archive_with_http_info(feedback_submission_id, to_object_type, to_object_id, association_type, opts = {})
45
45
  if @api_client.config.debugging
46
- @api_client.config.logger.debug 'Calling API: AssociationsApi.get_all ...'
46
+ @api_client.config.logger.debug 'Calling API: AssociationsApi.archive ...'
47
47
  end
48
48
  # verify the required parameter 'feedback_submission_id' is set
49
49
  if @api_client.config.client_side_validation && feedback_submission_id.nil?
50
- fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling AssociationsApi.get_all"
50
+ fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling AssociationsApi.archive"
51
51
  end
52
52
  # verify the required parameter 'to_object_type' is set
53
53
  if @api_client.config.client_side_validation && to_object_type.nil?
54
- fail ArgumentError, "Missing the required parameter 'to_object_type' when calling AssociationsApi.get_all"
54
+ fail ArgumentError, "Missing the required parameter 'to_object_type' when calling AssociationsApi.archive"
55
+ end
56
+ # verify the required parameter 'to_object_id' is set
57
+ if @api_client.config.client_side_validation && to_object_id.nil?
58
+ fail ArgumentError, "Missing the required parameter 'to_object_id' when calling AssociationsApi.archive"
59
+ end
60
+ # verify the required parameter 'association_type' is set
61
+ if @api_client.config.client_side_validation && association_type.nil?
62
+ fail ArgumentError, "Missing the required parameter 'association_type' when calling AssociationsApi.archive"
55
63
  end
56
64
  # resource path
57
- local_var_path = '/crm/v3/objects/feedback_submissions/{feedbackSubmissionId}/associations/{toObjectType}'.sub('{' + 'feedbackSubmissionId' + '}', CGI.escape(feedback_submission_id.to_s)).sub('{' + 'toObjectType' + '}', CGI.escape(to_object_type.to_s))
65
+ local_var_path = '/crm/v3/objects/feedback_submissions/{feedbackSubmissionId}/associations/{toObjectType}/{toObjectId}/{associationType}'.sub('{' + 'feedbackSubmissionId' + '}', CGI.escape(feedback_submission_id.to_s)).sub('{' + 'toObjectType' + '}', CGI.escape(to_object_type.to_s)).sub('{' + 'toObjectId' + '}', CGI.escape(to_object_id.to_s)).sub('{' + 'associationType' + '}', CGI.escape(association_type.to_s))
58
66
 
59
67
  # query parameters
60
68
  query_params = opts[:query_params] || {}
61
- query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
62
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
63
69
 
64
70
  # header parameters
65
71
  header_params = opts[:header_params] || {}
66
72
  # HTTP header 'Accept' (if needed)
67
- header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
73
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
68
74
 
69
75
  # form parameters
70
76
  form_params = opts[:form_params] || {}
@@ -73,7 +79,7 @@ module Hubspot
73
79
  post_body = opts[:body]
74
80
 
75
81
  # return_type
76
- return_type = opts[:return_type] || 'CollectionResponseAssociatedIdForwardPaging'
82
+ return_type = opts[:return_type]
77
83
 
78
84
  # auth_names
79
85
  auth_names = opts[:auth_names] || ['hapikey']
@@ -87,9 +93,9 @@ module Hubspot
87
93
  :return_type => return_type
88
94
  )
89
95
 
90
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
96
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
91
97
  if @api_client.config.debugging
92
- @api_client.config.logger.debug "API called: AssociationsApi#get_all\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
+ @api_client.config.logger.debug "API called: AssociationsApi#archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
93
99
  end
94
100
  return data, status_code, headers
95
101
  end
@@ -101,8 +107,8 @@ module Hubspot
101
107
  # @param association_type [String]
102
108
  # @param [Hash] opts the optional parameters
103
109
  # @return [SimplePublicObjectWithAssociations]
104
- def submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type(feedback_submission_id, to_object_type, to_object_id, association_type, opts = {})
105
- data, _status_code, _headers = submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type_with_http_info(feedback_submission_id, to_object_type, to_object_id, association_type, opts)
110
+ def create(feedback_submission_id, to_object_type, to_object_id, association_type, opts = {})
111
+ data, _status_code, _headers = create_with_http_info(feedback_submission_id, to_object_type, to_object_id, association_type, opts)
106
112
  data
107
113
  end
108
114
 
@@ -113,25 +119,25 @@ module Hubspot
113
119
  # @param association_type [String]
114
120
  # @param [Hash] opts the optional parameters
115
121
  # @return [Array<(SimplePublicObjectWithAssociations, Integer, Hash)>] SimplePublicObjectWithAssociations data, response status code and response headers
116
- def submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type_with_http_info(feedback_submission_id, to_object_type, to_object_id, association_type, opts = {})
122
+ def create_with_http_info(feedback_submission_id, to_object_type, to_object_id, association_type, opts = {})
117
123
  if @api_client.config.debugging
118
- @api_client.config.logger.debug 'Calling API: AssociationsApi.submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type ...'
124
+ @api_client.config.logger.debug 'Calling API: AssociationsApi.create ...'
119
125
  end
120
126
  # verify the required parameter 'feedback_submission_id' is set
121
127
  if @api_client.config.client_side_validation && feedback_submission_id.nil?
122
- fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling AssociationsApi.submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type"
128
+ fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling AssociationsApi.create"
123
129
  end
124
130
  # verify the required parameter 'to_object_type' is set
125
131
  if @api_client.config.client_side_validation && to_object_type.nil?
126
- fail ArgumentError, "Missing the required parameter 'to_object_type' when calling AssociationsApi.submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type"
132
+ fail ArgumentError, "Missing the required parameter 'to_object_type' when calling AssociationsApi.create"
127
133
  end
128
134
  # verify the required parameter 'to_object_id' is set
129
135
  if @api_client.config.client_side_validation && to_object_id.nil?
130
- fail ArgumentError, "Missing the required parameter 'to_object_id' when calling AssociationsApi.submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type"
136
+ fail ArgumentError, "Missing the required parameter 'to_object_id' when calling AssociationsApi.create"
131
137
  end
132
138
  # verify the required parameter 'association_type' is set
133
139
  if @api_client.config.client_side_validation && association_type.nil?
134
- fail ArgumentError, "Missing the required parameter 'association_type' when calling AssociationsApi.submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type"
140
+ fail ArgumentError, "Missing the required parameter 'association_type' when calling AssociationsApi.create"
135
141
  end
136
142
  # resource path
137
143
  local_var_path = '/crm/v3/objects/feedback_submissions/{feedbackSubmissionId}/associations/{toObjectType}/{toObjectId}/{associationType}'.sub('{' + 'feedbackSubmissionId' + '}', CGI.escape(feedback_submission_id.to_s)).sub('{' + 'toObjectType' + '}', CGI.escape(to_object_type.to_s)).sub('{' + 'toObjectId' + '}', CGI.escape(to_object_id.to_s)).sub('{' + 'associationType' + '}', CGI.escape(association_type.to_s))
@@ -167,60 +173,54 @@ module Hubspot
167
173
 
168
174
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
169
175
  if @api_client.config.debugging
170
- @api_client.config.logger.debug "API called: AssociationsApi#submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
+ @api_client.config.logger.debug "API called: AssociationsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
171
177
  end
172
178
  return data, status_code, headers
173
179
  end
174
180
 
175
- # Remove an association between two feedback submissions
181
+ # List associations of a feedback submission by type
176
182
  # @param feedback_submission_id [String]
177
183
  # @param to_object_type [String]
178
- # @param to_object_id [String]
179
- # @param association_type [String]
180
184
  # @param [Hash] opts the optional parameters
181
- # @return [nil]
182
- def submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type_0(feedback_submission_id, to_object_type, to_object_id, association_type, opts = {})
183
- submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type_0_with_http_info(feedback_submission_id, to_object_type, to_object_id, association_type, opts)
184
- nil
185
+ # @option opts [String] :after The paging cursor token of the last successfully read resource will be returned as the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.
186
+ # @option opts [Integer] :limit The maximum number of results to display per page. (default to 500)
187
+ # @return [CollectionResponseAssociatedIdForwardPaging]
188
+ def get_page(feedback_submission_id, to_object_type, opts = {})
189
+ data, _status_code, _headers = get_page_with_http_info(feedback_submission_id, to_object_type, opts)
190
+ data
185
191
  end
186
192
 
187
- # Remove an association between two feedback submissions
193
+ # List associations of a feedback submission by type
188
194
  # @param feedback_submission_id [String]
189
195
  # @param to_object_type [String]
190
- # @param to_object_id [String]
191
- # @param association_type [String]
192
196
  # @param [Hash] opts the optional parameters
193
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
194
- def submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type_0_with_http_info(feedback_submission_id, to_object_type, to_object_id, association_type, opts = {})
197
+ # @option opts [String] :after The paging cursor token of the last successfully read resource will be returned as the &#x60;paging.next.after&#x60; JSON property of a paged response containing more results.
198
+ # @option opts [Integer] :limit The maximum number of results to display per page.
199
+ # @return [Array<(CollectionResponseAssociatedIdForwardPaging, Integer, Hash)>] CollectionResponseAssociatedIdForwardPaging data, response status code and response headers
200
+ def get_page_with_http_info(feedback_submission_id, to_object_type, opts = {})
195
201
  if @api_client.config.debugging
196
- @api_client.config.logger.debug 'Calling API: AssociationsApi.submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type_0 ...'
202
+ @api_client.config.logger.debug 'Calling API: AssociationsApi.get_page ...'
197
203
  end
198
204
  # verify the required parameter 'feedback_submission_id' is set
199
205
  if @api_client.config.client_side_validation && feedback_submission_id.nil?
200
- fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling AssociationsApi.submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type_0"
206
+ fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling AssociationsApi.get_page"
201
207
  end
202
208
  # verify the required parameter 'to_object_type' is set
203
209
  if @api_client.config.client_side_validation && to_object_type.nil?
204
- fail ArgumentError, "Missing the required parameter 'to_object_type' when calling AssociationsApi.submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type_0"
205
- end
206
- # verify the required parameter 'to_object_id' is set
207
- if @api_client.config.client_side_validation && to_object_id.nil?
208
- fail ArgumentError, "Missing the required parameter 'to_object_id' when calling AssociationsApi.submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type_0"
209
- end
210
- # verify the required parameter 'association_type' is set
211
- if @api_client.config.client_side_validation && association_type.nil?
212
- fail ArgumentError, "Missing the required parameter 'association_type' when calling AssociationsApi.submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type_0"
210
+ fail ArgumentError, "Missing the required parameter 'to_object_type' when calling AssociationsApi.get_page"
213
211
  end
214
212
  # resource path
215
- local_var_path = '/crm/v3/objects/feedback_submissions/{feedbackSubmissionId}/associations/{toObjectType}/{toObjectId}/{associationType}'.sub('{' + 'feedbackSubmissionId' + '}', CGI.escape(feedback_submission_id.to_s)).sub('{' + 'toObjectType' + '}', CGI.escape(to_object_type.to_s)).sub('{' + 'toObjectId' + '}', CGI.escape(to_object_id.to_s)).sub('{' + 'associationType' + '}', CGI.escape(association_type.to_s))
213
+ local_var_path = '/crm/v3/objects/feedback_submissions/{feedbackSubmissionId}/associations/{toObjectType}'.sub('{' + 'feedbackSubmissionId' + '}', CGI.escape(feedback_submission_id.to_s)).sub('{' + 'toObjectType' + '}', CGI.escape(to_object_type.to_s))
216
214
 
217
215
  # query parameters
218
216
  query_params = opts[:query_params] || {}
217
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
218
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
219
219
 
220
220
  # header parameters
221
221
  header_params = opts[:header_params] || {}
222
222
  # HTTP header 'Accept' (if needed)
223
- header_params['Accept'] = @api_client.select_header_accept(['*/*'])
223
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
224
224
 
225
225
  # form parameters
226
226
  form_params = opts[:form_params] || {}
@@ -229,7 +229,7 @@ module Hubspot
229
229
  post_body = opts[:body]
230
230
 
231
231
  # return_type
232
- return_type = opts[:return_type]
232
+ return_type = opts[:return_type] || 'CollectionResponseAssociatedIdForwardPaging'
233
233
 
234
234
  # auth_names
235
235
  auth_names = opts[:auth_names] || ['hapikey']
@@ -243,9 +243,9 @@ module Hubspot
243
243
  :return_type => return_type
244
244
  )
245
245
 
246
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
246
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
247
247
  if @api_client.config.debugging
248
- @api_client.config.logger.debug "API called: AssociationsApi#submissions_feedback_submission_id_associations_to_object_type_to_object_id_association_type_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
248
+ @api_client.config.logger.debug "API called: AssociationsApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
249
249
  end
250
250
  return data, status_code, headers
251
251
  end