hubspot-api-client 10.1.0 → 11.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/Gemfile.lock +4 -4
- data/README.md +4 -0
- data/lib/hubspot/codegen/cms/audit-logs/api/{default_api.rb → audit_logs_api.rb} +3 -3
- data/lib/hubspot/codegen/cms/blogs/authors/api/{default_api.rb → author_api.rb} +28 -28
- data/lib/hubspot/codegen/cms/blogs/blog-posts/api/{default_api.rb → blog_post_api.rb} +62 -62
- data/lib/hubspot/codegen/cms/blogs/tags/api/{default_api.rb → tag_api.rb} +28 -28
- data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +2 -2
- data/lib/hubspot/codegen/cms/domains/configuration.rb +0 -7
- data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +102 -102
- data/lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb +21 -21
- data/lib/hubspot/codegen/cms/hubdb/api/tables_api.rb +100 -108
- data/lib/hubspot/codegen/cms/hubdb/api_client.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/api_error.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/configuration.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/{batch_input_hub_db_table_row_v3.rb → batch_input_hub_db_table_row_v3_request.rb} +5 -5
- data/lib/hubspot/codegen/cms/hubdb/models/batch_input_json_node.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/batch_input_string.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/column.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/{column_input.rb → column_request.rb} +71 -47
- data/lib/hubspot/codegen/cms/hubdb/models/error.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/error_detail.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/foreign_id.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/forward_paging.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_clone_request.rb +4 -9
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3.rb +12 -27
- data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_row_v3_input.rb → hub_db_table_row_v3_request.rb} +25 -20
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_v3_input.rb → hub_db_table_v3_request.rb} +53 -53
- data/lib/hubspot/codegen/cms/hubdb/models/import_result.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/next_page.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/option.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/simple_user.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/standard_error.rb +1 -1
- data/lib/hubspot/codegen/cms/performance/api/{default_api.rb → public_performance_api.rb} +5 -5
- data/lib/hubspot/codegen/cms/site-search/api/{default_api.rb → public_api.rb} +7 -7
- data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +15 -15
- data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/companies/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/companies/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/contacts/api/gdpr_api.rb +150 -0
- data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/contacts/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/deals/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/deals/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/imports/api/core_api.rb +2 -2
- data/lib/hubspot/codegen/crm/imports/api/{default_api.rb → public_imports_api.rb} +8 -8
- data/lib/hubspot/codegen/crm/imports/models/public_import_error.rb +4 -4
- data/lib/hubspot/codegen/crm/line_items/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/line_items/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/objects/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/objects/api/gdpr_api.rb +162 -0
- data/lib/hubspot/codegen/crm/objects/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +0 -2
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/objects/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/owners/api/{default_api.rb → owners_api.rb} +6 -6
- data/lib/hubspot/codegen/crm/products/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/products/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/products/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/quotes/api/batch_api.rb +0 -2
- data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/quotes/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/schemas/api/core_api.rb +3 -3
- data/lib/hubspot/codegen/crm/schemas/api/{default_api.rb → public_object_schemas_api.rb} +4 -4
- data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/tickets/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/timeline/api/templates_api.rb +3 -3
- data/lib/hubspot/codegen/crm/timeline/models/{collection_response_timeline_event_template.rb → collection_response_timeline_event_template_no_paging.rb} +7 -17
- data/lib/hubspot/codegen/files/files/api/files_api.rb +12 -6
- data/lib/hubspot/codegen/files/files/api/folders_api.rb +12 -0
- data/lib/hubspot/codegen/files/files/models/collection_response_file.rb +1 -1
- data/lib/hubspot/codegen/files/files/models/error_category.rb +18 -18
- data/lib/hubspot/codegen/marketing/transactional/api/{default_api.rb → public_smtp_tokens_api.rb} +14 -74
- data/lib/hubspot/codegen/marketing/transactional/api/single_send_api.rb +86 -0
- data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +82 -0
- data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +140 -0
- data/lib/hubspot/codegen/oauth/api/tokens_api.rb +100 -0
- data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +33 -1
- data/lib/hubspot/codegen/oauth/models/token_response_if.rb +27 -4
- data/lib/hubspot/version.rb +1 -1
- data/lib/hubspot-api-client.rb +16 -3
- data/pkg/hubspot-api-client-10.1.1.gem +0 -0
- data/spec/codegen/cms/audit-logs/api/{default_api_spec.rb → audit_logs_api_spec.rb} +6 -6
- data/spec/codegen/cms/blogs/authors/api/{default_api_spec.rb → author_api_spec.rb} +6 -6
- data/spec/codegen/cms/blogs/blog-posts/api/{default_api_spec.rb → blog_post_api_spec.rb} +6 -6
- data/spec/codegen/cms/blogs/tags/api/{default_api_spec.rb → tag_api_spec.rb} +6 -6
- data/spec/codegen/cms/hubdb/api/rows_api_spec.rb +18 -18
- data/spec/codegen/cms/hubdb/api/rows_batch_api_spec.rb +4 -4
- data/spec/codegen/cms/hubdb/api/tables_api_spec.rb +35 -36
- data/spec/codegen/cms/hubdb/models/{batch_input_hub_db_table_row_v3_spec.rb → batch_input_hub_db_table_row_v3_request_spec.rb} +7 -7
- data/spec/codegen/cms/hubdb/models/batch_input_json_node_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/batch_input_string_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/{column_input_spec.rb → column_request_spec.rb} +14 -22
- data/spec/codegen/cms/hubdb/models/column_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/error_detail_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/error_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/foreign_id_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/forward_paging_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/hub_db_table_clone_request_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/{hub_db_table_row_v3_input_spec.rb → hub_db_table_row_v3_request_spec.rb} +10 -10
- data/spec/codegen/cms/hubdb/models/hub_db_table_row_v3_spec.rb +7 -1
- data/spec/codegen/cms/hubdb/models/{hub_db_table_v3_input_spec.rb → hub_db_table_v3_request_spec.rb} +13 -13
- data/spec/codegen/cms/hubdb/models/hub_db_table_v3_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/import_result_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/next_page_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/option_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/simple_user_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/standard_error_spec.rb +1 -1
- data/spec/codegen/cms/performance/api/{default_api_spec.rb → public_performance_api_spec.rb} +6 -6
- data/spec/codegen/cms/site-search/api/{default_api_spec.rb → public_api_spec.rb} +6 -6
- data/spec/codegen/cms/site-search/models/search_hit_field_spec.rb +2 -2
- data/spec/codegen/crm/companies/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/companies/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/companies/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/contacts/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/contacts/api/gdpr_api_spec.rb +59 -0
- data/spec/codegen/crm/contacts/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/contacts/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/deals/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/deals/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/deals/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/imports/api/{default_api_spec.rb → public_imports_api_spec.rb} +8 -8
- data/spec/codegen/crm/imports/models/public_import_error_spec.rb +2 -2
- data/spec/codegen/crm/line_items/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/line_items/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/line_items/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/objects/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/objects/api/gdpr_api_spec.rb +61 -0
- data/spec/codegen/crm/objects/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +0 -1
- data/spec/codegen/crm/objects/feedback_submissions/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/objects/feedback_submissions/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/objects/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/owners/api/{default_api_spec.rb → owners_api_spec.rb} +6 -6
- data/spec/codegen/crm/products/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/products/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/products/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/quotes/api/batch_api_spec.rb +0 -1
- data/spec/codegen/crm/quotes/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/quotes/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/schemas/api/{default_api_spec.rb → public_object_schemas_api_spec.rb} +6 -6
- data/spec/codegen/crm/tickets/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/tickets/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/tickets/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/timeline/api/templates_api_spec.rb +1 -1
- data/spec/codegen/crm/timeline/models/{collection_response_timeline_event_template_spec.rb → collection_response_timeline_event_template_no_paging_spec.rb} +6 -12
- data/spec/codegen/files/files/api/files_api_spec.rb +4 -2
- data/spec/codegen/files/files/api/folders_api_spec.rb +4 -0
- data/spec/codegen/files/files/models/error_category_spec.rb +6 -6
- data/spec/codegen/marketing/transactional/api/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +6 -18
- data/spec/codegen/marketing/transactional/api/single_send_api_spec.rb +47 -0
- data/spec/codegen/oauth/api/access_tokens_api_spec.rb +45 -0
- data/spec/codegen/oauth/api/{default_api_spec.rb → refresh_tokens_api_spec.rb} +6 -31
- data/spec/codegen/oauth/api/tokens_api_spec.rb +50 -0
- data/spec/codegen/oauth/models/access_token_info_response_spec.rb +12 -0
- data/spec/codegen/oauth/models/token_response_if_spec.rb +12 -0
- data/spec/features/cms/audit-logs/{default_api_spec.rb → audit_logs_api_spec.rb} +4 -4
- data/spec/features/cms/blogs/authors/{default_api_spec.rb → author_api_spec.rb} +28 -28
- data/spec/features/cms/blogs/blog-posts/{default_api_spec.rb → blog_post_api_spec.rb} +2 -2
- data/spec/features/cms/blogs/tags/{default_api_spec.rb → tag_api_spec.rb} +2 -2
- data/spec/features/cms/hubdb/tables_api_spec.rb +1 -1
- data/spec/features/cms/perfomance/public_perfomance_api_spec.rb +8 -0
- data/spec/features/cms/site-search/{default_api_spec.rb → public_api_spec.rb} +2 -2
- data/spec/features/crm/contacts/gdpr_api_spec.rb +8 -0
- data/spec/features/crm/objects/gdpr_api_spec.rb +8 -0
- data/spec/features/crm/owners/{default_api_spec.rb → owners_api_spec.rb} +2 -2
- data/spec/features/crm/schemas/public_object_schemas_api_spec.rb +7 -0
- data/spec/features/marketing/transactional/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +2 -3
- data/spec/features/marketing/transactional/single_send_api_spec.rb +7 -0
- data/spec/features/oauth/access_tokens_api_spec.rb +7 -0
- data/spec/features/oauth/refresh_tokens_api_spec.rb +8 -0
- data/spec/features/oauth/tokens_api_spec.rb +7 -0
- metadata +96 -82
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_live_input.rb +0 -241
- data/lib/hubspot/codegen/crm/timeline/models/next_page.rb +0 -224
- data/lib/hubspot/codegen/crm/timeline/models/paging.rb +0 -219
- data/lib/hubspot/codegen/crm/timeline/models/previous_page.rb +0 -224
- data/lib/hubspot/codegen/oauth/api/default_api.rb +0 -270
- data/spec/codegen/cms/hubdb/models/hub_db_table_v3_live_input_spec.rb +0 -59
- data/spec/codegen/crm/timeline/models/next_page_spec.rb +0 -47
- data/spec/codegen/crm/timeline/models/paging_spec.rb +0 -47
- data/spec/codegen/crm/timeline/models/previous_page_spec.rb +0 -47
- data/spec/features/cms/perfomance/default_api_spec.rb +0 -8
- data/spec/features/crm/schemas/default_api_spec.rb +0 -7
- data/spec/features/oauth/default_api_spec.rb +0 -10
data/lib/hubspot/codegen/marketing/transactional/api/{default_api.rb → public_smtp_tokens_api.rb}
RENAMED
@@ -15,7 +15,7 @@ require 'cgi'
|
|
15
15
|
module Hubspot
|
16
16
|
module Marketing
|
17
17
|
module Transactional
|
18
|
-
class
|
18
|
+
class PublicSmtpTokensApi
|
19
19
|
attr_accessor :api_client
|
20
20
|
|
21
21
|
def initialize(api_client = ApiClient.default)
|
@@ -38,11 +38,11 @@ module Hubspot
|
|
38
38
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
39
39
|
def archive_token_with_http_info(token_id, opts = {})
|
40
40
|
if @api_client.config.debugging
|
41
|
-
@api_client.config.logger.debug 'Calling API:
|
41
|
+
@api_client.config.logger.debug 'Calling API: PublicSmtpTokensApi.archive_token ...'
|
42
42
|
end
|
43
43
|
# verify the required parameter 'token_id' is set
|
44
44
|
if @api_client.config.client_side_validation && token_id.nil?
|
45
|
-
fail ArgumentError, "Missing the required parameter 'token_id' when calling
|
45
|
+
fail ArgumentError, "Missing the required parameter 'token_id' when calling PublicSmtpTokensApi.archive_token"
|
46
46
|
end
|
47
47
|
# resource path
|
48
48
|
local_var_path = '/marketing/v3/transactional/smtp-tokens/{tokenId}'.sub('{' + 'tokenId' + '}', CGI.escape(token_id.to_s))
|
@@ -78,7 +78,7 @@ module Hubspot
|
|
78
78
|
|
79
79
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
80
80
|
if @api_client.config.debugging
|
81
|
-
@api_client.config.logger.debug "API called:
|
81
|
+
@api_client.config.logger.debug "API called: PublicSmtpTokensApi#archive_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
82
|
end
|
83
83
|
return data, status_code, headers
|
84
84
|
end
|
@@ -100,7 +100,7 @@ module Hubspot
|
|
100
100
|
# @return [Array<(SmtpApiTokenView, Integer, Hash)>] SmtpApiTokenView data, response status code and response headers
|
101
101
|
def create_token_with_http_info(opts = {})
|
102
102
|
if @api_client.config.debugging
|
103
|
-
@api_client.config.logger.debug 'Calling API:
|
103
|
+
@api_client.config.logger.debug 'Calling API: PublicSmtpTokensApi.create_token ...'
|
104
104
|
end
|
105
105
|
# resource path
|
106
106
|
local_var_path = '/marketing/v3/transactional/smtp-tokens'
|
@@ -138,7 +138,7 @@ module Hubspot
|
|
138
138
|
|
139
139
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
140
140
|
if @api_client.config.debugging
|
141
|
-
@api_client.config.logger.debug "API called:
|
141
|
+
@api_client.config.logger.debug "API called: PublicSmtpTokensApi#create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
142
|
end
|
143
143
|
return data, status_code, headers
|
144
144
|
end
|
@@ -160,11 +160,11 @@ module Hubspot
|
|
160
160
|
# @return [Array<(SmtpApiTokenView, Integer, Hash)>] SmtpApiTokenView data, response status code and response headers
|
161
161
|
def get_token_by_id_with_http_info(token_id, opts = {})
|
162
162
|
if @api_client.config.debugging
|
163
|
-
@api_client.config.logger.debug 'Calling API:
|
163
|
+
@api_client.config.logger.debug 'Calling API: PublicSmtpTokensApi.get_token_by_id ...'
|
164
164
|
end
|
165
165
|
# verify the required parameter 'token_id' is set
|
166
166
|
if @api_client.config.client_side_validation && token_id.nil?
|
167
|
-
fail ArgumentError, "Missing the required parameter 'token_id' when calling
|
167
|
+
fail ArgumentError, "Missing the required parameter 'token_id' when calling PublicSmtpTokensApi.get_token_by_id"
|
168
168
|
end
|
169
169
|
# resource path
|
170
170
|
local_var_path = '/marketing/v3/transactional/smtp-tokens/{tokenId}'.sub('{' + 'tokenId' + '}', CGI.escape(token_id.to_s))
|
@@ -200,7 +200,7 @@ module Hubspot
|
|
200
200
|
|
201
201
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
202
202
|
if @api_client.config.debugging
|
203
|
-
@api_client.config.logger.debug "API called:
|
203
|
+
@api_client.config.logger.debug "API called: PublicSmtpTokensApi#get_token_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
204
204
|
end
|
205
205
|
return data, status_code, headers
|
206
206
|
end
|
@@ -228,7 +228,7 @@ module Hubspot
|
|
228
228
|
# @return [Array<(CollectionResponseSmtpApiTokenView, Integer, Hash)>] CollectionResponseSmtpApiTokenView data, response status code and response headers
|
229
229
|
def get_tokens_page_with_http_info(opts = {})
|
230
230
|
if @api_client.config.debugging
|
231
|
-
@api_client.config.logger.debug 'Calling API:
|
231
|
+
@api_client.config.logger.debug 'Calling API: PublicSmtpTokensApi.get_tokens_page ...'
|
232
232
|
end
|
233
233
|
# resource path
|
234
234
|
local_var_path = '/marketing/v3/transactional/smtp-tokens'
|
@@ -268,7 +268,7 @@ module Hubspot
|
|
268
268
|
|
269
269
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
270
270
|
if @api_client.config.debugging
|
271
|
-
@api_client.config.logger.debug "API called:
|
271
|
+
@api_client.config.logger.debug "API called: PublicSmtpTokensApi#get_tokens_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
272
272
|
end
|
273
273
|
return data, status_code, headers
|
274
274
|
end
|
@@ -290,11 +290,11 @@ module Hubspot
|
|
290
290
|
# @return [Array<(SmtpApiTokenView, Integer, Hash)>] SmtpApiTokenView data, response status code and response headers
|
291
291
|
def reset_password_with_http_info(token_id, opts = {})
|
292
292
|
if @api_client.config.debugging
|
293
|
-
@api_client.config.logger.debug 'Calling API:
|
293
|
+
@api_client.config.logger.debug 'Calling API: PublicSmtpTokensApi.reset_password ...'
|
294
294
|
end
|
295
295
|
# verify the required parameter 'token_id' is set
|
296
296
|
if @api_client.config.client_side_validation && token_id.nil?
|
297
|
-
fail ArgumentError, "Missing the required parameter 'token_id' when calling
|
297
|
+
fail ArgumentError, "Missing the required parameter 'token_id' when calling PublicSmtpTokensApi.reset_password"
|
298
298
|
end
|
299
299
|
# resource path
|
300
300
|
local_var_path = '/marketing/v3/transactional/smtp-tokens/{tokenId}/password-reset'.sub('{' + 'tokenId' + '}', CGI.escape(token_id.to_s))
|
@@ -330,67 +330,7 @@ module Hubspot
|
|
330
330
|
|
331
331
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
332
332
|
if @api_client.config.debugging
|
333
|
-
@api_client.config.logger.debug "API called:
|
334
|
-
end
|
335
|
-
return data, status_code, headers
|
336
|
-
end
|
337
|
-
|
338
|
-
# Send a single transactional email asynchronously.
|
339
|
-
# Asynchronously send a transactional email. Returns the status of the email send with a statusId that can be used to continuously query for the status using the Email Send Status API.
|
340
|
-
# @param [Hash] opts the optional parameters
|
341
|
-
# @option opts [PublicSingleSendRequestEgg] :public_single_send_request_egg A request object describing the email to send.
|
342
|
-
# @return [EmailSendStatusView]
|
343
|
-
def send_email(opts = {})
|
344
|
-
data, _status_code, _headers = send_email_with_http_info(opts)
|
345
|
-
data
|
346
|
-
end
|
347
|
-
|
348
|
-
# Send a single transactional email asynchronously.
|
349
|
-
# Asynchronously send a transactional email. Returns the status of the email send with a statusId that can be used to continuously query for the status using the Email Send Status API.
|
350
|
-
# @param [Hash] opts the optional parameters
|
351
|
-
# @option opts [PublicSingleSendRequestEgg] :public_single_send_request_egg A request object describing the email to send.
|
352
|
-
# @return [Array<(EmailSendStatusView, Integer, Hash)>] EmailSendStatusView data, response status code and response headers
|
353
|
-
def send_email_with_http_info(opts = {})
|
354
|
-
if @api_client.config.debugging
|
355
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.send_email ...'
|
356
|
-
end
|
357
|
-
# resource path
|
358
|
-
local_var_path = '/marketing/v3/transactional/single-email/send'
|
359
|
-
|
360
|
-
# query parameters
|
361
|
-
query_params = opts[:query_params] || {}
|
362
|
-
|
363
|
-
# header parameters
|
364
|
-
header_params = opts[:header_params] || {}
|
365
|
-
# HTTP header 'Accept' (if needed)
|
366
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
367
|
-
# HTTP header 'Content-Type'
|
368
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
369
|
-
|
370
|
-
# form parameters
|
371
|
-
form_params = opts[:form_params] || {}
|
372
|
-
|
373
|
-
# http body (model)
|
374
|
-
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'public_single_send_request_egg'])
|
375
|
-
|
376
|
-
# return_type
|
377
|
-
return_type = opts[:return_type] || 'EmailSendStatusView'
|
378
|
-
|
379
|
-
# auth_names
|
380
|
-
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
381
|
-
|
382
|
-
new_options = opts.merge(
|
383
|
-
:header_params => header_params,
|
384
|
-
:query_params => query_params,
|
385
|
-
:form_params => form_params,
|
386
|
-
:body => post_body,
|
387
|
-
:auth_names => auth_names,
|
388
|
-
:return_type => return_type
|
389
|
-
)
|
390
|
-
|
391
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
392
|
-
if @api_client.config.debugging
|
393
|
-
@api_client.config.logger.debug "API called: DefaultApi#send_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
333
|
+
@api_client.config.logger.debug "API called: PublicSmtpTokensApi#reset_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
394
334
|
end
|
395
335
|
return data, status_code, headers
|
396
336
|
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
=begin
|
2
|
+
#Transactional Email
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module Marketing
|
17
|
+
module Transactional
|
18
|
+
class SingleSendApi
|
19
|
+
attr_accessor :api_client
|
20
|
+
|
21
|
+
def initialize(api_client = ApiClient.default)
|
22
|
+
@api_client = api_client
|
23
|
+
end
|
24
|
+
# Send a single transactional email asynchronously.
|
25
|
+
# Asynchronously send a transactional email. Returns the status of the email send with a statusId that can be used to continuously query for the status using the Email Send Status API.
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [PublicSingleSendRequestEgg] :public_single_send_request_egg A request object describing the email to send.
|
28
|
+
# @return [EmailSendStatusView]
|
29
|
+
def send_email(opts = {})
|
30
|
+
data, _status_code, _headers = send_email_with_http_info(opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Send a single transactional email asynchronously.
|
35
|
+
# Asynchronously send a transactional email. Returns the status of the email send with a statusId that can be used to continuously query for the status using the Email Send Status API.
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [PublicSingleSendRequestEgg] :public_single_send_request_egg A request object describing the email to send.
|
38
|
+
# @return [Array<(EmailSendStatusView, Integer, Hash)>] EmailSendStatusView data, response status code and response headers
|
39
|
+
def send_email_with_http_info(opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: SingleSendApi.send_email ...'
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/marketing/v3/transactional/single-email/send'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
53
|
+
# HTTP header 'Content-Type'
|
54
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'public_single_send_request_egg'])
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:return_type] || 'EmailSendStatusView'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: SingleSendApi#send_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
=begin
|
2
|
+
#OAuthService
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module OAuth
|
17
|
+
class AccessTokensApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client = ApiClient.default)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
# @param token [String]
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [AccessTokenInfoResponse]
|
26
|
+
def get_access_token(token, opts = {})
|
27
|
+
data, _status_code, _headers = get_access_token_with_http_info(token, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# @param token [String]
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @return [Array<(AccessTokenInfoResponse, Integer, Hash)>] AccessTokenInfoResponse data, response status code and response headers
|
34
|
+
def get_access_token_with_http_info(token, opts = {})
|
35
|
+
if @api_client.config.debugging
|
36
|
+
@api_client.config.logger.debug 'Calling API: AccessTokensApi.get_access_token ...'
|
37
|
+
end
|
38
|
+
# verify the required parameter 'token' is set
|
39
|
+
if @api_client.config.client_side_validation && token.nil?
|
40
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling AccessTokensApi.get_access_token"
|
41
|
+
end
|
42
|
+
# resource path
|
43
|
+
local_var_path = '/oauth/v1/access-tokens/{token}'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
44
|
+
|
45
|
+
# query parameters
|
46
|
+
query_params = opts[:query_params] || {}
|
47
|
+
|
48
|
+
# header parameters
|
49
|
+
header_params = opts[:header_params] || {}
|
50
|
+
# HTTP header 'Accept' (if needed)
|
51
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
52
|
+
|
53
|
+
# form parameters
|
54
|
+
form_params = opts[:form_params] || {}
|
55
|
+
|
56
|
+
# http body (model)
|
57
|
+
post_body = opts[:body]
|
58
|
+
|
59
|
+
# return_type
|
60
|
+
return_type = opts[:return_type] || 'AccessTokenInfoResponse'
|
61
|
+
|
62
|
+
# auth_names
|
63
|
+
auth_names = opts[:auth_names] || []
|
64
|
+
|
65
|
+
new_options = opts.merge(
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => return_type
|
72
|
+
)
|
73
|
+
|
74
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
75
|
+
if @api_client.config.debugging
|
76
|
+
@api_client.config.logger.debug "API called: AccessTokensApi#get_access_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
77
|
+
end
|
78
|
+
return data, status_code, headers
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
=begin
|
2
|
+
#OAuthService
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module OAuth
|
17
|
+
class RefreshTokensApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client = ApiClient.default)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
# @param token [String]
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [Error]
|
26
|
+
def archive_refresh_token(token, opts = {})
|
27
|
+
data, _status_code, _headers = archive_refresh_token_with_http_info(token, opts)
|
28
|
+
data
|
29
|
+
end
|
30
|
+
|
31
|
+
# @param token [String]
|
32
|
+
# @param [Hash] opts the optional parameters
|
33
|
+
# @return [Array<(Error, Integer, Hash)>] Error data, response status code and response headers
|
34
|
+
def archive_refresh_token_with_http_info(token, opts = {})
|
35
|
+
if @api_client.config.debugging
|
36
|
+
@api_client.config.logger.debug 'Calling API: RefreshTokensApi.archive_refresh_token ...'
|
37
|
+
end
|
38
|
+
# verify the required parameter 'token' is set
|
39
|
+
if @api_client.config.client_side_validation && token.nil?
|
40
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling RefreshTokensApi.archive_refresh_token"
|
41
|
+
end
|
42
|
+
# resource path
|
43
|
+
local_var_path = '/oauth/v1/refresh-tokens/{token}'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
44
|
+
|
45
|
+
# query parameters
|
46
|
+
query_params = opts[:query_params] || {}
|
47
|
+
|
48
|
+
# header parameters
|
49
|
+
header_params = opts[:header_params] || {}
|
50
|
+
# HTTP header 'Accept' (if needed)
|
51
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
52
|
+
|
53
|
+
# form parameters
|
54
|
+
form_params = opts[:form_params] || {}
|
55
|
+
|
56
|
+
# http body (model)
|
57
|
+
post_body = opts[:body]
|
58
|
+
|
59
|
+
# return_type
|
60
|
+
return_type = opts[:return_type] || 'Error'
|
61
|
+
|
62
|
+
# auth_names
|
63
|
+
auth_names = opts[:auth_names] || []
|
64
|
+
|
65
|
+
new_options = opts.merge(
|
66
|
+
:header_params => header_params,
|
67
|
+
:query_params => query_params,
|
68
|
+
:form_params => form_params,
|
69
|
+
:body => post_body,
|
70
|
+
:auth_names => auth_names,
|
71
|
+
:return_type => return_type
|
72
|
+
)
|
73
|
+
|
74
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
75
|
+
if @api_client.config.debugging
|
76
|
+
@api_client.config.logger.debug "API called: RefreshTokensApi#archive_refresh_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
77
|
+
end
|
78
|
+
return data, status_code, headers
|
79
|
+
end
|
80
|
+
|
81
|
+
# @param token [String]
|
82
|
+
# @param [Hash] opts the optional parameters
|
83
|
+
# @return [RefreshTokenInfoResponse]
|
84
|
+
def get_refresh_token(token, opts = {})
|
85
|
+
data, _status_code, _headers = get_refresh_token_with_http_info(token, opts)
|
86
|
+
data
|
87
|
+
end
|
88
|
+
|
89
|
+
# @param token [String]
|
90
|
+
# @param [Hash] opts the optional parameters
|
91
|
+
# @return [Array<(RefreshTokenInfoResponse, Integer, Hash)>] RefreshTokenInfoResponse data, response status code and response headers
|
92
|
+
def get_refresh_token_with_http_info(token, opts = {})
|
93
|
+
if @api_client.config.debugging
|
94
|
+
@api_client.config.logger.debug 'Calling API: RefreshTokensApi.get_refresh_token ...'
|
95
|
+
end
|
96
|
+
# verify the required parameter 'token' is set
|
97
|
+
if @api_client.config.client_side_validation && token.nil?
|
98
|
+
fail ArgumentError, "Missing the required parameter 'token' when calling RefreshTokensApi.get_refresh_token"
|
99
|
+
end
|
100
|
+
# resource path
|
101
|
+
local_var_path = '/oauth/v1/refresh-tokens/{token}'.sub('{' + 'token' + '}', CGI.escape(token.to_s))
|
102
|
+
|
103
|
+
# query parameters
|
104
|
+
query_params = opts[:query_params] || {}
|
105
|
+
|
106
|
+
# header parameters
|
107
|
+
header_params = opts[:header_params] || {}
|
108
|
+
# HTTP header 'Accept' (if needed)
|
109
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
110
|
+
|
111
|
+
# form parameters
|
112
|
+
form_params = opts[:form_params] || {}
|
113
|
+
|
114
|
+
# http body (model)
|
115
|
+
post_body = opts[:body]
|
116
|
+
|
117
|
+
# return_type
|
118
|
+
return_type = opts[:return_type] || 'RefreshTokenInfoResponse'
|
119
|
+
|
120
|
+
# auth_names
|
121
|
+
auth_names = opts[:auth_names] || []
|
122
|
+
|
123
|
+
new_options = opts.merge(
|
124
|
+
:header_params => header_params,
|
125
|
+
:query_params => query_params,
|
126
|
+
:form_params => form_params,
|
127
|
+
:body => post_body,
|
128
|
+
:auth_names => auth_names,
|
129
|
+
:return_type => return_type
|
130
|
+
)
|
131
|
+
|
132
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
133
|
+
if @api_client.config.debugging
|
134
|
+
@api_client.config.logger.debug "API called: RefreshTokensApi#get_refresh_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
135
|
+
end
|
136
|
+
return data, status_code, headers
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
=begin
|
2
|
+
#OAuthService
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module OAuth
|
17
|
+
class TokensApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client = ApiClient.default)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [String] :grant_type
|
25
|
+
# @option opts [String] :code
|
26
|
+
# @option opts [String] :redirect_uri
|
27
|
+
# @option opts [String] :client_id
|
28
|
+
# @option opts [String] :client_secret
|
29
|
+
# @option opts [String] :refresh_token
|
30
|
+
# @return [TokenResponseIF]
|
31
|
+
def create_token(opts = {})
|
32
|
+
data, _status_code, _headers = create_token_with_http_info(opts)
|
33
|
+
data
|
34
|
+
end
|
35
|
+
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [String] :grant_type
|
38
|
+
# @option opts [String] :code
|
39
|
+
# @option opts [String] :redirect_uri
|
40
|
+
# @option opts [String] :client_id
|
41
|
+
# @option opts [String] :client_secret
|
42
|
+
# @option opts [String] :refresh_token
|
43
|
+
# @return [Array<(TokenResponseIF, Integer, Hash)>] TokenResponseIF data, response status code and response headers
|
44
|
+
def create_token_with_http_info(opts = {})
|
45
|
+
if @api_client.config.debugging
|
46
|
+
@api_client.config.logger.debug 'Calling API: TokensApi.create_token ...'
|
47
|
+
end
|
48
|
+
allowable_values = ["authorization_code", "refresh_token"]
|
49
|
+
if @api_client.config.client_side_validation && opts[:'grant_type'] && !allowable_values.include?(opts[:'grant_type'])
|
50
|
+
fail ArgumentError, "invalid value for \"grant_type\", must be one of #{allowable_values}"
|
51
|
+
end
|
52
|
+
# resource path
|
53
|
+
local_var_path = '/oauth/v1/token'
|
54
|
+
|
55
|
+
# query parameters
|
56
|
+
query_params = opts[:query_params] || {}
|
57
|
+
|
58
|
+
# header parameters
|
59
|
+
header_params = opts[:header_params] || {}
|
60
|
+
# HTTP header 'Accept' (if needed)
|
61
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
62
|
+
# HTTP header 'Content-Type'
|
63
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
64
|
+
|
65
|
+
# form parameters
|
66
|
+
form_params = opts[:form_params] || {}
|
67
|
+
form_params['grant_type'] = opts[:'grant_type'] if !opts[:'grant_type'].nil?
|
68
|
+
form_params['code'] = opts[:'code'] if !opts[:'code'].nil?
|
69
|
+
form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
|
70
|
+
form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
|
71
|
+
form_params['client_secret'] = opts[:'client_secret'] if !opts[:'client_secret'].nil?
|
72
|
+
form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil?
|
73
|
+
|
74
|
+
# http body (model)
|
75
|
+
post_body = opts[:body]
|
76
|
+
|
77
|
+
# return_type
|
78
|
+
return_type = opts[:return_type] || 'TokenResponseIF'
|
79
|
+
|
80
|
+
# auth_names
|
81
|
+
auth_names = opts[:auth_names] || []
|
82
|
+
|
83
|
+
new_options = opts.merge(
|
84
|
+
:header_params => header_params,
|
85
|
+
:query_params => query_params,
|
86
|
+
:form_params => form_params,
|
87
|
+
:body => post_body,
|
88
|
+
:auth_names => auth_names,
|
89
|
+
:return_type => return_type
|
90
|
+
)
|
91
|
+
|
92
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
93
|
+
if @api_client.config.debugging
|
94
|
+
@api_client.config.logger.debug "API called: TokensApi#create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
95
|
+
end
|
96
|
+
return data, status_code, headers
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -25,6 +25,10 @@ module Hubspot
|
|
25
25
|
|
26
26
|
attr_accessor :scope_to_scope_group_pks
|
27
27
|
|
28
|
+
attr_accessor :trial_scopes
|
29
|
+
|
30
|
+
attr_accessor :trial_scope_to_scope_group_pks
|
31
|
+
|
28
32
|
attr_accessor :hub_id
|
29
33
|
|
30
34
|
attr_accessor :app_id
|
@@ -43,6 +47,8 @@ module Hubspot
|
|
43
47
|
:'hub_domain' => :'hub_domain',
|
44
48
|
:'scopes' => :'scopes',
|
45
49
|
:'scope_to_scope_group_pks' => :'scope_to_scope_group_pks',
|
50
|
+
:'trial_scopes' => :'trial_scopes',
|
51
|
+
:'trial_scope_to_scope_group_pks' => :'trial_scope_to_scope_group_pks',
|
46
52
|
:'hub_id' => :'hub_id',
|
47
53
|
:'app_id' => :'app_id',
|
48
54
|
:'expires_in' => :'expires_in',
|
@@ -59,6 +65,8 @@ module Hubspot
|
|
59
65
|
:'hub_domain' => :'String',
|
60
66
|
:'scopes' => :'Array<String>',
|
61
67
|
:'scope_to_scope_group_pks' => :'Array<Integer>',
|
68
|
+
:'trial_scopes' => :'Array<String>',
|
69
|
+
:'trial_scope_to_scope_group_pks' => :'Array<Integer>',
|
62
70
|
:'hub_id' => :'Integer',
|
63
71
|
:'app_id' => :'Integer',
|
64
72
|
:'expires_in' => :'Integer',
|
@@ -112,6 +120,18 @@ module Hubspot
|
|
112
120
|
end
|
113
121
|
end
|
114
122
|
|
123
|
+
if attributes.key?(:'trial_scopes')
|
124
|
+
if (value = attributes[:'trial_scopes']).is_a?(Array)
|
125
|
+
self.trial_scopes = value
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'trial_scope_to_scope_group_pks')
|
130
|
+
if (value = attributes[:'trial_scope_to_scope_group_pks']).is_a?(Array)
|
131
|
+
self.trial_scope_to_scope_group_pks = value
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
115
135
|
if attributes.key?(:'hub_id')
|
116
136
|
self.hub_id = attributes[:'hub_id']
|
117
137
|
end
|
@@ -149,6 +169,14 @@ module Hubspot
|
|
149
169
|
invalid_properties.push('invalid value for "scope_to_scope_group_pks", scope_to_scope_group_pks cannot be nil.')
|
150
170
|
end
|
151
171
|
|
172
|
+
if @trial_scopes.nil?
|
173
|
+
invalid_properties.push('invalid value for "trial_scopes", trial_scopes cannot be nil.')
|
174
|
+
end
|
175
|
+
|
176
|
+
if @trial_scope_to_scope_group_pks.nil?
|
177
|
+
invalid_properties.push('invalid value for "trial_scope_to_scope_group_pks", trial_scope_to_scope_group_pks cannot be nil.')
|
178
|
+
end
|
179
|
+
|
152
180
|
if @hub_id.nil?
|
153
181
|
invalid_properties.push('invalid value for "hub_id", hub_id cannot be nil.')
|
154
182
|
end
|
@@ -178,6 +206,8 @@ module Hubspot
|
|
178
206
|
return false if @token.nil?
|
179
207
|
return false if @scopes.nil?
|
180
208
|
return false if @scope_to_scope_group_pks.nil?
|
209
|
+
return false if @trial_scopes.nil?
|
210
|
+
return false if @trial_scope_to_scope_group_pks.nil?
|
181
211
|
return false if @hub_id.nil?
|
182
212
|
return false if @app_id.nil?
|
183
213
|
return false if @expires_in.nil?
|
@@ -196,6 +226,8 @@ module Hubspot
|
|
196
226
|
hub_domain == o.hub_domain &&
|
197
227
|
scopes == o.scopes &&
|
198
228
|
scope_to_scope_group_pks == o.scope_to_scope_group_pks &&
|
229
|
+
trial_scopes == o.trial_scopes &&
|
230
|
+
trial_scope_to_scope_group_pks == o.trial_scope_to_scope_group_pks &&
|
199
231
|
hub_id == o.hub_id &&
|
200
232
|
app_id == o.app_id &&
|
201
233
|
expires_in == o.expires_in &&
|
@@ -212,7 +244,7 @@ module Hubspot
|
|
212
244
|
# Calculates hash code according to all attributes.
|
213
245
|
# @return [Integer] Hash code
|
214
246
|
def hash
|
215
|
-
[token, user, hub_domain, scopes, scope_to_scope_group_pks, hub_id, app_id, expires_in, user_id, token_type].hash
|
247
|
+
[token, user, hub_domain, scopes, scope_to_scope_group_pks, trial_scopes, trial_scope_to_scope_group_pks, hub_id, app_id, expires_in, user_id, token_type].hash
|
216
248
|
end
|
217
249
|
|
218
250
|
# Builds the object from hash
|