hubspot-api-client 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/hubspot-api-client.rb +3 -2
- data/lib/hubspot/codegen/crm/associations/api/batch_api.rb +3 -3
- data/lib/hubspot/codegen/crm/associations/api/types_api.rb +94 -0
- data/lib/hubspot/codegen/crm/associations/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/associations/models/associated_id.rb +229 -0
- data/lib/hubspot/codegen/crm/associations/models/batch_input_public_object_id.rb +1 -1
- data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association.rb +0 -5
- data/lib/hubspot/codegen/crm/associations/models/batch_response_public_association_multi.rb +0 -5
- data/lib/hubspot/codegen/crm/associations/models/collection_response_public_association_definiton.rb +226 -0
- data/lib/hubspot/codegen/crm/associations/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/associations/models/error_detail.rb +20 -23
- data/lib/hubspot/codegen/crm/associations/models/next_page.rb +224 -0
- data/lib/hubspot/codegen/crm/associations/models/paging.rb +210 -0
- data/lib/hubspot/codegen/crm/associations/models/public_association.rb +19 -5
- data/lib/hubspot/codegen/crm/associations/models/public_association_definiton.rb +229 -0
- data/lib/hubspot/codegen/crm/associations/models/public_association_multi.rb +2 -2
- data/lib/hubspot/codegen/crm/companies/api/associations_api.rb +42 -30
- data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +8 -5
- data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +2 -2
- data/lib/hubspot/codegen/crm/companies/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/companies/models/associated_id.rb +229 -0
- data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +11 -2
- data/lib/hubspot/codegen/crm/companies/models/batch_response_simple_public_object.rb +1 -6
- data/lib/hubspot/codegen/crm/companies/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
- data/lib/hubspot/codegen/crm/companies/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/companies/models/error_detail.rb +20 -23
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +2 -12
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input.rb +1 -1
- data/lib/hubspot/codegen/crm/contacts/api/associations_api.rb +42 -30
- data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +8 -5
- data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +2 -2
- data/lib/hubspot/codegen/crm/contacts/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/contacts/models/associated_id.rb +229 -0
- data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +11 -2
- data/lib/hubspot/codegen/crm/contacts/models/batch_response_simple_public_object.rb +1 -6
- data/lib/hubspot/codegen/crm/contacts/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
- data/lib/hubspot/codegen/crm/contacts/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/contacts/models/error_detail.rb +20 -23
- data/lib/hubspot/codegen/crm/contacts/models/filter.rb +3 -3
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +2 -12
- data/lib/hubspot/codegen/crm/deals/api/associations_api.rb +42 -30
- data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +8 -5
- data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +2 -2
- data/lib/hubspot/codegen/crm/deals/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/deals/models/associated_id.rb +229 -0
- data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +11 -2
- data/lib/hubspot/codegen/crm/deals/models/batch_response_simple_public_object.rb +1 -6
- data/lib/hubspot/codegen/crm/deals/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
- data/lib/hubspot/codegen/crm/deals/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/deals/models/error_detail.rb +20 -23
- data/lib/hubspot/codegen/crm/deals/models/filter.rb +3 -3
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +2 -12
- data/lib/hubspot/codegen/crm/extensions/cards/api/cards_api.rb +36 -36
- data/lib/hubspot/codegen/crm/extensions/cards/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/extensions/cards/models/card_actions.rb +5 -3
- data/lib/hubspot/codegen/crm/extensions/cards/models/card_create_request.rb +5 -3
- data/lib/hubspot/codegen/crm/extensions/cards/models/card_display_body.rb +5 -3
- data/lib/hubspot/codegen/crm/extensions/cards/models/card_display_property.rb +8 -3
- data/lib/hubspot/codegen/crm/extensions/cards/models/card_fetch_body.rb +6 -3
- data/lib/hubspot/codegen/crm/extensions/cards/models/card_fetch_body_patch.rb +7 -4
- data/lib/hubspot/codegen/crm/extensions/cards/models/card_list_response.rb +5 -3
- data/lib/hubspot/codegen/crm/extensions/cards/models/card_object_type_body.rb +5 -3
- data/lib/hubspot/codegen/crm/extensions/cards/models/card_patch_request.rb +5 -3
- data/lib/hubspot/codegen/crm/extensions/cards/models/card_response.rb +8 -3
- data/lib/hubspot/codegen/crm/extensions/cards/models/display_option.rb +7 -3
- data/lib/hubspot/codegen/crm/extensions/cards/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/extensions/cards/models/error_detail.rb +24 -4
- data/lib/hubspot/codegen/crm/line_items/api/associations_api.rb +42 -30
- data/lib/hubspot/codegen/crm/line_items/api/basic_api.rb +8 -5
- data/lib/hubspot/codegen/crm/line_items/api/batch_api.rb +2 -2
- data/lib/hubspot/codegen/crm/line_items/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/line_items/models/associated_id.rb +229 -0
- data/lib/hubspot/codegen/crm/line_items/models/batch_read_input_simple_public_object_id.rb +11 -2
- data/lib/hubspot/codegen/crm/line_items/models/batch_response_simple_public_object.rb +1 -6
- data/lib/hubspot/codegen/crm/line_items/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
- data/lib/hubspot/codegen/crm/line_items/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/line_items/models/error_detail.rb +20 -23
- data/lib/hubspot/codegen/crm/line_items/models/filter.rb +3 -3
- data/lib/hubspot/codegen/crm/line_items/models/simple_public_object.rb +2 -12
- data/lib/hubspot/codegen/crm/owners/api/default_api.rb +2 -2
- data/lib/hubspot/codegen/crm/owners/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/owners/models/collection_response_public_owner.rb +1 -1
- data/lib/hubspot/codegen/crm/owners/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/owners/models/error_detail.rb +22 -2
- data/lib/hubspot/codegen/crm/owners/models/public_owner.rb +1 -6
- data/lib/hubspot/codegen/crm/pipelines/api/pipeline_stages_api.rb +6 -6
- data/lib/hubspot/codegen/crm/pipelines/api/pipelines_api.rb +7 -7
- data/lib/hubspot/codegen/crm/pipelines/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/pipelines/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/pipelines/models/error_detail.rb +22 -2
- data/lib/hubspot/codegen/crm/products/api/associations_api.rb +43 -31
- data/lib/hubspot/codegen/crm/products/api/basic_api.rb +9 -6
- data/lib/hubspot/codegen/crm/products/api/batch_api.rb +3 -3
- data/lib/hubspot/codegen/crm/products/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/products/models/associated_id.rb +229 -0
- data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +11 -2
- data/lib/hubspot/codegen/crm/products/models/batch_response_simple_public_object.rb +1 -6
- data/lib/hubspot/codegen/crm/products/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
- data/lib/hubspot/codegen/crm/products/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/products/models/error_detail.rb +20 -23
- data/lib/hubspot/codegen/crm/products/models/filter.rb +3 -3
- data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +2 -12
- data/lib/hubspot/codegen/crm/products/models/simple_public_object_id.rb +1 -1
- data/lib/hubspot/codegen/crm/products/models/simple_public_object_input.rb +1 -1
- data/lib/hubspot/codegen/crm/properties/api/batch_api.rb +4 -4
- data/lib/hubspot/codegen/crm/properties/api/core_api.rb +6 -6
- data/lib/hubspot/codegen/crm/properties/api/groups_api.rb +6 -6
- data/lib/hubspot/codegen/crm/properties/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/properties/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/properties/models/error_detail.rb +20 -23
- data/lib/hubspot/codegen/crm/quotes/api/associations_api.rb +43 -31
- data/lib/hubspot/codegen/crm/quotes/api/basic_api.rb +9 -6
- data/lib/hubspot/codegen/crm/quotes/api/batch_api.rb +3 -3
- data/lib/hubspot/codegen/crm/quotes/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/quotes/models/associated_id.rb +229 -0
- data/lib/hubspot/codegen/crm/quotes/models/batch_read_input_simple_public_object_id.rb +11 -2
- data/lib/hubspot/codegen/crm/quotes/models/batch_response_simple_public_object.rb +1 -6
- data/lib/hubspot/codegen/crm/quotes/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +5 -5
- data/lib/hubspot/codegen/crm/quotes/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/quotes/models/error_detail.rb +20 -23
- data/lib/hubspot/codegen/crm/quotes/models/filter.rb +4 -4
- data/lib/hubspot/codegen/crm/quotes/models/simple_public_object.rb +2 -12
- data/lib/hubspot/codegen/crm/tickets/api/associations_api.rb +43 -31
- data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +9 -6
- data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +3 -3
- data/lib/hubspot/codegen/crm/tickets/api_client.rb +1 -0
- data/lib/hubspot/codegen/crm/tickets/models/associated_id.rb +229 -0
- data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +11 -2
- data/lib/hubspot/codegen/crm/tickets/models/batch_response_simple_public_object.rb +1 -6
- data/lib/hubspot/codegen/crm/tickets/models/{collection_response_simple_public_object_id.rb → collection_response_associated_id.rb} +6 -6
- data/lib/hubspot/codegen/crm/tickets/models/error.rb +12 -2
- data/lib/hubspot/codegen/crm/tickets/models/error_detail.rb +20 -23
- data/lib/hubspot/codegen/crm/tickets/models/filter.rb +3 -3
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object.rb +2 -12
- data/lib/hubspot/codegen/crm/timeline/api/events_api.rb +353 -0
- data/lib/hubspot/codegen/crm/timeline/api/templates_api.rb +362 -0
- data/lib/hubspot/codegen/crm/timeline/api/tokens_api.rb +250 -0
- data/lib/hubspot/codegen/crm/{objects → timeline}/api_client.rb +6 -5
- data/lib/hubspot/codegen/crm/{objects → timeline}/api_error.rb +4 -4
- data/lib/hubspot/codegen/crm/{objects → timeline}/configuration.rb +6 -6
- data/lib/hubspot/codegen/crm/timeline/models/add_numbers.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/batch_input_timeline_event.rb +219 -0
- data/lib/hubspot/codegen/crm/{objects/models/batch_response_simple_public_object.rb → timeline/models/batch_response_timeline_event_response.rb} +17 -14
- data/lib/hubspot/codegen/crm/timeline/models/begins_with.rb +294 -0
- data/lib/hubspot/codegen/crm/timeline/models/boolean_property_variable.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/collection_response_timeline_event_template.rb +228 -0
- data/lib/hubspot/codegen/crm/timeline/models/concat_strings.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/constant_boolean.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/constant_number.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/constant_string.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/contains.rb +294 -0
- data/lib/hubspot/codegen/crm/timeline/models/date.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/divide_numbers.rb +280 -0
- data/lib/hubspot/codegen/crm/{objects → timeline}/models/error.rb +18 -8
- data/lib/hubspot/codegen/crm/{objects → timeline}/models/error_detail.rb +26 -29
- data/lib/hubspot/codegen/crm/timeline/models/event_detail.rb +217 -0
- data/lib/hubspot/codegen/crm/timeline/models/extract_most_recent_email_reply_html.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/extract_most_recent_email_reply_text.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/extract_most_recent_plain_text_email_reply.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/fetch_exchange_rate.rb +280 -0
- data/lib/hubspot/codegen/crm/{objects/models/batch_input_simple_public_object_input.rb → timeline/models/has_email_reply.rb} +78 -15
- data/lib/hubspot/codegen/crm/timeline/models/has_plain_text_email_reply.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/if_boolean.rb +303 -0
- data/lib/hubspot/codegen/crm/timeline/models/if_number.rb +303 -0
- data/lib/hubspot/codegen/crm/timeline/models/if_string.rb +303 -0
- data/lib/hubspot/codegen/crm/timeline/models/is_present.rb +294 -0
- data/lib/hubspot/codegen/crm/timeline/models/less_than.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/less_than_or_equal.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/lower_case.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/max_numbers.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/min_numbers.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/model_and.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/model_not.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/model_or.rb +280 -0
- data/lib/hubspot/codegen/crm/{objects/models/filter.rb → timeline/models/month.rb} +36 -28
- data/lib/hubspot/codegen/crm/timeline/models/more_than.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/more_than_or_equal.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/multiply_numbers.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/next_page.rb +224 -0
- data/lib/hubspot/codegen/crm/{objects/models/batch_input_simple_public_object_id.rb → timeline/models/now.rb} +78 -15
- data/lib/hubspot/codegen/crm/timeline/models/number_equals.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/number_property_variable.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/number_to_string.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/paging.rb +210 -0
- data/lib/hubspot/codegen/crm/timeline/models/parse_number.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/period_to_months.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/pipeline_probability.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/round_down_numbers.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/round_up_numbers.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/string_equals.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/string_property_variable.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/subtract_numbers.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/time_between.rb +280 -0
- data/lib/hubspot/codegen/crm/{objects/models/public_object_search_request.rb → timeline/models/timeline_event.rb} +101 -69
- data/lib/hubspot/codegen/crm/{objects/models/simple_public_object_id.rb → timeline/models/timeline_event_i_frame.rb} +79 -18
- data/lib/hubspot/codegen/crm/timeline/models/timeline_event_response.rb +342 -0
- data/lib/hubspot/codegen/crm/{objects/models/simple_public_object.rb → timeline/models/timeline_event_template.rb} +62 -56
- data/lib/hubspot/codegen/crm/{objects/models/batch_read_input_simple_public_object_id.rb → timeline/models/timeline_event_template_create_request.rb} +63 -36
- data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template_token.rb +328 -0
- data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template_token_option.rb +229 -0
- data/lib/hubspot/codegen/crm/timeline/models/timeline_event_template_token_update_request.rb +244 -0
- data/lib/hubspot/codegen/crm/{objects/models/simple_public_object_batch_input.rb → timeline/models/timeline_event_template_update_request.rb} +57 -19
- data/lib/hubspot/codegen/crm/timeline/models/upper_case.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/xor.rb +280 -0
- data/lib/hubspot/codegen/crm/timeline/models/year.rb +280 -0
- data/lib/hubspot/codegen/oauth/api/default_api.rb +270 -0
- data/lib/hubspot/codegen/oauth/api_client.rb +3 -4
- data/lib/hubspot/codegen/oauth/configuration.rb +3 -3
- data/lib/hubspot/codegen/oauth/models/error.rb +14 -25
- data/lib/hubspot/codegen/oauth/models/error_detail.rb +26 -6
- data/lib/hubspot/codegen/oauth/models/{refresh_token.rb → token_response_if.rb} +33 -47
- data/lib/hubspot/codegen/webhooks/api/settings_api.rb +214 -0
- data/lib/hubspot/codegen/webhooks/api/subscriptions_api.rb +360 -0
- data/lib/hubspot/codegen/webhooks/api_client.rb +420 -0
- data/lib/hubspot/codegen/webhooks/api_error.rb +59 -0
- data/lib/hubspot/codegen/webhooks/configuration.rb +256 -0
- data/lib/hubspot/codegen/webhooks/models/error.rb +290 -0
- data/lib/hubspot/codegen/webhooks/models/error_detail.rb +256 -0
- data/lib/hubspot/codegen/webhooks/models/settings_change_request.rb +229 -0
- data/lib/hubspot/codegen/webhooks/models/settings_response.rb +254 -0
- data/lib/hubspot/codegen/webhooks/models/subscription_create_request.rb +268 -0
- data/lib/hubspot/codegen/webhooks/models/subscription_list_response.rb +217 -0
- data/lib/hubspot/codegen/webhooks/models/subscription_patch_request.rb +210 -0
- data/lib/hubspot/codegen/{oauth/models/json_node.rb → webhooks/models/subscription_response.rb} +75 -189
- data/lib/hubspot/codegen/webhooks/models/throttling_settings.rb +264 -0
- data/lib/hubspot/version.rb +1 -1
- data/sample-apps/companies-app/Gemfile.lock +2 -2
- data/sample-apps/companies-app/app/lib/services/authorization/tokens/generate.rb +2 -2
- data/sample-apps/companies-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
- data/sample-apps/companies-app/app/lib/services/hubspot/associations/create.rb +3 -2
- data/sample-apps/companies-app/app/lib/services/hubspot/associations/delete.rb +3 -2
- data/sample-apps/contacts-app/Gemfile.lock +2 -2
- data/sample-apps/contacts-app/app/lib/services/authorization/tokens/generate.rb +2 -2
- data/sample-apps/contacts-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
- data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/create.rb +1 -1
- data/sample-apps/contacts-app/app/lib/services/hubspot/contacts/update.rb +1 -1
- data/sample-apps/contacts-app/app/views/contacts/show.html.erb +1 -0
- data/sample-apps/leaky-bucket-app/Gemfile.lock +2 -2
- data/sample-apps/leaky-bucket-app/app/lib/services/authorization/tokens/generate.rb +2 -2
- data/sample-apps/leaky-bucket-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
- data/sample-apps/oauth-app/Gemfile.lock +2 -2
- data/sample-apps/oauth-app/app/lib/services/authorization/tokens/generate.rb +2 -2
- data/sample-apps/oauth-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
- data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/create.rb +1 -1
- data/sample-apps/oauth-app/app/lib/services/hubspot/contacts/update.rb +1 -1
- data/sample-apps/rate-limits-redis-sample-app/app/lib/services/authorization/tokens/generate.rb +2 -2
- data/sample-apps/rate-limits-redis-sample-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
- data/sample-apps/retry-middleware-sample-app/app/lib/services/authorization/tokens/generate.rb +2 -2
- data/sample-apps/retry-middleware-sample-app/app/lib/services/authorization/tokens/refresh.rb +2 -2
- metadata +170 -90
- data/lib/hubspot/codegen/crm/objects/api/associations_api.rb +0 -254
- data/lib/hubspot/codegen/crm/objects/api/basic_api.rb +0 -389
- data/lib/hubspot/codegen/crm/objects/api/batch_api.rb +0 -293
- data/lib/hubspot/codegen/crm/objects/api/search_api.rb +0 -92
- data/lib/hubspot/codegen/crm/objects/models/batch_input_simple_public_object_batch_input.rb +0 -217
- data/lib/hubspot/codegen/crm/objects/models/collection_response_simple_public_object.rb +0 -226
- data/lib/hubspot/codegen/crm/objects/models/collection_response_simple_public_object_id.rb +0 -226
- data/lib/hubspot/codegen/crm/objects/models/collection_response_with_total_simple_public_object.rb +0 -241
- data/lib/hubspot/codegen/crm/objects/models/filter_group.rb +0 -217
- data/lib/hubspot/codegen/crm/objects/models/next_page.rb +0 -224
- data/lib/hubspot/codegen/crm/objects/models/paging.rb +0 -210
- data/lib/hubspot/codegen/crm/objects/models/simple_public_object_input.rb +0 -217
- data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +0 -84
- data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +0 -336
- data/lib/hubspot/codegen/oauth/api/tokens_api.rb +0 -98
- data/spec/objects/api/associations_api_spec.rb +0 -76
- data/spec/objects/api/basic_api_spec.rb +0 -108
- data/spec/objects/api/batch_api_spec.rb +0 -88
- data/spec/objects/api/search_api_spec.rb +0 -48
- data/spec/objects/api_client_spec.rb +0 -226
- data/spec/objects/configuration_spec.rb +0 -42
- data/spec/objects/models/batch_input_simple_public_object_batch_input_spec.rb +0 -41
- data/spec/objects/models/batch_input_simple_public_object_id_spec.rb +0 -41
- data/spec/objects/models/batch_input_simple_public_object_input_spec.rb +0 -41
- data/spec/objects/models/batch_read_input_simple_public_object_id_spec.rb +0 -47
- data/spec/objects/models/batch_response_simple_public_object_spec.rb +0 -81
- data/spec/objects/models/collection_response_simple_public_object_id_spec.rb +0 -47
- data/spec/objects/models/collection_response_simple_public_object_spec.rb +0 -47
- data/spec/objects/models/collection_response_with_total_simple_public_object_spec.rb +0 -53
- data/spec/objects/models/error_detail_spec.rb +0 -65
- data/spec/objects/models/error_spec.rb +0 -71
- data/spec/objects/models/filter_group_spec.rb +0 -41
- data/spec/objects/models/filter_spec.rb +0 -57
- data/spec/objects/models/next_page_spec.rb +0 -47
- data/spec/objects/models/paging_spec.rb +0 -41
- data/spec/objects/models/public_object_search_request_spec.rb +0 -71
- data/spec/objects/models/simple_public_object_batch_input_spec.rb +0 -47
- data/spec/objects/models/simple_public_object_id_spec.rb +0 -41
- data/spec/objects/models/simple_public_object_input_spec.rb +0 -41
- data/spec/objects/models/simple_public_object_spec.rb +0 -77
@@ -1,76 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#CRM Objects
|
3
|
-
|
4
|
-
#CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are native objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.2
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for Hubspot::Crm::Objects::AssociationsApi
|
17
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'AssociationsApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@api_instance = Hubspot::Crm::Objects::AssociationsApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of AssociationsApi' do
|
30
|
-
it 'should create an instance of AssociationsApi' do
|
31
|
-
expect(@api_instance).to be_instance_of(Hubspot::Crm::Objects::AssociationsApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for archive_association
|
36
|
-
# Remove an association between two objects
|
37
|
-
# @param object_type
|
38
|
-
# @param object_id
|
39
|
-
# @param associated_object_type
|
40
|
-
# @param to_object_id
|
41
|
-
# @param [Hash] opts the optional parameters
|
42
|
-
# @return [nil]
|
43
|
-
describe 'archive_association test' do
|
44
|
-
it 'should work' do
|
45
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
# unit tests for create_association
|
50
|
-
# Associate two objects
|
51
|
-
# @param object_type
|
52
|
-
# @param object_id
|
53
|
-
# @param associated_object_type
|
54
|
-
# @param to_object_id
|
55
|
-
# @param [Hash] opts the optional parameters
|
56
|
-
# @return [SimplePublicObject]
|
57
|
-
describe 'create_association test' do
|
58
|
-
it 'should work' do
|
59
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
# unit tests for get_associations
|
64
|
-
# List associations of an object by type
|
65
|
-
# @param object_type
|
66
|
-
# @param object_id
|
67
|
-
# @param associated_object_type
|
68
|
-
# @param [Hash] opts the optional parameters
|
69
|
-
# @return [CollectionResponseSimplePublicObjectId]
|
70
|
-
describe 'get_associations test' do
|
71
|
-
it 'should work' do
|
72
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
end
|
@@ -1,108 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#CRM Objects
|
3
|
-
|
4
|
-
#CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are native objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.2
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for Hubspot::Crm::Objects::BasicApi
|
17
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'BasicApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@api_instance = Hubspot::Crm::Objects::BasicApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of BasicApi' do
|
30
|
-
it 'should create an instance of BasicApi' do
|
31
|
-
expect(@api_instance).to be_instance_of(Hubspot::Crm::Objects::BasicApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for archive
|
36
|
-
# Archive
|
37
|
-
# Move an Object identified by `{objectId}` to the recycling bin.
|
38
|
-
# @param object_type
|
39
|
-
# @param object_id
|
40
|
-
# @param [Hash] opts the optional parameters
|
41
|
-
# @return [nil]
|
42
|
-
describe 'archive test' do
|
43
|
-
it 'should work' do
|
44
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
# unit tests for create
|
49
|
-
# Create
|
50
|
-
# Create a CRM object with the given properties and return a copy of the object, including the ID. Documentation and examples for creating native objects is provided.
|
51
|
-
# @param object_type
|
52
|
-
# @param [Hash] opts the optional parameters
|
53
|
-
# @option opts [SimplePublicObjectInput] :body
|
54
|
-
# @return [SimplePublicObject]
|
55
|
-
describe 'create test' do
|
56
|
-
it 'should work' do
|
57
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
# unit tests for get_by_id
|
62
|
-
# Read
|
63
|
-
# Read an Object identified by `{objectId}`. Control what is returned via the `properties` query param.
|
64
|
-
# @param object_type
|
65
|
-
# @param object_id
|
66
|
-
# @param [Hash] opts the optional parameters
|
67
|
-
# @option opts [Array<String>] :properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored.
|
68
|
-
# @option opts [Array<String>] :associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored.
|
69
|
-
# @option opts [Boolean] :archived Whether to return only results that have been archived.
|
70
|
-
# @return [SimplePublicObject]
|
71
|
-
describe 'get_by_id test' do
|
72
|
-
it 'should work' do
|
73
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
# unit tests for get_page
|
78
|
-
# List
|
79
|
-
# Read a page of objects. Control what is returned via the `properties` query param.
|
80
|
-
# @param object_type
|
81
|
-
# @param [Hash] opts the optional parameters
|
82
|
-
# @option opts [Integer] :limit The maximum number of results to display per page.
|
83
|
-
# @option opts [String] :after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results.
|
84
|
-
# @option opts [Array<String>] :properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored.
|
85
|
-
# @option opts [Array<String>] :associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored.
|
86
|
-
# @option opts [Boolean] :archived Whether to return only results that have been archived.
|
87
|
-
# @return [CollectionResponseSimplePublicObject]
|
88
|
-
describe 'get_page test' do
|
89
|
-
it 'should work' do
|
90
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
# unit tests for update
|
95
|
-
# Update
|
96
|
-
# Perform a partial update of an Object identified by `{objectId}`. Provided property values will be overwritten. Read-only and non-existent properties will be ignored. Properties values can be cleared by passing an empty string.
|
97
|
-
# @param object_type
|
98
|
-
# @param object_id
|
99
|
-
# @param [Hash] opts the optional parameters
|
100
|
-
# @option opts [SimplePublicObjectInput] :body
|
101
|
-
# @return [SimplePublicObject]
|
102
|
-
describe 'update test' do
|
103
|
-
it 'should work' do
|
104
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
end
|
@@ -1,88 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#CRM Objects
|
3
|
-
|
4
|
-
#CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are native objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.2
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for Hubspot::Crm::Objects::BatchApi
|
17
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'BatchApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@api_instance = Hubspot::Crm::Objects::BatchApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of BatchApi' do
|
30
|
-
it 'should create an instance of BatchApi' do
|
31
|
-
expect(@api_instance).to be_instance_of(Hubspot::Crm::Objects::BatchApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for archive_batch
|
36
|
-
# Archive a batch of objects by ID
|
37
|
-
# Archive a list of objects given a collection of IDs. This method will return a `204 No Content` response on success regardless of the initial state of the object (e.g. active, already archived, non-existent).
|
38
|
-
# @param object_type
|
39
|
-
# @param [Hash] opts the optional parameters
|
40
|
-
# @option opts [BatchInputSimplePublicObjectId] :body
|
41
|
-
# @return [nil]
|
42
|
-
describe 'archive_batch test' do
|
43
|
-
it 'should work' do
|
44
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
# unit tests for create_batch
|
49
|
-
# Create a batch of objects
|
50
|
-
# Create a batch of objects. This follows the same rules as creating an individual object.
|
51
|
-
# @param object_type
|
52
|
-
# @param [Hash] opts the optional parameters
|
53
|
-
# @option opts [BatchInputSimplePublicObjectInput] :body
|
54
|
-
# @return [BatchResponseSimplePublicObject]
|
55
|
-
describe 'create_batch test' do
|
56
|
-
it 'should work' do
|
57
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
# unit tests for read_batch
|
62
|
-
# Read a batch of objects by ID
|
63
|
-
# Read a list of objects given a collection of IDs. Use the `properties` request body property to control which properties are returned.
|
64
|
-
# @param object_type
|
65
|
-
# @param [Hash] opts the optional parameters
|
66
|
-
# @option opts [Boolean] :archived Whether to return only results that have been archived.
|
67
|
-
# @option opts [BatchReadInputSimplePublicObjectId] :body
|
68
|
-
# @return [BatchResponseSimplePublicObject]
|
69
|
-
describe 'read_batch test' do
|
70
|
-
it 'should work' do
|
71
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
# unit tests for update_batch
|
76
|
-
# Update a batch of objects
|
77
|
-
# Perform a partial upate on a batch of objects. This follows the same rules as performing partial updates on an individual object.
|
78
|
-
# @param object_type
|
79
|
-
# @param [Hash] opts the optional parameters
|
80
|
-
# @option opts [BatchInputSimplePublicObjectBatchInput] :body
|
81
|
-
# @return [BatchResponseSimplePublicObject]
|
82
|
-
describe 'update_batch test' do
|
83
|
-
it 'should work' do
|
84
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#CRM Objects
|
3
|
-
|
4
|
-
#CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are native objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.2
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for Hubspot::Crm::Objects::SearchApi
|
17
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'SearchApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@api_instance = Hubspot::Crm::Objects::SearchApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of SearchApi' do
|
30
|
-
it 'should create an instance of SearchApi' do
|
31
|
-
expect(@api_instance).to be_instance_of(Hubspot::Crm::Objects::SearchApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for do_search
|
36
|
-
# Filter, Sort, and Search CRM Objects
|
37
|
-
# # Filter, Sort, and Search CRM Objects The CRM Search API is a powerful API that allows developers to filter, sort, and search across all CRM object types, including contacts, deals, companies and tickets. Using this API, developers can more efficiently retrieve a subset of data they are looking for to better suit their business needs. Common use cases this API allows for include, but are not limited to the following: <ul> <li>Getting a list of contacts for a specific account</li> <li>Retrieving a list of all open deals</li> <li>Searching for contacts by custom properties</li> <li>& more</li> </ul> Prerequisite for using this API: To use the CRM Search API with an OAuth token, your app must request and be granted access to the contacts scope. <br /> `engagements` including `tasks`, `calls`, `emails`, and `notes` are not supported. <br /> ## Filter Use `filterGroups` in the request body to limit results to specific CRM objects. *Example*: Find all contacts with a first name of \"Alice\" ``` curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=demo \\ --header \"Content-Type: application/json\" \\ --data '{ \"filterGroups\":[ { \"filters\":[ { \"propertyName\": \"firstname\", \"operator\": \"EQ\", \"value\": \"Alice\" } ] }] }' ``` When multiple `filters` are provided within a `filterGroup`, they will be combined using a logical `AND` operator. When multiple `filterGroup`s are provided, they will be combined using a logical `OR` operator. The system supports a maximum of three `filterGroups` with up to three `filters` per `filterGroup`. *Example*: Find all contacts with (a first name of \"Alice\" `AND` a last name that is not \"Smith\") OR has the property \"enum1\" ``` curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=demo \\ --header \"Content-Type: application/json\" \\ --data '{ \"filterGroups\":[ { \"filters\": [ { \"propertyName\": \"firstname\", \"operator\": \"EQ\", \"value\": \"Alice\" }, { \"propertyName\": \"lastname\", \"operator\": \"NEQ\", \"value\": \"Smith\" } ] }, { \"filters\": [ { \"property\": \"enum1\", \"operator\": \"HAS_PROPERTY\" } ] }] }' ``` <br /> ### Operators Supported operators include: |Operator|Description| |--|--| |`EQ`| equal to | |`NEQ`| not equal to | |`LT`| less than | |`LTE`| less than or equal to | |`GT`| greater than | |`GTE`| greater than or equal to | |`HAS_PROPERTY`| has the property | |`NOT_HAS_PROPERTY`| does not have the property | |`CONTAINS_TOKEN`| contains token, strings only | |`NOT_CONTAINS_TOKEN`| not contains token, strings only | <br /> ### Associations You can find objects associated with a different object type by ID using the `associations.{objectType}` psuedo-property. Support for this is limited to `deals` and `tickets`. Supported association filters: |Object Type |Filter `propertyName` | |--|--| | `deals` | `associations.company`, `associations.contact`, `associations.ticket` | | `tickets` | `associations.company`, `associations.contact`, `associations.deal` | *Example*: Find all tickets associated with the contact using ID \"123\" ``` curl --request POST https://api.hubapi.com/crm/v3/objects/tickets/search?hapikey=demo \\ --header \"Content-Type: application/json\" \\ --data '{ \"filters\": [ { \"propertyName\": \"associations.contact\", \"operator\": \"EQ\", \"value\": \"123\" } ] }' ``` <br /> ## Sort Use `sorts`, which contain a property name and a direction, to sort the returned collection. *Example*: List all contacts with most recently created first ``` curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=demo \\ --header \"Content-Type: application/json\" \\ --data '{ \"sorts\": [ { \"propertyName\": \"createdate\", \"direction\": \"DESCENDING\" } ] }' ``` The system supports a single sort. <br /> ## Search Perform a text search against all property values for an object type. By default, the results will be returned in order of object creation (oldest first) but this can be overridden using `sorts`. *Example*: Find all contacts with a property value containing the letter `x` ``` curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=demo \\ --header \"Content-Type: application/json\" \\ --data '{ \"query\": \"x\" }' ``` <br /> ## Controlling returned properties Each object type is returned with a default set of properties. You can override this by providing an array of property names in the `properties` property of the request body. *Example*: Return all contacts and include their email and mailing address state ``` curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=demo \\ --header \"Content-Type: application/json\" \\ --data '{ \"properties\": [ \"email\", \"state\" ] }' ``` <br /> ## Paging through results By default, the Search API returns results containing 10 objects per page. The system supports a maximum of 100 results per page. *Example*: Get pages of size 20 ``` curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=demo \\ --header \"Content-Type: application/json\" \\ --data '{ \"limit\": 20 } ``` In order to access the next page of results, you must pass the `after` parameter that was provided in the previous response in the `paging.next.after` property. If no `paging.next.after` property is provided, no additional results will be shown. Note that the after parameter is expected to be a string. *Example*: Get the next page of results ``` curl --request POST https://api.hubapi.com/crm/v3/objects/contacts/search?hapikey=demo \\ --header \"Content-Type: application/json\" \\ --data '{ \"after\": \"20\" }' ``` <br /> ## Sample Response (Success) ``` { \"results\": [ { \"id\": \"174\", \"properties\": { \"firstname\": \"Brantley\", \"lastname\": \"Forrest\", \"email\": \"bforrest8@acme.com\" }, \"createdAt\":\"2019-10-30T03:30:17.883Z\", \"updatedAt\": \"1569516907T16:50:06.678Z\", \"archived\": false }, ... ], \"paging\": { \"next\": { \"after\": \"10\" } } } ``` <br /> ## Limitations 1. It can take a few moments between creating or updating a CRM object in HubSpot and seeing it in CRM Search API results. 2. CRM objects in an archived state will not be available in the Search API. 3. The Search API is rate limited to 1 request per second per authentication token, which is more stringent than our general rate limits. The `X-HubSpot-RateLimit-*` headers will not reflect this during the beta period. Read more about [rate limits](https://developers.hubspot.com/docs/faq/working-within-the-hubspot-api-rate-limits). <br /> ## Error Handling Read our [error documentation](https://developers.hubspot.com/docs/faq/api-error-responses).
|
38
|
-
# @param object_type
|
39
|
-
# @param [Hash] opts the optional parameters
|
40
|
-
# @option opts [PublicObjectSearchRequest] :body
|
41
|
-
# @return [CollectionResponseWithTotalSimplePublicObject]
|
42
|
-
describe 'do_search test' do
|
43
|
-
it 'should work' do
|
44
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
@@ -1,226 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#CRM Objects
|
3
|
-
|
4
|
-
#CRM objects such as companies, contacts, deals, line items, products, tickets, and quotes are native objects in HubSpot’s CRM. These core building blocks support custom properties, store critical information, and play a central role in the HubSpot application. ## Supported Object Types This API provides access to collections of CRM objects, which return a map of property names to values. Each object type has its own set of default properties, which can be found by exploring the [CRM Object Properties API](https://developers.hubspot.com/docs/methods/crm-properties/crm-properties-overview). |Object Type |Properties returned by default | |--|--| | `companies` | `name`, `domain` | | `contacts` | `firstname`, `lastname`, `email` | | `deals` | `dealname`, `amount`, `closedate`, `pipeline`, `dealstage` | | `products` | `name`, `description`, `price` | | `tickets` | `content`, `hs_pipeline`, `hs_pipeline_stage`, `hs_ticket_category`, `hs_ticket_priority`, `subject` | Find a list of all properties for an object type using the [CRM Object Properties](https://developers.hubspot.com/docs/methods/crm-properties/get-properties) API. e.g. `GET https://api.hubapi.com/properties/v2/companies/properties`. Change the properties returned in the response using the `properties` array in the request body.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: v3
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.2
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
|
15
|
-
describe Hubspot::Crm::Objects::ApiClient do
|
16
|
-
context 'initialization' do
|
17
|
-
context 'URL stuff' do
|
18
|
-
context 'host' do
|
19
|
-
it 'removes http from host' do
|
20
|
-
Hubspot.configure { |c| c.host = 'http://example.com' }
|
21
|
-
expect(Hubspot::Crm::Objects::Configuration.default.host).to eq('example.com')
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'removes https from host' do
|
25
|
-
Hubspot.configure { |c| c.host = 'https://wookiee.com' }
|
26
|
-
expect(Hubspot::Crm::Objects::ApiClient.default.config.host).to eq('wookiee.com')
|
27
|
-
end
|
28
|
-
|
29
|
-
it 'removes trailing path from host' do
|
30
|
-
Hubspot.configure { |c| c.host = 'hobo.com/v4' }
|
31
|
-
expect(Hubspot::Crm::Objects::Configuration.default.host).to eq('hobo.com')
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
context 'base_path' do
|
36
|
-
it "prepends a slash to base_path" do
|
37
|
-
Hubspot.configure { |c| c.base_path = 'v4/dog' }
|
38
|
-
expect(Hubspot::Crm::Objects::Configuration.default.base_path).to eq('/v4/dog')
|
39
|
-
end
|
40
|
-
|
41
|
-
it "doesn't prepend a slash if one is already there" do
|
42
|
-
Hubspot.configure { |c| c.base_path = '/v4/dog' }
|
43
|
-
expect(Hubspot::Crm::Objects::Configuration.default.base_path).to eq('/v4/dog')
|
44
|
-
end
|
45
|
-
|
46
|
-
it "ends up as a blank string if nil" do
|
47
|
-
Hubspot.configure { |c| c.base_path = nil }
|
48
|
-
expect(Hubspot::Crm::Objects::Configuration.default.base_path).to eq('')
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
describe 'params_encoding in #build_request' do
|
55
|
-
let(:config) { Hubspot::Crm::Objects::Configuration.new }
|
56
|
-
let(:api_client) { Hubspot::Crm::Objects::ApiClient.new(config) }
|
57
|
-
|
58
|
-
it 'defaults to nil' do
|
59
|
-
expect(Hubspot::Crm::Objects::Configuration.default.params_encoding).to eq(nil)
|
60
|
-
expect(config.params_encoding).to eq(nil)
|
61
|
-
|
62
|
-
request = api_client.build_request(:get, '/test')
|
63
|
-
expect(request.options[:params_encoding]).to eq(nil)
|
64
|
-
end
|
65
|
-
|
66
|
-
it 'can be customized' do
|
67
|
-
config.params_encoding = :multi
|
68
|
-
request = api_client.build_request(:get, '/test')
|
69
|
-
expect(request.options[:params_encoding]).to eq(:multi)
|
70
|
-
end
|
71
|
-
end
|
72
|
-
|
73
|
-
describe 'timeout in #build_request' do
|
74
|
-
let(:config) { Hubspot::Crm::Objects::Configuration.new }
|
75
|
-
let(:api_client) { Hubspot::Crm::Objects::ApiClient.new(config) }
|
76
|
-
|
77
|
-
it 'defaults to 0' do
|
78
|
-
expect(Hubspot::Crm::Objects::Configuration.default.timeout).to eq(0)
|
79
|
-
expect(config.timeout).to eq(0)
|
80
|
-
|
81
|
-
request = api_client.build_request(:get, '/test')
|
82
|
-
expect(request.options[:timeout]).to eq(0)
|
83
|
-
end
|
84
|
-
|
85
|
-
it 'can be customized' do
|
86
|
-
config.timeout = 100
|
87
|
-
request = api_client.build_request(:get, '/test')
|
88
|
-
expect(request.options[:timeout]).to eq(100)
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
describe '#deserialize' do
|
93
|
-
it "handles Array<Integer>" do
|
94
|
-
api_client = Hubspot::Crm::Objects::ApiClient.new
|
95
|
-
headers = { 'Content-Type' => 'application/json' }
|
96
|
-
response = double('response', headers: headers, body: '[12, 34]')
|
97
|
-
data = api_client.deserialize(response, 'Array<Integer>')
|
98
|
-
expect(data).to be_instance_of(Array)
|
99
|
-
expect(data).to eq([12, 34])
|
100
|
-
end
|
101
|
-
|
102
|
-
it 'handles Array<Array<Integer>>' do
|
103
|
-
api_client = Hubspot::Crm::Objects::ApiClient.new
|
104
|
-
headers = { 'Content-Type' => 'application/json' }
|
105
|
-
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
106
|
-
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
107
|
-
expect(data).to be_instance_of(Array)
|
108
|
-
expect(data).to eq([[12, 34], [56]])
|
109
|
-
end
|
110
|
-
|
111
|
-
it 'handles Hash<String, String>' do
|
112
|
-
api_client = Hubspot::Crm::Objects::ApiClient.new
|
113
|
-
headers = { 'Content-Type' => 'application/json' }
|
114
|
-
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
115
|
-
data = api_client.deserialize(response, 'Hash<String, String>')
|
116
|
-
expect(data).to be_instance_of(Hash)
|
117
|
-
expect(data).to eq(:message => 'Hello')
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
|
-
describe "#object_to_hash" do
|
122
|
-
it 'ignores nils and includes empty arrays' do
|
123
|
-
# uncomment below to test object_to_hash for model
|
124
|
-
# api_client = Hubspot::Crm::Objects::ApiClient.new
|
125
|
-
# _model = Hubspot::Crm::Objects::ModelName.new
|
126
|
-
# update the model attribute below
|
127
|
-
# _model.id = 1
|
128
|
-
# update the expected value (hash) below
|
129
|
-
# expected = {id: 1, name: '', tags: []}
|
130
|
-
# expect(api_client.object_to_hash(_model)).to eq(expected)
|
131
|
-
end
|
132
|
-
end
|
133
|
-
|
134
|
-
describe '#build_collection_param' do
|
135
|
-
let(:param) { ['aa', 'bb', 'cc'] }
|
136
|
-
let(:api_client) { Hubspot::Crm::Objects::ApiClient.new }
|
137
|
-
|
138
|
-
it 'works for csv' do
|
139
|
-
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
140
|
-
end
|
141
|
-
|
142
|
-
it 'works for ssv' do
|
143
|
-
expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
|
144
|
-
end
|
145
|
-
|
146
|
-
it 'works for tsv' do
|
147
|
-
expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
|
148
|
-
end
|
149
|
-
|
150
|
-
it 'works for pipes' do
|
151
|
-
expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
|
152
|
-
end
|
153
|
-
|
154
|
-
it 'works for multi' do
|
155
|
-
expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
|
156
|
-
end
|
157
|
-
|
158
|
-
it 'fails for invalid collection format' do
|
159
|
-
expect{api_client.build_collection_param(param, :INVALID)}.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
|
160
|
-
end
|
161
|
-
end
|
162
|
-
|
163
|
-
describe '#json_mime?' do
|
164
|
-
let(:api_client) { Hubspot::Crm::Objects::ApiClient.new }
|
165
|
-
|
166
|
-
it 'works' do
|
167
|
-
expect(api_client.json_mime?(nil)).to eq false
|
168
|
-
expect(api_client.json_mime?('')).to eq false
|
169
|
-
|
170
|
-
expect(api_client.json_mime?('application/json')).to eq true
|
171
|
-
expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
|
172
|
-
expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
|
173
|
-
|
174
|
-
expect(api_client.json_mime?('application/xml')).to eq false
|
175
|
-
expect(api_client.json_mime?('text/plain')).to eq false
|
176
|
-
expect(api_client.json_mime?('application/jsonp')).to eq false
|
177
|
-
end
|
178
|
-
end
|
179
|
-
|
180
|
-
describe '#select_header_accept' do
|
181
|
-
let(:api_client) { Hubspot::Crm::Objects::ApiClient.new }
|
182
|
-
|
183
|
-
it 'works' do
|
184
|
-
expect(api_client.select_header_accept(nil)).to be_nil
|
185
|
-
expect(api_client.select_header_accept([])).to be_nil
|
186
|
-
|
187
|
-
expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
|
188
|
-
expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
189
|
-
expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
190
|
-
|
191
|
-
expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
|
192
|
-
expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
|
-
describe '#select_header_content_type' do
|
197
|
-
let(:api_client) { Hubspot::Crm::Objects::ApiClient.new }
|
198
|
-
|
199
|
-
it 'works' do
|
200
|
-
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
201
|
-
expect(api_client.select_header_content_type([])).to eq('application/json')
|
202
|
-
|
203
|
-
expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
|
204
|
-
expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
|
205
|
-
expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
|
206
|
-
expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
|
207
|
-
expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
|
208
|
-
end
|
209
|
-
end
|
210
|
-
|
211
|
-
describe '#sanitize_filename' do
|
212
|
-
let(:api_client) { Hubspot::Crm::Objects::ApiClient.new }
|
213
|
-
|
214
|
-
it 'works' do
|
215
|
-
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
216
|
-
expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
|
217
|
-
expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
|
218
|
-
expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
|
219
|
-
expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
|
220
|
-
expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
|
221
|
-
expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
|
222
|
-
expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
|
223
|
-
expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
|
224
|
-
end
|
225
|
-
end
|
226
|
-
end
|