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')
|
@@ -16,38 +16,55 @@ module Hubspot
|
|
16
16
|
module Cms
|
17
17
|
module SiteSearch
|
18
18
|
class ContentSearchResult
|
19
|
+
# The ID of the content.
|
19
20
|
attr_accessor :id
|
20
21
|
|
22
|
+
# The matching score of the document.
|
21
23
|
attr_accessor :score
|
22
24
|
|
25
|
+
# The type of document. Can be `SITE_PAGE`, `LANDING_PAGE`, `BLOG_POST`, `LISTING_PAGE`, or `KNOWLEDGE_ARTICLE`.
|
23
26
|
attr_accessor :type
|
24
27
|
|
28
|
+
# The domain the document is hosted on.
|
25
29
|
attr_accessor :domain
|
26
30
|
|
31
|
+
# The url of the document.
|
27
32
|
attr_accessor :url
|
28
33
|
|
34
|
+
# URL of the featured image.
|
29
35
|
attr_accessor :featured_image_url
|
30
36
|
|
37
|
+
# The document's language.
|
31
38
|
attr_accessor :language
|
32
39
|
|
40
|
+
# The title of the returned document.
|
33
41
|
attr_accessor :title
|
34
42
|
|
43
|
+
# The result's description. The content will be determined by the value of `length` in the request.
|
35
44
|
attr_accessor :description
|
36
45
|
|
46
|
+
# For knowledge articles, the category of the article.
|
37
47
|
attr_accessor :category
|
38
48
|
|
49
|
+
# For knowledge articles, the subcategory of the article.
|
39
50
|
attr_accessor :subcategory
|
40
51
|
|
52
|
+
# Name of the author.
|
41
53
|
attr_accessor :author_full_name
|
42
54
|
|
55
|
+
# If a blog post, the tags associated with it.
|
43
56
|
attr_accessor :tags
|
44
57
|
|
58
|
+
# If a dynamic page, the ID of the HubDB table.
|
45
59
|
attr_accessor :table_id
|
46
60
|
|
61
|
+
# If a dynamic page, the row ID in the HubDB table.
|
47
62
|
attr_accessor :row_id
|
48
63
|
|
64
|
+
# The date the content was published.
|
49
65
|
attr_accessor :published_date
|
50
66
|
|
67
|
+
# The ID of the document in HubSpot.
|
51
68
|
attr_accessor :combined_id
|
52
69
|
|
53
70
|
class EnumAttributeValidator
|
@@ -243,7 +260,7 @@ module Hubspot
|
|
243
260
|
return false if @id.nil?
|
244
261
|
return false if @score.nil?
|
245
262
|
return false if @type.nil?
|
246
|
-
type_validator = EnumAttributeValidator.new('String', ["LANDING_PAGE", "BLOG_POST", "SITE_PAGE", "
|
263
|
+
type_validator = EnumAttributeValidator.new('String', ["LANDING_PAGE", "BLOG_POST", "SITE_PAGE", "KNOWLEDGE_ARTICLE", "LISTING_PAGE"])
|
247
264
|
return false unless type_validator.valid?(@type)
|
248
265
|
return false if @domain.nil?
|
249
266
|
return false if @url.nil?
|
@@ -255,7 +272,7 @@ module Hubspot
|
|
255
272
|
# Custom attribute writer method checking allowed values (enum).
|
256
273
|
# @param [Object] type Object to be assigned
|
257
274
|
def type=(type)
|
258
|
-
validator = EnumAttributeValidator.new('String', ["LANDING_PAGE", "BLOG_POST", "SITE_PAGE", "
|
275
|
+
validator = EnumAttributeValidator.new('String', ["LANDING_PAGE", "BLOG_POST", "SITE_PAGE", "KNOWLEDGE_ARTICLE", "LISTING_PAGE"])
|
259
276
|
unless validator.valid?(type)
|
260
277
|
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
261
278
|
end
|
@@ -16,10 +16,13 @@ module Hubspot
|
|
16
16
|
module Cms
|
17
17
|
module SiteSearch
|
18
18
|
class IndexedData
|
19
|
+
# The ID of the document in HubSpot.
|
19
20
|
attr_accessor :id
|
20
21
|
|
22
|
+
# The type of document. Can be `SITE_PAGE`, `LANDING_PAGE`, `BLOG_POST`, `LISTING_PAGE`, or `KNOWLEDGE_ARTICLE`.
|
21
23
|
attr_accessor :type
|
22
24
|
|
25
|
+
# The indexed fields in HubSpot.
|
23
26
|
attr_accessor :fields
|
24
27
|
|
25
28
|
class EnumAttributeValidator
|
@@ -122,7 +125,7 @@ module Hubspot
|
|
122
125
|
def valid?
|
123
126
|
return false if @id.nil?
|
124
127
|
return false if @type.nil?
|
125
|
-
type_validator = EnumAttributeValidator.new('String', ["LANDING_PAGE", "BLOG_POST", "SITE_PAGE", "
|
128
|
+
type_validator = EnumAttributeValidator.new('String', ["LANDING_PAGE", "BLOG_POST", "SITE_PAGE", "KNOWLEDGE_ARTICLE", "LISTING_PAGE"])
|
126
129
|
return false unless type_validator.valid?(@type)
|
127
130
|
return false if @fields.nil?
|
128
131
|
true
|
@@ -131,7 +134,7 @@ module Hubspot
|
|
131
134
|
# Custom attribute writer method checking allowed values (enum).
|
132
135
|
# @param [Object] type Object to be assigned
|
133
136
|
def type=(type)
|
134
|
-
validator = EnumAttributeValidator.new('String', ["LANDING_PAGE", "BLOG_POST", "SITE_PAGE", "
|
137
|
+
validator = EnumAttributeValidator.new('String', ["LANDING_PAGE", "BLOG_POST", "SITE_PAGE", "KNOWLEDGE_ARTICLE", "LISTING_PAGE"])
|
135
138
|
unless validator.valid?(type)
|
136
139
|
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
|
137
140
|
end
|
@@ -16,10 +16,10 @@ module Hubspot
|
|
16
16
|
module Cms
|
17
17
|
module SiteSearch
|
18
18
|
class SearchHitField
|
19
|
-
attr_accessor :metadata_field
|
20
|
-
|
21
19
|
attr_accessor :values
|
22
20
|
|
21
|
+
attr_accessor :metadata_field
|
22
|
+
|
23
23
|
attr_accessor :name
|
24
24
|
|
25
25
|
attr_accessor :value
|
@@ -27,8 +27,8 @@ module Hubspot
|
|
27
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
28
|
def self.attribute_map
|
29
29
|
{
|
30
|
-
:'metadata_field' => :'metadataField',
|
31
30
|
:'values' => :'values',
|
31
|
+
:'metadata_field' => :'metadataField',
|
32
32
|
:'name' => :'name',
|
33
33
|
:'value' => :'value'
|
34
34
|
}
|
@@ -37,8 +37,8 @@ module Hubspot
|
|
37
37
|
# Attribute type mapping.
|
38
38
|
def self.openapi_types
|
39
39
|
{
|
40
|
+
:'values' => :'Array<Object>',
|
40
41
|
:'metadata_field' => :'Boolean',
|
41
|
-
:'values' => :'Array',
|
42
42
|
:'name' => :'String',
|
43
43
|
:'value' => :'Object'
|
44
44
|
}
|
@@ -65,12 +65,14 @@ module Hubspot
|
|
65
65
|
h[k.to_sym] = v
|
66
66
|
}
|
67
67
|
|
68
|
-
if attributes.key?(:'
|
69
|
-
|
68
|
+
if attributes.key?(:'values')
|
69
|
+
if (value = attributes[:'values']).is_a?(Array)
|
70
|
+
self.values = value
|
71
|
+
end
|
70
72
|
end
|
71
73
|
|
72
|
-
if attributes.key?(:'
|
73
|
-
self.
|
74
|
+
if attributes.key?(:'metadata_field')
|
75
|
+
self.metadata_field = attributes[:'metadata_field']
|
74
76
|
end
|
75
77
|
|
76
78
|
if attributes.key?(:'name')
|
@@ -86,14 +88,14 @@ module Hubspot
|
|
86
88
|
# @return Array for valid properties with the reasons
|
87
89
|
def list_invalid_properties
|
88
90
|
invalid_properties = Array.new
|
89
|
-
if @metadata_field.nil?
|
90
|
-
invalid_properties.push('invalid value for "metadata_field", metadata_field cannot be nil.')
|
91
|
-
end
|
92
|
-
|
93
91
|
if @values.nil?
|
94
92
|
invalid_properties.push('invalid value for "values", values cannot be nil.')
|
95
93
|
end
|
96
94
|
|
95
|
+
if @metadata_field.nil?
|
96
|
+
invalid_properties.push('invalid value for "metadata_field", metadata_field cannot be nil.')
|
97
|
+
end
|
98
|
+
|
97
99
|
if @name.nil?
|
98
100
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
99
101
|
end
|
@@ -108,8 +110,8 @@ module Hubspot
|
|
108
110
|
# Check to see if the all the properties in the model are valid
|
109
111
|
# @return true if the model is valid
|
110
112
|
def valid?
|
111
|
-
return false if @metadata_field.nil?
|
112
113
|
return false if @values.nil?
|
114
|
+
return false if @metadata_field.nil?
|
113
115
|
return false if @name.nil?
|
114
116
|
return false if @value.nil?
|
115
117
|
true
|
@@ -120,8 +122,8 @@ module Hubspot
|
|
120
122
|
def ==(o)
|
121
123
|
return true if self.equal?(o)
|
122
124
|
self.class == o.class &&
|
123
|
-
metadata_field == o.metadata_field &&
|
124
125
|
values == o.values &&
|
126
|
+
metadata_field == o.metadata_field &&
|
125
127
|
name == o.name &&
|
126
128
|
value == o.value
|
127
129
|
end
|
@@ -135,7 +137,7 @@ module Hubspot
|
|
135
137
|
# Calculates hash code according to all attributes.
|
136
138
|
# @return [Integer] Hash code
|
137
139
|
def hash
|
138
|
-
[
|
140
|
+
[values, metadata_field, name, value].hash
|
139
141
|
end
|
140
142
|
|
141
143
|
# Builds the object from hash
|
@@ -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')
|
@@ -0,0 +1,80 @@
|
|
1
|
+
=begin
|
2
|
+
#Subscriptions
|
3
|
+
|
4
|
+
#Subscriptions allow contacts to control what forms of communications they receive. Contacts can decide whether they want to receive communication pertaining to a specific topic, brand, or an entire HubSpot account.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module CommunicationPreferences
|
17
|
+
class DefinitionApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client = ApiClient.default)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
# Get subscription definitions
|
24
|
+
# Get a list of all subscription definitions for the portal
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [SubscriptionDefinitionsResponse]
|
27
|
+
def get_page(opts = {})
|
28
|
+
data, _status_code, _headers = get_page_with_http_info(opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get subscription definitions
|
33
|
+
# Get a list of all subscription definitions for the portal
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @return [Array<(SubscriptionDefinitionsResponse, Integer, Hash)>] SubscriptionDefinitionsResponse data, response status code and response headers
|
36
|
+
def get_page_with_http_info(opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug 'Calling API: DefinitionApi.get_page ...'
|
39
|
+
end
|
40
|
+
# resource path
|
41
|
+
local_var_path = '/communication-preferences/v3/definitions'
|
42
|
+
|
43
|
+
# query parameters
|
44
|
+
query_params = opts[:query_params] || {}
|
45
|
+
|
46
|
+
# header parameters
|
47
|
+
header_params = opts[:header_params] || {}
|
48
|
+
# HTTP header 'Accept' (if needed)
|
49
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
50
|
+
|
51
|
+
# form parameters
|
52
|
+
form_params = opts[:form_params] || {}
|
53
|
+
|
54
|
+
# http body (model)
|
55
|
+
post_body = opts[:body]
|
56
|
+
|
57
|
+
# return_type
|
58
|
+
return_type = opts[:return_type] || 'SubscriptionDefinitionsResponse'
|
59
|
+
|
60
|
+
# auth_names
|
61
|
+
auth_names = opts[:auth_names] || ['hapikey']
|
62
|
+
|
63
|
+
new_options = opts.merge(
|
64
|
+
:header_params => header_params,
|
65
|
+
:query_params => query_params,
|
66
|
+
:form_params => form_params,
|
67
|
+
:body => post_body,
|
68
|
+
:auth_names => auth_names,
|
69
|
+
:return_type => return_type
|
70
|
+
)
|
71
|
+
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
73
|
+
if @api_client.config.debugging
|
74
|
+
@api_client.config.logger.debug "API called: DefinitionApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
+
end
|
76
|
+
return data, status_code, headers
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,214 @@
|
|
1
|
+
=begin
|
2
|
+
#Subscriptions
|
3
|
+
|
4
|
+
#Subscriptions allow contacts to control what forms of communications they receive. Contacts can decide whether they want to receive communication pertaining to a specific topic, brand, or an entire HubSpot account.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module CommunicationPreferences
|
17
|
+
class StatusApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client = ApiClient.default)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
# Get subscription statuses for a contact
|
24
|
+
# Returns a list of subscriptions and their status for a given contact.
|
25
|
+
# @param email_address [String]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [PublicSubscriptionStatusesResponse]
|
28
|
+
def get_email_status(email_address, opts = {})
|
29
|
+
data, _status_code, _headers = get_email_status_with_http_info(email_address, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Get subscription statuses for a contact
|
34
|
+
# Returns a list of subscriptions and their status for a given contact.
|
35
|
+
# @param email_address [String]
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(PublicSubscriptionStatusesResponse, Integer, Hash)>] PublicSubscriptionStatusesResponse data, response status code and response headers
|
38
|
+
def get_email_status_with_http_info(email_address, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug 'Calling API: StatusApi.get_email_status ...'
|
41
|
+
end
|
42
|
+
# verify the required parameter 'email_address' is set
|
43
|
+
if @api_client.config.client_side_validation && email_address.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'email_address' when calling StatusApi.get_email_status"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = '/communication-preferences/v3/status/email/{emailAddress}'.sub('{' + 'emailAddress' + '}', CGI.escape(email_address.to_s))
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = opts[:query_params] || {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = opts[:header_params] || {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
56
|
+
|
57
|
+
# form parameters
|
58
|
+
form_params = opts[:form_params] || {}
|
59
|
+
|
60
|
+
# http body (model)
|
61
|
+
post_body = opts[:body]
|
62
|
+
|
63
|
+
# return_type
|
64
|
+
return_type = opts[:return_type] || 'PublicSubscriptionStatusesResponse'
|
65
|
+
|
66
|
+
# auth_names
|
67
|
+
auth_names = opts[:auth_names] || ['hapikey']
|
68
|
+
|
69
|
+
new_options = opts.merge(
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => return_type
|
76
|
+
)
|
77
|
+
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: StatusApi#get_email_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
|
85
|
+
# Subscribe a contact
|
86
|
+
# Subscribes a contact to the given subscription type. This API is not valid to use for subscribing a contact at a brand or portal level and will return an error.
|
87
|
+
# @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [PublicSubscriptionStatus]
|
90
|
+
def subscribe(public_update_subscription_status_request, opts = {})
|
91
|
+
data, _status_code, _headers = subscribe_with_http_info(public_update_subscription_status_request, opts)
|
92
|
+
data
|
93
|
+
end
|
94
|
+
|
95
|
+
# Subscribe a contact
|
96
|
+
# Subscribes a contact to the given subscription type. This API is not valid to use for subscribing a contact at a brand or portal level and will return an error.
|
97
|
+
# @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [Array<(PublicSubscriptionStatus, Integer, Hash)>] PublicSubscriptionStatus data, response status code and response headers
|
100
|
+
def subscribe_with_http_info(public_update_subscription_status_request, opts = {})
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug 'Calling API: StatusApi.subscribe ...'
|
103
|
+
end
|
104
|
+
# verify the required parameter 'public_update_subscription_status_request' is set
|
105
|
+
if @api_client.config.client_side_validation && public_update_subscription_status_request.nil?
|
106
|
+
fail ArgumentError, "Missing the required parameter 'public_update_subscription_status_request' when calling StatusApi.subscribe"
|
107
|
+
end
|
108
|
+
# resource path
|
109
|
+
local_var_path = '/communication-preferences/v3/subscribe'
|
110
|
+
|
111
|
+
# query parameters
|
112
|
+
query_params = opts[:query_params] || {}
|
113
|
+
|
114
|
+
# header parameters
|
115
|
+
header_params = opts[:header_params] || {}
|
116
|
+
# HTTP header 'Accept' (if needed)
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
118
|
+
# HTTP header 'Content-Type'
|
119
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
120
|
+
|
121
|
+
# form parameters
|
122
|
+
form_params = opts[:form_params] || {}
|
123
|
+
|
124
|
+
# http body (model)
|
125
|
+
post_body = opts[:body] || @api_client.object_to_http_body(public_update_subscription_status_request)
|
126
|
+
|
127
|
+
# return_type
|
128
|
+
return_type = opts[:return_type] || 'PublicSubscriptionStatus'
|
129
|
+
|
130
|
+
# auth_names
|
131
|
+
auth_names = opts[:auth_names] || ['hapikey']
|
132
|
+
|
133
|
+
new_options = opts.merge(
|
134
|
+
:header_params => header_params,
|
135
|
+
:query_params => query_params,
|
136
|
+
:form_params => form_params,
|
137
|
+
:body => post_body,
|
138
|
+
:auth_names => auth_names,
|
139
|
+
:return_type => return_type
|
140
|
+
)
|
141
|
+
|
142
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
143
|
+
if @api_client.config.debugging
|
144
|
+
@api_client.config.logger.debug "API called: StatusApi#subscribe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
145
|
+
end
|
146
|
+
return data, status_code, headers
|
147
|
+
end
|
148
|
+
|
149
|
+
# Unsubscribe a contact
|
150
|
+
# Unsubscribes a contact from the given subscription type. This API is not valid to use for unsubscribing a contact at a brand or portal level and will return an error.
|
151
|
+
# @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
|
152
|
+
# @param [Hash] opts the optional parameters
|
153
|
+
# @return [PublicSubscriptionStatus]
|
154
|
+
def unsubscribe(public_update_subscription_status_request, opts = {})
|
155
|
+
data, _status_code, _headers = unsubscribe_with_http_info(public_update_subscription_status_request, opts)
|
156
|
+
data
|
157
|
+
end
|
158
|
+
|
159
|
+
# Unsubscribe a contact
|
160
|
+
# Unsubscribes a contact from the given subscription type. This API is not valid to use for unsubscribing a contact at a brand or portal level and will return an error.
|
161
|
+
# @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
|
162
|
+
# @param [Hash] opts the optional parameters
|
163
|
+
# @return [Array<(PublicSubscriptionStatus, Integer, Hash)>] PublicSubscriptionStatus data, response status code and response headers
|
164
|
+
def unsubscribe_with_http_info(public_update_subscription_status_request, opts = {})
|
165
|
+
if @api_client.config.debugging
|
166
|
+
@api_client.config.logger.debug 'Calling API: StatusApi.unsubscribe ...'
|
167
|
+
end
|
168
|
+
# verify the required parameter 'public_update_subscription_status_request' is set
|
169
|
+
if @api_client.config.client_side_validation && public_update_subscription_status_request.nil?
|
170
|
+
fail ArgumentError, "Missing the required parameter 'public_update_subscription_status_request' when calling StatusApi.unsubscribe"
|
171
|
+
end
|
172
|
+
# resource path
|
173
|
+
local_var_path = '/communication-preferences/v3/unsubscribe'
|
174
|
+
|
175
|
+
# query parameters
|
176
|
+
query_params = opts[:query_params] || {}
|
177
|
+
|
178
|
+
# header parameters
|
179
|
+
header_params = opts[:header_params] || {}
|
180
|
+
# HTTP header 'Accept' (if needed)
|
181
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
182
|
+
# HTTP header 'Content-Type'
|
183
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
184
|
+
|
185
|
+
# form parameters
|
186
|
+
form_params = opts[:form_params] || {}
|
187
|
+
|
188
|
+
# http body (model)
|
189
|
+
post_body = opts[:body] || @api_client.object_to_http_body(public_update_subscription_status_request)
|
190
|
+
|
191
|
+
# return_type
|
192
|
+
return_type = opts[:return_type] || 'PublicSubscriptionStatus'
|
193
|
+
|
194
|
+
# auth_names
|
195
|
+
auth_names = opts[:auth_names] || ['hapikey']
|
196
|
+
|
197
|
+
new_options = opts.merge(
|
198
|
+
:header_params => header_params,
|
199
|
+
:query_params => query_params,
|
200
|
+
:form_params => form_params,
|
201
|
+
:body => post_body,
|
202
|
+
:auth_names => auth_names,
|
203
|
+
:return_type => return_type
|
204
|
+
)
|
205
|
+
|
206
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
207
|
+
if @api_client.config.debugging
|
208
|
+
@api_client.config.logger.debug "API called: StatusApi#unsubscribe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
209
|
+
end
|
210
|
+
return data, status_code, headers
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|