hubspot-api-client 9.5.0 → 10.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 +17 -0
- data/Gemfile.lock +4 -4
- data/LICENSE +201 -0
- data/README.md +1 -1
- data/hubspot-api-client.gemspec +1 -1
- data/lib/hubspot/codegen/automation/actions/api_client.rb +14 -0
- data/lib/hubspot/codegen/cms/audit-logs/api_client.rb +14 -0
- data/lib/hubspot/codegen/cms/blogs/authors/api/default_api.rb +2 -2
- data/lib/hubspot/codegen/cms/blogs/authors/api_client.rb +14 -0
- data/lib/hubspot/codegen/cms/blogs/blog-posts/api/default_api.rb +2 -2
- data/lib/hubspot/codegen/cms/blogs/blog-posts/api_client.rb +14 -0
- data/lib/hubspot/codegen/cms/blogs/blog-posts/models/blog_post.rb +108 -102
- data/lib/hubspot/codegen/cms/blogs/blog-posts/models/layout_section.rb +4 -2
- data/lib/hubspot/codegen/cms/blogs/tags/api/default_api.rb +2 -2
- data/lib/hubspot/codegen/cms/blogs/tags/api_client.rb +14 -0
- data/lib/hubspot/codegen/cms/domains/api_client.rb +14 -0
- data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/api/tables_api.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/api_client.rb +15 -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 +1 -1
- 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 +1 -1
- 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 +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3.rb +5 -3
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3_input.rb +1 -1
- 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 +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_live_input.rb +1 -1
- 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_client.rb +14 -0
- data/lib/hubspot/codegen/cms/site-search/api/default_api.rb +2 -5
- data/lib/hubspot/codegen/cms/site-search/api_client.rb +14 -0
- data/lib/hubspot/codegen/cms/site-search/models/content_search_result.rb +19 -2
- data/lib/hubspot/codegen/cms/site-search/models/indexed_data.rb +5 -2
- data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +17 -15
- data/lib/hubspot/codegen/cms/url-redirects/api_client.rb +14 -0
- 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 +14 -0
- data/lib/hubspot/codegen/crm/associations/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/companies/api/associations_api.rb +6 -12
- data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +11 -14
- data/lib/hubspot/codegen/crm/companies/api/search_api.rb +3 -3
- data/lib/hubspot/codegen/crm/companies/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +20 -20
- data/lib/hubspot/codegen/crm/companies/models/collection_response_associated_id_forward_paging.rb +226 -0
- data/lib/hubspot/codegen/crm/companies/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
- data/lib/hubspot/codegen/crm/companies/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
- data/lib/hubspot/codegen/crm/companies/models/forward_paging.rb +210 -0
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +1 -12
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_with_associations.rb +288 -0
- data/lib/hubspot/codegen/crm/contacts/api/associations_api.rb +6 -12
- data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +11 -14
- data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +3 -3
- data/lib/hubspot/codegen/crm/contacts/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +20 -20
- data/lib/hubspot/codegen/crm/contacts/models/collection_response_associated_id_forward_paging.rb +226 -0
- data/lib/hubspot/codegen/crm/contacts/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
- data/lib/hubspot/codegen/crm/contacts/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
- data/lib/hubspot/codegen/crm/contacts/models/forward_paging.rb +210 -0
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +1 -12
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_with_associations.rb +288 -0
- data/lib/hubspot/codegen/crm/deals/api/associations_api.rb +6 -12
- data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +11 -14
- data/lib/hubspot/codegen/crm/deals/api/search_api.rb +3 -3
- data/lib/hubspot/codegen/crm/deals/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +20 -20
- data/lib/hubspot/codegen/crm/deals/models/collection_response_associated_id_forward_paging.rb +226 -0
- data/lib/hubspot/codegen/crm/deals/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
- data/lib/hubspot/codegen/crm/deals/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
- data/lib/hubspot/codegen/crm/deals/models/forward_paging.rb +210 -0
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +1 -12
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_with_associations.rb +288 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/extensions/calling/api/settings_api.rb +24 -16
- data/lib/hubspot/codegen/crm/extensions/calling/api_client.rb +14 -0
- 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 +14 -0
- data/lib/hubspot/codegen/crm/extensions/cards/configuration.rb +1 -1
- data/lib/hubspot/codegen/crm/extensions/videoconferencing/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/imports/api/default_api.rb +90 -0
- data/lib/hubspot/codegen/crm/imports/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/imports/models/collection_response_public_import_error_forward_paging.rb +226 -0
- data/lib/hubspot/codegen/crm/{schemas/models/paging.rb → imports/models/forward_paging.rb} +11 -20
- data/lib/hubspot/codegen/crm/imports/models/import_row_core.rb +238 -0
- data/lib/hubspot/codegen/crm/imports/models/public_import_error.rb +353 -0
- data/lib/hubspot/codegen/crm/imports/models/public_import_response.rb +2 -2
- data/lib/hubspot/codegen/crm/line_items/api/associations_api.rb +6 -12
- data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +11 -14
- data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +3 -3
- data/lib/hubspot/codegen/crm/line_items/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/line_items/models/batch_read_input_simple_public_object_id.rb +20 -20
- data/lib/hubspot/codegen/crm/line_items/models/collection_response_associated_id_forward_paging.rb +226 -0
- data/lib/hubspot/codegen/crm/line_items/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
- data/lib/hubspot/codegen/crm/line_items/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
- data/lib/hubspot/codegen/crm/line_items/models/forward_paging.rb +210 -0
- data/lib/hubspot/codegen/crm/line_items/models/simple_public_object.rb +1 -12
- data/lib/hubspot/codegen/crm/line_items/models/simple_public_object_with_associations.rb +288 -0
- data/lib/hubspot/codegen/crm/objects/api/associations_api.rb +6 -12
- data/lib/hubspot/codegen/crm/objects/api/basic_api.rb +11 -14
- data/lib/hubspot/codegen/crm/objects/api/search_api.rb +10 -10
- data/lib/hubspot/codegen/crm/objects/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/associations_api.rb +3 -6
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +6 -12
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +3 -3
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id.rb +20 -20
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/{collection_response_simple_public_object.rb → collection_response_associated_id_forward_paging.rb} +5 -5
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/collection_response_simple_public_object_with_associations_forward_paging.rb +228 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/forward_paging.rb +212 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object.rb +1 -12
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations.rb +290 -0
- data/lib/hubspot/codegen/crm/objects/models/batch_read_input_simple_public_object_id.rb +20 -20
- data/lib/hubspot/codegen/crm/objects/models/collection_response_associated_id_forward_paging.rb +226 -0
- data/lib/hubspot/codegen/crm/objects/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
- data/lib/hubspot/codegen/crm/objects/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
- data/lib/hubspot/codegen/crm/objects/models/forward_paging.rb +210 -0
- data/lib/hubspot/codegen/crm/objects/models/simple_public_object.rb +1 -12
- data/lib/hubspot/codegen/crm/objects/models/simple_public_object_with_associations.rb +288 -0
- data/lib/hubspot/codegen/crm/owners/api/default_api.rb +9 -3
- data/lib/hubspot/codegen/crm/owners/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/owners/models/{collection_response_public_owner.rb → collection_response_public_owner_forward_paging.rb} +4 -4
- data/lib/hubspot/codegen/crm/owners/models/{paging.rb → forward_paging.rb} +3 -3
- data/lib/hubspot/codegen/crm/pipelines/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/products/api/associations_api.rb +6 -12
- data/lib/hubspot/codegen/crm/products/api/basic_api.rb +11 -14
- data/lib/hubspot/codegen/crm/products/api/search_api.rb +3 -3
- data/lib/hubspot/codegen/crm/products/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +20 -20
- data/lib/hubspot/codegen/crm/products/models/collection_response_associated_id_forward_paging.rb +226 -0
- data/lib/hubspot/codegen/crm/products/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
- data/lib/hubspot/codegen/crm/products/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
- data/lib/hubspot/codegen/crm/products/models/forward_paging.rb +210 -0
- data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +1 -12
- data/lib/hubspot/codegen/crm/products/models/simple_public_object_with_associations.rb +288 -0
- data/lib/hubspot/codegen/crm/properties/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/quotes/api/associations_api.rb +3 -6
- data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +6 -12
- data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +3 -3
- data/lib/hubspot/codegen/crm/quotes/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/quotes/models/batch_read_input_simple_public_object_id.rb +20 -20
- data/lib/hubspot/codegen/crm/quotes/models/collection_response_associated_id_forward_paging.rb +226 -0
- data/lib/hubspot/codegen/crm/quotes/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
- data/lib/hubspot/codegen/crm/quotes/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
- data/lib/hubspot/codegen/crm/{schemas/models/previous_page.rb → quotes/models/forward_paging.rb} +14 -28
- data/lib/hubspot/codegen/crm/quotes/models/simple_public_object.rb +1 -12
- data/lib/hubspot/codegen/crm/quotes/models/simple_public_object_with_associations.rb +288 -0
- data/lib/hubspot/codegen/crm/schemas/api/core_api.rb +23 -17
- data/lib/hubspot/codegen/crm/schemas/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/schemas/models/association_definition.rb +1 -75
- data/lib/hubspot/codegen/crm/schemas/models/association_definition_egg.rb +4 -78
- data/lib/hubspot/codegen/crm/schemas/models/{collection_response_object_schema.rb → collection_response_object_schema_no_paging.rb} +7 -16
- data/lib/hubspot/codegen/crm/schemas/models/object_schema.rb +15 -1
- data/lib/hubspot/codegen/crm/schemas/models/object_type_definition.rb +15 -1
- data/lib/hubspot/codegen/crm/schemas/models/object_type_property_create.rb +2 -2
- data/lib/hubspot/codegen/crm/tickets/api/associations_api.rb +6 -12
- data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +11 -14
- data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +3 -3
- data/lib/hubspot/codegen/crm/tickets/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +20 -20
- data/lib/hubspot/codegen/crm/tickets/models/collection_response_associated_id_forward_paging.rb +226 -0
- data/lib/hubspot/codegen/crm/tickets/models/{collection_response_simple_public_object.rb → collection_response_simple_public_object_with_associations_forward_paging.rb} +5 -5
- data/lib/hubspot/codegen/crm/tickets/models/{collection_response_with_total_simple_public_object.rb → collection_response_with_total_simple_public_object_forward_paging.rb} +4 -5
- data/lib/hubspot/codegen/crm/tickets/models/forward_paging.rb +210 -0
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object.rb +1 -12
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_with_associations.rb +288 -0
- data/lib/hubspot/codegen/crm/timeline/api_client.rb +14 -0
- data/lib/hubspot/codegen/events/api_client.rb +14 -0
- data/lib/hubspot/codegen/files/files/api/files_api.rb +8 -8
- data/lib/hubspot/codegen/files/files/api_client.rb +14 -0
- data/lib/hubspot/codegen/files/files/models/file_update_input.rb +2 -2
- data/lib/hubspot/codegen/files/files/models/{file.rb → hubspot_file.rb} +3 -3
- data/lib/hubspot/codegen/files/files/models/import_from_url_input.rb +2 -2
- data/lib/hubspot/codegen/marketing/transactional/api/default_api.rb +60 -60
- data/lib/hubspot/codegen/marketing/transactional/api_client.rb +14 -0
- data/lib/hubspot/codegen/oauth/api_client.rb +14 -0
- data/lib/hubspot/codegen/webhooks/api_client.rb +14 -0
- data/lib/hubspot/version.rb +1 -1
- data/spec/codegen/cms/blogs/authors/api/default_api_spec.rb +24 -24
- data/spec/codegen/cms/blogs/blog-posts/api/default_api_spec.rb +26 -26
- data/spec/codegen/cms/blogs/blog-posts/models/blog_post_spec.rb +14 -14
- data/spec/codegen/cms/blogs/tags/api/default_api_spec.rb +24 -24
- data/spec/codegen/cms/hubdb/api/rows_api_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/api/rows_batch_api_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/api/tables_api_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/batch_input_hub_db_table_row_v3_spec.rb +1 -1
- 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 +1 -1
- 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 +1 -1
- data/spec/codegen/cms/hubdb/models/hub_db_table_row_v3_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/hub_db_table_v3_input_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/hub_db_table_v3_live_input_spec.rb +1 -1
- 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/site-search/api/default_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/indexed_data_spec.rb +1 -1
- 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/associations_api_spec.rb +2 -4
- data/spec/codegen/crm/companies/api/basic_api_spec.rb +4 -5
- data/spec/codegen/crm/companies/api/search_api_spec.rb +1 -1
- data/spec/codegen/crm/companies/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
- data/spec/codegen/crm/companies/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
- data/spec/codegen/crm/companies/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/companies/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/companies/models/forward_paging_spec.rb +41 -0
- data/spec/codegen/crm/companies/models/simple_public_object_spec.rb +0 -6
- data/spec/codegen/crm/companies/models/simple_public_object_with_associations_spec.rb +77 -0
- data/spec/codegen/crm/contacts/api/associations_api_spec.rb +2 -4
- data/spec/codegen/crm/contacts/api/basic_api_spec.rb +4 -5
- data/spec/codegen/crm/contacts/api/search_api_spec.rb +1 -1
- data/spec/codegen/crm/contacts/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
- data/spec/codegen/crm/contacts/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
- data/spec/codegen/crm/contacts/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/contacts/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/contacts/models/forward_paging_spec.rb +41 -0
- data/spec/codegen/crm/contacts/models/simple_public_object_spec.rb +0 -6
- data/spec/codegen/crm/contacts/models/simple_public_object_with_associations_spec.rb +77 -0
- data/spec/codegen/crm/deals/api/associations_api_spec.rb +2 -4
- data/spec/codegen/crm/deals/api/basic_api_spec.rb +4 -5
- data/spec/codegen/crm/deals/api/search_api_spec.rb +1 -1
- data/spec/codegen/crm/deals/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
- data/spec/codegen/crm/deals/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
- data/spec/codegen/crm/deals/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/deals/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/deals/models/forward_paging_spec.rb +41 -0
- data/spec/codegen/crm/deals/models/simple_public_object_spec.rb +0 -6
- data/spec/codegen/crm/deals/models/simple_public_object_with_associations_spec.rb +77 -0
- 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 +47 -0
- data/spec/codegen/crm/imports/models/collection_response_public_import_error_forward_paging_spec.rb +47 -0
- data/spec/codegen/crm/imports/models/forward_paging_spec.rb +41 -0
- data/spec/codegen/crm/imports/models/import_row_core_spec.rb +53 -0
- data/spec/codegen/crm/imports/models/public_import_error_spec.rb +97 -0
- data/spec/codegen/crm/imports/models/public_import_response_spec.rb +1 -1
- data/spec/codegen/crm/line_items/api/associations_api_spec.rb +2 -4
- data/spec/codegen/crm/line_items/api/basic_api_spec.rb +4 -5
- data/spec/codegen/crm/line_items/api/search_api_spec.rb +1 -1
- data/spec/codegen/crm/line_items/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
- data/spec/codegen/crm/line_items/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
- data/spec/codegen/crm/line_items/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/line_items/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/line_items/models/forward_paging_spec.rb +41 -0
- data/spec/codegen/crm/line_items/models/simple_public_object_spec.rb +0 -6
- data/spec/codegen/crm/line_items/models/simple_public_object_with_associations_spec.rb +77 -0
- data/spec/codegen/crm/objects/api/associations_api_spec.rb +2 -4
- data/spec/codegen/crm/objects/api/basic_api_spec.rb +4 -5
- data/spec/codegen/crm/objects/api/search_api_spec.rb +3 -3
- data/spec/codegen/crm/objects/feedback_submissions/api/associations_api_spec.rb +1 -2
- data/spec/codegen/crm/objects/feedback_submissions/api/basic_api_spec.rb +2 -4
- data/spec/codegen/crm/objects/feedback_submissions/api/search_api_spec.rb +1 -1
- data/spec/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
- data/spec/codegen/crm/objects/feedback_submissions/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/objects/feedback_submissions/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/objects/feedback_submissions/models/forward_paging_spec.rb +41 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_spec.rb +0 -6
- data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations_spec.rb +77 -0
- data/spec/codegen/crm/objects/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
- data/spec/codegen/crm/objects/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
- data/spec/codegen/crm/objects/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/objects/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/objects/models/forward_paging_spec.rb +41 -0
- data/spec/codegen/crm/objects/models/simple_public_object_spec.rb +0 -6
- data/spec/codegen/crm/objects/models/simple_public_object_with_associations_spec.rb +77 -0
- data/spec/codegen/crm/owners/api/default_api_spec.rb +3 -1
- data/spec/codegen/crm/owners/models/{collection_response_public_owner_spec.rb → collection_response_public_owner_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/owners/models/{paging_spec.rb → forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/products/api/associations_api_spec.rb +2 -4
- data/spec/codegen/crm/products/api/basic_api_spec.rb +4 -5
- data/spec/codegen/crm/products/api/search_api_spec.rb +1 -1
- data/spec/codegen/crm/products/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
- data/spec/codegen/crm/products/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
- data/spec/codegen/crm/products/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/products/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/products/models/forward_paging_spec.rb +41 -0
- data/spec/codegen/crm/products/models/simple_public_object_spec.rb +0 -6
- data/spec/codegen/crm/products/models/simple_public_object_with_associations_spec.rb +77 -0
- data/spec/codegen/crm/quotes/api/associations_api_spec.rb +1 -2
- data/spec/codegen/crm/quotes/api/basic_api_spec.rb +2 -4
- data/spec/codegen/crm/quotes/api/search_api_spec.rb +1 -1
- data/spec/codegen/crm/quotes/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
- data/spec/codegen/crm/quotes/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
- data/spec/codegen/crm/quotes/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/quotes/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/quotes/models/forward_paging_spec.rb +41 -0
- data/spec/codegen/crm/quotes/models/simple_public_object_spec.rb +0 -6
- data/spec/codegen/crm/quotes/models/simple_public_object_with_associations_spec.rb +77 -0
- data/spec/codegen/crm/schemas/api/core_api_spec.rb +10 -8
- data/spec/codegen/crm/schemas/models/association_definition_egg_spec.rb +0 -20
- data/spec/codegen/crm/schemas/models/association_definition_spec.rb +0 -20
- data/spec/codegen/crm/schemas/models/{collection_response_object_schema_spec.rb → collection_response_object_schema_no_paging_spec.rb} +6 -12
- data/spec/codegen/crm/schemas/models/object_schema_spec.rb +6 -0
- data/spec/codegen/crm/schemas/models/object_type_definition_spec.rb +6 -0
- data/spec/codegen/crm/schemas/models/object_type_property_create_spec.rb +1 -1
- data/spec/codegen/crm/tickets/api/associations_api_spec.rb +2 -4
- data/spec/codegen/crm/tickets/api/basic_api_spec.rb +4 -5
- data/spec/codegen/crm/tickets/api/search_api_spec.rb +1 -1
- data/spec/codegen/crm/tickets/models/batch_read_input_simple_public_object_id_spec.rb +3 -3
- data/spec/codegen/crm/tickets/models/collection_response_associated_id_forward_paging_spec.rb +47 -0
- data/spec/codegen/crm/tickets/models/{collection_response_simple_public_object_spec.rb → collection_response_simple_public_object_with_associations_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/tickets/models/{collection_response_with_total_simple_public_object_spec.rb → collection_response_with_total_simple_public_object_forward_paging_spec.rb} +6 -6
- data/spec/codegen/crm/tickets/models/forward_paging_spec.rb +41 -0
- data/spec/codegen/crm/tickets/models/simple_public_object_spec.rb +0 -6
- data/spec/codegen/crm/tickets/models/simple_public_object_with_associations_spec.rb +77 -0
- data/spec/codegen/files/files/api/files_api_spec.rb +2 -2
- data/spec/codegen/files/files/models/file_update_input_spec.rb +1 -1
- data/spec/codegen/files/files/models/{file_spec.rb → hubspot_file_spec.rb} +5 -5
- data/spec/codegen/files/files/models/import_from_url_input_spec.rb +1 -1
- data/spec/codegen/marketing/transactional/api/default_api_spec.rb +12 -12
- 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/objects/search_api_spec.rb +1 -1
- metadata +200 -78
- data/lib/hubspot/codegen/crm/schemas/models/next_page.rb +0 -224
- data/spec/codegen/crm/schemas/models/next_page_spec.rb +0 -47
- data/spec/codegen/crm/schemas/models/paging_spec.rb +0 -47
- data/spec/codegen/crm/schemas/models/previous_page_spec.rb +0 -47
@@ -55,6 +55,20 @@ module Hubspot
|
|
55
55
|
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
56
56
|
end
|
57
57
|
|
58
|
+
if !response.success? && config.error_handler.any?
|
59
|
+
config.error_handler.each do |statuses, opts|
|
60
|
+
statuses = statuses.is_a?(Integer) ? [statuses] : statuses
|
61
|
+
|
62
|
+
retries = opts[:max_retries] || 5
|
63
|
+
while retries > 0 && statuses.include?(response.code)
|
64
|
+
sleep opts[:seconds_delay] if opts[:seconds_delay]
|
65
|
+
response = request.run
|
66
|
+
opts[:retry_block].call if opts[:retry_block]
|
67
|
+
retries -= 1
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
58
72
|
unless response.success?
|
59
73
|
if response.timed_out?
|
60
74
|
fail ApiError.new('Connection timed out')
|
@@ -127,7 +127,7 @@ module Hubspot
|
|
127
127
|
# Check to see if the all the properties in the model are valid
|
128
128
|
# @return true if the model is valid
|
129
129
|
def valid?
|
130
|
-
access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
|
130
|
+
access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
|
131
131
|
return false unless access_validator.valid?(@access)
|
132
132
|
true
|
133
133
|
end
|
@@ -135,7 +135,7 @@ module Hubspot
|
|
135
135
|
# Custom attribute writer method checking allowed values (enum).
|
136
136
|
# @param [Object] access Object to be assigned
|
137
137
|
def access=(access)
|
138
|
-
validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
|
138
|
+
validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
|
139
139
|
unless validator.valid?(access)
|
140
140
|
fail ArgumentError, "invalid value for \"access\", must be one of #{validator.allowable_values}."
|
141
141
|
end
|
@@ -15,7 +15,7 @@ require 'date'
|
|
15
15
|
module Hubspot
|
16
16
|
module Files
|
17
17
|
module Files
|
18
|
-
class
|
18
|
+
class HubspotFile
|
19
19
|
# File ID.
|
20
20
|
attr_accessor :id
|
21
21
|
|
@@ -269,7 +269,7 @@ module Hubspot
|
|
269
269
|
return false if @updated_at.nil?
|
270
270
|
return false if @archived.nil?
|
271
271
|
return false if @access.nil?
|
272
|
-
access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
|
272
|
+
access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
|
273
273
|
return false unless access_validator.valid?(@access)
|
274
274
|
true
|
275
275
|
end
|
@@ -277,7 +277,7 @@ module Hubspot
|
|
277
277
|
# Custom attribute writer method checking allowed values (enum).
|
278
278
|
# @param [Object] access Object to be assigned
|
279
279
|
def access=(access)
|
280
|
-
validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
|
280
|
+
validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
|
281
281
|
unless validator.valid?(access)
|
282
282
|
fail ArgumentError, "invalid value for \"access\", must be one of #{validator.allowable_values}."
|
283
283
|
end
|
@@ -184,7 +184,7 @@ module Hubspot
|
|
184
184
|
# @return true if the model is valid
|
185
185
|
def valid?
|
186
186
|
return false if @access.nil?
|
187
|
-
access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
|
187
|
+
access_validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
|
188
188
|
return false unless access_validator.valid?(@access)
|
189
189
|
return false if @url.nil?
|
190
190
|
return false if @duplicate_validation_strategy.nil?
|
@@ -200,7 +200,7 @@ module Hubspot
|
|
200
200
|
# Custom attribute writer method checking allowed values (enum).
|
201
201
|
# @param [Object] access Object to be assigned
|
202
202
|
def access=(access)
|
203
|
-
validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "PRIVATE"])
|
203
|
+
validator = EnumAttributeValidator.new('String', ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE"])
|
204
204
|
unless validator.valid?(access)
|
205
205
|
fail ArgumentError, "invalid value for \"access\", must be one of #{validator.allowable_values}."
|
206
206
|
end
|
@@ -83,6 +83,66 @@ module Hubspot
|
|
83
83
|
return data, status_code, headers
|
84
84
|
end
|
85
85
|
|
86
|
+
# Create a SMTP API token.
|
87
|
+
# Create a SMTP API token.
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @option opts [SmtpApiTokenRequestEgg] :smtp_api_token_request_egg A request object that includes the campaign name tied to the token and whether contacts should be created for recipients of emails.
|
90
|
+
# @return [SmtpApiTokenView]
|
91
|
+
def create_token(opts = {})
|
92
|
+
data, _status_code, _headers = create_token_with_http_info(opts)
|
93
|
+
data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Create a SMTP API token.
|
97
|
+
# Create a SMTP API token.
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @option opts [SmtpApiTokenRequestEgg] :smtp_api_token_request_egg A request object that includes the campaign name tied to the token and whether contacts should be created for recipients of emails.
|
100
|
+
# @return [Array<(SmtpApiTokenView, Integer, Hash)>] SmtpApiTokenView data, response status code and response headers
|
101
|
+
def create_token_with_http_info(opts = {})
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.create_token ...'
|
104
|
+
end
|
105
|
+
# resource path
|
106
|
+
local_var_path = '/marketing/v3/transactional/smtp-tokens'
|
107
|
+
|
108
|
+
# query parameters
|
109
|
+
query_params = opts[:query_params] || {}
|
110
|
+
|
111
|
+
# header parameters
|
112
|
+
header_params = opts[:header_params] || {}
|
113
|
+
# HTTP header 'Accept' (if needed)
|
114
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
115
|
+
# HTTP header 'Content-Type'
|
116
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
117
|
+
|
118
|
+
# form parameters
|
119
|
+
form_params = opts[:form_params] || {}
|
120
|
+
|
121
|
+
# http body (model)
|
122
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'smtp_api_token_request_egg'])
|
123
|
+
|
124
|
+
# return_type
|
125
|
+
return_type = opts[:return_type] || 'SmtpApiTokenView'
|
126
|
+
|
127
|
+
# auth_names
|
128
|
+
auth_names = opts[:auth_names] || ['hapikey']
|
129
|
+
|
130
|
+
new_options = opts.merge(
|
131
|
+
:header_params => header_params,
|
132
|
+
:query_params => query_params,
|
133
|
+
:form_params => form_params,
|
134
|
+
:body => post_body,
|
135
|
+
:auth_names => auth_names,
|
136
|
+
:return_type => return_type
|
137
|
+
)
|
138
|
+
|
139
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
140
|
+
if @api_client.config.debugging
|
141
|
+
@api_client.config.logger.debug "API called: DefaultApi#create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
142
|
+
end
|
143
|
+
return data, status_code, headers
|
144
|
+
end
|
145
|
+
|
86
146
|
# Query a single token by ID.
|
87
147
|
# Query a single token by ID.
|
88
148
|
# @param token_id [String] Identifier generated when a token is created.
|
@@ -213,66 +273,6 @@ module Hubspot
|
|
213
273
|
return data, status_code, headers
|
214
274
|
end
|
215
275
|
|
216
|
-
# Create a SMTP API token.
|
217
|
-
# Create a SMTP API token.
|
218
|
-
# @param [Hash] opts the optional parameters
|
219
|
-
# @option opts [SmtpApiTokenRequestEgg] :smtp_api_token_request_egg A request object that includes the campaign name tied to the token and whether contacts should be created for recipients of emails.
|
220
|
-
# @return [SmtpApiTokenView]
|
221
|
-
def create_token(opts = {})
|
222
|
-
data, _status_code, _headers = create_token_with_http_info(opts)
|
223
|
-
data
|
224
|
-
end
|
225
|
-
|
226
|
-
# Create a SMTP API token.
|
227
|
-
# Create a SMTP API token.
|
228
|
-
# @param [Hash] opts the optional parameters
|
229
|
-
# @option opts [SmtpApiTokenRequestEgg] :smtp_api_token_request_egg A request object that includes the campaign name tied to the token and whether contacts should be created for recipients of emails.
|
230
|
-
# @return [Array<(SmtpApiTokenView, Integer, Hash)>] SmtpApiTokenView data, response status code and response headers
|
231
|
-
def create_token_with_http_info(opts = {})
|
232
|
-
if @api_client.config.debugging
|
233
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.create_token ...'
|
234
|
-
end
|
235
|
-
# resource path
|
236
|
-
local_var_path = '/marketing/v3/transactional/smtp-tokens'
|
237
|
-
|
238
|
-
# query parameters
|
239
|
-
query_params = opts[:query_params] || {}
|
240
|
-
|
241
|
-
# header parameters
|
242
|
-
header_params = opts[:header_params] || {}
|
243
|
-
# HTTP header 'Accept' (if needed)
|
244
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
245
|
-
# HTTP header 'Content-Type'
|
246
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
247
|
-
|
248
|
-
# form parameters
|
249
|
-
form_params = opts[:form_params] || {}
|
250
|
-
|
251
|
-
# http body (model)
|
252
|
-
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'smtp_api_token_request_egg'])
|
253
|
-
|
254
|
-
# return_type
|
255
|
-
return_type = opts[:return_type] || 'SmtpApiTokenView'
|
256
|
-
|
257
|
-
# auth_names
|
258
|
-
auth_names = opts[:auth_names] || ['hapikey']
|
259
|
-
|
260
|
-
new_options = opts.merge(
|
261
|
-
:header_params => header_params,
|
262
|
-
:query_params => query_params,
|
263
|
-
:form_params => form_params,
|
264
|
-
:body => post_body,
|
265
|
-
:auth_names => auth_names,
|
266
|
-
:return_type => return_type
|
267
|
-
)
|
268
|
-
|
269
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
270
|
-
if @api_client.config.debugging
|
271
|
-
@api_client.config.logger.debug "API called: DefaultApi#create_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
272
|
-
end
|
273
|
-
return data, status_code, headers
|
274
|
-
end
|
275
|
-
|
276
276
|
# Reset the password of an existing token.
|
277
277
|
# Allows the creation of a replacement password for a given token. Once the password is successfully reset, the old password for the token will be invalid.
|
278
278
|
# @param token_id [String] Identifier generated when a token is created.
|
@@ -55,6 +55,20 @@ module Hubspot
|
|
55
55
|
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
56
56
|
end
|
57
57
|
|
58
|
+
if !response.success? && config.error_handler.any?
|
59
|
+
config.error_handler.each do |statuses, opts|
|
60
|
+
statuses = statuses.is_a?(Integer) ? [statuses] : statuses
|
61
|
+
|
62
|
+
retries = opts[:max_retries] || 5
|
63
|
+
while retries > 0 && statuses.include?(response.code)
|
64
|
+
sleep opts[:seconds_delay] if opts[:seconds_delay]
|
65
|
+
response = request.run
|
66
|
+
opts[:retry_block].call if opts[:retry_block]
|
67
|
+
retries -= 1
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
58
72
|
unless response.success?
|
59
73
|
if response.timed_out?
|
60
74
|
fail ApiError.new('Connection timed out')
|
@@ -54,6 +54,20 @@ module Hubspot
|
|
54
54
|
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
55
55
|
end
|
56
56
|
|
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
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
57
71
|
unless response.success?
|
58
72
|
if response.timed_out?
|
59
73
|
fail ApiError.new('Connection timed out')
|
@@ -54,6 +54,20 @@ module Hubspot
|
|
54
54
|
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
55
55
|
end
|
56
56
|
|
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
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
57
71
|
unless response.success?
|
58
72
|
if response.timed_out?
|
59
73
|
fail ApiError.new('Connection timed out')
|
data/lib/hubspot/version.rb
CHANGED
@@ -33,10 +33,11 @@ describe 'DefaultApi' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for archive
|
36
|
-
#
|
37
|
-
#
|
38
|
-
# @param
|
36
|
+
# Delete a Blog Author
|
37
|
+
# Delete the Blog Author object identified by the id in the path.
|
38
|
+
# @param object_id The Blog Author id.
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [Boolean] :archived Whether to return only results that have been archived.
|
40
41
|
# @return [nil]
|
41
42
|
describe 'archive test' do
|
42
43
|
it 'should work' do
|
@@ -44,14 +45,13 @@ describe 'DefaultApi' do
|
|
44
45
|
end
|
45
46
|
end
|
46
47
|
|
47
|
-
# unit tests for
|
48
|
-
#
|
49
|
-
# Delete the Blog Author
|
50
|
-
# @param
|
48
|
+
# unit tests for archive_batch
|
49
|
+
# Archive a batch of Blog Authors
|
50
|
+
# Delete the Blog Author objects identified in the request body. Note: This is not the same as the in-app `archive` function.
|
51
|
+
# @param batch_input_string The JSON array of Blog Author ids.
|
51
52
|
# @param [Hash] opts the optional parameters
|
52
|
-
# @option opts [Boolean] :archived Whether to return only results that have been archived.
|
53
53
|
# @return [nil]
|
54
|
-
describe '
|
54
|
+
describe 'archive_batch test' do
|
55
55
|
it 'should work' do
|
56
56
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
57
57
|
end
|
@@ -69,13 +69,13 @@ describe 'DefaultApi' do
|
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
72
|
-
# unit tests for
|
72
|
+
# unit tests for create_batch
|
73
73
|
# Create a batch of Blog Authors
|
74
74
|
# Create the Blog Author objects detailed in the request body.
|
75
75
|
# @param batch_input_blog_author The JSON array of new Blog Authors to create.
|
76
76
|
# @param [Hash] opts the optional parameters
|
77
77
|
# @return [Object]
|
78
|
-
describe '
|
78
|
+
describe 'create_batch test' do
|
79
79
|
it 'should work' do
|
80
80
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
81
81
|
end
|
@@ -115,41 +115,41 @@ describe 'DefaultApi' do
|
|
115
115
|
end
|
116
116
|
end
|
117
117
|
|
118
|
-
# unit tests for
|
118
|
+
# unit tests for read_batch
|
119
119
|
# Retrieve a batch of Blog Authors
|
120
120
|
# Retrieve the Blog Author objects identified in the request body.
|
121
121
|
# @param batch_input_string The JSON array of Blog Author ids.
|
122
122
|
# @param [Hash] opts the optional parameters
|
123
123
|
# @option opts [Boolean] :archived Specifies whether to return archived Blog Authors. Defaults to `false`.
|
124
124
|
# @return [Object]
|
125
|
-
describe '
|
125
|
+
describe 'read_batch test' do
|
126
126
|
it 'should work' do
|
127
127
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
131
|
# unit tests for update
|
132
|
-
# Update a
|
133
|
-
#
|
134
|
-
# @param
|
132
|
+
# Update a Blog Author
|
133
|
+
# Sparse updates a single Blog Author object identified by the id in the path. All the column values need not be specified. Only the that need to be modified can be specified.
|
134
|
+
# @param object_id The Blog Author id.
|
135
|
+
# @param blog_author The JSON representation of the updated Blog Author.
|
135
136
|
# @param [Hash] opts the optional parameters
|
136
137
|
# @option opts [Boolean] :archived Specifies whether to update archived Blog Authors. Defaults to `false`.
|
137
|
-
# @return [
|
138
|
+
# @return [BlogAuthor]
|
138
139
|
describe 'update test' do
|
139
140
|
it 'should work' do
|
140
141
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
141
142
|
end
|
142
143
|
end
|
143
144
|
|
144
|
-
# unit tests for
|
145
|
-
# Update a Blog
|
146
|
-
#
|
147
|
-
# @param
|
148
|
-
# @param blog_author The JSON representation of the updated Blog Author.
|
145
|
+
# unit tests for update_batch
|
146
|
+
# Update a batch of Blog Authors
|
147
|
+
# Update the Blog Author objects identified in the request body.
|
148
|
+
# @param batch_input_json_node A JSON array of the JSON representations of the updated Blog Authors.
|
149
149
|
# @param [Hash] opts the optional parameters
|
150
150
|
# @option opts [Boolean] :archived Specifies whether to update archived Blog Authors. Defaults to `false`.
|
151
|
-
# @return [
|
152
|
-
describe '
|
151
|
+
# @return [Object]
|
152
|
+
describe 'update_batch test' do
|
153
153
|
it 'should work' do
|
154
154
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
155
155
|
end
|
@@ -33,10 +33,11 @@ describe 'DefaultApi' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for archive
|
36
|
-
#
|
37
|
-
#
|
38
|
-
# @param
|
36
|
+
# Delete a Blog Post
|
37
|
+
# Delete the Blog Post object identified by the id in the path.
|
38
|
+
# @param object_id The Blog Post id.
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [Boolean] :archived Whether to return only results that have been archived.
|
40
41
|
# @return [nil]
|
41
42
|
describe 'archive test' do
|
42
43
|
it 'should work' do
|
@@ -44,14 +45,13 @@ describe 'DefaultApi' do
|
|
44
45
|
end
|
45
46
|
end
|
46
47
|
|
47
|
-
# unit tests for
|
48
|
-
#
|
49
|
-
# Delete the Blog Post
|
50
|
-
# @param
|
48
|
+
# unit tests for archive_batch
|
49
|
+
# Archive a batch of Blog Posts
|
50
|
+
# Delete the Blog Post objects identified in the request body. Note: This is not the same as the in-app `archive` function. To perform an in-app `archive` send an normal update with the `archived` field set to true.
|
51
|
+
# @param batch_input_string The JSON array of Blog Post ids.
|
51
52
|
# @param [Hash] opts the optional parameters
|
52
|
-
# @option opts [Boolean] :archived Whether to return only results that have been archived.
|
53
53
|
# @return [nil]
|
54
|
-
describe '
|
54
|
+
describe 'archive_batch test' do
|
55
55
|
it 'should work' do
|
56
56
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
57
57
|
end
|
@@ -81,13 +81,13 @@ describe 'DefaultApi' do
|
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
84
|
-
# unit tests for
|
84
|
+
# unit tests for create_batch
|
85
85
|
# Create a batch of Blog Posts
|
86
86
|
# Create the Blog Post objects detailed in the request body.
|
87
87
|
# @param batch_input_blog_post The JSON array of new Blog Posts to create.
|
88
88
|
# @param [Hash] opts the optional parameters
|
89
89
|
# @return [Object]
|
90
|
-
describe '
|
90
|
+
describe 'create_batch test' do
|
91
91
|
it 'should work' do
|
92
92
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
93
93
|
end
|
@@ -179,14 +179,14 @@ describe 'DefaultApi' do
|
|
179
179
|
end
|
180
180
|
end
|
181
181
|
|
182
|
-
# unit tests for
|
182
|
+
# unit tests for read_batch
|
183
183
|
# Retrieve a batch of Blog Posts
|
184
184
|
# Retrieve the Blog Post objects identified in the request body.
|
185
185
|
# @param batch_input_string The JSON array of Blog Post ids.
|
186
186
|
# @param [Hash] opts the optional parameters
|
187
187
|
# @option opts [Boolean] :archived Specifies whether to return archived Blog Posts. Defaults to `false`.
|
188
188
|
# @return [Object]
|
189
|
-
describe '
|
189
|
+
describe 'read_batch test' do
|
190
190
|
it 'should work' do
|
191
191
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
192
192
|
end
|
@@ -243,27 +243,27 @@ describe 'DefaultApi' do
|
|
243
243
|
end
|
244
244
|
|
245
245
|
# unit tests for update
|
246
|
-
# Update a
|
247
|
-
#
|
248
|
-
# @param
|
246
|
+
# Update a Blog Post
|
247
|
+
# Sparse updates a single Blog Post object identified by the id in the path. All the column values need not be specified. Only the that need to be modified can be specified.
|
248
|
+
# @param object_id The Blog Post id.
|
249
|
+
# @param blog_post The JSON representation of the updated Blog Post.
|
249
250
|
# @param [Hash] opts the optional parameters
|
250
|
-
# @option opts [Boolean] :archived
|
251
|
-
# @return [
|
251
|
+
# @option opts [Boolean] :archived Specifies whether to update archived Blog Posts. Defaults to `false`.
|
252
|
+
# @return [BlogPost]
|
252
253
|
describe 'update test' do
|
253
254
|
it 'should work' do
|
254
255
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
255
256
|
end
|
256
257
|
end
|
257
258
|
|
258
|
-
# unit tests for
|
259
|
-
# Update a Blog
|
260
|
-
#
|
261
|
-
# @param
|
262
|
-
# @param blog_post The JSON representation of the updated Blog Post.
|
259
|
+
# unit tests for update_batch
|
260
|
+
# Update a batch of Blog Posts
|
261
|
+
# Update the Blog Post objects identified in the request body.
|
262
|
+
# @param batch_input_json_node
|
263
263
|
# @param [Hash] opts the optional parameters
|
264
|
-
# @option opts [Boolean] :archived
|
265
|
-
# @return [
|
266
|
-
describe '
|
264
|
+
# @option opts [Boolean] :archived Whether to return only results that have been archived.
|
265
|
+
# @return [Object]
|
266
|
+
describe 'update_batch test' do
|
267
267
|
it 'should work' do
|
268
268
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
269
269
|
end
|