hubspot-api-client 10.0.0 → 11.1.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 +13 -0
- data/Gemfile.lock +3 -3
- data/README.md +4 -0
- data/lib/hubspot/codegen/automation/actions/api_client.rb +12 -12
- data/lib/hubspot/codegen/cms/audit-logs/api/{default_api.rb → audit_logs_api.rb} +3 -3
- data/lib/hubspot/codegen/cms/audit-logs/api_client.rb +12 -12
- data/lib/hubspot/codegen/cms/blogs/authors/api/{default_api.rb → author_api.rb} +28 -28
- data/lib/hubspot/codegen/cms/blogs/authors/api_client.rb +12 -12
- data/lib/hubspot/codegen/cms/blogs/blog-posts/api/{default_api.rb → blog_post_api.rb} +62 -62
- data/lib/hubspot/codegen/cms/blogs/blog-posts/api_client.rb +12 -12
- data/lib/hubspot/codegen/cms/blogs/tags/api/{default_api.rb → tag_api.rb} +28 -28
- data/lib/hubspot/codegen/cms/blogs/tags/api_client.rb +12 -12
- data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +2 -2
- data/lib/hubspot/codegen/cms/domains/api_client.rb +12 -12
- 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 +13 -13
- 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/performance/api_client.rb +12 -12
- data/lib/hubspot/codegen/cms/site-search/api/{default_api.rb → public_api.rb} +7 -7
- data/lib/hubspot/codegen/cms/site-search/api_client.rb +12 -12
- data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +15 -15
- data/lib/hubspot/codegen/cms/url-redirects/api_client.rb +12 -12
- data/lib/hubspot/codegen/communication_preferences/api/definition_api.rb +80 -0
- data/lib/hubspot/codegen/communication_preferences/api/status_api.rb +214 -0
- data/lib/hubspot/codegen/communication_preferences/api_client.rb +404 -0
- data/lib/hubspot/codegen/communication_preferences/api_error.rb +59 -0
- data/lib/hubspot/codegen/communication_preferences/configuration.rb +254 -0
- data/lib/hubspot/codegen/communication_preferences/models/error.rb +290 -0
- data/lib/hubspot/codegen/communication_preferences/models/error_detail.rb +256 -0
- data/lib/hubspot/codegen/communication_preferences/models/public_subscription_status.rb +372 -0
- data/lib/hubspot/codegen/communication_preferences/models/public_subscription_statuses_response.rb +231 -0
- data/lib/hubspot/codegen/communication_preferences/models/public_update_subscription_status_request.rb +283 -0
- data/lib/hubspot/codegen/communication_preferences/models/subscription_definition.rb +339 -0
- data/lib/hubspot/codegen/communication_preferences/models/subscription_definitions_response.rb +216 -0
- data/lib/hubspot/codegen/conversations/visitor-identification/api_client.rb +12 -12
- data/lib/hubspot/codegen/crm/associations/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- data/lib/hubspot/codegen/crm/deals/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/extensions/accounting/api_client.rb +12 -12
- data/lib/hubspot/codegen/crm/extensions/calling/api/settings_api.rb +24 -16
- data/lib/hubspot/codegen/crm/extensions/calling/api_client.rb +12 -12
- data/lib/hubspot/codegen/crm/extensions/calling/configuration.rb +1 -1
- data/lib/hubspot/codegen/crm/extensions/calling/models/settings_patch_request.rb +14 -4
- data/lib/hubspot/codegen/crm/extensions/calling/models/settings_request.rb +14 -4
- data/lib/hubspot/codegen/crm/extensions/calling/models/settings_response.rb +16 -1
- data/lib/hubspot/codegen/crm/extensions/cards/api/cards_api.rb +25 -17
- data/lib/hubspot/codegen/crm/extensions/cards/api_client.rb +12 -12
- data/lib/hubspot/codegen/crm/extensions/cards/configuration.rb +1 -1
- data/lib/hubspot/codegen/crm/extensions/videoconferencing/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- 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/owners/api_client.rb +12 -12
- data/lib/hubspot/codegen/crm/pipelines/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- data/lib/hubspot/codegen/crm/products/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/properties/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- 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/schemas/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- 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/events/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- 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/marketing/transactional/api_client.rb +12 -12
- 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/api_client.rb +12 -12
- 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/codegen/webhooks/api_client.rb +12 -12
- 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/communication_preferences/api/definition_api_spec.rb +46 -0
- data/spec/codegen/communication_preferences/api/status_api_spec.rb +71 -0
- data/spec/codegen/communication_preferences/models/error_detail_spec.rb +65 -0
- data/spec/codegen/communication_preferences/models/error_spec.rb +77 -0
- data/spec/codegen/communication_preferences/models/public_subscription_status_spec.rb +101 -0
- data/spec/codegen/communication_preferences/models/public_subscription_statuses_response_spec.rb +47 -0
- data/spec/codegen/communication_preferences/models/public_update_subscription_status_request_spec.rb +63 -0
- data/spec/codegen/communication_preferences/models/subscription_definition_spec.rb +95 -0
- data/spec/codegen/communication_preferences/models/subscription_definitions_response_spec.rb +41 -0
- 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/extensions/calling/api/settings_api_spec.rb +2 -2
- data/spec/codegen/crm/extensions/calling/models/settings_patch_request_spec.rb +6 -0
- data/spec/codegen/crm/extensions/calling/models/settings_request_spec.rb +6 -0
- data/spec/codegen/crm/extensions/calling/models/settings_response_spec.rb +6 -0
- data/spec/codegen/crm/extensions/cards/api/cards_api_spec.rb +2 -2
- 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/communication_preferences/definition_api_spec.rb +7 -0
- data/spec/features/communication_preferences/status_api_spec.rb +9 -0
- 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 +130 -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
@@ -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
|
@@ -54,21 +54,21 @@ module Hubspot
|
|
54
54
|
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
55
55
|
end
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
retries -= 1
|
68
|
-
end
|
57
|
+
if !response.success? && config.error_handler.any?
|
58
|
+
config.error_handler.each do |statuses, opts|
|
59
|
+
statuses = statuses.is_a?(Integer) ? [statuses] : statuses
|
60
|
+
|
61
|
+
retries = opts[:max_retries] || 5
|
62
|
+
while retries > 0 && statuses.include?(response.code)
|
63
|
+
sleep opts[:seconds_delay] if opts[:seconds_delay]
|
64
|
+
response = request.run
|
65
|
+
opts[:retry_block].call if opts[:retry_block]
|
66
|
+
retries -= 1
|
69
67
|
end
|
70
68
|
end
|
69
|
+
end
|
71
70
|
|
71
|
+
unless response.success?
|
72
72
|
if response.timed_out?
|
73
73
|
fail ApiError.new('Connection timed out')
|
74
74
|
elsif response.code == 0
|
@@ -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
|
@@ -21,12 +21,18 @@ module Hubspot
|
|
21
21
|
|
22
22
|
attr_accessor :access_token
|
23
23
|
|
24
|
+
attr_accessor :id_token
|
25
|
+
|
26
|
+
attr_accessor :token_type
|
27
|
+
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
29
|
def self.attribute_map
|
26
30
|
{
|
27
31
|
:'refresh_token' => :'refresh_token',
|
28
32
|
:'expires_in' => :'expires_in',
|
29
|
-
:'access_token' => :'access_token'
|
33
|
+
:'access_token' => :'access_token',
|
34
|
+
:'id_token' => :'id_token',
|
35
|
+
:'token_type' => :'token_type'
|
30
36
|
}
|
31
37
|
end
|
32
38
|
|
@@ -35,7 +41,9 @@ module Hubspot
|
|
35
41
|
{
|
36
42
|
:'refresh_token' => :'String',
|
37
43
|
:'expires_in' => :'Integer',
|
38
|
-
:'access_token' => :'String'
|
44
|
+
:'access_token' => :'String',
|
45
|
+
:'id_token' => :'String',
|
46
|
+
:'token_type' => :'String'
|
39
47
|
}
|
40
48
|
end
|
41
49
|
|
@@ -71,6 +79,14 @@ module Hubspot
|
|
71
79
|
if attributes.key?(:'access_token')
|
72
80
|
self.access_token = attributes[:'access_token']
|
73
81
|
end
|
82
|
+
|
83
|
+
if attributes.key?(:'id_token')
|
84
|
+
self.id_token = attributes[:'id_token']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.key?(:'token_type')
|
88
|
+
self.token_type = attributes[:'token_type']
|
89
|
+
end
|
74
90
|
end
|
75
91
|
|
76
92
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -89,6 +105,10 @@ module Hubspot
|
|
89
105
|
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
90
106
|
end
|
91
107
|
|
108
|
+
if @token_type.nil?
|
109
|
+
invalid_properties.push('invalid value for "token_type", token_type cannot be nil.')
|
110
|
+
end
|
111
|
+
|
92
112
|
invalid_properties
|
93
113
|
end
|
94
114
|
|
@@ -98,6 +118,7 @@ module Hubspot
|
|
98
118
|
return false if @refresh_token.nil?
|
99
119
|
return false if @expires_in.nil?
|
100
120
|
return false if @access_token.nil?
|
121
|
+
return false if @token_type.nil?
|
101
122
|
true
|
102
123
|
end
|
103
124
|
|
@@ -108,7 +129,9 @@ module Hubspot
|
|
108
129
|
self.class == o.class &&
|
109
130
|
refresh_token == o.refresh_token &&
|
110
131
|
expires_in == o.expires_in &&
|
111
|
-
access_token == o.access_token
|
132
|
+
access_token == o.access_token &&
|
133
|
+
id_token == o.id_token &&
|
134
|
+
token_type == o.token_type
|
112
135
|
end
|
113
136
|
|
114
137
|
# @see the `==` method
|
@@ -120,7 +143,7 @@ module Hubspot
|
|
120
143
|
# Calculates hash code according to all attributes.
|
121
144
|
# @return [Integer] Hash code
|
122
145
|
def hash
|
123
|
-
[refresh_token, expires_in, access_token].hash
|
146
|
+
[refresh_token, expires_in, access_token, id_token, token_type].hash
|
124
147
|
end
|
125
148
|
|
126
149
|
# Builds the object from hash
|
@@ -54,21 +54,21 @@ module Hubspot
|
|
54
54
|
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
55
55
|
end
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
retries -= 1
|
68
|
-
end
|
57
|
+
if !response.success? && config.error_handler.any?
|
58
|
+
config.error_handler.each do |statuses, opts|
|
59
|
+
statuses = statuses.is_a?(Integer) ? [statuses] : statuses
|
60
|
+
|
61
|
+
retries = opts[:max_retries] || 5
|
62
|
+
while retries > 0 && statuses.include?(response.code)
|
63
|
+
sleep opts[:seconds_delay] if opts[:seconds_delay]
|
64
|
+
response = request.run
|
65
|
+
opts[:retry_block].call if opts[:retry_block]
|
66
|
+
retries -= 1
|
69
67
|
end
|
70
68
|
end
|
69
|
+
end
|
71
70
|
|
71
|
+
unless response.success?
|
72
72
|
if response.timed_out?
|
73
73
|
fail ApiError.new('Connection timed out')
|
74
74
|
elsif response.code == 0
|