hubspot-api-client 12.0.0 → 13.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/Gemfile.lock +25 -23
  4. data/README.md +49 -44
  5. data/hubspot-api-client.gemspec +1 -1
  6. data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +1 -1
  7. data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +2 -2
  8. data/lib/hubspot/codegen/cms/site-search/api/public_api.rb +1 -4
  9. data/lib/hubspot/codegen/cms/site-search/models/content_search_result.rb +2 -2
  10. data/lib/hubspot/codegen/cms/site-search/models/indexed_data.rb +1 -1
  11. data/lib/hubspot/codegen/cms/site-search/models/{search_hit_field.rb → indexed_field.rb} +35 -35
  12. data/lib/hubspot/codegen/cms/url-redirects/api/redirects_api.rb +23 -21
  13. data/lib/hubspot/codegen/cms/url-redirects/models/{collection_response_with_total_url_mapping.rb → collection_response_with_total_url_mapping_forward_paging.rb} +4 -6
  14. data/lib/hubspot/codegen/cms/url-redirects/models/{paging.rb → forward_paging.rb} +3 -3
  15. data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping.rb +14 -226
  16. data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping_create_request_body.rb +31 -31
  17. data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +2 -2
  18. data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +8 -2
  19. data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +2 -2
  20. data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +2 -2
  21. data/lib/hubspot/codegen/crm/objects/api/basic_api.rb +2 -2
  22. data/lib/hubspot/codegen/crm/objects/calls/api/basic_api.rb +2 -2
  23. data/lib/hubspot/codegen/crm/objects/emails/api/basic_api.rb +2 -2
  24. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/associations_api.rb +59 -59
  25. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +114 -114
  26. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +61 -61
  27. data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/public_object_api.rb +6 -6
  28. data/lib/hubspot/codegen/crm/objects/meetings/api/basic_api.rb +2 -2
  29. data/lib/hubspot/codegen/crm/objects/notes/api/basic_api.rb +2 -2
  30. data/lib/hubspot/codegen/crm/objects/tasks/api/basic_api.rb +2 -2
  31. data/lib/hubspot/codegen/crm/products/api/basic_api.rb +2 -2
  32. data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +2 -2
  33. data/lib/hubspot/codegen/crm/quotes/api/public_object_api.rb +6 -6
  34. data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +2 -2
  35. data/lib/hubspot/codegen/files/files/api/files_api.rb +2 -2
  36. data/lib/hubspot/codegen/files/files/api/folders_api.rb +3 -3
  37. data/lib/hubspot/codegen/marketing/transactional/api/public_smtp_tokens_api.rb +18 -14
  38. data/lib/hubspot/codegen/marketing/transactional/api/single_send_api.rb +10 -6
  39. data/lib/hubspot/codegen/marketing/transactional/models/{collection_response_smtp_api_token_view.rb → collection_response_smtp_api_token_view_forward_paging.rb} +4 -5
  40. data/lib/hubspot/codegen/marketing/transactional/models/email_send_status_view.rb +15 -15
  41. data/lib/hubspot/codegen/marketing/transactional/models/{paging.rb → forward_paging.rb} +3 -3
  42. data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_email.rb +3 -13
  43. data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_request_egg.rb +22 -30
  44. data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_request_egg.rb +1 -1
  45. data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_view.rb +1 -1
  46. data/lib/hubspot/configuration.rb +3 -1
  47. data/lib/hubspot/version.rb +1 -1
  48. data/spec/codegen/cms/site-search/api/public_api_spec.rb +0 -1
  49. data/spec/codegen/cms/site-search/models/content_search_result_spec.rb +1 -1
  50. data/spec/codegen/cms/site-search/models/{search_hit_field_spec.rb → indexed_field_spec.rb} +10 -10
  51. data/spec/codegen/cms/url-redirects/api/redirects_api_spec.rb +3 -5
  52. data/spec/codegen/cms/url-redirects/models/{collection_response_with_total_url_mapping_spec.rb → collection_response_with_total_url_mapping_forward_paging_spec.rb} +6 -6
  53. data/spec/codegen/cms/url-redirects/models/{paging_spec.rb → forward_paging_spec.rb} +6 -6
  54. data/spec/codegen/cms/url-redirects/models/url_mapping_create_request_body_spec.rb +10 -10
  55. data/spec/codegen/cms/url-redirects/models/url_mapping_spec.rb +2 -78
  56. data/spec/codegen/crm/contacts/api/basic_api_spec.rb +2 -0
  57. data/spec/codegen/crm/contacts/api/gdpr_api_spec.rb +3 -3
  58. data/spec/codegen/crm/objects/api/gdpr_api_spec.rb +3 -3
  59. data/spec/codegen/crm/objects/feedback_submissions/api/associations_api_spec.rb +14 -14
  60. data/spec/codegen/crm/objects/feedback_submissions/api/basic_api_spec.rb +26 -26
  61. data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +17 -17
  62. data/spec/codegen/crm/objects/feedback_submissions/api/public_object_api_spec.rb +2 -2
  63. data/spec/codegen/crm/quotes/api/public_object_api_spec.rb +2 -2
  64. data/spec/codegen/marketing/transactional/api/public_smtp_tokens_api_spec.rb +2 -2
  65. data/spec/codegen/marketing/transactional/api/single_send_api_spec.rb +1 -1
  66. data/spec/codegen/marketing/transactional/models/{collection_response_smtp_api_token_view_spec.rb → collection_response_smtp_api_token_view_forward_paging_spec.rb} +6 -6
  67. data/spec/codegen/marketing/transactional/models/email_send_status_view_spec.rb +7 -7
  68. data/spec/codegen/marketing/transactional/models/{paging_spec.rb → forward_paging_spec.rb} +6 -6
  69. data/spec/codegen/marketing/transactional/models/public_single_send_request_egg_spec.rb +4 -4
  70. data/spec/discovery/crm/objects/feedback_submissions/associations_api_spec.rb +3 -1
  71. data/spec/discovery/crm/objects/feedback_submissions/basic_api_spec.rb +3 -0
  72. data/spec/discovery/crm/objects/feedback_submissions/batch_api_spec.rb +4 -1
  73. data/spec/discovery/crm/objects/feedback_submissions/public_object_api_spec.rb +1 -1
  74. data/spec/features/crm/objects/feedback_submissions/associations_api_spec.rb +3 -1
  75. data/spec/features/crm/objects/feedback_submissions/basic_api_spec.rb +3 -0
  76. data/spec/features/crm/objects/feedback_submissions/batch_api_spec.rb +4 -1
  77. data/spec/features/crm/objects/feedback_submissions/public_object_api_spec.rb +1 -1
  78. metadata +20 -27
  79. data/pkg/hubspot-api-client-10.1.1.gem +0 -0
