hubspot-api-client 9.3.0 → 10.0.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 +27 -0
- data/Gemfile.lock +6 -4
- data/LICENSE +201 -0
- data/README.md +1 -1
- data/hubspot-api-client.gemspec +2 -1
- data/lib/hubspot-api-client.rb +5 -664
- 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/conversations/visitor-identification/api/generate_api.rb +90 -0
- data/lib/hubspot/codegen/conversations/visitor-identification/api_client.rb +406 -0
- data/lib/hubspot/codegen/conversations/visitor-identification/api_error.rb +61 -0
- data/lib/hubspot/codegen/conversations/visitor-identification/configuration.rb +263 -0
- data/lib/hubspot/codegen/conversations/visitor-identification/models/error.rb +292 -0
- data/lib/hubspot/codegen/conversations/visitor-identification/models/error_detail.rb +258 -0
- data/lib/hubspot/codegen/conversations/visitor-identification/models/identification_token_generation_request.rb +236 -0
- data/lib/hubspot/codegen/conversations/visitor-identification/models/identification_token_response.rb +215 -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/callbacks_api.rb +728 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/api/invoice_api.rb +247 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/api/settings_api.rb +160 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/api/sync_api.rb +168 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/api/user_accounts_api.rb +154 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/api_client.rb +408 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/api_error.rb +63 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/configuration.rb +265 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_app_settings.rb +241 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_app_urls.rb +381 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_extension_customer.rb +262 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_extension_invoice.rb +357 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_extension_term.rb +253 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/accounting_features.rb +248 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/action_response.rb +299 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/address.rb +253 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/create_invoice_feature.rb +232 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/create_invoice_sub_features.rb +293 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/create_user_account_request_external.rb +248 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/customer_search_response_external.rb +269 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/error.rb +294 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/error_detail.rb +260 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/exchange_rate_response.rb +297 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/import_invoice_feature.rb +218 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_create_payment_request.rb +263 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_pdf_response.rb +283 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_read_response.rb +455 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_search_response.rb +264 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_update_request.rb +281 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/invoice_update_response.rb +441 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/invoices_response_external.rb +264 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/object_sync_feature.rb +218 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/product.rb +281 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/product_search_response.rb +264 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/result_id_accounting_response.rb +267 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/sync_contacts_request.rb +235 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/sync_products_request.rb +235 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/tax.rb +248 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/tax_search_response.rb +264 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/tax_type.rb +228 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/terms_response.rb +264 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/unit_price.rb +228 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/updated_contact.rb +319 -0
- data/lib/hubspot/codegen/crm/extensions/accounting/models/updated_product.rb +324 -0
- data/lib/hubspot/codegen/crm/extensions/calling/api/settings_api.rb +284 -0
- data/lib/hubspot/codegen/crm/extensions/calling/api_client.rb +408 -0
- data/lib/hubspot/codegen/crm/extensions/calling/api_error.rb +63 -0
- data/lib/hubspot/codegen/crm/extensions/calling/configuration.rb +258 -0
- data/lib/hubspot/codegen/crm/extensions/calling/models/error.rb +294 -0
- data/lib/hubspot/codegen/crm/extensions/calling/models/error_detail.rb +260 -0
- data/lib/hubspot/codegen/crm/extensions/calling/models/settings_patch_request.rb +253 -0
- data/lib/hubspot/codegen/crm/extensions/calling/models/settings_request.rb +263 -0
- data/lib/hubspot/codegen/crm/extensions/calling/models/settings_response.rb +308 -0
- data/lib/hubspot/codegen/crm/extensions/cards/api_client.rb +14 -0
- data/lib/hubspot/codegen/crm/extensions/videoconferencing/api/settings_api.rb +222 -0
- data/lib/hubspot/codegen/crm/extensions/videoconferencing/api_client.rb +408 -0
- data/lib/hubspot/codegen/crm/extensions/videoconferencing/api_error.rb +63 -0
- data/lib/hubspot/codegen/crm/extensions/videoconferencing/configuration.rb +258 -0
- data/lib/hubspot/codegen/crm/extensions/videoconferencing/models/error.rb +294 -0
- data/lib/hubspot/codegen/crm/extensions/videoconferencing/models/error_detail.rb +260 -0
- data/lib/hubspot/codegen/crm/extensions/videoconferencing/models/external_settings.rb +248 -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/imports/models/forward_paging.rb +210 -0
- 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 +100 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +175 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +95 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +92 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api_client.rb +408 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api_error.rb +63 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/configuration.rb +258 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/associated_id.rb +231 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_batch_input.rb +219 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_id.rb +219 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_input.rb +219 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id.rb +244 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_response_simple_public_object.rb +315 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_response_simple_public_object_with_errors.rb +335 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/collection_response_associated_id.rb +228 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/collection_response_associated_id_forward_paging.rb +228 -0
- 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_forward_paging.rb +242 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/error.rb +294 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/error_category.rb +265 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/error_detail.rb +260 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/filter.rb +274 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/filter_group.rb +219 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/forward_paging.rb +212 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/next_page.rb +226 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/paging.rb +221 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/previous_page.rb +226 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/public_object_search_request.rb +288 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object.rb +279 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_batch_input.rb +233 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_id.rb +217 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_input.rb +219 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations.rb +290 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/standard_error.rb +311 -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/quotes/models/forward_paging.rb +210 -0
- 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/events_api.rb +105 -0
- data/lib/hubspot/codegen/events/api_client.rb +404 -0
- data/lib/hubspot/codegen/events/api_error.rb +59 -0
- data/lib/hubspot/codegen/events/configuration.rb +261 -0
- data/lib/hubspot/codegen/events/models/collection_response_external_unified_event.rb +224 -0
- data/lib/hubspot/codegen/events/models/error.rb +290 -0
- data/lib/hubspot/codegen/events/models/error_detail.rb +256 -0
- data/lib/hubspot/codegen/events/models/external_unified_event.rb +290 -0
- data/lib/hubspot/codegen/events/models/next_page.rb +222 -0
- data/lib/hubspot/codegen/events/models/paging.rb +208 -0
- data/lib/hubspot/codegen/files/files/api/files_api.rb +787 -0
- data/lib/hubspot/codegen/files/files/api/folders_api.rb +579 -0
- data/lib/hubspot/codegen/files/files/api_client.rb +406 -0
- data/lib/hubspot/codegen/files/files/api_error.rb +61 -0
- data/lib/hubspot/codegen/files/files/configuration.rb +263 -0
- data/lib/hubspot/codegen/files/files/models/collection_response_file.rb +226 -0
- data/lib/hubspot/codegen/files/files/models/collection_response_folder.rb +226 -0
- data/lib/hubspot/codegen/files/files/models/error.rb +292 -0
- data/lib/hubspot/codegen/files/files/models/error_category.rb +263 -0
- data/lib/hubspot/codegen/files/files/models/error_detail.rb +258 -0
- data/lib/hubspot/codegen/files/files/models/file_action_response.rb +348 -0
- data/lib/hubspot/codegen/files/files/models/file_update_input.rb +285 -0
- data/lib/hubspot/codegen/files/files/models/folder.rb +301 -0
- data/lib/hubspot/codegen/files/files/models/folder_action_response.rb +348 -0
- data/lib/hubspot/codegen/files/files/models/folder_input.rb +236 -0
- data/lib/hubspot/codegen/files/files/models/folder_update_input.rb +236 -0
- data/lib/hubspot/codegen/files/files/models/folder_update_task_locator.rb +228 -0
- data/lib/hubspot/codegen/files/files/models/hubspot_file.rb +440 -0
- data/lib/hubspot/codegen/files/files/models/import_from_url_input.rb +374 -0
- data/lib/hubspot/codegen/files/files/models/import_from_url_task_locator.rb +228 -0
- data/lib/hubspot/codegen/{crm/schemas → files/files}/models/next_page.rb +7 -7
- data/lib/hubspot/codegen/{crm/schemas → files/files}/models/paging.rb +7 -7
- data/lib/hubspot/codegen/{crm/schemas → files/files}/models/previous_page.rb +7 -7
- data/lib/hubspot/codegen/files/files/models/signed_url.rb +311 -0
- data/lib/hubspot/codegen/files/files/models/standard_error.rb +309 -0
- data/lib/hubspot/codegen/marketing/transactional/api/default_api.rb +400 -0
- data/lib/hubspot/codegen/marketing/transactional/api_client.rb +406 -0
- data/lib/hubspot/codegen/marketing/transactional/api_error.rb +61 -0
- data/lib/hubspot/codegen/marketing/transactional/configuration.rb +263 -0
- data/lib/hubspot/codegen/marketing/transactional/models/collection_response_smtp_api_token_view.rb +227 -0
- data/lib/hubspot/codegen/marketing/transactional/models/email_send_status_view.rb +326 -0
- data/lib/hubspot/codegen/marketing/transactional/models/error.rb +292 -0
- data/lib/hubspot/codegen/marketing/transactional/models/error_detail.rb +258 -0
- data/lib/hubspot/codegen/marketing/transactional/models/event_id_view.rb +231 -0
- data/lib/hubspot/codegen/marketing/transactional/models/next_page.rb +224 -0
- data/lib/hubspot/codegen/marketing/transactional/models/paging.rb +210 -0
- data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_email.rb +282 -0
- data/lib/hubspot/codegen/marketing/transactional/models/public_single_send_request_egg.rb +262 -0
- data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_request_egg.rb +231 -0
- data/lib/hubspot/codegen/marketing/transactional/models/smtp_api_token_view.rb +301 -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/conversations/visitor-identification/api/generate_api_spec.rb +47 -0
- data/spec/codegen/conversations/visitor-identification/models/error_detail_spec.rb +65 -0
- data/spec/codegen/conversations/visitor-identification/models/error_spec.rb +77 -0
- data/spec/codegen/conversations/visitor-identification/models/identification_token_generation_request_spec.rb +53 -0
- data/spec/codegen/conversations/visitor-identification/models/identification_token_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/accounting/api/callbacks_api_spec.rb +165 -0
- data/spec/codegen/crm/extensions/accounting/api/invoice_api_spec.rb +76 -0
- data/spec/codegen/crm/extensions/accounting/api/settings_api_spec.rb +60 -0
- data/spec/codegen/crm/extensions/accounting/api/sync_api_spec.rb +61 -0
- data/spec/codegen/crm/extensions/accounting/api/user_accounts_api_spec.rb +59 -0
- data/spec/codegen/crm/extensions/accounting/models/accounting_app_settings_spec.rb +53 -0
- data/spec/codegen/crm/extensions/accounting/models/accounting_app_urls_spec.rb +125 -0
- data/spec/codegen/crm/extensions/accounting/models/accounting_extension_customer_spec.rb +65 -0
- data/spec/codegen/crm/extensions/accounting/models/accounting_extension_invoice_spec.rb +93 -0
- data/spec/codegen/crm/extensions/accounting/models/accounting_extension_term_spec.rb +59 -0
- data/spec/codegen/crm/extensions/accounting/models/accounting_features_spec.rb +53 -0
- data/spec/codegen/crm/extensions/accounting/models/action_response_spec.rb +69 -0
- data/spec/codegen/crm/extensions/accounting/models/address_spec.rb +65 -0
- data/spec/codegen/crm/extensions/accounting/models/create_invoice_feature_spec.rb +47 -0
- data/spec/codegen/crm/extensions/accounting/models/create_invoice_sub_features_spec.rb +71 -0
- data/spec/codegen/crm/extensions/accounting/models/create_user_account_request_external_spec.rb +53 -0
- data/spec/codegen/crm/extensions/accounting/models/customer_search_response_external_spec.rb +51 -0
- data/spec/codegen/crm/extensions/accounting/models/error_detail_spec.rb +65 -0
- data/spec/codegen/crm/extensions/accounting/models/error_spec.rb +77 -0
- data/spec/codegen/crm/extensions/accounting/models/exchange_rate_response_spec.rb +63 -0
- data/spec/codegen/crm/extensions/accounting/models/import_invoice_feature_spec.rb +41 -0
- data/spec/codegen/crm/extensions/accounting/models/invoice_create_payment_request_spec.rb +59 -0
- data/spec/codegen/crm/extensions/accounting/models/invoice_pdf_response_spec.rb +51 -0
- data/spec/codegen/crm/extensions/accounting/models/invoice_read_response_spec.rb +135 -0
- data/spec/codegen/crm/extensions/accounting/models/invoice_search_response_spec.rb +51 -0
- data/spec/codegen/crm/extensions/accounting/models/invoice_update_request_spec.rb +83 -0
- data/spec/codegen/crm/extensions/accounting/models/invoice_update_response_spec.rb +135 -0
- data/spec/codegen/crm/extensions/accounting/models/invoices_response_external_spec.rb +51 -0
- data/spec/codegen/crm/extensions/accounting/models/object_sync_feature_spec.rb +41 -0
- data/spec/codegen/crm/extensions/accounting/models/product_search_response_spec.rb +51 -0
- data/spec/codegen/crm/extensions/accounting/models/product_spec.rb +71 -0
- data/spec/codegen/crm/extensions/accounting/models/result_id_accounting_response_spec.rb +51 -0
- data/spec/codegen/crm/extensions/accounting/models/sync_contacts_request_spec.rb +47 -0
- data/spec/codegen/crm/extensions/accounting/models/sync_products_request_spec.rb +47 -0
- data/spec/codegen/crm/extensions/accounting/models/tax_search_response_spec.rb +51 -0
- data/spec/codegen/crm/extensions/accounting/models/tax_spec.rb +53 -0
- data/spec/codegen/crm/extensions/accounting/models/tax_type_spec.rb +47 -0
- data/spec/codegen/crm/extensions/accounting/models/terms_response_spec.rb +51 -0
- data/spec/codegen/crm/extensions/accounting/models/unit_price_spec.rb +47 -0
- data/spec/codegen/crm/extensions/accounting/models/updated_contact_spec.rb +73 -0
- data/spec/codegen/crm/extensions/accounting/models/updated_product_spec.rb +75 -0
- data/spec/codegen/crm/extensions/calling/api/settings_api_spec.rb +85 -0
- data/spec/codegen/crm/extensions/calling/models/error_detail_spec.rb +65 -0
- data/spec/codegen/crm/extensions/calling/models/error_spec.rb +77 -0
- data/spec/codegen/crm/extensions/calling/models/settings_patch_request_spec.rb +65 -0
- data/spec/codegen/crm/extensions/calling/models/settings_request_spec.rb +65 -0
- data/spec/codegen/crm/extensions/calling/models/settings_response_spec.rb +77 -0
- data/spec/codegen/crm/extensions/videoconferencing/api/settings_api_spec.rb +72 -0
- data/spec/codegen/crm/extensions/videoconferencing/models/error_detail_spec.rb +65 -0
- data/spec/codegen/crm/extensions/videoconferencing/models/error_spec.rb +77 -0
- data/spec/codegen/crm/extensions/videoconferencing/models/external_settings_spec.rb +59 -0
- 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 +49 -0
- data/spec/codegen/crm/objects/feedback_submissions/api/basic_api_spec.rb +67 -0
- data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +48 -0
- data/spec/codegen/crm/objects/feedback_submissions/api/search_api_spec.rb +47 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/associated_id_spec.rb +47 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_batch_input_spec.rb +41 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_id_spec.rb +41 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/batch_input_simple_public_object_input_spec.rb +41 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id_spec.rb +53 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/batch_response_simple_public_object_spec.rb +75 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/batch_response_simple_public_object_with_errors_spec.rb +87 -0
- 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_associated_id_spec.rb +47 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/collection_response_simple_public_object_with_associations_forward_paging_spec.rb +47 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/collection_response_with_total_simple_public_object_forward_paging_spec.rb +53 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/error_category_spec.rb +51 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/error_detail_spec.rb +65 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/error_spec.rb +77 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/filter_group_spec.rb +41 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/filter_spec.rb +57 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/forward_paging_spec.rb +41 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/next_page_spec.rb +47 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/paging_spec.rb +47 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/previous_page_spec.rb +47 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/public_object_search_request_spec.rb +71 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_batch_input_spec.rb +47 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_id_spec.rb +41 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_input_spec.rb +41 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_spec.rb +71 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations_spec.rb +77 -0
- data/spec/codegen/crm/objects/feedback_submissions/models/standard_error_spec.rb +83 -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/events/api/events_api_spec.rb +54 -0
- data/spec/codegen/events/models/collection_response_external_unified_event_spec.rb +47 -0
- data/spec/codegen/events/models/error_detail_spec.rb +65 -0
- data/spec/codegen/events/models/error_spec.rb +77 -0
- data/spec/codegen/events/models/external_unified_event_spec.rb +71 -0
- data/spec/codegen/events/models/next_page_spec.rb +47 -0
- data/spec/codegen/events/models/paging_spec.rb +41 -0
- data/spec/codegen/files/files/api/files_api_spec.rb +189 -0
- data/spec/codegen/files/files/api/folders_api_spec.rb +143 -0
- data/spec/codegen/files/files/models/collection_response_file_spec.rb +47 -0
- data/spec/codegen/files/files/models/collection_response_folder_spec.rb +47 -0
- data/spec/codegen/files/files/models/error_category_spec.rb +51 -0
- data/spec/codegen/files/files/models/error_detail_spec.rb +65 -0
- data/spec/codegen/files/files/models/error_spec.rb +77 -0
- data/spec/codegen/files/files/models/file_action_response_spec.rb +93 -0
- data/spec/codegen/files/files/models/file_update_input_spec.rb +69 -0
- data/spec/codegen/files/files/models/folder_action_response_spec.rb +93 -0
- data/spec/codegen/files/files/models/folder_input_spec.rb +53 -0
- data/spec/codegen/files/files/models/folder_spec.rb +83 -0
- data/spec/codegen/files/files/models/folder_update_input_spec.rb +53 -0
- data/spec/codegen/files/files/models/folder_update_task_locator_spec.rb +47 -0
- data/spec/codegen/files/files/models/hubspot_file_spec.rb +147 -0
- data/spec/codegen/files/files/models/import_from_url_input_spec.rb +101 -0
- data/spec/codegen/files/files/models/import_from_url_task_locator_spec.rb +47 -0
- data/spec/codegen/{crm/schemas → files/files}/models/next_page_spec.rb +5 -5
- data/spec/codegen/{crm/schemas → files/files}/models/paging_spec.rb +5 -5
- data/spec/codegen/{crm/schemas → files/files}/models/previous_page_spec.rb +5 -5
- data/spec/codegen/files/files/models/signed_url_spec.rb +83 -0
- data/spec/codegen/files/files/models/standard_error_spec.rb +83 -0
- data/spec/codegen/marketing/transactional/api/default_api_spec.rb +110 -0
- data/spec/codegen/marketing/transactional/models/collection_response_smtp_api_token_view_spec.rb +47 -0
- data/spec/codegen/marketing/transactional/models/email_send_status_view_spec.rb +85 -0
- data/spec/codegen/marketing/transactional/models/error_detail_spec.rb +65 -0
- data/spec/codegen/marketing/transactional/models/error_spec.rb +77 -0
- data/spec/codegen/marketing/transactional/models/event_id_view_spec.rb +47 -0
- data/spec/codegen/marketing/transactional/models/next_page_spec.rb +47 -0
- data/spec/codegen/marketing/transactional/models/paging_spec.rb +41 -0
- data/spec/codegen/marketing/transactional/models/public_single_send_email_spec.rb +71 -0
- data/spec/codegen/marketing/transactional/models/public_single_send_request_egg_spec.rb +59 -0
- data/spec/codegen/marketing/transactional/models/smtp_api_token_request_egg_spec.rb +47 -0
- data/spec/codegen/marketing/transactional/models/smtp_api_token_view_spec.rb +77 -0
- data/spec/features/conversations/visitor-identification/generate_api_spec.rb +7 -0
- data/spec/features/crm/extensions/accounting/callbacks_api_spec.rb +16 -0
- data/spec/features/crm/extensions/accounting/invoice_api_spec.rb +9 -0
- data/spec/features/crm/extensions/accounting/settings_api_spec.rb +8 -0
- data/spec/features/crm/extensions/accounting/sync_api_spec.rb +8 -0
- data/spec/features/crm/extensions/accounting/user_accounts_api_spec.rb +8 -0
- data/spec/features/crm/extensions/calling/settings_api_spec.rb +10 -0
- data/spec/features/crm/extensions/videoconferencing/settings_api_spec.rb +9 -0
- data/spec/features/crm/objects/feedback_submissions/associations_api_spec.rb +7 -0
- data/spec/features/crm/objects/feedback_submissions/basic_api_spec.rb +8 -0
- data/spec/features/crm/objects/feedback_submissions/batch_api_spec.rb +7 -0
- data/spec/features/crm/objects/feedback_submissions/search_api_spec.rb +7 -0
- data/spec/features/crm/objects/search_api_spec.rb +1 -1
- data/spec/features/events/events_api_spec.rb +7 -0
- data/spec/features/files/files/files_api_spec.rb +16 -0
- data/spec/features/files/files/folders_api_spec.rb +14 -0
- data/spec/features/marketing/transactional/default_api_spec.rb +12 -0
- metadata +602 -69
@@ -56,6 +56,20 @@ module Hubspot
|
|
56
56
|
end
|
57
57
|
|
58
58
|
unless response.success?
|
59
|
+
if config.error_handler.any?
|
60
|
+
config.error_handler.each do |statuses, opts|
|
61
|
+
statuses = statuses.is_a?(Integer) ? [statuses] : statuses
|
62
|
+
|
63
|
+
retries = opts[:max_retries] || 5
|
64
|
+
while retries > 0 && statuses.include?(response.code)
|
65
|
+
sleep opts[:seconds_delay] if opts[:seconds_delay]
|
66
|
+
response = request.run
|
67
|
+
opts[:retry_block].call if opts[:retry_block]
|
68
|
+
retries -= 1
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
59
73
|
if response.timed_out?
|
60
74
|
fail ApiError.new('Connection timed out')
|
61
75
|
elsif response.code == 0
|
@@ -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
|
@@ -56,6 +56,20 @@ module Hubspot
|
|
56
56
|
end
|
57
57
|
|
58
58
|
unless response.success?
|
59
|
+
if config.error_handler.any?
|
60
|
+
config.error_handler.each do |statuses, opts|
|
61
|
+
statuses = statuses.is_a?(Integer) ? [statuses] : statuses
|
62
|
+
|
63
|
+
retries = opts[:max_retries] || 5
|
64
|
+
while retries > 0 && statuses.include?(response.code)
|
65
|
+
sleep opts[:seconds_delay] if opts[:seconds_delay]
|
66
|
+
response = request.run
|
67
|
+
opts[:retry_block].call if opts[:retry_block]
|
68
|
+
retries -= 1
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
59
73
|
if response.timed_out?
|
60
74
|
fail ApiError.new('Connection timed out')
|
61
75
|
elsif response.code == 0
|
@@ -0,0 +1,90 @@
|
|
1
|
+
=begin
|
2
|
+
#Visitor Identification
|
3
|
+
|
4
|
+
#The Visitor Identification API allows you to pass identification information to the HubSpot chat widget for otherwise unknown visitors that were verified by your own authentication system.
|
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 Conversations
|
17
|
+
module VisitorIdentification
|
18
|
+
class GenerateApi
|
19
|
+
attr_accessor :api_client
|
20
|
+
|
21
|
+
def initialize(api_client = ApiClient.default)
|
22
|
+
@api_client = api_client
|
23
|
+
end
|
24
|
+
# Generate a token
|
25
|
+
# Generates a new visitor identification token. This token will be unique every time this endpoint is called, even if called with the same email address. This token is temporary and will expire after 12 hours
|
26
|
+
# @param identification_token_generation_request [IdentificationTokenGenerationRequest]
|
27
|
+
# @param [Hash] opts the optional parameters
|
28
|
+
# @return [IdentificationTokenResponse]
|
29
|
+
def generate_token(identification_token_generation_request, opts = {})
|
30
|
+
data, _status_code, _headers = generate_token_with_http_info(identification_token_generation_request, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Generate a token
|
35
|
+
# Generates a new visitor identification token. This token will be unique every time this endpoint is called, even if called with the same email address. This token is temporary and will expire after 12 hours
|
36
|
+
# @param identification_token_generation_request [IdentificationTokenGenerationRequest]
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @return [Array<(IdentificationTokenResponse, Integer, Hash)>] IdentificationTokenResponse data, response status code and response headers
|
39
|
+
def generate_token_with_http_info(identification_token_generation_request, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: GenerateApi.generate_token ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'identification_token_generation_request' is set
|
44
|
+
if @api_client.config.client_side_validation && identification_token_generation_request.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'identification_token_generation_request' when calling GenerateApi.generate_token"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/conversations/v3/visitor-identification/tokens/create'
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
|
53
|
+
# header parameters
|
54
|
+
header_params = opts[:header_params] || {}
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
57
|
+
# HTTP header 'Content-Type'
|
58
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
59
|
+
|
60
|
+
# form parameters
|
61
|
+
form_params = opts[:form_params] || {}
|
62
|
+
|
63
|
+
# http body (model)
|
64
|
+
post_body = opts[:body] || @api_client.object_to_http_body(identification_token_generation_request)
|
65
|
+
|
66
|
+
# return_type
|
67
|
+
return_type = opts[:return_type] || 'IdentificationTokenResponse'
|
68
|
+
|
69
|
+
# auth_names
|
70
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
71
|
+
|
72
|
+
new_options = opts.merge(
|
73
|
+
:header_params => header_params,
|
74
|
+
:query_params => query_params,
|
75
|
+
:form_params => form_params,
|
76
|
+
:body => post_body,
|
77
|
+
:auth_names => auth_names,
|
78
|
+
:return_type => return_type
|
79
|
+
)
|
80
|
+
|
81
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
82
|
+
if @api_client.config.debugging
|
83
|
+
@api_client.config.logger.debug "API called: GenerateApi#generate_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
84
|
+
end
|
85
|
+
return data, status_code, headers
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
@@ -0,0 +1,406 @@
|
|
1
|
+
=begin
|
2
|
+
#Visitor Identification
|
3
|
+
|
4
|
+
#The Visitor Identification API allows you to pass identification information to the HubSpot chat widget for otherwise unknown visitors that were verified by your own authentication system.
|
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 'date'
|
14
|
+
require 'json'
|
15
|
+
require 'logger'
|
16
|
+
require 'tempfile'
|
17
|
+
require 'typhoeus'
|
18
|
+
|
19
|
+
module Hubspot
|
20
|
+
module Conversations
|
21
|
+
module VisitorIdentification
|
22
|
+
class ApiClient
|
23
|
+
# The Configuration object holding settings to be used in the API client.
|
24
|
+
attr_accessor :config
|
25
|
+
|
26
|
+
# Defines the headers to be used in HTTP requests of all API calls by default.
|
27
|
+
#
|
28
|
+
# @return [Hash]
|
29
|
+
attr_accessor :default_headers
|
30
|
+
|
31
|
+
# Initializes the ApiClient
|
32
|
+
# @option config [Configuration] Configuration for initializing the object, default to Configuration.default
|
33
|
+
def initialize(config = Configuration.default)
|
34
|
+
@config = config
|
35
|
+
@user_agent = "hubspot-api-client-ruby; #{VERSION}"
|
36
|
+
@default_headers = {
|
37
|
+
'Content-Type' => 'application/json',
|
38
|
+
'User-Agent' => @user_agent
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.default
|
43
|
+
@@default ||= ApiClient.new
|
44
|
+
end
|
45
|
+
|
46
|
+
# Call an API with given options.
|
47
|
+
#
|
48
|
+
# @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
|
49
|
+
# the data deserialized from response body (could be nil), response status code and response headers.
|
50
|
+
def call_api(http_method, path, opts = {})
|
51
|
+
request = build_request(http_method, path, opts)
|
52
|
+
response = request.run
|
53
|
+
|
54
|
+
if @config.debugging
|
55
|
+
@config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
|
56
|
+
end
|
57
|
+
|
58
|
+
unless response.success?
|
59
|
+
if config.error_handler.any?
|
60
|
+
config.error_handler.each do |statuses, opts|
|
61
|
+
statuses = statuses.is_a?(Integer) ? [statuses] : statuses
|
62
|
+
|
63
|
+
retries = opts[:max_retries] || 5
|
64
|
+
while retries > 0 && statuses.include?(response.code)
|
65
|
+
sleep opts[:seconds_delay] if opts[:seconds_delay]
|
66
|
+
response = request.run
|
67
|
+
opts[:retry_block].call if opts[:retry_block]
|
68
|
+
retries -= 1
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
if response.timed_out?
|
74
|
+
fail ApiError.new('Connection timed out')
|
75
|
+
elsif response.code == 0
|
76
|
+
# Errors from libcurl will be made visible here
|
77
|
+
fail ApiError.new(:code => 0,
|
78
|
+
:message => response.return_message)
|
79
|
+
else
|
80
|
+
fail ApiError.new(:code => response.code,
|
81
|
+
:response_headers => response.headers,
|
82
|
+
:response_body => response.body),
|
83
|
+
response.status_message
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
if opts[:return_type]
|
88
|
+
data = deserialize(response, opts[:return_type])
|
89
|
+
else
|
90
|
+
data = nil
|
91
|
+
end
|
92
|
+
return data, response.code, response.headers
|
93
|
+
end
|
94
|
+
|
95
|
+
# Builds the HTTP request
|
96
|
+
#
|
97
|
+
# @param [String] http_method HTTP method/verb (e.g. POST)
|
98
|
+
# @param [String] path URL path (e.g. /account/new)
|
99
|
+
# @option opts [Hash] :header_params Header parameters
|
100
|
+
# @option opts [Hash] :query_params Query parameters
|
101
|
+
# @option opts [Hash] :form_params Query parameters
|
102
|
+
# @option opts [Object] :body HTTP body (JSON/XML)
|
103
|
+
# @return [Typhoeus::Request] A Typhoeus Request
|
104
|
+
def build_request(http_method, path, opts = {})
|
105
|
+
url = build_request_url(path)
|
106
|
+
http_method = http_method.to_sym.downcase
|
107
|
+
|
108
|
+
header_params = @default_headers.merge(opts[:header_params] || {})
|
109
|
+
query_params = opts[:query_params] || {}
|
110
|
+
form_params = opts[:form_params] || {}
|
111
|
+
|
112
|
+
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
113
|
+
|
114
|
+
# set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
|
115
|
+
_verify_ssl_host = @config.verify_ssl_host ? 2 : 0
|
116
|
+
|
117
|
+
req_opts = {
|
118
|
+
:method => http_method,
|
119
|
+
:headers => header_params,
|
120
|
+
:params => query_params,
|
121
|
+
:params_encoding => @config.params_encoding,
|
122
|
+
:timeout => @config.timeout,
|
123
|
+
:ssl_verifypeer => @config.verify_ssl,
|
124
|
+
:ssl_verifyhost => _verify_ssl_host,
|
125
|
+
:sslcert => @config.cert_file,
|
126
|
+
:sslkey => @config.key_file,
|
127
|
+
:verbose => @config.debugging
|
128
|
+
}
|
129
|
+
|
130
|
+
# set custom cert, if provided
|
131
|
+
req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
|
132
|
+
|
133
|
+
if [:post, :patch, :put, :delete].include?(http_method)
|
134
|
+
req_body = build_request_body(header_params, form_params, opts[:body])
|
135
|
+
req_opts.update :body => req_body
|
136
|
+
if @config.debugging
|
137
|
+
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
request = Typhoeus::Request.new(url, req_opts)
|
142
|
+
download_file(request) if opts[:return_type] == 'File'
|
143
|
+
request
|
144
|
+
end
|
145
|
+
|
146
|
+
# Builds the HTTP request body
|
147
|
+
#
|
148
|
+
# @param [Hash] header_params Header parameters
|
149
|
+
# @param [Hash] form_params Query parameters
|
150
|
+
# @param [Object] body HTTP body (JSON/XML)
|
151
|
+
# @return [String] HTTP body data in the form of string
|
152
|
+
def build_request_body(header_params, form_params, body)
|
153
|
+
# http form
|
154
|
+
if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
|
155
|
+
header_params['Content-Type'] == 'multipart/form-data'
|
156
|
+
data = {}
|
157
|
+
form_params.each do |key, value|
|
158
|
+
case value
|
159
|
+
when ::File, ::Array, nil
|
160
|
+
# let typhoeus handle File, Array and nil parameters
|
161
|
+
data[key] = value
|
162
|
+
else
|
163
|
+
data[key] = value.to_s
|
164
|
+
end
|
165
|
+
end
|
166
|
+
elsif body
|
167
|
+
data = body.is_a?(String) ? body : body.to_json
|
168
|
+
else
|
169
|
+
data = nil
|
170
|
+
end
|
171
|
+
data
|
172
|
+
end
|
173
|
+
|
174
|
+
# Check if the given MIME is a JSON MIME.
|
175
|
+
# JSON MIME examples:
|
176
|
+
# application/json
|
177
|
+
# application/json; charset=UTF8
|
178
|
+
# APPLICATION/JSON
|
179
|
+
# */*
|
180
|
+
# @param [String] mime MIME
|
181
|
+
# @return [Boolean] True if the MIME is application/json
|
182
|
+
def json_mime?(mime)
|
183
|
+
(mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
|
184
|
+
end
|
185
|
+
|
186
|
+
# Deserialize the response to the given return type.
|
187
|
+
#
|
188
|
+
# @param [Response] response HTTP response
|
189
|
+
# @param [String] return_type some examples: "User", "Array<User>", "Hash<String, Integer>"
|
190
|
+
def deserialize(response, return_type)
|
191
|
+
body = response.body
|
192
|
+
|
193
|
+
# handle file downloading - return the File instance processed in request callbacks
|
194
|
+
# note that response body is empty when the file is written in chunks in request on_body callback
|
195
|
+
return @tempfile if return_type == 'File'
|
196
|
+
|
197
|
+
return nil if body.nil? || body.empty?
|
198
|
+
|
199
|
+
# return response body directly for String return type
|
200
|
+
return body if return_type == 'String'
|
201
|
+
|
202
|
+
# ensuring a default content type
|
203
|
+
content_type = response.headers['Content-Type'] || 'application/json'
|
204
|
+
|
205
|
+
fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type)
|
206
|
+
|
207
|
+
begin
|
208
|
+
data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
|
209
|
+
rescue JSON::ParserError => e
|
210
|
+
if %w(String Date DateTime).include?(return_type)
|
211
|
+
data = body
|
212
|
+
else
|
213
|
+
raise e
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
convert_to_type data, return_type
|
218
|
+
end
|
219
|
+
|
220
|
+
# Convert data to the given return type.
|
221
|
+
# @param [Object] data Data to be converted
|
222
|
+
# @param [String] return_type Return type
|
223
|
+
# @return [Mixed] Data in a particular type
|
224
|
+
def convert_to_type(data, return_type)
|
225
|
+
return nil if data.nil?
|
226
|
+
case return_type
|
227
|
+
when 'String'
|
228
|
+
data.to_s
|
229
|
+
when 'Integer'
|
230
|
+
data.to_i
|
231
|
+
when 'Float'
|
232
|
+
data.to_f
|
233
|
+
when 'Boolean'
|
234
|
+
data == true
|
235
|
+
when 'DateTime'
|
236
|
+
# parse date time (expecting ISO 8601 format)
|
237
|
+
DateTime.parse data
|
238
|
+
when 'Date'
|
239
|
+
# parse date time (expecting ISO 8601 format)
|
240
|
+
Date.parse data
|
241
|
+
when 'Object'
|
242
|
+
# generic object (usually a Hash), return directly
|
243
|
+
data
|
244
|
+
when /\AArray<(.+)>\z/
|
245
|
+
# e.g. Array<Pet>
|
246
|
+
sub_type = $1
|
247
|
+
data.map { |item| convert_to_type(item, sub_type) }
|
248
|
+
when /\AHash\<String, (.+)\>\z/
|
249
|
+
# e.g. Hash<String, Integer>
|
250
|
+
sub_type = $1
|
251
|
+
{}.tap do |hash|
|
252
|
+
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
253
|
+
end
|
254
|
+
else
|
255
|
+
# models, e.g. Pet
|
256
|
+
Hubspot::Conversations::VisitorIdentification.const_get(return_type).build_from_hash(data)
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
# Save response body into a file in (the defined) temporary folder, using the filename
|
261
|
+
# from the "Content-Disposition" header if provided, otherwise a random filename.
|
262
|
+
# The response body is written to the file in chunks in order to handle files which
|
263
|
+
# size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
|
264
|
+
# process can use.
|
265
|
+
#
|
266
|
+
# @see Configuration#temp_folder_path
|
267
|
+
def download_file(request)
|
268
|
+
tempfile = nil
|
269
|
+
encoding = nil
|
270
|
+
request.on_headers do |response|
|
271
|
+
content_disposition = response.headers['Content-Disposition']
|
272
|
+
if content_disposition && content_disposition =~ /filename=/i
|
273
|
+
filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
|
274
|
+
prefix = sanitize_filename(filename)
|
275
|
+
else
|
276
|
+
prefix = 'download-'
|
277
|
+
end
|
278
|
+
prefix = prefix + '-' unless prefix.end_with?('-')
|
279
|
+
encoding = response.body.encoding
|
280
|
+
tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
|
281
|
+
@tempfile = tempfile
|
282
|
+
end
|
283
|
+
request.on_body do |chunk|
|
284
|
+
chunk.force_encoding(encoding)
|
285
|
+
tempfile.write(chunk)
|
286
|
+
end
|
287
|
+
request.on_complete do |response|
|
288
|
+
if tempfile
|
289
|
+
tempfile.close
|
290
|
+
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
291
|
+
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
292
|
+
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
293
|
+
"explicitly with `tempfile.delete`"
|
294
|
+
end
|
295
|
+
end
|
296
|
+
end
|
297
|
+
|
298
|
+
# Sanitize filename by removing path.
|
299
|
+
# e.g. ../../sun.gif becomes sun.gif
|
300
|
+
#
|
301
|
+
# @param [String] filename the filename to be sanitized
|
302
|
+
# @return [String] the sanitized filename
|
303
|
+
def sanitize_filename(filename)
|
304
|
+
filename.gsub(/.*[\/\\]/, '')
|
305
|
+
end
|
306
|
+
|
307
|
+
def build_request_url(path)
|
308
|
+
# Add leading and trailing slashes to path
|
309
|
+
path = "/#{path}".gsub(/\/+/, '/')
|
310
|
+
@config.base_url + path
|
311
|
+
end
|
312
|
+
|
313
|
+
# Update hearder and query params based on authentication settings.
|
314
|
+
#
|
315
|
+
# @param [Hash] header_params Header parameters
|
316
|
+
# @param [Hash] query_params Query parameters
|
317
|
+
# @param [String] auth_names Authentication scheme name
|
318
|
+
def update_params_for_auth!(header_params, query_params, auth_names)
|
319
|
+
Array(auth_names).each do |auth_name|
|
320
|
+
auth_setting = @config.auth_settings[auth_name]
|
321
|
+
next unless auth_setting
|
322
|
+
case auth_setting[:in]
|
323
|
+
when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
|
324
|
+
when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
|
325
|
+
else fail ArgumentError, 'Authentication token must be in `query` of `header`'
|
326
|
+
end
|
327
|
+
end
|
328
|
+
end
|
329
|
+
|
330
|
+
# Sets user agent in HTTP header
|
331
|
+
#
|
332
|
+
# @param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.0)
|
333
|
+
def user_agent=(user_agent)
|
334
|
+
@user_agent = user_agent
|
335
|
+
@default_headers['User-Agent'] = @user_agent
|
336
|
+
end
|
337
|
+
|
338
|
+
# Return Accept header based on an array of accepts provided.
|
339
|
+
# @param [Array] accepts array for Accept
|
340
|
+
# @return [String] the Accept header (e.g. application/json)
|
341
|
+
def select_header_accept(accepts)
|
342
|
+
return nil if accepts.nil? || accepts.empty?
|
343
|
+
# use JSON when present, otherwise use all of the provided
|
344
|
+
json_accept = accepts.find { |s| json_mime?(s) }
|
345
|
+
json_accept || accepts.join(',')
|
346
|
+
end
|
347
|
+
|
348
|
+
# Return Content-Type header based on an array of content types provided.
|
349
|
+
# @param [Array] content_types array for Content-Type
|
350
|
+
# @return [String] the Content-Type header (e.g. application/json)
|
351
|
+
def select_header_content_type(content_types)
|
352
|
+
# use application/json by default
|
353
|
+
return 'application/json' if content_types.nil? || content_types.empty?
|
354
|
+
# use JSON when present, otherwise use the first one
|
355
|
+
json_content_type = content_types.find { |s| json_mime?(s) }
|
356
|
+
json_content_type || content_types.first
|
357
|
+
end
|
358
|
+
|
359
|
+
# Convert object (array, hash, object, etc) to JSON string.
|
360
|
+
# @param [Object] model object to be converted into JSON string
|
361
|
+
# @return [String] JSON string representation of the object
|
362
|
+
def object_to_http_body(model)
|
363
|
+
return model if model.nil? || model.is_a?(String)
|
364
|
+
local_body = nil
|
365
|
+
if model.is_a?(Array)
|
366
|
+
local_body = model.map { |m| object_to_hash(m) }
|
367
|
+
else
|
368
|
+
local_body = object_to_hash(model)
|
369
|
+
end
|
370
|
+
local_body.to_json
|
371
|
+
end
|
372
|
+
|
373
|
+
# Convert object(non-array) to hash.
|
374
|
+
# @param [Object] obj object to be converted into JSON string
|
375
|
+
# @return [String] JSON string representation of the object
|
376
|
+
def object_to_hash(obj)
|
377
|
+
if obj.respond_to?(:to_hash)
|
378
|
+
obj.to_hash
|
379
|
+
else
|
380
|
+
obj
|
381
|
+
end
|
382
|
+
end
|
383
|
+
|
384
|
+
# Build parameter value according to the given collection format.
|
385
|
+
# @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi
|
386
|
+
def build_collection_param(param, collection_format)
|
387
|
+
case collection_format
|
388
|
+
when :csv
|
389
|
+
param.join(',')
|
390
|
+
when :ssv
|
391
|
+
param.join(' ')
|
392
|
+
when :tsv
|
393
|
+
param.join("\t")
|
394
|
+
when :pipes
|
395
|
+
param.join('|')
|
396
|
+
when :multi
|
397
|
+
# return the array directly as typhoeus will handle it as expected
|
398
|
+
param
|
399
|
+
else
|
400
|
+
fail "unknown collection format: #{collection_format.inspect}"
|
401
|
+
end
|
402
|
+
end
|
403
|
+
end
|
404
|
+
end
|
405
|
+
end
|
406
|
+
end
|