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
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -116,7 +116,7 @@ module Hubspot
|
|
116
116
|
def valid?
|
117
117
|
return false if @property_name.nil?
|
118
118
|
return false if @operator.nil?
|
119
|
-
operator_validator = EnumAttributeValidator.new('String', ["EQ", "NEQ", "LT", "LTE", "GT", "GTE", "BETWEEN", "IN", "NOT_IN", "HAS_PROPERTY", "NOT_HAS_PROPERTY", "
|
119
|
+
operator_validator = EnumAttributeValidator.new('String', ["EQ", "NEQ", "LT", "LTE", "GT", "GTE", "BETWEEN", "IN", "NOT_IN", "HAS_PROPERTY", "NOT_HAS_PROPERTY", "CONTAINS_TOKEN", "NOT_CONTAINS_TOKEN"])
|
120
120
|
return false unless operator_validator.valid?(@operator)
|
121
121
|
true
|
122
122
|
end
|
@@ -124,7 +124,7 @@ module Hubspot
|
|
124
124
|
# Custom attribute writer method checking allowed values (enum).
|
125
125
|
# @param [Object] operator Object to be assigned
|
126
126
|
def operator=(operator)
|
127
|
-
validator = EnumAttributeValidator.new('String', ["EQ", "NEQ", "LT", "LTE", "GT", "GTE", "BETWEEN", "IN", "NOT_IN", "HAS_PROPERTY", "NOT_HAS_PROPERTY", "
|
127
|
+
validator = EnumAttributeValidator.new('String', ["EQ", "NEQ", "LT", "LTE", "GT", "GTE", "BETWEEN", "IN", "NOT_IN", "HAS_PROPERTY", "NOT_HAS_PROPERTY", "CONTAINS_TOKEN", "NOT_CONTAINS_TOKEN"])
|
128
128
|
unless validator.valid?(operator)
|
129
129
|
fail ArgumentError, "invalid value for \"operator\", must be one of #{validator.allowable_values}."
|
130
130
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -50,7 +50,7 @@ module Hubspot
|
|
50
50
|
:'properties' => :'Hash<String, String>',
|
51
51
|
:'created_at' => :'DateTime',
|
52
52
|
:'updated_at' => :'DateTime',
|
53
|
-
:'associations' => :'Hash<String,
|
53
|
+
:'associations' => :'Hash<String, CollectionResponseAssociatedId>',
|
54
54
|
:'archived' => :'Boolean',
|
55
55
|
:'archived_at' => :'DateTime'
|
56
56
|
}
|
@@ -130,14 +130,6 @@ module Hubspot
|
|
130
130
|
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
131
131
|
end
|
132
132
|
|
133
|
-
if @associations.nil?
|
134
|
-
invalid_properties.push('invalid value for "associations", associations cannot be nil.')
|
135
|
-
end
|
136
|
-
|
137
|
-
if @archived.nil?
|
138
|
-
invalid_properties.push('invalid value for "archived", archived cannot be nil.')
|
139
|
-
end
|
140
|
-
|
141
133
|
invalid_properties
|
142
134
|
end
|
143
135
|
|
@@ -148,8 +140,6 @@ module Hubspot
|
|
148
140
|
return false if @properties.nil?
|
149
141
|
return false if @created_at.nil?
|
150
142
|
return false if @updated_at.nil?
|
151
|
-
return false if @associations.nil?
|
152
|
-
return false if @archived.nil?
|
153
143
|
true
|
154
144
|
end
|
155
145
|
|
@@ -0,0 +1,353 @@
|
|
1
|
+
=begin
|
2
|
+
#Timeline events
|
3
|
+
|
4
|
+
#This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM object like contacts, companies, or deals. You'll find multiple use cases for this API in the sections below.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module Crm
|
17
|
+
module Timeline
|
18
|
+
class EventsApi
|
19
|
+
attr_accessor :api_client
|
20
|
+
|
21
|
+
def initialize(api_client = ApiClient.default)
|
22
|
+
@api_client = api_client
|
23
|
+
end
|
24
|
+
# Create a single event
|
25
|
+
# Creates an instance of a timeline event based on an event template. Once created, this event is immutable on the object timeline and cannot be modified. If the event template was configured to update object properties via `objectPropertyName`, this call will also attempt to updates those properties, or add them if they don't exist.
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @option opts [TimelineEvent] :timeline_event The timeline event definition.
|
28
|
+
# @return [TimelineEventResponse]
|
29
|
+
def create(opts = {})
|
30
|
+
data, _status_code, _headers = create_with_http_info(opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Create a single event
|
35
|
+
# Creates an instance of a timeline event based on an event template. Once created, this event is immutable on the object timeline and cannot be modified. If the event template was configured to update object properties via `objectPropertyName`, this call will also attempt to updates those properties, or add them if they don't exist.
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [TimelineEvent] :timeline_event The timeline event definition.
|
38
|
+
# @return [Array<(TimelineEventResponse, Integer, Hash)>] TimelineEventResponse data, response status code and response headers
|
39
|
+
def create_with_http_info(opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.create ...'
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/crm/v3/timeline/events'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
53
|
+
# HTTP header 'Content-Type'
|
54
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'timeline_event'])
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:return_type] || 'TimelineEventResponse'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: EventsApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# Creates multiple events
|
85
|
+
# Creates multiple instances of timeline events based on an event template. Once created, these event are immutable on the object timeline and cannot be modified. If the event template was configured to update object properties via `objectPropertyName`, this call will also attempt to updates those properties, or add them if they don't exist.
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @option opts [BatchInputTimelineEvent] :batch_input_timeline_event The timeline event definition.
|
88
|
+
# @return [BatchResponseTimelineEventResponse]
|
89
|
+
def create_batch(opts = {})
|
90
|
+
data, _status_code, _headers = create_batch_with_http_info(opts)
|
91
|
+
data
|
92
|
+
end
|
93
|
+
|
94
|
+
# Creates multiple events
|
95
|
+
# Creates multiple instances of timeline events based on an event template. Once created, these event are immutable on the object timeline and cannot be modified. If the event template was configured to update object properties via `objectPropertyName`, this call will also attempt to updates those properties, or add them if they don't exist.
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @option opts [BatchInputTimelineEvent] :batch_input_timeline_event The timeline event definition.
|
98
|
+
# @return [Array<(BatchResponseTimelineEventResponse, Integer, Hash)>] BatchResponseTimelineEventResponse data, response status code and response headers
|
99
|
+
def create_batch_with_http_info(opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.create_batch ...'
|
102
|
+
end
|
103
|
+
# resource path
|
104
|
+
local_var_path = '/crm/v3/timeline/events/batch/create'
|
105
|
+
|
106
|
+
# query parameters
|
107
|
+
query_params = opts[:query_params] || {}
|
108
|
+
|
109
|
+
# header parameters
|
110
|
+
header_params = opts[:header_params] || {}
|
111
|
+
# HTTP header 'Accept' (if needed)
|
112
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
113
|
+
# HTTP header 'Content-Type'
|
114
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
115
|
+
|
116
|
+
# form parameters
|
117
|
+
form_params = opts[:form_params] || {}
|
118
|
+
|
119
|
+
# http body (model)
|
120
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'batch_input_timeline_event'])
|
121
|
+
|
122
|
+
# return_type
|
123
|
+
return_type = opts[:return_type] || 'BatchResponseTimelineEventResponse'
|
124
|
+
|
125
|
+
# auth_names
|
126
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
127
|
+
|
128
|
+
new_options = opts.merge(
|
129
|
+
:header_params => header_params,
|
130
|
+
:query_params => query_params,
|
131
|
+
:form_params => form_params,
|
132
|
+
:body => post_body,
|
133
|
+
:auth_names => auth_names,
|
134
|
+
:return_type => return_type
|
135
|
+
)
|
136
|
+
|
137
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug "API called: EventsApi#create_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
140
|
+
end
|
141
|
+
return data, status_code, headers
|
142
|
+
end
|
143
|
+
|
144
|
+
# Gets the event
|
145
|
+
# This returns the previously created event. It contains all existing info for the event, but not necessarily the CRM object.
|
146
|
+
# @param event_template_id [String] The event template ID.
|
147
|
+
# @param event_id [String] The event ID.
|
148
|
+
# @param [Hash] opts the optional parameters
|
149
|
+
# @return [TimelineEventResponse]
|
150
|
+
def get_by_id(event_template_id, event_id, opts = {})
|
151
|
+
data, _status_code, _headers = get_by_id_with_http_info(event_template_id, event_id, opts)
|
152
|
+
data
|
153
|
+
end
|
154
|
+
|
155
|
+
# Gets the event
|
156
|
+
# This returns the previously created event. It contains all existing info for the event, but not necessarily the CRM object.
|
157
|
+
# @param event_template_id [String] The event template ID.
|
158
|
+
# @param event_id [String] The event ID.
|
159
|
+
# @param [Hash] opts the optional parameters
|
160
|
+
# @return [Array<(TimelineEventResponse, Integer, Hash)>] TimelineEventResponse data, response status code and response headers
|
161
|
+
def get_by_id_with_http_info(event_template_id, event_id, opts = {})
|
162
|
+
if @api_client.config.debugging
|
163
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.get_by_id ...'
|
164
|
+
end
|
165
|
+
# verify the required parameter 'event_template_id' is set
|
166
|
+
if @api_client.config.client_side_validation && event_template_id.nil?
|
167
|
+
fail ArgumentError, "Missing the required parameter 'event_template_id' when calling EventsApi.get_by_id"
|
168
|
+
end
|
169
|
+
# verify the required parameter 'event_id' is set
|
170
|
+
if @api_client.config.client_side_validation && event_id.nil?
|
171
|
+
fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.get_by_id"
|
172
|
+
end
|
173
|
+
# resource path
|
174
|
+
local_var_path = '/crm/v3/timeline/events/{eventTemplateId}/{eventId}'.sub('{' + 'eventTemplateId' + '}', CGI.escape(event_template_id.to_s)).sub('{' + 'eventId' + '}', CGI.escape(event_id.to_s))
|
175
|
+
|
176
|
+
# query parameters
|
177
|
+
query_params = opts[:query_params] || {}
|
178
|
+
|
179
|
+
# header parameters
|
180
|
+
header_params = opts[:header_params] || {}
|
181
|
+
# HTTP header 'Accept' (if needed)
|
182
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
183
|
+
|
184
|
+
# form parameters
|
185
|
+
form_params = opts[:form_params] || {}
|
186
|
+
|
187
|
+
# http body (model)
|
188
|
+
post_body = opts[:body]
|
189
|
+
|
190
|
+
# return_type
|
191
|
+
return_type = opts[:return_type] || 'TimelineEventResponse'
|
192
|
+
|
193
|
+
# auth_names
|
194
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
195
|
+
|
196
|
+
new_options = opts.merge(
|
197
|
+
:header_params => header_params,
|
198
|
+
:query_params => query_params,
|
199
|
+
:form_params => form_params,
|
200
|
+
:body => post_body,
|
201
|
+
:auth_names => auth_names,
|
202
|
+
:return_type => return_type
|
203
|
+
)
|
204
|
+
|
205
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
206
|
+
if @api_client.config.debugging
|
207
|
+
@api_client.config.logger.debug "API called: EventsApi#get_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
208
|
+
end
|
209
|
+
return data, status_code, headers
|
210
|
+
end
|
211
|
+
|
212
|
+
# Gets the detailTemplate as rendered
|
213
|
+
# This will take the `detailTemplate` from the event template and return an object rendering the specified event. If the template references `extraData` that isn't found in the event, it will be ignored and we'll render without it.
|
214
|
+
# @param event_template_id [String] The event template ID.
|
215
|
+
# @param event_id [String] The event ID.
|
216
|
+
# @param [Hash] opts the optional parameters
|
217
|
+
# @return [EventDetail]
|
218
|
+
def get_detail_by_id(event_template_id, event_id, opts = {})
|
219
|
+
data, _status_code, _headers = get_detail_by_id_with_http_info(event_template_id, event_id, opts)
|
220
|
+
data
|
221
|
+
end
|
222
|
+
|
223
|
+
# Gets the detailTemplate as rendered
|
224
|
+
# This will take the `detailTemplate` from the event template and return an object rendering the specified event. If the template references `extraData` that isn't found in the event, it will be ignored and we'll render without it.
|
225
|
+
# @param event_template_id [String] The event template ID.
|
226
|
+
# @param event_id [String] The event ID.
|
227
|
+
# @param [Hash] opts the optional parameters
|
228
|
+
# @return [Array<(EventDetail, Integer, Hash)>] EventDetail data, response status code and response headers
|
229
|
+
def get_detail_by_id_with_http_info(event_template_id, event_id, opts = {})
|
230
|
+
if @api_client.config.debugging
|
231
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.get_detail_by_id ...'
|
232
|
+
end
|
233
|
+
# verify the required parameter 'event_template_id' is set
|
234
|
+
if @api_client.config.client_side_validation && event_template_id.nil?
|
235
|
+
fail ArgumentError, "Missing the required parameter 'event_template_id' when calling EventsApi.get_detail_by_id"
|
236
|
+
end
|
237
|
+
# verify the required parameter 'event_id' is set
|
238
|
+
if @api_client.config.client_side_validation && event_id.nil?
|
239
|
+
fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.get_detail_by_id"
|
240
|
+
end
|
241
|
+
# resource path
|
242
|
+
local_var_path = '/crm/v3/timeline/events/{eventTemplateId}/{eventId}/detail'.sub('{' + 'eventTemplateId' + '}', CGI.escape(event_template_id.to_s)).sub('{' + 'eventId' + '}', CGI.escape(event_id.to_s))
|
243
|
+
|
244
|
+
# query parameters
|
245
|
+
query_params = opts[:query_params] || {}
|
246
|
+
|
247
|
+
# header parameters
|
248
|
+
header_params = opts[:header_params] || {}
|
249
|
+
# HTTP header 'Accept' (if needed)
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
251
|
+
|
252
|
+
# form parameters
|
253
|
+
form_params = opts[:form_params] || {}
|
254
|
+
|
255
|
+
# http body (model)
|
256
|
+
post_body = opts[:body]
|
257
|
+
|
258
|
+
# return_type
|
259
|
+
return_type = opts[:return_type] || 'EventDetail'
|
260
|
+
|
261
|
+
# auth_names
|
262
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
263
|
+
|
264
|
+
new_options = opts.merge(
|
265
|
+
:header_params => header_params,
|
266
|
+
:query_params => query_params,
|
267
|
+
:form_params => form_params,
|
268
|
+
:body => post_body,
|
269
|
+
:auth_names => auth_names,
|
270
|
+
:return_type => return_type
|
271
|
+
)
|
272
|
+
|
273
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
274
|
+
if @api_client.config.debugging
|
275
|
+
@api_client.config.logger.debug "API called: EventsApi#get_detail_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
276
|
+
end
|
277
|
+
return data, status_code, headers
|
278
|
+
end
|
279
|
+
|
280
|
+
# Renders the header or detail as HTML
|
281
|
+
# This will take either the `headerTemplate` or `detailTemplate` from the event template and render for the specified event as HTML. If the template references `extraData` that isn't found in the event, it will be ignored and we'll render without it.
|
282
|
+
# @param event_template_id [String] The event template ID.
|
283
|
+
# @param event_id [String] The event ID.
|
284
|
+
# @param [Hash] opts the optional parameters
|
285
|
+
# @option opts [Boolean] :detail Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`.
|
286
|
+
# @return [String]
|
287
|
+
def get_render_by_id(event_template_id, event_id, opts = {})
|
288
|
+
data, _status_code, _headers = get_render_by_id_with_http_info(event_template_id, event_id, opts)
|
289
|
+
data
|
290
|
+
end
|
291
|
+
|
292
|
+
# Renders the header or detail as HTML
|
293
|
+
# This will take either the `headerTemplate` or `detailTemplate` from the event template and render for the specified event as HTML. If the template references `extraData` that isn't found in the event, it will be ignored and we'll render without it.
|
294
|
+
# @param event_template_id [String] The event template ID.
|
295
|
+
# @param event_id [String] The event ID.
|
296
|
+
# @param [Hash] opts the optional parameters
|
297
|
+
# @option opts [Boolean] :detail Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`.
|
298
|
+
# @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
|
299
|
+
def get_render_by_id_with_http_info(event_template_id, event_id, opts = {})
|
300
|
+
if @api_client.config.debugging
|
301
|
+
@api_client.config.logger.debug 'Calling API: EventsApi.get_render_by_id ...'
|
302
|
+
end
|
303
|
+
# verify the required parameter 'event_template_id' is set
|
304
|
+
if @api_client.config.client_side_validation && event_template_id.nil?
|
305
|
+
fail ArgumentError, "Missing the required parameter 'event_template_id' when calling EventsApi.get_render_by_id"
|
306
|
+
end
|
307
|
+
# verify the required parameter 'event_id' is set
|
308
|
+
if @api_client.config.client_side_validation && event_id.nil?
|
309
|
+
fail ArgumentError, "Missing the required parameter 'event_id' when calling EventsApi.get_render_by_id"
|
310
|
+
end
|
311
|
+
# resource path
|
312
|
+
local_var_path = '/crm/v3/timeline/events/{eventTemplateId}/{eventId}/render'.sub('{' + 'eventTemplateId' + '}', CGI.escape(event_template_id.to_s)).sub('{' + 'eventId' + '}', CGI.escape(event_id.to_s))
|
313
|
+
|
314
|
+
# query parameters
|
315
|
+
query_params = opts[:query_params] || {}
|
316
|
+
query_params[:'detail'] = opts[:'detail'] if !opts[:'detail'].nil?
|
317
|
+
|
318
|
+
# header parameters
|
319
|
+
header_params = opts[:header_params] || {}
|
320
|
+
# HTTP header 'Accept' (if needed)
|
321
|
+
header_params['Accept'] = @api_client.select_header_accept(['text/html', '*/*'])
|
322
|
+
|
323
|
+
# form parameters
|
324
|
+
form_params = opts[:form_params] || {}
|
325
|
+
|
326
|
+
# http body (model)
|
327
|
+
post_body = opts[:body]
|
328
|
+
|
329
|
+
# return_type
|
330
|
+
return_type = opts[:return_type] || 'String'
|
331
|
+
|
332
|
+
# auth_names
|
333
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
334
|
+
|
335
|
+
new_options = opts.merge(
|
336
|
+
:header_params => header_params,
|
337
|
+
:query_params => query_params,
|
338
|
+
:form_params => form_params,
|
339
|
+
:body => post_body,
|
340
|
+
:auth_names => auth_names,
|
341
|
+
:return_type => return_type
|
342
|
+
)
|
343
|
+
|
344
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
345
|
+
if @api_client.config.debugging
|
346
|
+
@api_client.config.logger.debug "API called: EventsApi#get_render_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
347
|
+
end
|
348
|
+
return data, status_code, headers
|
349
|
+
end
|
350
|
+
end
|
351
|
+
end
|
352
|
+
end
|
353
|
+
end
|
@@ -0,0 +1,362 @@
|
|
1
|
+
=begin
|
2
|
+
#Timeline events
|
3
|
+
|
4
|
+
#This feature allows an app to create and configure custom events that can show up in the timelines of certain CRM object like contacts, companies, or deals. You'll find multiple use cases for this API in the sections below.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module Crm
|
17
|
+
module Timeline
|
18
|
+
class TemplatesApi
|
19
|
+
attr_accessor :api_client
|
20
|
+
|
21
|
+
def initialize(api_client = ApiClient.default)
|
22
|
+
@api_client = api_client
|
23
|
+
end
|
24
|
+
# Deletes an event template for the app
|
25
|
+
# This will delete the event template. All events associated with it will be removed from search and the timeline UI. There is no recovery from this option, so it's highly recommended that you stop using any events for a template before deleting it.
|
26
|
+
# @param event_template_id [String] The event template ID.
|
27
|
+
# @param app_id [Integer] The ID of the target app.
|
28
|
+
# @param [Hash] opts the optional parameters
|
29
|
+
# @return [nil]
|
30
|
+
def archive_event_template(event_template_id, app_id, opts = {})
|
31
|
+
archive_event_template_with_http_info(event_template_id, app_id, opts)
|
32
|
+
nil
|
33
|
+
end
|
34
|
+
|
35
|
+
# Deletes an event template for the app
|
36
|
+
# This will delete the event template. All events associated with it will be removed from search and the timeline UI. There is no recovery from this option, so it's highly recommended that you stop using any events for a template before deleting it.
|
37
|
+
# @param event_template_id [String] The event template ID.
|
38
|
+
# @param app_id [Integer] The ID of the target app.
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
41
|
+
def archive_event_template_with_http_info(event_template_id, app_id, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.archive_event_template ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'event_template_id' is set
|
46
|
+
if @api_client.config.client_side_validation && event_template_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'event_template_id' when calling TemplatesApi.archive_event_template"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'app_id' is set
|
50
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling TemplatesApi.archive_event_template"
|
52
|
+
end
|
53
|
+
# resource path
|
54
|
+
local_var_path = '/crm/v3/timeline/{appId}/event-templates/{eventTemplateId}'.sub('{' + 'eventTemplateId' + '}', CGI.escape(event_template_id.to_s)).sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
55
|
+
|
56
|
+
# query parameters
|
57
|
+
query_params = opts[:query_params] || {}
|
58
|
+
|
59
|
+
# header parameters
|
60
|
+
header_params = opts[:header_params] || {}
|
61
|
+
# HTTP header 'Accept' (if needed)
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = opts[:form_params] || {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = opts[:body]
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:return_type]
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
77
|
+
:header_params => header_params,
|
78
|
+
:query_params => query_params,
|
79
|
+
:form_params => form_params,
|
80
|
+
:body => post_body,
|
81
|
+
:auth_names => auth_names,
|
82
|
+
:return_type => return_type
|
83
|
+
)
|
84
|
+
|
85
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "API called: TemplatesApi#archive_event_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
92
|
+
# Create an event template for your app
|
93
|
+
# Event templates define the general structure for a custom timeline event. This includes formatted copy for its heading and details, as well as any custom property definitions. The event could be something like viewing a video, registering for a webinar, or filling out a survey. A single app can define multiple event templates. Event templates will be created for contacts by default, but they can be created for companies and deals as well. Each event template contains its own set of tokens and `Markdown` templates. These tokens can be associated with any CRM object properties via the `objectPropertyName` field to fully build out CRM objects. You must create an event template before you can create events.
|
94
|
+
# @param app_id [Integer] The ID of the target app.
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @option opts [TimelineEventTemplateCreateRequest] :timeline_event_template_create_request The new event template definition.
|
97
|
+
# @return [TimelineEventTemplate]
|
98
|
+
def create_event_template(app_id, opts = {})
|
99
|
+
data, _status_code, _headers = create_event_template_with_http_info(app_id, opts)
|
100
|
+
data
|
101
|
+
end
|
102
|
+
|
103
|
+
# Create an event template for your app
|
104
|
+
# Event templates define the general structure for a custom timeline event. This includes formatted copy for its heading and details, as well as any custom property definitions. The event could be something like viewing a video, registering for a webinar, or filling out a survey. A single app can define multiple event templates. Event templates will be created for contacts by default, but they can be created for companies and deals as well. Each event template contains its own set of tokens and `Markdown` templates. These tokens can be associated with any CRM object properties via the `objectPropertyName` field to fully build out CRM objects. You must create an event template before you can create events.
|
105
|
+
# @param app_id [Integer] The ID of the target app.
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @option opts [TimelineEventTemplateCreateRequest] :timeline_event_template_create_request The new event template definition.
|
108
|
+
# @return [Array<(TimelineEventTemplate, Integer, Hash)>] TimelineEventTemplate data, response status code and response headers
|
109
|
+
def create_event_template_with_http_info(app_id, opts = {})
|
110
|
+
if @api_client.config.debugging
|
111
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.create_event_template ...'
|
112
|
+
end
|
113
|
+
# verify the required parameter 'app_id' is set
|
114
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
115
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling TemplatesApi.create_event_template"
|
116
|
+
end
|
117
|
+
# resource path
|
118
|
+
local_var_path = '/crm/v3/timeline/{appId}/event-templates'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
119
|
+
|
120
|
+
# query parameters
|
121
|
+
query_params = opts[:query_params] || {}
|
122
|
+
|
123
|
+
# header parameters
|
124
|
+
header_params = opts[:header_params] || {}
|
125
|
+
# HTTP header 'Accept' (if needed)
|
126
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
127
|
+
# HTTP header 'Content-Type'
|
128
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
129
|
+
|
130
|
+
# form parameters
|
131
|
+
form_params = opts[:form_params] || {}
|
132
|
+
|
133
|
+
# http body (model)
|
134
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'timeline_event_template_create_request'])
|
135
|
+
|
136
|
+
# return_type
|
137
|
+
return_type = opts[:return_type] || 'TimelineEventTemplate'
|
138
|
+
|
139
|
+
# auth_names
|
140
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
141
|
+
|
142
|
+
new_options = opts.merge(
|
143
|
+
:header_params => header_params,
|
144
|
+
:query_params => query_params,
|
145
|
+
:form_params => form_params,
|
146
|
+
:body => post_body,
|
147
|
+
:auth_names => auth_names,
|
148
|
+
:return_type => return_type
|
149
|
+
)
|
150
|
+
|
151
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "API called: TemplatesApi#create_event_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
154
|
+
end
|
155
|
+
return data, status_code, headers
|
156
|
+
end
|
157
|
+
|
158
|
+
# List all event templates for your app
|
159
|
+
# Use this to list all event templates owned by your app.
|
160
|
+
# @param app_id [Integer] The ID of the target app.
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @return [CollectionResponseTimelineEventTemplate]
|
163
|
+
def get_all_event_templates(app_id, opts = {})
|
164
|
+
data, _status_code, _headers = get_all_event_templates_with_http_info(app_id, opts)
|
165
|
+
data
|
166
|
+
end
|
167
|
+
|
168
|
+
# List all event templates for your app
|
169
|
+
# Use this to list all event templates owned by your app.
|
170
|
+
# @param app_id [Integer] The ID of the target app.
|
171
|
+
# @param [Hash] opts the optional parameters
|
172
|
+
# @return [Array<(CollectionResponseTimelineEventTemplate, Integer, Hash)>] CollectionResponseTimelineEventTemplate data, response status code and response headers
|
173
|
+
def get_all_event_templates_with_http_info(app_id, opts = {})
|
174
|
+
if @api_client.config.debugging
|
175
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.get_all_event_templates ...'
|
176
|
+
end
|
177
|
+
# verify the required parameter 'app_id' is set
|
178
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
179
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling TemplatesApi.get_all_event_templates"
|
180
|
+
end
|
181
|
+
# resource path
|
182
|
+
local_var_path = '/crm/v3/timeline/{appId}/event-templates'.sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
183
|
+
|
184
|
+
# query parameters
|
185
|
+
query_params = opts[:query_params] || {}
|
186
|
+
|
187
|
+
# header parameters
|
188
|
+
header_params = opts[:header_params] || {}
|
189
|
+
# HTTP header 'Accept' (if needed)
|
190
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
191
|
+
|
192
|
+
# form parameters
|
193
|
+
form_params = opts[:form_params] || {}
|
194
|
+
|
195
|
+
# http body (model)
|
196
|
+
post_body = opts[:body]
|
197
|
+
|
198
|
+
# return_type
|
199
|
+
return_type = opts[:return_type] || 'CollectionResponseTimelineEventTemplate'
|
200
|
+
|
201
|
+
# auth_names
|
202
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
203
|
+
|
204
|
+
new_options = opts.merge(
|
205
|
+
:header_params => header_params,
|
206
|
+
:query_params => query_params,
|
207
|
+
:form_params => form_params,
|
208
|
+
:body => post_body,
|
209
|
+
:auth_names => auth_names,
|
210
|
+
:return_type => return_type
|
211
|
+
)
|
212
|
+
|
213
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
214
|
+
if @api_client.config.debugging
|
215
|
+
@api_client.config.logger.debug "API called: TemplatesApi#get_all_event_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
216
|
+
end
|
217
|
+
return data, status_code, headers
|
218
|
+
end
|
219
|
+
|
220
|
+
# Gets a specific event template for your app
|
221
|
+
# View the current state of a specific template and its tokens.
|
222
|
+
# @param event_template_id [String] The event template ID.
|
223
|
+
# @param app_id [Integer] The ID of the target app.
|
224
|
+
# @param [Hash] opts the optional parameters
|
225
|
+
# @return [TimelineEventTemplate]
|
226
|
+
def get_event_template_by_id(event_template_id, app_id, opts = {})
|
227
|
+
data, _status_code, _headers = get_event_template_by_id_with_http_info(event_template_id, app_id, opts)
|
228
|
+
data
|
229
|
+
end
|
230
|
+
|
231
|
+
# Gets a specific event template for your app
|
232
|
+
# View the current state of a specific template and its tokens.
|
233
|
+
# @param event_template_id [String] The event template ID.
|
234
|
+
# @param app_id [Integer] The ID of the target app.
|
235
|
+
# @param [Hash] opts the optional parameters
|
236
|
+
# @return [Array<(TimelineEventTemplate, Integer, Hash)>] TimelineEventTemplate data, response status code and response headers
|
237
|
+
def get_event_template_by_id_with_http_info(event_template_id, app_id, opts = {})
|
238
|
+
if @api_client.config.debugging
|
239
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.get_event_template_by_id ...'
|
240
|
+
end
|
241
|
+
# verify the required parameter 'event_template_id' is set
|
242
|
+
if @api_client.config.client_side_validation && event_template_id.nil?
|
243
|
+
fail ArgumentError, "Missing the required parameter 'event_template_id' when calling TemplatesApi.get_event_template_by_id"
|
244
|
+
end
|
245
|
+
# verify the required parameter 'app_id' is set
|
246
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
247
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling TemplatesApi.get_event_template_by_id"
|
248
|
+
end
|
249
|
+
# resource path
|
250
|
+
local_var_path = '/crm/v3/timeline/{appId}/event-templates/{eventTemplateId}'.sub('{' + 'eventTemplateId' + '}', CGI.escape(event_template_id.to_s)).sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
251
|
+
|
252
|
+
# query parameters
|
253
|
+
query_params = opts[:query_params] || {}
|
254
|
+
|
255
|
+
# header parameters
|
256
|
+
header_params = opts[:header_params] || {}
|
257
|
+
# HTTP header 'Accept' (if needed)
|
258
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
259
|
+
|
260
|
+
# form parameters
|
261
|
+
form_params = opts[:form_params] || {}
|
262
|
+
|
263
|
+
# http body (model)
|
264
|
+
post_body = opts[:body]
|
265
|
+
|
266
|
+
# return_type
|
267
|
+
return_type = opts[:return_type] || 'TimelineEventTemplate'
|
268
|
+
|
269
|
+
# auth_names
|
270
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
271
|
+
|
272
|
+
new_options = opts.merge(
|
273
|
+
:header_params => header_params,
|
274
|
+
:query_params => query_params,
|
275
|
+
:form_params => form_params,
|
276
|
+
:body => post_body,
|
277
|
+
:auth_names => auth_names,
|
278
|
+
:return_type => return_type
|
279
|
+
)
|
280
|
+
|
281
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
282
|
+
if @api_client.config.debugging
|
283
|
+
@api_client.config.logger.debug "API called: TemplatesApi#get_event_template_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
284
|
+
end
|
285
|
+
return data, status_code, headers
|
286
|
+
end
|
287
|
+
|
288
|
+
# Update an existing event template
|
289
|
+
# Updates an existing template and its tokens. This is primarily used to update the headerTemplate/detailTemplate, and those changes will take effect for existing events. You can also update or replace all the tokens in the template here instead of doing individual API calls on the `/tokens` endpoint.
|
290
|
+
# @param event_template_id [String] The event template ID.
|
291
|
+
# @param app_id [Integer] The ID of the target app.
|
292
|
+
# @param [Hash] opts the optional parameters
|
293
|
+
# @option opts [TimelineEventTemplateUpdateRequest] :timeline_event_template_update_request The updated event template definition.
|
294
|
+
# @return [TimelineEventTemplate]
|
295
|
+
def update_event_template(event_template_id, app_id, opts = {})
|
296
|
+
data, _status_code, _headers = update_event_template_with_http_info(event_template_id, app_id, opts)
|
297
|
+
data
|
298
|
+
end
|
299
|
+
|
300
|
+
# Update an existing event template
|
301
|
+
# Updates an existing template and its tokens. This is primarily used to update the headerTemplate/detailTemplate, and those changes will take effect for existing events. You can also update or replace all the tokens in the template here instead of doing individual API calls on the `/tokens` endpoint.
|
302
|
+
# @param event_template_id [String] The event template ID.
|
303
|
+
# @param app_id [Integer] The ID of the target app.
|
304
|
+
# @param [Hash] opts the optional parameters
|
305
|
+
# @option opts [TimelineEventTemplateUpdateRequest] :timeline_event_template_update_request The updated event template definition.
|
306
|
+
# @return [Array<(TimelineEventTemplate, Integer, Hash)>] TimelineEventTemplate data, response status code and response headers
|
307
|
+
def update_event_template_with_http_info(event_template_id, app_id, opts = {})
|
308
|
+
if @api_client.config.debugging
|
309
|
+
@api_client.config.logger.debug 'Calling API: TemplatesApi.update_event_template ...'
|
310
|
+
end
|
311
|
+
# verify the required parameter 'event_template_id' is set
|
312
|
+
if @api_client.config.client_side_validation && event_template_id.nil?
|
313
|
+
fail ArgumentError, "Missing the required parameter 'event_template_id' when calling TemplatesApi.update_event_template"
|
314
|
+
end
|
315
|
+
# verify the required parameter 'app_id' is set
|
316
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
317
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling TemplatesApi.update_event_template"
|
318
|
+
end
|
319
|
+
# resource path
|
320
|
+
local_var_path = '/crm/v3/timeline/{appId}/event-templates/{eventTemplateId}'.sub('{' + 'eventTemplateId' + '}', CGI.escape(event_template_id.to_s)).sub('{' + 'appId' + '}', CGI.escape(app_id.to_s))
|
321
|
+
|
322
|
+
# query parameters
|
323
|
+
query_params = opts[:query_params] || {}
|
324
|
+
|
325
|
+
# header parameters
|
326
|
+
header_params = opts[:header_params] || {}
|
327
|
+
# HTTP header 'Accept' (if needed)
|
328
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
329
|
+
# HTTP header 'Content-Type'
|
330
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
331
|
+
|
332
|
+
# form parameters
|
333
|
+
form_params = opts[:form_params] || {}
|
334
|
+
|
335
|
+
# http body (model)
|
336
|
+
post_body = opts[:body] || @api_client.object_to_http_body(opts[:'timeline_event_template_update_request'])
|
337
|
+
|
338
|
+
# return_type
|
339
|
+
return_type = opts[:return_type] || 'TimelineEventTemplate'
|
340
|
+
|
341
|
+
# auth_names
|
342
|
+
auth_names = opts[:auth_names] || ['hapikey', 'oauth2']
|
343
|
+
|
344
|
+
new_options = opts.merge(
|
345
|
+
:header_params => header_params,
|
346
|
+
:query_params => query_params,
|
347
|
+
:form_params => form_params,
|
348
|
+
:body => post_body,
|
349
|
+
:auth_names => auth_names,
|
350
|
+
:return_type => return_type
|
351
|
+
)
|
352
|
+
|
353
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
354
|
+
if @api_client.config.debugging
|
355
|
+
@api_client.config.logger.debug "API called: TemplatesApi#update_event_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
356
|
+
end
|
357
|
+
return data, status_code, headers
|
358
|
+
end
|
359
|
+
end
|
360
|
+
end
|
361
|
+
end
|
362
|
+
end
|