@@ -24,54 +24,39 @@ module Hubspot
24
24
  def initialize(api_client = ApiClient.default)
25
25
  @api_client = api_client
26
26
  end
27
- # Read
28
- # Read an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` 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.
27
+ # Archive
28
+ # Move an Object identified by `{feedbackSubmissionId}` to the recycling bin.
29
29
  # @param feedback_submission_id [String]
30
30
  # @param [Hash] opts the optional parameters
31
- # @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.
32
- # @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.
33
- # @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.
34
- # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false)
35
- # @option opts [String] :id_property The name of a property whose values are unique for this object type
36
- # @return [SimplePublicObjectWithAssociations]
37
- def get_by_id(feedback_submission_id, opts = {})
38
- data, _status_code, _headers = get_by_id_with_http_info(feedback_submission_id, opts)
39
- data
31
+ # @return [nil]
32
+ def archive(feedback_submission_id, opts = {})
33
+ archive_with_http_info(feedback_submission_id, opts)
34
+ nil
40
35
  end
41
36
 
42
- # Read
43
- # Read an Object identified by &#x60;{feedbackSubmissionId}&#x60;. &#x60;{feedbackSubmissionId}&#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.
37
+ # Archive
38
+ # Move an Object identified by &#x60;{feedbackSubmissionId}&#x60; to the recycling bin.
44
39
  # @param feedback_submission_id [String]
