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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/Gemfile.lock +25 -23
- data/README.md +49 -44
- data/hubspot-api-client.gemspec +1 -1
- data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +2 -2
- data/lib/hubspot/codegen/cms/site-search/api/public_api.rb +1 -4
- data/lib/hubspot/codegen/cms/site-search/models/content_search_result.rb +2 -2
- data/lib/hubspot/codegen/cms/site-search/models/indexed_data.rb +1 -1
- data/lib/hubspot/codegen/cms/site-search/models/{search_hit_field.rb → indexed_field.rb} +35 -35
- data/lib/hubspot/codegen/cms/url-redirects/api/redirects_api.rb +23 -21
- 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
- data/lib/hubspot/codegen/cms/url-redirects/models/{paging.rb → forward_paging.rb} +3 -3
- data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping.rb +14 -226
- data/lib/hubspot/codegen/cms/url-redirects/models/url_mapping_create_request_body.rb +31 -31
- data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +8 -2
- data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/objects/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/objects/calls/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/objects/emails/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/associations_api.rb +59 -59
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +114 -114
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +61 -61
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/public_object_api.rb +6 -6
- data/lib/hubspot/codegen/crm/objects/meetings/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/objects/notes/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/objects/tasks/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/products/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/crm/quotes/api/public_object_api.rb +6 -6
- data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +2 -2
- data/lib/hubspot/codegen/files/files/api/files_api.rb +2 -2
- data/lib/hubspot/codegen/files/files/api/folders_api.rb +3 -3
- data/lib/hubspot/codegen/marketing/transactional/api/public_smtp_tokens_api.rb +18 -14
- data/lib/hubspot/codegen/marketing/transactional/api/single_send_api.rb +10 -6
- 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
- data/lib/hubspot/codegen/marketing/transactional/models/email_send_status_view.rb +15 -15
- data/lib/hubspot/codegen/marketing/transactional/models/{paging.rb → forward_paging.rb} +3 -3
- data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_email.rb +3 -13
- data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_request_egg.rb +22 -30
- data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_request_egg.rb +1 -1
- data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_view.rb +1 -1
- data/lib/hubspot/configuration.rb +3 -1
- data/lib/hubspot/version.rb +1 -1
- data/spec/codegen/cms/site-search/api/public_api_spec.rb +0 -1
- data/spec/codegen/cms/site-search/models/content_search_result_spec.rb +1 -1
- data/spec/codegen/cms/site-search/models/{search_hit_field_spec.rb → indexed_field_spec.rb} +10 -10
- data/spec/codegen/cms/url-redirects/api/redirects_api_spec.rb +3 -5
- 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
- data/spec/codegen/cms/url-redirects/models/{paging_spec.rb → forward_paging_spec.rb} +6 -6
- data/spec/codegen/cms/url-redirects/models/url_mapping_create_request_body_spec.rb +10 -10
- data/spec/codegen/cms/url-redirects/models/url_mapping_spec.rb +2 -78
- data/spec/codegen/crm/contacts/api/basic_api_spec.rb +2 -0
- data/spec/codegen/crm/contacts/api/gdpr_api_spec.rb +3 -3
- data/spec/codegen/crm/objects/api/gdpr_api_spec.rb +3 -3
- data/spec/codegen/crm/objects/feedback_submissions/api/associations_api_spec.rb +14 -14
- data/spec/codegen/crm/objects/feedback_submissions/api/basic_api_spec.rb +26 -26
- data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +17 -17
- data/spec/codegen/crm/objects/feedback_submissions/api/public_object_api_spec.rb +2 -2
- data/spec/codegen/crm/quotes/api/public_object_api_spec.rb +2 -2
- data/spec/codegen/marketing/transactional/api/public_smtp_tokens_api_spec.rb +2 -2
- data/spec/codegen/marketing/transactional/api/single_send_api_spec.rb +1 -1
- 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
- data/spec/codegen/marketing/transactional/models/email_send_status_view_spec.rb +7 -7
- data/spec/codegen/marketing/transactional/models/{paging_spec.rb → forward_paging_spec.rb} +6 -6
- data/spec/codegen/marketing/transactional/models/public_single_send_request_egg_spec.rb +4 -4
- data/spec/discovery/crm/objects/feedback_submissions/associations_api_spec.rb +3 -1
- data/spec/discovery/crm/objects/feedback_submissions/basic_api_spec.rb +3 -0
- data/spec/discovery/crm/objects/feedback_submissions/batch_api_spec.rb +4 -1
- data/spec/discovery/crm/objects/feedback_submissions/public_object_api_spec.rb +1 -1
- data/spec/features/crm/objects/feedback_submissions/associations_api_spec.rb +3 -1
- data/spec/features/crm/objects/feedback_submissions/basic_api_spec.rb +3 -0
- data/spec/features/crm/objects/feedback_submissions/batch_api_spec.rb +4 -1
- data/spec/features/crm/objects/feedback_submissions/public_object_api_spec.rb +1 -1
- metadata +20 -27
- 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
|
-
#
|
28
|
-
#
|
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
|
-
# @
|
32
|
-
|
33
|
-
|
34
|
-
|
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
|
-
#
|
43
|
-
#
|
37
|
+
# Archive
|
38
|
+
# Move an Object identified by `{feedbackSubmissionId}` to the recycling bin.
|
44
39
|
# @param feedback_submission_id [String]
|
45
40
|
# @param [Hash] opts the optional parameters
|
46
|
-
# @
|
47
|
-
|
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.
|
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.
|
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(['
|
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]
|
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(:
|
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#
|
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
|
-
#
|
105
|
-
#
|
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
|
-
# @
|
108
|
-
|
109
|
-
|
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
|
-
#
|
120
|
-
#
|
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
|
-
# @
|
123
|
-
|
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.
|
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] || '
|
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(:
|
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#
|
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
|
-
#
|
179
|
-
#
|
180
|
-
# @param
|
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
|
-
# @
|
183
|
-
|
184
|
-
|
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
|
-
#
|
189
|
-
#
|
190
|
-
# @param
|
168
|
+
# Read
|
169
|
+
# 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.
|
170
|
+
# @param feedback_submission_id [String]
|
191
171
|
# @param [Hash] opts the optional parameters
|
192
|
-
# @
|
193
|
-
|
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.
|
180
|
+
@api_client.config.logger.debug 'Calling API: BasicApi.get_by_id ...'
|
196
181
|
end
|
197
|
-
# verify the required parameter '
|
198
|
-
if @api_client.config.client_side_validation &&
|
199
|
-
fail ArgumentError, "Missing the required parameter '
|
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]
|
206
|
+
post_body = opts[:body]
|
219
207
|
|
220
208
|
# return_type
|
221
|
-
return_type = opts[:return_type] || '
|
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(:
|
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#
|
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
|
-
#
|
243
|
-
#
|
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
|
-
# @
|
247
|
-
|
248
|
-
|
249
|
-
|
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 `paging.next.after` 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
|
-
#
|
253
|
-
#
|
254
|
-
# @param feedback_submission_id [String]
|
245
|
+
# List
|
246
|
+
# Read a page of feedback submissions. Control what is returned via the `properties` query param.
|
255
247
|
# @param [Hash] opts the optional parameters
|
256
|
-
# @
|
257
|
-
|
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 `paging.next.after` 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.
|
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
|
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(:
|
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#
|
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
|
312
|
-
data, _status_code, _headers =
|
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
|
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.
|
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.
|
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.
|
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#
|
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
|