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,12 +1,12 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#Timeline events
|
3
3
|
|
4
|
-
#
|
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
5
|
|
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
|
|
@@ -14,41 +14,67 @@ require 'date'
|
|
14
14
|
|
15
15
|
module Hubspot
|
16
16
|
module Crm
|
17
|
-
module
|
18
|
-
|
19
|
-
|
17
|
+
module Timeline
|
18
|
+
# The state of the timeline event.
|
19
|
+
class TimelineEvent
|
20
|
+
# Identifier for the event. This is optional, and we recommend you do not pass this in. We will create one for you if you omit this. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness.
|
21
|
+
attr_accessor :id
|
20
22
|
|
21
|
-
|
23
|
+
# The event template ID.
|
24
|
+
attr_accessor :event_template_id
|
22
25
|
|
23
|
-
|
26
|
+
# The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`).
|
27
|
+
attr_accessor :email
|
24
28
|
|
25
|
-
|
29
|
+
# The CRM object identifier. This is required for every event other than contacts (where utk or email can be used).
|
30
|
+
attr_accessor :object_id
|
26
31
|
|
27
|
-
|
32
|
+
# Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie.
|
33
|
+
attr_accessor :utk
|
28
34
|
|
29
|
-
|
35
|
+
# The event domain (often paired with utk).
|
36
|
+
attr_accessor :domain
|
37
|
+
|
38
|
+
# The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline.
|
39
|
+
attr_accessor :timestamp
|
40
|
+
|
41
|
+
# A collection of token keys and values associated with the template tokens.
|
42
|
+
attr_accessor :tokens
|
43
|
+
|
44
|
+
# Additional event-specific data that can be interpreted by the template's markdown.
|
45
|
+
attr_accessor :extra_data
|
46
|
+
|
47
|
+
attr_accessor :timeline_i_frame
|
30
48
|
|
31
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
50
|
def self.attribute_map
|
33
51
|
{
|
34
|
-
:'
|
35
|
-
:'
|
36
|
-
:'
|
37
|
-
:'
|
38
|
-
:'
|
39
|
-
:'
|
52
|
+
:'id' => :'id',
|
53
|
+
:'event_template_id' => :'eventTemplateId',
|
54
|
+
:'email' => :'email',
|
55
|
+
:'object_id' => :'objectId',
|
56
|
+
:'utk' => :'utk',
|
57
|
+
:'domain' => :'domain',
|
58
|
+
:'timestamp' => :'timestamp',
|
59
|
+
:'tokens' => :'tokens',
|
60
|
+
:'extra_data' => :'extraData',
|
61
|
+
:'timeline_i_frame' => :'timelineIFrame'
|
40
62
|
}
|
41
63
|
end
|
42
64
|
|
43
65
|
# Attribute type mapping.
|
44
66
|
def self.openapi_types
|
45
67
|
{
|
46
|
-
:'
|
47
|
-
:'
|
48
|
-
:'
|
49
|
-
:'
|
50
|
-
:'
|
51
|
-
:'
|
68
|
+
:'id' => :'String',
|
69
|
+
:'event_template_id' => :'String',
|
70
|
+
:'email' => :'String',
|
71
|
+
:'object_id' => :'String',
|
72
|
+
:'utk' => :'String',
|
73
|
+
:'domain' => :'String',
|
74
|
+
:'timestamp' => :'DateTime',
|
75
|
+
:'tokens' => :'Hash<String, String>',
|
76
|
+
:'extra_data' => :'Object',
|
77
|
+
:'timeline_i_frame' => :'TimelineEventIFrame'
|
52
78
|
}
|
53
79
|
end
|
54
80
|
|
@@ -62,45 +88,57 @@ module Hubspot
|
|
62
88
|
# @param [Hash] attributes Model attributes in the form of hash
|
63
89
|
def initialize(attributes = {})
|
64
90
|
if (!attributes.is_a?(Hash))
|
65
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::
|
91
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Timeline::TimelineEvent` initialize method"
|
66
92
|
end
|
67
93
|
|
68
94
|
# check to see if the attribute exists and convert string to symbol for hash key
|
69
95
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
96
|
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Timeline::TimelineEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
98
|
end
|
73
99
|
h[k.to_sym] = v
|
74
100
|
}
|
75
101
|
|
76
|
-
if attributes.key?(:'
|
77
|
-
|
78
|
-
self.filter_groups = value
|
79
|
-
end
|
102
|
+
if attributes.key?(:'id')
|
103
|
+
self.id = attributes[:'id']
|
80
104
|
end
|
81
105
|
|
82
|
-
if attributes.key?(:'
|
83
|
-
|
84
|
-
|
85
|
-
|
106
|
+
if attributes.key?(:'event_template_id')
|
107
|
+
self.event_template_id = attributes[:'event_template_id']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.key?(:'email')
|
111
|
+
self.email = attributes[:'email']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.key?(:'object_id')
|
115
|
+
self.object_id = attributes[:'object_id']
|
116
|
+
end
|
117
|
+
|
118
|
+
if attributes.key?(:'utk')
|
119
|
+
self.utk = attributes[:'utk']
|
120
|
+
end
|
121
|
+
|
122
|
+
if attributes.key?(:'domain')
|
123
|
+
self.domain = attributes[:'domain']
|
86
124
|
end
|
87
125
|
|
88
|
-
if attributes.key?(:'
|
89
|
-
self.
|
126
|
+
if attributes.key?(:'timestamp')
|
127
|
+
self.timestamp = attributes[:'timestamp']
|
90
128
|
end
|
91
129
|
|
92
|
-
if attributes.key?(:'
|
93
|
-
if (value = attributes[:'
|
94
|
-
self.
|
130
|
+
if attributes.key?(:'tokens')
|
131
|
+
if (value = attributes[:'tokens']).is_a?(Hash)
|
132
|
+
self.tokens = value
|
95
133
|
end
|
96
134
|
end
|
97
135
|
|
98
|
-
if attributes.key?(:'
|
99
|
-
self.
|
136
|
+
if attributes.key?(:'extra_data')
|
137
|
+
self.extra_data = attributes[:'extra_data']
|
100
138
|
end
|
101
139
|
|
102
|
-
if attributes.key?(:'
|
103
|
-
self.
|
140
|
+
if attributes.key?(:'timeline_i_frame')
|
141
|
+
self.timeline_i_frame = attributes[:'timeline_i_frame']
|
104
142
|
end
|
105
143
|
end
|
106
144
|
|
@@ -108,24 +146,16 @@ module Hubspot
|
|
108
146
|
# @return Array for valid properties with the reasons
|
109
147
|
def list_invalid_properties
|
110
148
|
invalid_properties = Array.new
|
111
|
-
if @
|
112
|
-
invalid_properties.push('invalid value for "
|
113
|
-
end
|
114
|
-
|
115
|
-
if @sorts.nil?
|
116
|
-
invalid_properties.push('invalid value for "sorts", sorts cannot be nil.')
|
117
|
-
end
|
118
|
-
|
119
|
-
if @properties.nil?
|
120
|
-
invalid_properties.push('invalid value for "properties", properties cannot be nil.')
|
149
|
+
if @id.nil?
|
150
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
121
151
|
end
|
122
152
|
|
123
|
-
if @
|
124
|
-
invalid_properties.push('invalid value for "
|
153
|
+
if @event_template_id.nil?
|
154
|
+
invalid_properties.push('invalid value for "event_template_id", event_template_id cannot be nil.')
|
125
155
|
end
|
126
156
|
|
127
|
-
if @
|
128
|
-
invalid_properties.push('invalid value for "
|
157
|
+
if @tokens.nil?
|
158
|
+
invalid_properties.push('invalid value for "tokens", tokens cannot be nil.')
|
129
159
|
end
|
130
160
|
|
131
161
|
invalid_properties
|
@@ -134,11 +164,9 @@ module Hubspot
|
|
134
164
|
# Check to see if the all the properties in the model are valid
|
135
165
|
# @return true if the model is valid
|
136
166
|
def valid?
|
137
|
-
return false if @
|
138
|
-
return false if @
|
139
|
-
return false if @
|
140
|
-
return false if @limit.nil?
|
141
|
-
return false if @after.nil?
|
167
|
+
return false if @id.nil?
|
168
|
+
return false if @event_template_id.nil?
|
169
|
+
return false if @tokens.nil?
|
142
170
|
true
|
143
171
|
end
|
144
172
|
|
@@ -147,12 +175,16 @@ module Hubspot
|
|
147
175
|
def ==(o)
|
148
176
|
return true if self.equal?(o)
|
149
177
|
self.class == o.class &&
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
178
|
+
id == o.id &&
|
179
|
+
event_template_id == o.event_template_id &&
|
180
|
+
email == o.email &&
|
181
|
+
object_id == o.object_id &&
|
182
|
+
utk == o.utk &&
|
183
|
+
domain == o.domain &&
|
184
|
+
timestamp == o.timestamp &&
|
185
|
+
tokens == o.tokens &&
|
186
|
+
extra_data == o.extra_data &&
|
187
|
+
timeline_i_frame == o.timeline_i_frame
|
156
188
|
end
|
157
189
|
|
158
190
|
# @see the `==` method
|
@@ -164,7 +196,7 @@ module Hubspot
|
|
164
196
|
# Calculates hash code according to all attributes.
|
165
197
|
# @return [Integer] Hash code
|
166
198
|
def hash
|
167
|
-
[
|
199
|
+
[id, event_template_id, email, object_id, utk, domain, timestamp, tokens, extra_data, timeline_i_frame].hash
|
168
200
|
end
|
169
201
|
|
170
202
|
# Builds the object from hash
|
@@ -231,7 +263,7 @@ module Hubspot
|
|
231
263
|
end
|
232
264
|
end
|
233
265
|
else # model
|
234
|
-
Hubspot::Crm::
|
266
|
+
Hubspot::Crm::Timeline.const_get(type).build_from_hash(value)
|
235
267
|
end
|
236
268
|
end
|
237
269
|
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
|
-
#
|
2
|
+
#Timeline events
|
3
3
|
|
4
|
-
#
|
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
5
|
|
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
|
|
@@ -14,21 +14,42 @@ require 'date'
|
|
14
14
|
|
15
15
|
module Hubspot
|
16
16
|
module Crm
|
17
|
-
module
|
18
|
-
class
|
19
|
-
|
17
|
+
module Timeline
|
18
|
+
class TimelineEventIFrame
|
19
|
+
# The text displaying the link that will display the iframe.
|
20
|
+
attr_accessor :link_label
|
21
|
+
|
22
|
+
# The label of the modal window that displays the iframe contents.
|
23
|
+
attr_accessor :header_label
|
24
|
+
|
25
|
+
# The URI of the iframe contents.
|
26
|
+
attr_accessor :url
|
27
|
+
|
28
|
+
# The width of the modal window in pixels.
|
29
|
+
attr_accessor :width
|
30
|
+
|
31
|
+
# The height of the modal window in pixels.
|
32
|
+
attr_accessor :height
|
20
33
|
|
21
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
35
|
def self.attribute_map
|
23
36
|
{
|
24
|
-
:'
|
37
|
+
:'link_label' => :'linkLabel',
|
38
|
+
:'header_label' => :'headerLabel',
|
39
|
+
:'url' => :'url',
|
40
|
+
:'width' => :'width',
|
41
|
+
:'height' => :'height'
|
25
42
|
}
|
26
43
|
end
|
27
44
|
|
28
45
|
# Attribute type mapping.
|
29
46
|
def self.openapi_types
|
30
47
|
{
|
31
|
-
:'
|
48
|
+
:'link_label' => :'String',
|
49
|
+
:'header_label' => :'String',
|
50
|
+
:'url' => :'String',
|
51
|
+
:'width' => :'Integer',
|
52
|
+
:'height' => :'Integer'
|
32
53
|
}
|
33
54
|
end
|
34
55
|
|
@@ -42,19 +63,35 @@ module Hubspot
|
|
42
63
|
# @param [Hash] attributes Model attributes in the form of hash
|
43
64
|
def initialize(attributes = {})
|
44
65
|
if (!attributes.is_a?(Hash))
|
45
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Timeline::TimelineEventIFrame` initialize method"
|
46
67
|
end
|
47
68
|
|
48
69
|
# check to see if the attribute exists and convert string to symbol for hash key
|
49
70
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
50
71
|
if (!self.class.attribute_map.key?(k.to_sym))
|
51
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Timeline::TimelineEventIFrame`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
52
73
|
end
|
53
74
|
h[k.to_sym] = v
|
54
75
|
}
|
55
76
|
|
56
|
-
if attributes.key?(:'
|
57
|
-
self.
|
77
|
+
if attributes.key?(:'link_label')
|
78
|
+
self.link_label = attributes[:'link_label']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'header_label')
|
82
|
+
self.header_label = attributes[:'header_label']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'url')
|
86
|
+
self.url = attributes[:'url']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'width')
|
90
|
+
self.width = attributes[:'width']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'height')
|
94
|
+
self.height = attributes[:'height']
|
58
95
|
end
|
59
96
|
end
|
60
97
|
|
@@ -62,8 +99,24 @@ module Hubspot
|
|
62
99
|
# @return Array for valid properties with the reasons
|
63
100
|
def list_invalid_properties
|
64
101
|
invalid_properties = Array.new
|
65
|
-
if @
|
66
|
-
invalid_properties.push('invalid value for "
|
102
|
+
if @link_label.nil?
|
103
|
+
invalid_properties.push('invalid value for "link_label", link_label cannot be nil.')
|
104
|
+
end
|
105
|
+
|
106
|
+
if @header_label.nil?
|
107
|
+
invalid_properties.push('invalid value for "header_label", header_label cannot be nil.')
|
108
|
+
end
|
109
|
+
|
110
|
+
if @url.nil?
|
111
|
+
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
112
|
+
end
|
113
|
+
|
114
|
+
if @width.nil?
|
115
|
+
invalid_properties.push('invalid value for "width", width cannot be nil.')
|
116
|
+
end
|
117
|
+
|
118
|
+
if @height.nil?
|
119
|
+
invalid_properties.push('invalid value for "height", height cannot be nil.')
|
67
120
|
end
|
68
121
|
|
69
122
|
invalid_properties
|
@@ -72,7 +125,11 @@ module Hubspot
|
|
72
125
|
# Check to see if the all the properties in the model are valid
|
73
126
|
# @return true if the model is valid
|
74
127
|
def valid?
|
75
|
-
return false if @
|
128
|
+
return false if @link_label.nil?
|
129
|
+
return false if @header_label.nil?
|
130
|
+
return false if @url.nil?
|
131
|
+
return false if @width.nil?
|
132
|
+
return false if @height.nil?
|
76
133
|
true
|
77
134
|
end
|
78
135
|
|
@@ -81,7 +138,11 @@ module Hubspot
|
|
81
138
|
def ==(o)
|
82
139
|
return true if self.equal?(o)
|
83
140
|
self.class == o.class &&
|
84
|
-
|
141
|
+
link_label == o.link_label &&
|
142
|
+
header_label == o.header_label &&
|
143
|
+
url == o.url &&
|
144
|
+
width == o.width &&
|
145
|
+
height == o.height
|
85
146
|
end
|
86
147
|
|
87
148
|
# @see the `==` method
|
@@ -93,7 +154,7 @@ module Hubspot
|
|
93
154
|
# Calculates hash code according to all attributes.
|
94
155
|
# @return [Integer] Hash code
|
95
156
|
def hash
|
96
|
-
[
|
157
|
+
[link_label, header_label, url, width, height].hash
|
97
158
|
end
|
98
159
|
|
99
160
|
# Builds the object from hash
|
@@ -160,7 +221,7 @@ module Hubspot
|
|
160
221
|
end
|
161
222
|
end
|
162
223
|
else # model
|
163
|
-
Hubspot::Crm::
|
224
|
+
Hubspot::Crm::Timeline.const_get(type).build_from_hash(value)
|
164
225
|
end
|
165
226
|
end
|
166
227
|
|
@@ -0,0 +1,342 @@
|
|
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 'date'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module Crm
|
17
|
+
module Timeline
|
18
|
+
# The current state of the timeline event.
|
19
|
+
class TimelineEventResponse
|
20
|
+
# The ObjectType associated with the EventTemplate.
|
21
|
+
attr_accessor :object_type
|
22
|
+
|
23
|
+
attr_accessor :created_at
|
24
|
+
|
25
|
+
# Identifier for the event. This should be unique to the app and event template. If you use the same ID for different CRM objects, the last to be processed will win and the first will not have a record. You can also use `{{uuid}}` anywhere in the ID to generate a unique string, guaranteeing uniqueness.
|
26
|
+
attr_accessor :id
|
27
|
+
|
28
|
+
# The event template ID.
|
29
|
+
attr_accessor :event_template_id
|
30
|
+
|
31
|
+
# The email address used for contact-specific events. This can be used to identify existing contacts, create new ones, or change the email for an existing contact (if paired with the `objectId`).
|
32
|
+
attr_accessor :email
|
33
|
+
|
34
|
+
# The CRM object identifier. This is required for every event other than contacts (where utk or email can be used).
|
35
|
+
attr_accessor :object_id
|
36
|
+
|
37
|
+
# Use the `utk` parameter to associate an event with a contact by `usertoken`. This is recommended if you don't know a user's email, but have an identifying user token in your cookie.
|
38
|
+
attr_accessor :utk
|
39
|
+
|
40
|
+
# The event domain (often paired with utk).
|
41
|
+
attr_accessor :domain
|
42
|
+
|
43
|
+
# The time the event occurred. If not passed in, the curren time will be assumed. This is used to determine where an event is shown on a CRM object's timeline.
|
44
|
+
attr_accessor :timestamp
|
45
|
+
|
46
|
+
# A collection of token keys and values associated with the template tokens.
|
47
|
+
attr_accessor :tokens
|
48
|
+
|
49
|
+
# Additional event-specific data that can be interpreted by the template's markdown.
|
50
|
+
attr_accessor :extra_data
|
51
|
+
|
52
|
+
attr_accessor :timeline_i_frame
|
53
|
+
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
55
|
+
def self.attribute_map
|
56
|
+
{
|
57
|
+
:'object_type' => :'objectType',
|
58
|
+
:'created_at' => :'createdAt',
|
59
|
+
:'id' => :'id',
|
60
|
+
:'event_template_id' => :'eventTemplateId',
|
61
|
+
:'email' => :'email',
|
62
|
+
:'object_id' => :'objectId',
|
63
|
+
:'utk' => :'utk',
|
64
|
+
:'domain' => :'domain',
|
65
|
+
:'timestamp' => :'timestamp',
|
66
|
+
:'tokens' => :'tokens',
|
67
|
+
:'extra_data' => :'extraData',
|
68
|
+
:'timeline_i_frame' => :'timelineIFrame'
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
72
|
+
# Attribute type mapping.
|
73
|
+
def self.openapi_types
|
74
|
+
{
|
75
|
+
:'object_type' => :'String',
|
76
|
+
:'created_at' => :'DateTime',
|
77
|
+
:'id' => :'String',
|
78
|
+
:'event_template_id' => :'String',
|
79
|
+
:'email' => :'String',
|
80
|
+
:'object_id' => :'String',
|
81
|
+
:'utk' => :'String',
|
82
|
+
:'domain' => :'String',
|
83
|
+
:'timestamp' => :'DateTime',
|
84
|
+
:'tokens' => :'Hash<String, String>',
|
85
|
+
:'extra_data' => :'Object',
|
86
|
+
:'timeline_i_frame' => :'TimelineEventIFrame'
|
87
|
+
}
|
88
|
+
end
|
89
|
+
|
90
|
+
# List of attributes with nullable: true
|
91
|
+
def self.openapi_nullable
|
92
|
+
Set.new([
|
93
|
+
])
|
94
|
+
end
|
95
|
+
|
96
|
+
# Initializes the object
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
+
def initialize(attributes = {})
|
99
|
+
if (!attributes.is_a?(Hash))
|
100
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Crm::Timeline::TimelineEventResponse` initialize method"
|
101
|
+
end
|
102
|
+
|
103
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
104
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
105
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
106
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Crm::Timeline::TimelineEventResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
107
|
+
end
|
108
|
+
h[k.to_sym] = v
|
109
|
+
}
|
110
|
+
|
111
|
+
if attributes.key?(:'object_type')
|
112
|
+
self.object_type = attributes[:'object_type']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'created_at')
|
116
|
+
self.created_at = attributes[:'created_at']
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'id')
|
120
|
+
self.id = attributes[:'id']
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.key?(:'event_template_id')
|
124
|
+
self.event_template_id = attributes[:'event_template_id']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.key?(:'email')
|
128
|
+
self.email = attributes[:'email']
|
129
|
+
end
|
130
|
+
|
131
|
+
if attributes.key?(:'object_id')
|
132
|
+
self.object_id = attributes[:'object_id']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.key?(:'utk')
|
136
|
+
self.utk = attributes[:'utk']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'domain')
|
140
|
+
self.domain = attributes[:'domain']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.key?(:'timestamp')
|
144
|
+
self.timestamp = attributes[:'timestamp']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.key?(:'tokens')
|
148
|
+
if (value = attributes[:'tokens']).is_a?(Hash)
|
149
|
+
self.tokens = value
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.key?(:'extra_data')
|
154
|
+
self.extra_data = attributes[:'extra_data']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.key?(:'timeline_i_frame')
|
158
|
+
self.timeline_i_frame = attributes[:'timeline_i_frame']
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
163
|
+
# @return Array for valid properties with the reasons
|
164
|
+
def list_invalid_properties
|
165
|
+
invalid_properties = Array.new
|
166
|
+
if @object_type.nil?
|
167
|
+
invalid_properties.push('invalid value for "object_type", object_type cannot be nil.')
|
168
|
+
end
|
169
|
+
|
170
|
+
if @id.nil?
|
171
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
172
|
+
end
|
173
|
+
|
174
|
+
if @event_template_id.nil?
|
175
|
+
invalid_properties.push('invalid value for "event_template_id", event_template_id cannot be nil.')
|
176
|
+
end
|
177
|
+
|
178
|
+
if @tokens.nil?
|
179
|
+
invalid_properties.push('invalid value for "tokens", tokens cannot be nil.')
|
180
|
+
end
|
181
|
+
|
182
|
+
invalid_properties
|
183
|
+
end
|
184
|
+
|
185
|
+
# Check to see if the all the properties in the model are valid
|
186
|
+
# @return true if the model is valid
|
187
|
+
def valid?
|
188
|
+
return false if @object_type.nil?
|
189
|
+
return false if @id.nil?
|
190
|
+
return false if @event_template_id.nil?
|
191
|
+
return false if @tokens.nil?
|
192
|
+
true
|
193
|
+
end
|
194
|
+
|
195
|
+
# Checks equality by comparing each attribute.
|
196
|
+
# @param [Object] Object to be compared
|
197
|
+
def ==(o)
|
198
|
+
return true if self.equal?(o)
|
199
|
+
self.class == o.class &&
|
200
|
+
object_type == o.object_type &&
|
201
|
+
created_at == o.created_at &&
|
202
|
+
id == o.id &&
|
203
|
+
event_template_id == o.event_template_id &&
|
204
|
+
email == o.email &&
|
205
|
+
object_id == o.object_id &&
|
206
|
+
utk == o.utk &&
|
207
|
+
domain == o.domain &&
|
208
|
+
timestamp == o.timestamp &&
|
209
|
+
tokens == o.tokens &&
|
210
|
+
extra_data == o.extra_data &&
|
211
|
+
timeline_i_frame == o.timeline_i_frame
|
212
|
+
end
|
213
|
+
|
214
|
+
# @see the `==` method
|
215
|
+
# @param [Object] Object to be compared
|
216
|
+
def eql?(o)
|
217
|
+
self == o
|
218
|
+
end
|
219
|
+
|
220
|
+
# Calculates hash code according to all attributes.
|
221
|
+
# @return [Integer] Hash code
|
222
|
+
def hash
|
223
|
+
[object_type, created_at, id, event_template_id, email, object_id, utk, domain, timestamp, tokens, extra_data, timeline_i_frame].hash
|
224
|
+
end
|
225
|
+
|
226
|
+
# Builds the object from hash
|
227
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
228
|
+
# @return [Object] Returns the model itself
|
229
|
+
def self.build_from_hash(attributes)
|
230
|
+
new.build_from_hash(attributes)
|
231
|
+
end
|
232
|
+
|
233
|
+
# Builds the object from hash
|
234
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
235
|
+
# @return [Object] Returns the model itself
|
236
|
+
def build_from_hash(attributes)
|
237
|
+
return nil unless attributes.is_a?(Hash)
|
238
|
+
self.class.openapi_types.each_pair do |key, type|
|
239
|
+
if type =~ /\AArray<(.*)>/i
|
240
|
+
# check to ensure the input is an array given that the attribute
|
241
|
+
# is documented as an array but the input is not
|
242
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
243
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
244
|
+
end
|
245
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
246
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
247
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
248
|
+
end
|
249
|
+
|
250
|
+
self
|
251
|
+
end
|
252
|
+
|
253
|
+
# Deserializes the data based on type
|
254
|
+
# @param string type Data type
|
255
|
+
# @param string value Value to be deserialized
|
256
|
+
# @return [Object] Deserialized data
|
257
|
+
def _deserialize(type, value)
|
258
|
+
case type.to_sym
|
259
|
+
when :DateTime
|
260
|
+
DateTime.parse(value)
|
261
|
+
when :Date
|
262
|
+
Date.parse(value)
|
263
|
+
when :String
|
264
|
+
value.to_s
|
265
|
+
when :Integer
|
266
|
+
value.to_i
|
267
|
+
when :Float
|
268
|
+
value.to_f
|
269
|
+
when :Boolean
|
270
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
271
|
+
true
|
272
|
+
else
|
273
|
+
false
|
274
|
+
end
|
275
|
+
when :Object
|
276
|
+
# generic object (usually a Hash), return directly
|
277
|
+
value
|
278
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
279
|
+
inner_type = Regexp.last_match[:inner_type]
|
280
|
+
value.map { |v| _deserialize(inner_type, v) }
|
281
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
282
|
+
k_type = Regexp.last_match[:k_type]
|
283
|
+
v_type = Regexp.last_match[:v_type]
|
284
|
+
{}.tap do |hash|
|
285
|
+
value.each do |k, v|
|
286
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
287
|
+
end
|
288
|
+
end
|
289
|
+
else # model
|
290
|
+
Hubspot::Crm::Timeline.const_get(type).build_from_hash(value)
|
291
|
+
end
|
292
|
+
end
|
293
|
+
|
294
|
+
# Returns the string representation of the object
|
295
|
+
# @return [String] String presentation of the object
|
296
|
+
def to_s
|
297
|
+
to_hash.to_s
|
298
|
+
end
|
299
|
+
|
300
|
+
# to_body is an alias to to_hash (backward compatibility)
|
301
|
+
# @return [Hash] Returns the object in the form of hash
|
302
|
+
def to_body
|
303
|
+
to_hash
|
304
|
+
end
|
305
|
+
|
306
|
+
# Returns the object in the form of hash
|
307
|
+
# @return [Hash] Returns the object in the form of hash
|
308
|
+
def to_hash
|
309
|
+
hash = {}
|
310
|
+
self.class.attribute_map.each_pair do |attr, param|
|
311
|
+
value = self.send(attr)
|
312
|
+
if value.nil?
|
313
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
314
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
315
|
+
end
|
316
|
+
|
317
|
+
hash[param] = _to_hash(value)
|
318
|
+
end
|
319
|
+
hash
|
320
|
+
end
|
321
|
+
|
322
|
+
# Outputs non-array value in the form of hash
|
323
|
+
# For object, use to_hash. Otherwise, just return the value
|
324
|
+
# @param [Object] value Any valid value
|
325
|
+
# @return [Hash] Returns the value in the form of hash
|
326
|
+
def _to_hash(value)
|
327
|
+
if value.is_a?(Array)
|
328
|
+
value.compact.map { |v| _to_hash(v) }
|
329
|
+
elsif value.is_a?(Hash)
|
330
|
+
{}.tap do |hash|
|
331
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
332
|
+
end
|
333
|
+
elsif value.respond_to? :to_hash
|
334
|
+
value.to_hash
|
335
|
+
else
|
336
|
+
value
|
337
|
+
end
|
338
|
+
end
|
339
|
+
end
|
340
|
+
end
|
341
|
+
end
|
342
|
+
end
|