45
40
  # @param [Hash] opts the optional parameters
46
- # @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.
47
- # @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.
48
- # @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.
49
- # @option opts [Boolean] :archived Whether to return only results that have been archived.
50
- # @option opts [String] :id_property The name of a property whose values are unique for this object type
51
- # @return [Array<(SimplePublicObjectWithAssociations, Integer, Hash)>] SimplePublicObjectWithAssociations data, response status code and response headers
52
- def get_by_id_with_http_info(feedback_submission_id, opts = {})
41
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
42
+ def archive_with_http_info(feedback_submission_id, opts = {})
53
43
  if @api_client.config.debugging
54
- @api_client.config.logger.debug 'Calling API: BasicApi.get_by_id ...'
44
+ @api_client.config.logger.debug 'Calling API: BasicApi.archive ...'
55
45
  end
56
46
  # verify the required parameter 'feedback_submission_id' is set
57
47
  if @api_client.config.client_side_validation && feedback_submission_id.nil?
58
- fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling BasicApi.get_by_id"
48
+ fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling BasicApi.archive"
59
49
  end
60
50
  # resource path
61
51
  local_var_path = '/crm/v3/objects/feedback_submissions/{feedbackSubmissionId}'.sub('{' + 'feedbackSubmissionId' + '}', CGI.escape(feedback_submission_id.to_s))
62
52
 
63
53
  # query parameters
64
54
  query_params = opts[:query_params] || {}
65
- query_params[:'properties'] = @api_client.build_collection_param(opts[:'properties'], :multi) if !opts[:'properties'].nil?
66
- query_params[:'propertiesWithHistory'] = @api_client.build_collection_param(opts[:'properties_with_history'], :multi) if !opts[:'properties_with_history'].nil?
67
- query_params[:'associations'] = @api_client.build_collection_param(opts[:'associations'], :multi) if !opts[:'associations'].nil?
68
- query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
69
- query_params[:'idProperty'] = opts[:'id_property'] if !opts[:'id_property'].nil?
70
55
 
71
56
  # header parameters
72
57
  header_params = opts[:header_params] || {}
73
58
  # HTTP header 'Accept' (if needed)
74
- header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
59
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
75
60
 
76
61
  # form parameters
77
62
  form_params = opts[:form_params] || {}
@@ -80,7 +65,7 @@ module Hubspot
80
65
  post_body = opts[:body]
81
66
 
82
67
  # return_type
83
- return_type = opts[:return_type] || 'SimplePublicObjectWithAssociations'
68
+ return_type = opts[:return_type]
84
69
 
85
70
  # auth_names
86
71
  auth_names = opts[:auth_names] || ['hapikey']
@@ -94,67 +79,57 @@ module Hubspot
94
79
  :return_type => return_type
95
80
  )
96
81
 
97
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
82
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
98
83
  if @api_client.config.debugging
99
- @api_client.config.logger.debug "API called: BasicApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
+ @api_client.config.logger.debug "API called: BasicApi#archive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
100
85
  end
101
86
  return data, status_code, headers
102
87
  end
103
88
 
104
- # List
105
- # Read a page of feedback submissions. Control what is returned via the `properties` query param.
89
+ # Create
90
+ # Create a feedback submission with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard feedback submissions is provided.
91
+ # @param simple_public_object_input [SimplePublicObjectInput]
106
92
  # @param [Hash] opts the optional parameters
107
- # @option opts [Integer] :limit The maximum number of results to display per page. (default to 10)
108
- # @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.
109
- # @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.
110
- # @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. Usage of this parameter will reduce the maximum number of objects that can be read by a single request.
111
- # @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.
112
- # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false)
113
- # @return [CollectionResponseSimplePublicObjectWithAssociationsForwardPaging]
114
- def get_page(opts = {})
115
- data, _status_code, _headers = get_page_with_http_info(opts)
93
+ # @return [SimplePublicObject]
94
+ def create(simple_public_object_input, opts = {})
95
+ data, _status_code, _headers = create_with_http_info(simple_public_object_input, opts)
116
96
  data
117
97
  end
118
98
 
119
- # List
120
- # Read a page of feedback submissions. Control what is returned via the &#x60;properties&#x60; query param.
99
+ # Create
100
+ # Create a feedback submission with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard feedback submissions is provided.
101
+ # @param simple_public_object_input [SimplePublicObjectInput]
121
102
  # @param [Hash] opts the optional parameters
122
- # @option opts [Integer] :limit The maximum number of results to display per page.
123
- # @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.
124
- # @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.
125
- # @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. Usage of this parameter will reduce the maximum number of objects that can be read by a single request.
126
- # @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.
127
- # @option opts [Boolean] :archived Whether to return only results that have been archived.
128
- # @return [Array<(CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, Integer, Hash)>] CollectionResponseSimplePublicObjectWithAssociationsForwardPaging data, response status code and response headers
129
- def get_page_with_http_info(opts = {})
103
+ # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
104
+ def create_with_http_info(simple_public_object_input, opts = {})
130
105
  if @api_client.config.debugging
131
- @api_client.config.logger.debug 'Calling API: BasicApi.get_page ...'
106
+ @api_client.config.logger.debug 'Calling API: BasicApi.create ...'
107
+ end
108
+ # verify the required parameter 'simple_public_object_input' is set
109
+ if @api_client.config.client_side_validation && simple_public_object_input.nil?
110
+ fail ArgumentError, "Missing the required parameter 'simple_public_object_input' when calling BasicApi.create"
132
111
  end
133
112
  # resource path
134
113
  local_var_path = '/crm/v3/objects/feedback_submissions'
135
114
 
136
115
  # query parameters
137
116
  query_params = opts[:query_params] || {}
138
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
139
- query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
140
- query_params[:'properties'] = @api_client.build_collection_param(opts[:'properties'], :multi) if !opts[:'properties'].nil?
141
- query_params[:'propertiesWithHistory'] = @api_client.build_collection_param(opts[:'properties_with_history'], :multi) if !opts[:'properties_with_history'].nil?
142
- query_params[:'associations'] = @api_client.build_collection_param(opts[:'associations'], :multi) if !opts[:'associations'].nil?
143
- query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
144
117
 
145
118
  # header parameters
146
119
  header_params = opts[:header_params] || {}
147
120
  # HTTP header 'Accept' (if needed)
148
121
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
122
+ # HTTP header 'Content-Type'
123
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
149
124
 
150
125
  # form parameters
151
126
  form_params = opts[:form_params] || {}
152
127
 
153
128
  # http body (model)
154
- post_body = opts[:body]
129
+ post_body = opts[:body] || @api_client.object_to_http_body(simple_public_object_input)
155
130
 
156
131
  # return_type
157
- return_type = opts[:return_type] || 'CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'
132
+ return_type = opts[:return_type] || 'SimplePublicObject'
158
133
 
159
134
  # auth_names
160
135
  auth_names = opts[:auth_names] || ['hapikey']
@@ -168,57 +143,70 @@ module Hubspot
168
143
  :return_type => return_type
169
144
  )
170
145
 
171
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
146
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
172
147
  if @api_client.config.debugging
173
- @api_client.config.logger.debug "API called: BasicApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
148
+ @api_client.config.logger.debug "API called: BasicApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
174
149
  end
175
150
  return data, status_code, headers
176
151
  end
177
152
 
178
- # Create
179
- # Create a feedback submission with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard feedback submissions is provided.
180
- # @param simple_public_object_input [SimplePublicObjectInput]
153
+ # Read
154
+ # Read an Object identified by `{feedbackSubmissionId}`. `{feedbackSubmissionId}` 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.
155
+ # @param feedback_submission_id [String]
181
156
  # @param [Hash] opts the optional parameters
182
- # @return [SimplePublicObject]
183
- def submissions(simple_public_object_input, opts = {})
184
- data, _status_code, _headers = submissions_with_http_info(simple_public_object_input, opts)
157
+ # @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.
158
+ # @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.
159
+ # @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.
160
+ # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false)
161
+ # @option opts [String] :id_property The name of a property whose values are unique for this object type
162
+ # @return [SimplePublicObjectWithAssociations]
163
+ def get_by_id(feedback_submission_id, opts = {})
164
+ data, _status_code, _headers = get_by_id_with_http_info(feedback_submission_id, opts)
185
165
  data
186
166
  end
187
167
 
188
- # Create
189
- # Create a feedback submission with the given properties and return a copy of the object, including the ID. Documentation and examples for creating standard feedback submissions is provided.
190
- # @param simple_public_object_input [SimplePublicObjectInput]
168
+ # Read
169
+ # Read an Object identified by &#x60;{feedbackSubmissionId}&#x60;. &#x60;{feedbackSubmissionId}&#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.
170
+ # @param feedback_submission_id [String]
191
171
  # @param [Hash] opts the optional parameters
192
- # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
193
- def submissions_with_http_info(simple_public_object_input, opts = {})
172
+ # @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.
173
+ # @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.
174
+ # @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.
175
+ # @option opts [Boolean] :archived Whether to return only results that have been archived.
176
+ # @option opts [String] :id_property The name of a property whose values are unique for this object type
177
+ # @return [Array<(SimplePublicObjectWithAssociations, Integer, Hash)>] SimplePublicObjectWithAssociations data, response status code and response headers
178
+ def get_by_id_with_http_info(feedback_submission_id, opts = {})
194
179
  if @api_client.config.debugging
195
- @api_client.config.logger.debug 'Calling API: BasicApi.submissions ...'
180
+ @api_client.config.logger.debug 'Calling API: BasicApi.get_by_id ...'
196
181
  end
197
- # verify the required parameter 'simple_public_object_input' is set
198
- if @api_client.config.client_side_validation && simple_public_object_input.nil?
199
- fail ArgumentError, "Missing the required parameter 'simple_public_object_input' when calling BasicApi.submissions"
182
+ # verify the required parameter 'feedback_submission_id' is set
183
+ if @api_client.config.client_side_validation && feedback_submission_id.nil?
184
+ fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling BasicApi.get_by_id"
200
185
  end
201
186
  # resource path
202
- local_var_path = '/crm/v3/objects/feedback_submissions'
187
+ local_var_path = '/crm/v3/objects/feedback_submissions/{feedbackSubmissionId}'.sub('{' + 'feedbackSubmissionId' + '}', CGI.escape(feedback_submission_id.to_s))
203
188
 
204
189
  # query parameters
205
190
  query_params = opts[:query_params] || {}
191
+ query_params[:'properties'] = @api_client.build_collection_param(opts[:'properties'], :csv) if !opts[:'properties'].nil?
192
+ query_params[:'propertiesWithHistory'] = @api_client.build_collection_param(opts[:'properties_with_history'], :multi) if !opts[:'properties_with_history'].nil?
193
+ query_params[:'associations'] = @api_client.build_collection_param(opts[:'associations'], :multi) if !opts[:'associations'].nil?
194
+ query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
195
+ query_params[:'idProperty'] = opts[:'id_property'] if !opts[:'id_property'].nil?
206
196
 
207
197
  # header parameters
208
198
  header_params = opts[:header_params] || {}
209
199
  # HTTP header 'Accept' (if needed)
210
200
  header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
211
- # HTTP header 'Content-Type'
212
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
213
201
 
214
202
  # form parameters
215
203
  form_params = opts[:form_params] || {}
216
204
 
217
205
  # http body (model)
218
- post_body = opts[:body] || @api_client.object_to_http_body(simple_public_object_input)
206
+ post_body = opts[:body]
219
207
 
220
208
  # return_type
221
- return_type = opts[:return_type] || 'SimplePublicObject'
209
+ return_type = opts[:return_type] || 'SimplePublicObjectWithAssociations'
222
210
 
223
211
  # auth_names
224
212
  auth_names = opts[:auth_names] || ['hapikey']
@@ -232,46 +220,58 @@ module Hubspot
232
220
  :return_type => return_type
233
221
  )
234
222
 
235
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
223
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
236
224
  if @api_client.config.debugging
237
- @api_client.config.logger.debug "API called: BasicApi#submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
225
+ @api_client.config.logger.debug "API called: BasicApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
238
226
  end
239
227
  return data, status_code, headers
240
228
  end
241
229
 
242
- # Archive
243
- # Move an Object identified by `{feedbackSubmissionId}` to the recycling bin.
244
- # @param feedback_submission_id [String]
230
+ # List
231
+ # Read a page of feedback submissions. Control what is returned via the `properties` query param.
245
232
  # @param [Hash] opts the optional parameters
246
- # @return [nil]
247
- def submissions_feedback_submission_id(feedback_submission_id, opts = {})
248
- submissions_feedback_submission_id_with_http_info(feedback_submission_id, opts)
249
- nil
233
+ # @option opts [Integer] :limit The maximum number of results to display per page. (default to 10)
234
+ # @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.
235
+ # @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.
236
+ # @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. Usage of this parameter will reduce the maximum number of objects that can be read by a single request.
237
+ # @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.
238
+ # @option opts [Boolean] :archived Whether to return only results that have been archived. (default to false)
239
+ # @return [CollectionResponseSimplePublicObjectWithAssociationsForwardPaging]
240
+ def get_page(opts = {})
241
+ data, _status_code, _headers = get_page_with_http_info(opts)
242
+ data
250
243
  end
251
244
 
252
- # Archive
253
- # Move an Object identified by &#x60;{feedbackSubmissionId}&#x60; to the recycling bin.
254
- # @param feedback_submission_id [String]
245
+ # List
246
+ # Read a page of feedback submissions. Control what is returned via the &#x60;properties&#x60; query param.
255
247
  # @param [Hash] opts the optional parameters
256
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
257
- def submissions_feedback_submission_id_with_http_info(feedback_submission_id, opts = {})
248
+ # @option opts [Integer] :limit The maximum number of results to display per page.
249
+ # @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.
250
+ # @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.
251
+ # @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. Usage of this parameter will reduce the maximum number of objects that can be read by a single request.
252
+ # @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.
253
+ # @option opts [Boolean] :archived Whether to return only results that have been archived.
254
+ # @return [Array<(CollectionResponseSimplePublicObjectWithAssociationsForwardPaging, Integer, Hash)>] CollectionResponseSimplePublicObjectWithAssociationsForwardPaging data, response status code and response headers
255
+ def get_page_with_http_info(opts = {})
258
256
  if @api_client.config.debugging
259
- @api_client.config.logger.debug 'Calling API: BasicApi.submissions_feedback_submission_id ...'
260
- end
261
- # verify the required parameter 'feedback_submission_id' is set
262
- if @api_client.config.client_side_validation && feedback_submission_id.nil?
263
- fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling BasicApi.submissions_feedback_submission_id"
257
+ @api_client.config.logger.debug 'Calling API: BasicApi.get_page ...'
264
258
  end
265
259
  # resource path
266
- local_var_path = '/crm/v3/objects/feedback_submissions/{feedbackSubmissionId}'.sub('{' + 'feedbackSubmissionId' + '}', CGI.escape(feedback_submission_id.to_s))
260
+ local_var_path = '/crm/v3/objects/feedback_submissions'
267
261
 
268
262
  # query parameters
269
263
  query_params = opts[:query_params] || {}
264
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
265
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
266
+ query_params[:'properties'] = @api_client.build_collection_param(opts[:'properties'], :csv) if !opts[:'properties'].nil?
267
+ query_params[:'propertiesWithHistory'] = @api_client.build_collection_param(opts[:'properties_with_history'], :multi) if !opts[:'properties_with_history'].nil?
268
+ query_params[:'associations'] = @api_client.build_collection_param(opts[:'associations'], :multi) if !opts[:'associations'].nil?
269
+ query_params[:'archived'] = opts[:'archived'] if !opts[:'archived'].nil?
270
270
 
271
271
  # header parameters
272
272
  header_params = opts[:header_params] || {}
273
273
  # HTTP header 'Accept' (if needed)
274
- header_params['Accept'] = @api_client.select_header_accept(['*/*'])
274
+ header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
275
275
 
276
276
  # form parameters
277
277
  form_params = opts[:form_params] || {}
@@ -280,7 +280,7 @@ module Hubspot
280
280
  post_body = opts[:body]
281
281
 
282
282
  # return_type
283
- return_type = opts[:return_type]
283
+ return_type = opts[:return_type] || 'CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'
284
284
 
285
285
  # auth_names
286
286
  auth_names = opts[:auth_names] || ['hapikey']
@@ -294,9 +294,9 @@ module Hubspot
294
294
  :return_type => return_type
295
295
  )
296
296
 
297
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
297
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
298
298
  if @api_client.config.debugging
299
- @api_client.config.logger.debug "API called: BasicApi#submissions_feedback_submission_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
299
+ @api_client.config.logger.debug "API called: BasicApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
300
300
  end
301
301
  return data, status_code, headers
302
302
  end
@@ -308,8 +308,8 @@ module Hubspot
308
308
  # @param [Hash] opts the optional parameters
309
309
  # @option opts [String] :id_property The name of a property whose values are unique for this object type
310
310
  # @return [SimplePublicObject]
311
- def submissions_feedback_submission_id_0(feedback_submission_id, simple_public_object_input, opts = {})
312
- data, _status_code, _headers = submissions_feedback_submission_id_0_with_http_info(feedback_submission_id, simple_public_object_input, opts)
311
+ def update(feedback_submission_id, simple_public_object_input, opts = {})
312
+ data, _status_code, _headers = update_with_http_info(feedback_submission_id, simple_public_object_input, opts)
313
313
  data
314
314
  end
315
315
 
@@ -320,17 +320,17 @@ module Hubspot
320
320
  # @param [Hash] opts the optional parameters
321
321
  # @option opts [String] :id_property The name of a property whose values are unique for this object type
322
322
  # @return [Array<(SimplePublicObject, Integer, Hash)>] SimplePublicObject data, response status code and response headers
323
- def submissions_feedback_submission_id_0_with_http_info(feedback_submission_id, simple_public_object_input, opts = {})
323
+ def update_with_http_info(feedback_submission_id, simple_public_object_input, opts = {})
324
324
  if @api_client.config.debugging
325
- @api_client.config.logger.debug 'Calling API: BasicApi.submissions_feedback_submission_id_0 ...'
325
+ @api_client.config.logger.debug 'Calling API: BasicApi.update ...'
326
326
  end
327
327
  # verify the required parameter 'feedback_submission_id' is set
328
328
  if @api_client.config.client_side_validation && feedback_submission_id.nil?
329
- fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling BasicApi.submissions_feedback_submission_id_0"
329
+ fail ArgumentError, "Missing the required parameter 'feedback_submission_id' when calling BasicApi.update"
330
330
  end
331
331
  # verify the required parameter 'simple_public_object_input' is set
332
332
  if @api_client.config.client_side_validation && simple_public_object_input.nil?
333
- fail ArgumentError, "Missing the required parameter 'simple_public_object_input' when calling BasicApi.submissions_feedback_submission_id_0"
333
+ fail ArgumentError, "Missing the required parameter 'simple_public_object_input' when calling BasicApi.update"
334
334
  end
335
335
  # resource path
336
336
  local_var_path = '/crm/v3/objects/feedback_submissions/{feedbackSubmissionId}'.sub('{' + 'feedbackSubmissionId' + '}', CGI.escape(feedback_submission_id.to_s))
@@ -369,7 +369,7 @@ module Hubspot
369
369
 
370
370
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
371
371
  if @api_client.config.debugging
372
- @api_client.config.logger.debug "API called: BasicApi#submissions_feedback_submission_id_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
372
+ @api_client.config.logger.debug "API called: BasicApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
373
373
  end
374
374
  return data, status_code, headers
375
375
  end