hubspot-api-client 10.0.1 → 11.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/Gemfile.lock +4 -4
- data/README.md +4 -0
- data/lib/hubspot/codegen/cms/audit-logs/api/{default_api.rb → audit_logs_api.rb} +3 -3
- data/lib/hubspot/codegen/cms/blogs/authors/api/{default_api.rb → author_api.rb} +28 -28
- data/lib/hubspot/codegen/cms/blogs/blog-posts/api/{default_api.rb → blog_post_api.rb} +62 -62
- data/lib/hubspot/codegen/cms/blogs/tags/api/{default_api.rb → tag_api.rb} +28 -28
- data/lib/hubspot/codegen/cms/domains/api/domains_api.rb +2 -2
- data/lib/hubspot/codegen/cms/domains/configuration.rb +0 -7
- data/lib/hubspot/codegen/cms/hubdb/api/rows_api.rb +102 -102
- data/lib/hubspot/codegen/cms/hubdb/api/rows_batch_api.rb +21 -21
- data/lib/hubspot/codegen/cms/hubdb/api/tables_api.rb +100 -108
- data/lib/hubspot/codegen/cms/hubdb/api_client.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/api_error.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/configuration.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/{batch_input_hub_db_table_row_v3.rb → batch_input_hub_db_table_row_v3_request.rb} +5 -5
- data/lib/hubspot/codegen/cms/hubdb/models/batch_input_json_node.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/batch_input_string.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/column.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/{column_input.rb → column_request.rb} +71 -47
- data/lib/hubspot/codegen/cms/hubdb/models/error.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/error_detail.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/foreign_id.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/forward_paging.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_clone_request.rb +4 -9
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_row_v3.rb +12 -27
- data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_row_v3_input.rb → hub_db_table_row_v3_request.rb} +25 -20
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/{hub_db_table_v3_input.rb → hub_db_table_v3_request.rb} +53 -53
- data/lib/hubspot/codegen/cms/hubdb/models/import_result.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/next_page.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/option.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/simple_user.rb +1 -1
- data/lib/hubspot/codegen/cms/hubdb/models/standard_error.rb +1 -1
- data/lib/hubspot/codegen/cms/performance/api/{default_api.rb → public_performance_api.rb} +5 -5
- data/lib/hubspot/codegen/cms/site-search/api/{default_api.rb → public_api.rb} +7 -7
- data/lib/hubspot/codegen/cms/site-search/models/search_hit_field.rb +15 -15
- data/lib/hubspot/codegen/communication_preferences/api/definition_api.rb +80 -0
- data/lib/hubspot/codegen/communication_preferences/api/status_api.rb +214 -0
- data/lib/hubspot/codegen/communication_preferences/api_client.rb +404 -0
- data/lib/hubspot/codegen/communication_preferences/api_error.rb +59 -0
- data/lib/hubspot/codegen/communication_preferences/configuration.rb +254 -0
- data/lib/hubspot/codegen/communication_preferences/models/error.rb +290 -0
- data/lib/hubspot/codegen/communication_preferences/models/error_detail.rb +256 -0
- data/lib/hubspot/codegen/communication_preferences/models/public_subscription_status.rb +372 -0
- data/lib/hubspot/codegen/communication_preferences/models/public_subscription_statuses_response.rb +231 -0
- data/lib/hubspot/codegen/communication_preferences/models/public_update_subscription_status_request.rb +283 -0
- data/lib/hubspot/codegen/communication_preferences/models/subscription_definition.rb +339 -0
- data/lib/hubspot/codegen/communication_preferences/models/subscription_definitions_response.rb +216 -0
- data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/companies/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/companies/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/contacts/api/gdpr_api.rb +150 -0
- data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/contacts/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/deals/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/deals/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/imports/api/core_api.rb +2 -2
- data/lib/hubspot/codegen/crm/imports/api/{default_api.rb → public_imports_api.rb} +8 -8
- data/lib/hubspot/codegen/crm/imports/models/public_import_error.rb +4 -4
- data/lib/hubspot/codegen/crm/line_items/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/line_items/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/line_items/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/objects/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/objects/api/gdpr_api.rb +162 -0
- data/lib/hubspot/codegen/crm/objects/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +0 -2
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/objects/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/owners/api/{default_api.rb → owners_api.rb} +6 -6
- data/lib/hubspot/codegen/crm/products/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/products/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/products/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/quotes/api/batch_api.rb +0 -2
- data/lib/hubspot/codegen/crm/quotes/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/quotes/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/schemas/api/core_api.rb +3 -3
- data/lib/hubspot/codegen/crm/schemas/api/{default_api.rb → public_object_schemas_api.rb} +4 -4
- data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +0 -8
- data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +0 -4
- data/lib/hubspot/codegen/crm/tickets/models/filter.rb +3 -2
- data/lib/hubspot/codegen/crm/timeline/api/templates_api.rb +3 -3
- data/lib/hubspot/codegen/crm/timeline/models/{collection_response_timeline_event_template.rb → collection_response_timeline_event_template_no_paging.rb} +7 -17
- data/lib/hubspot/codegen/files/files/api/files_api.rb +12 -6
- data/lib/hubspot/codegen/files/files/api/folders_api.rb +12 -0
- data/lib/hubspot/codegen/files/files/models/collection_response_file.rb +1 -1
- data/lib/hubspot/codegen/files/files/models/error_category.rb +18 -18
- data/lib/hubspot/codegen/marketing/transactional/api/{default_api.rb → public_smtp_tokens_api.rb} +14 -74
- data/lib/hubspot/codegen/marketing/transactional/api/single_send_api.rb +86 -0
- data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +82 -0
- data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +140 -0
- data/lib/hubspot/codegen/oauth/api/tokens_api.rb +100 -0
- data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +33 -1
- data/lib/hubspot/codegen/oauth/models/token_response_if.rb +27 -4
- data/lib/hubspot/version.rb +1 -1
- data/lib/hubspot-api-client.rb +16 -3
- data/pkg/hubspot-api-client-10.1.1.gem +0 -0
- data/spec/codegen/cms/audit-logs/api/{default_api_spec.rb → audit_logs_api_spec.rb} +6 -6
- data/spec/codegen/cms/blogs/authors/api/{default_api_spec.rb → author_api_spec.rb} +6 -6
- data/spec/codegen/cms/blogs/blog-posts/api/{default_api_spec.rb → blog_post_api_spec.rb} +6 -6
- data/spec/codegen/cms/blogs/tags/api/{default_api_spec.rb → tag_api_spec.rb} +6 -6
- data/spec/codegen/cms/hubdb/api/rows_api_spec.rb +18 -18
- data/spec/codegen/cms/hubdb/api/rows_batch_api_spec.rb +4 -4
- data/spec/codegen/cms/hubdb/api/tables_api_spec.rb +35 -36
- data/spec/codegen/cms/hubdb/models/{batch_input_hub_db_table_row_v3_spec.rb → batch_input_hub_db_table_row_v3_request_spec.rb} +7 -7
- data/spec/codegen/cms/hubdb/models/batch_input_json_node_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/batch_input_string_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/batch_response_hub_db_table_row_v3_with_errors_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_row_v3_forward_paging_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/collection_response_with_total_hub_db_table_v3_forward_paging_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/{column_input_spec.rb → column_request_spec.rb} +14 -22
- data/spec/codegen/cms/hubdb/models/column_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/error_detail_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/error_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/foreign_id_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/forward_paging_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/hub_db_table_clone_request_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/{hub_db_table_row_v3_input_spec.rb → hub_db_table_row_v3_request_spec.rb} +10 -10
- data/spec/codegen/cms/hubdb/models/hub_db_table_row_v3_spec.rb +7 -1
- data/spec/codegen/cms/hubdb/models/{hub_db_table_v3_input_spec.rb → hub_db_table_v3_request_spec.rb} +13 -13
- data/spec/codegen/cms/hubdb/models/hub_db_table_v3_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/import_result_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/next_page_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/option_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/simple_user_spec.rb +1 -1
- data/spec/codegen/cms/hubdb/models/standard_error_spec.rb +1 -1
- data/spec/codegen/cms/performance/api/{default_api_spec.rb → public_performance_api_spec.rb} +6 -6
- data/spec/codegen/cms/site-search/api/{default_api_spec.rb → public_api_spec.rb} +6 -6
- data/spec/codegen/cms/site-search/models/search_hit_field_spec.rb +2 -2
- data/spec/codegen/communication_preferences/api/definition_api_spec.rb +46 -0
- data/spec/codegen/communication_preferences/api/status_api_spec.rb +71 -0
- data/spec/codegen/communication_preferences/models/error_detail_spec.rb +65 -0
- data/spec/codegen/communication_preferences/models/error_spec.rb +77 -0
- data/spec/codegen/communication_preferences/models/public_subscription_status_spec.rb +101 -0
- data/spec/codegen/communication_preferences/models/public_subscription_statuses_response_spec.rb +47 -0
- data/spec/codegen/communication_preferences/models/public_update_subscription_status_request_spec.rb +63 -0
- data/spec/codegen/communication_preferences/models/subscription_definition_spec.rb +95 -0
- data/spec/codegen/communication_preferences/models/subscription_definitions_response_spec.rb +41 -0
- data/spec/codegen/crm/companies/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/companies/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/companies/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/contacts/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/contacts/api/gdpr_api_spec.rb +59 -0
- data/spec/codegen/crm/contacts/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/contacts/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/deals/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/deals/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/deals/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/extensions/calling/api/settings_api_spec.rb +2 -2
- data/spec/codegen/crm/extensions/calling/models/settings_patch_request_spec.rb +6 -0
- data/spec/codegen/crm/extensions/calling/models/settings_request_spec.rb +6 -0
- data/spec/codegen/crm/extensions/calling/models/settings_response_spec.rb +6 -0
- data/spec/codegen/crm/extensions/cards/api/cards_api_spec.rb +2 -2
- data/spec/codegen/crm/imports/api/{default_api_spec.rb → public_imports_api_spec.rb} +8 -8
- data/spec/codegen/crm/imports/models/public_import_error_spec.rb +2 -2
- data/spec/codegen/crm/line_items/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/line_items/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/line_items/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/objects/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/objects/api/gdpr_api_spec.rb +61 -0
- data/spec/codegen/crm/objects/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/objects/feedback_submissions/api/batch_api_spec.rb +0 -1
- data/spec/codegen/crm/objects/feedback_submissions/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/objects/feedback_submissions/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/objects/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/owners/api/{default_api_spec.rb → owners_api_spec.rb} +6 -6
- data/spec/codegen/crm/products/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/products/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/products/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/quotes/api/batch_api_spec.rb +0 -1
- data/spec/codegen/crm/quotes/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/quotes/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/schemas/api/{default_api_spec.rb → public_object_schemas_api_spec.rb} +6 -6
- data/spec/codegen/crm/tickets/api/batch_api_spec.rb +0 -4
- data/spec/codegen/crm/tickets/api/search_api_spec.rb +0 -2
- data/spec/codegen/crm/tickets/models/filter_spec.rb +1 -1
- data/spec/codegen/crm/timeline/api/templates_api_spec.rb +1 -1
- data/spec/codegen/crm/timeline/models/{collection_response_timeline_event_template_spec.rb → collection_response_timeline_event_template_no_paging_spec.rb} +6 -12
- data/spec/codegen/files/files/api/files_api_spec.rb +4 -2
- data/spec/codegen/files/files/api/folders_api_spec.rb +4 -0
- data/spec/codegen/files/files/models/error_category_spec.rb +6 -6
- data/spec/codegen/marketing/transactional/api/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +6 -18
- data/spec/codegen/marketing/transactional/api/single_send_api_spec.rb +47 -0
- data/spec/codegen/oauth/api/access_tokens_api_spec.rb +45 -0
- data/spec/codegen/oauth/api/{default_api_spec.rb → refresh_tokens_api_spec.rb} +6 -31
- data/spec/codegen/oauth/api/tokens_api_spec.rb +50 -0
- data/spec/codegen/oauth/models/access_token_info_response_spec.rb +12 -0
- data/spec/codegen/oauth/models/token_response_if_spec.rb +12 -0
- data/spec/features/cms/audit-logs/{default_api_spec.rb → audit_logs_api_spec.rb} +4 -4
- data/spec/features/cms/blogs/authors/{default_api_spec.rb → author_api_spec.rb} +28 -28
- data/spec/features/cms/blogs/blog-posts/{default_api_spec.rb → blog_post_api_spec.rb} +2 -2
- data/spec/features/cms/blogs/tags/{default_api_spec.rb → tag_api_spec.rb} +2 -2
- data/spec/features/cms/hubdb/tables_api_spec.rb +1 -1
- data/spec/features/cms/perfomance/public_perfomance_api_spec.rb +8 -0
- data/spec/features/cms/site-search/{default_api_spec.rb → public_api_spec.rb} +2 -2
- data/spec/features/communication_preferences/definition_api_spec.rb +7 -0
- data/spec/features/communication_preferences/status_api_spec.rb +9 -0
- data/spec/features/crm/contacts/gdpr_api_spec.rb +8 -0
- data/spec/features/crm/objects/gdpr_api_spec.rb +8 -0
- data/spec/features/crm/owners/{default_api_spec.rb → owners_api_spec.rb} +2 -2
- data/spec/features/crm/schemas/public_object_schemas_api_spec.rb +7 -0
- data/spec/features/marketing/transactional/{default_api_spec.rb → public_smtp_tokens_api_spec.rb} +2 -3
- data/spec/features/marketing/transactional/single_send_api_spec.rb +7 -0
- data/spec/features/oauth/access_tokens_api_spec.rb +7 -0
- data/spec/features/oauth/refresh_tokens_api_spec.rb +8 -0
- data/spec/features/oauth/tokens_api_spec.rb +7 -0
- metadata +130 -82
- data/lib/hubspot/codegen/cms/hubdb/models/hub_db_table_v3_live_input.rb +0 -241
- data/lib/hubspot/codegen/crm/timeline/models/next_page.rb +0 -224
- data/lib/hubspot/codegen/crm/timeline/models/paging.rb +0 -219
- data/lib/hubspot/codegen/crm/timeline/models/previous_page.rb +0 -224
- data/lib/hubspot/codegen/oauth/api/default_api.rb +0 -270
- data/spec/codegen/cms/hubdb/models/hub_db_table_v3_live_input_spec.rb +0 -59
- data/spec/codegen/crm/timeline/models/next_page_spec.rb +0 -47
- data/spec/codegen/crm/timeline/models/paging_spec.rb +0 -47
- data/spec/codegen/crm/timeline/models/previous_page_spec.rb +0 -47
- data/spec/features/cms/perfomance/default_api_spec.rb +0 -8
- data/spec/features/crm/schemas/default_api_spec.rb +0 -7
- data/spec/features/oauth/default_api_spec.rb +0 -10
@@ -16,10 +16,10 @@ module Hubspot
|
|
16
16
|
module Cms
|
17
17
|
module SiteSearch
|
18
18
|
class SearchHitField
|
19
|
-
attr_accessor :values
|
20
|
-
|
21
19
|
attr_accessor :metadata_field
|
22
20
|
|
21
|
+
attr_accessor :values
|
22
|
+
|
23
23
|
attr_accessor :name
|
24
24
|
|
25
25
|
attr_accessor :value
|
@@ -27,8 +27,8 @@ module Hubspot
|
|
27
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
28
|
def self.attribute_map
|
29
29
|
{
|
30
|
-
:'values' => :'values',
|
31
30
|
:'metadata_field' => :'metadataField',
|
31
|
+
:'values' => :'values',
|
32
32
|
:'name' => :'name',
|
33
33
|
:'value' => :'value'
|
34
34
|
}
|
@@ -37,8 +37,8 @@ module Hubspot
|
|
37
37
|
# Attribute type mapping.
|
38
38
|
def self.openapi_types
|
39
39
|
{
|
40
|
-
:'values' => :'Array<Object>',
|
41
40
|
:'metadata_field' => :'Boolean',
|
41
|
+
:'values' => :'Array<Object>',
|
42
42
|
:'name' => :'String',
|
43
43
|
:'value' => :'Object'
|
44
44
|
}
|
@@ -65,16 +65,16 @@ module Hubspot
|
|
65
65
|
h[k.to_sym] = v
|
66
66
|
}
|
67
67
|
|
68
|
+
if attributes.key?(:'metadata_field')
|
69
|
+
self.metadata_field = attributes[:'metadata_field']
|
70
|
+
end
|
71
|
+
|
68
72
|
if attributes.key?(:'values')
|
69
73
|
if (value = attributes[:'values']).is_a?(Array)
|
70
74
|
self.values = value
|
71
75
|
end
|
72
76
|
end
|
73
77
|
|
74
|
-
if attributes.key?(:'metadata_field')
|
75
|
-
self.metadata_field = attributes[:'metadata_field']
|
76
|
-
end
|
77
|
-
|
78
78
|
if attributes.key?(:'name')
|
79
79
|
self.name = attributes[:'name']
|
80
80
|
end
|
@@ -88,14 +88,14 @@ module Hubspot
|
|
88
88
|
# @return Array for valid properties with the reasons
|
89
89
|
def list_invalid_properties
|
90
90
|
invalid_properties = Array.new
|
91
|
-
if @values.nil?
|
92
|
-
invalid_properties.push('invalid value for "values", values cannot be nil.')
|
93
|
-
end
|
94
|
-
|
95
91
|
if @metadata_field.nil?
|
96
92
|
invalid_properties.push('invalid value for "metadata_field", metadata_field cannot be nil.')
|
97
93
|
end
|
98
94
|
|
95
|
+
if @values.nil?
|
96
|
+
invalid_properties.push('invalid value for "values", values cannot be nil.')
|
97
|
+
end
|
98
|
+
|
99
99
|
if @name.nil?
|
100
100
|
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
101
101
|
end
|
@@ -110,8 +110,8 @@ module Hubspot
|
|
110
110
|
# Check to see if the all the properties in the model are valid
|
111
111
|
# @return true if the model is valid
|
112
112
|
def valid?
|
113
|
-
return false if @values.nil?
|
114
113
|
return false if @metadata_field.nil?
|
114
|
+
return false if @values.nil?
|
115
115
|
return false if @name.nil?
|
116
116
|
return false if @value.nil?
|
117
117
|
true
|
@@ -122,8 +122,8 @@ module Hubspot
|
|
122
122
|
def ==(o)
|
123
123
|
return true if self.equal?(o)
|
124
124
|
self.class == o.class &&
|
125
|
-
values == o.values &&
|
126
125
|
metadata_field == o.metadata_field &&
|
126
|
+
values == o.values &&
|
127
127
|
name == o.name &&
|
128
128
|
value == o.value
|
129
129
|
end
|
@@ -137,7 +137,7 @@ module Hubspot
|
|
137
137
|
# Calculates hash code according to all attributes.
|
138
138
|
# @return [Integer] Hash code
|
139
139
|
def hash
|
140
|
-
[
|
140
|
+
[metadata_field, values, name, value].hash
|
141
141
|
end
|
142
142
|
|
143
143
|
# Builds the object from hash
|
@@ -0,0 +1,80 @@
|
|
1
|
+
=begin
|
2
|
+
#Subscriptions
|
3
|
+
|
4
|
+
#Subscriptions allow contacts to control what forms of communications they receive. Contacts can decide whether they want to receive communication pertaining to a specific topic, brand, or an entire HubSpot account.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module CommunicationPreferences
|
17
|
+
class DefinitionApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client = ApiClient.default)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
# Get subscription definitions
|
24
|
+
# Get a list of all subscription definitions for the portal
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [SubscriptionDefinitionsResponse]
|
27
|
+
def get_page(opts = {})
|
28
|
+
data, _status_code, _headers = get_page_with_http_info(opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get subscription definitions
|
33
|
+
# Get a list of all subscription definitions for the portal
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @return [Array<(SubscriptionDefinitionsResponse, Integer, Hash)>] SubscriptionDefinitionsResponse data, response status code and response headers
|
36
|
+
def get_page_with_http_info(opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug 'Calling API: DefinitionApi.get_page ...'
|
39
|
+
end
|
40
|
+
# resource path
|
41
|
+
local_var_path = '/communication-preferences/v3/definitions'
|
42
|
+
|
43
|
+
# query parameters
|
44
|
+
query_params = opts[:query_params] || {}
|
45
|
+
|
46
|
+
# header parameters
|
47
|
+
header_params = opts[:header_params] || {}
|
48
|
+
# HTTP header 'Accept' (if needed)
|
49
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
50
|
+
|
51
|
+
# form parameters
|
52
|
+
form_params = opts[:form_params] || {}
|
53
|
+
|
54
|
+
# http body (model)
|
55
|
+
post_body = opts[:body]
|
56
|
+
|
57
|
+
# return_type
|
58
|
+
return_type = opts[:return_type] || 'SubscriptionDefinitionsResponse'
|
59
|
+
|
60
|
+
# auth_names
|
61
|
+
auth_names = opts[:auth_names] || ['hapikey']
|
62
|
+
|
63
|
+
new_options = opts.merge(
|
64
|
+
:header_params => header_params,
|
65
|
+
:query_params => query_params,
|
66
|
+
:form_params => form_params,
|
67
|
+
:body => post_body,
|
68
|
+
:auth_names => auth_names,
|
69
|
+
:return_type => return_type
|
70
|
+
)
|
71
|
+
|
72
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
73
|
+
if @api_client.config.debugging
|
74
|
+
@api_client.config.logger.debug "API called: DefinitionApi#get_page\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
75
|
+
end
|
76
|
+
return data, status_code, headers
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,214 @@
|
|
1
|
+
=begin
|
2
|
+
#Subscriptions
|
3
|
+
|
4
|
+
#Subscriptions allow contacts to control what forms of communications they receive. Contacts can decide whether they want to receive communication pertaining to a specific topic, brand, or an entire HubSpot account.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module Hubspot
|
16
|
+
module CommunicationPreferences
|
17
|
+
class StatusApi
|
18
|
+
attr_accessor :api_client
|
19
|
+
|
20
|
+
def initialize(api_client = ApiClient.default)
|
21
|
+
@api_client = api_client
|
22
|
+
end
|
23
|
+
# Get subscription statuses for a contact
|
24
|
+
# Returns a list of subscriptions and their status for a given contact.
|
25
|
+
# @param email_address [String]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [PublicSubscriptionStatusesResponse]
|
28
|
+
def get_email_status(email_address, opts = {})
|
29
|
+
data, _status_code, _headers = get_email_status_with_http_info(email_address, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Get subscription statuses for a contact
|
34
|
+
# Returns a list of subscriptions and their status for a given contact.
|
35
|
+
# @param email_address [String]
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(PublicSubscriptionStatusesResponse, Integer, Hash)>] PublicSubscriptionStatusesResponse data, response status code and response headers
|
38
|
+
def get_email_status_with_http_info(email_address, opts = {})
|
39
|
+
if @api_client.config.debugging
|
40
|
+
@api_client.config.logger.debug 'Calling API: StatusApi.get_email_status ...'
|
41
|
+
end
|
42
|
+
# verify the required parameter 'email_address' is set
|
43
|
+
if @api_client.config.client_side_validation && email_address.nil?
|
44
|
+
fail ArgumentError, "Missing the required parameter 'email_address' when calling StatusApi.get_email_status"
|
45
|
+
end
|
46
|
+
# resource path
|
47
|
+
local_var_path = '/communication-preferences/v3/status/email/{emailAddress}'.sub('{' + 'emailAddress' + '}', CGI.escape(email_address.to_s))
|
48
|
+
|
49
|
+
# query parameters
|
50
|
+
query_params = opts[:query_params] || {}
|
51
|
+
|
52
|
+
# header parameters
|
53
|
+
header_params = opts[:header_params] || {}
|
54
|
+
# HTTP header 'Accept' (if needed)
|
55
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
56
|
+
|
57
|
+
# form parameters
|
58
|
+
form_params = opts[:form_params] || {}
|
59
|
+
|
60
|
+
# http body (model)
|
61
|
+
post_body = opts[:body]
|
62
|
+
|
63
|
+
# return_type
|
64
|
+
return_type = opts[:return_type] || 'PublicSubscriptionStatusesResponse'
|
65
|
+
|
66
|
+
# auth_names
|
67
|
+
auth_names = opts[:auth_names] || ['hapikey']
|
68
|
+
|
69
|
+
new_options = opts.merge(
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => return_type
|
76
|
+
)
|
77
|
+
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: StatusApi#get_email_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
|
85
|
+
# Subscribe a contact
|
86
|
+
# Subscribes a contact to the given subscription type. This API is not valid to use for subscribing a contact at a brand or portal level and will return an error.
|
87
|
+
# @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [PublicSubscriptionStatus]
|
90
|
+
def subscribe(public_update_subscription_status_request, opts = {})
|
91
|
+
data, _status_code, _headers = subscribe_with_http_info(public_update_subscription_status_request, opts)
|
92
|
+
data
|
93
|
+
end
|
94
|
+
|
95
|
+
# Subscribe a contact
|
96
|
+
# Subscribes a contact to the given subscription type. This API is not valid to use for subscribing a contact at a brand or portal level and will return an error.
|
97
|
+
# @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @return [Array<(PublicSubscriptionStatus, Integer, Hash)>] PublicSubscriptionStatus data, response status code and response headers
|
100
|
+
def subscribe_with_http_info(public_update_subscription_status_request, opts = {})
|
101
|
+
if @api_client.config.debugging
|
102
|
+
@api_client.config.logger.debug 'Calling API: StatusApi.subscribe ...'
|
103
|
+
end
|
104
|
+
# verify the required parameter 'public_update_subscription_status_request' is set
|
105
|
+
if @api_client.config.client_side_validation && public_update_subscription_status_request.nil?
|
106
|
+
fail ArgumentError, "Missing the required parameter 'public_update_subscription_status_request' when calling StatusApi.subscribe"
|
107
|
+
end
|
108
|
+
# resource path
|
109
|
+
local_var_path = '/communication-preferences/v3/subscribe'
|
110
|
+
|
111
|
+
# query parameters
|
112
|
+
query_params = opts[:query_params] || {}
|
113
|
+
|
114
|
+
# header parameters
|
115
|
+
header_params = opts[:header_params] || {}
|
116
|
+
# HTTP header 'Accept' (if needed)
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
118
|
+
# HTTP header 'Content-Type'
|
119
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
120
|
+
|
121
|
+
# form parameters
|
122
|
+
form_params = opts[:form_params] || {}
|
123
|
+
|
124
|
+
# http body (model)
|
125
|
+
post_body = opts[:body] || @api_client.object_to_http_body(public_update_subscription_status_request)
|
126
|
+
|
127
|
+
# return_type
|
128
|
+
return_type = opts[:return_type] || 'PublicSubscriptionStatus'
|
129
|
+
|
130
|
+
# auth_names
|
131
|
+
auth_names = opts[:auth_names] || ['hapikey']
|
132
|
+
|
133
|
+
new_options = opts.merge(
|
134
|
+
:header_params => header_params,
|
135
|
+
:query_params => query_params,
|
136
|
+
:form_params => form_params,
|
137
|
+
:body => post_body,
|
138
|
+
:auth_names => auth_names,
|
139
|
+
:return_type => return_type
|
140
|
+
)
|
141
|
+
|
142
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
143
|
+
if @api_client.config.debugging
|
144
|
+
@api_client.config.logger.debug "API called: StatusApi#subscribe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
145
|
+
end
|
146
|
+
return data, status_code, headers
|
147
|
+
end
|
148
|
+
|
149
|
+
# Unsubscribe a contact
|
150
|
+
# Unsubscribes a contact from the given subscription type. This API is not valid to use for unsubscribing a contact at a brand or portal level and will return an error.
|
151
|
+
# @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
|
152
|
+
# @param [Hash] opts the optional parameters
|
153
|
+
# @return [PublicSubscriptionStatus]
|
154
|
+
def unsubscribe(public_update_subscription_status_request, opts = {})
|
155
|
+
data, _status_code, _headers = unsubscribe_with_http_info(public_update_subscription_status_request, opts)
|
156
|
+
data
|
157
|
+
end
|
158
|
+
|
159
|
+
# Unsubscribe a contact
|
160
|
+
# Unsubscribes a contact from the given subscription type. This API is not valid to use for unsubscribing a contact at a brand or portal level and will return an error.
|
161
|
+
# @param public_update_subscription_status_request [PublicUpdateSubscriptionStatusRequest]
|
162
|
+
# @param [Hash] opts the optional parameters
|
163
|
+
# @return [Array<(PublicSubscriptionStatus, Integer, Hash)>] PublicSubscriptionStatus data, response status code and response headers
|
164
|
+
def unsubscribe_with_http_info(public_update_subscription_status_request, opts = {})
|
165
|
+
if @api_client.config.debugging
|
166
|
+
@api_client.config.logger.debug 'Calling API: StatusApi.unsubscribe ...'
|
167
|
+
end
|
168
|
+
# verify the required parameter 'public_update_subscription_status_request' is set
|
169
|
+
if @api_client.config.client_side_validation && public_update_subscription_status_request.nil?
|
170
|
+
fail ArgumentError, "Missing the required parameter 'public_update_subscription_status_request' when calling StatusApi.unsubscribe"
|
171
|
+
end
|
172
|
+
# resource path
|
173
|
+
local_var_path = '/communication-preferences/v3/unsubscribe'
|
174
|
+
|
175
|
+
# query parameters
|
176
|
+
query_params = opts[:query_params] || {}
|
177
|
+
|
178
|
+
# header parameters
|
179
|
+
header_params = opts[:header_params] || {}
|
180
|
+
# HTTP header 'Accept' (if needed)
|
181
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json', '*/*'])
|
182
|
+
# HTTP header 'Content-Type'
|
183
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
184
|
+
|
185
|
+
# form parameters
|
186
|
+
form_params = opts[:form_params] || {}
|
187
|
+
|
188
|
+
# http body (model)
|
189
|
+
post_body = opts[:body] || @api_client.object_to_http_body(public_update_subscription_status_request)
|
190
|
+
|
191
|
+
# return_type
|
192
|
+
return_type = opts[:return_type] || 'PublicSubscriptionStatus'
|
193
|
+
|
194
|
+
# auth_names
|
195
|
+
auth_names = opts[:auth_names] || ['hapikey']
|
196
|
+
|
197
|
+
new_options = opts.merge(
|
198
|
+
:header_params => header_params,
|
199
|
+
:query_params => query_params,
|
200
|
+
:form_params => form_params,
|
201
|
+
:body => post_body,
|
202
|
+
:auth_names => auth_names,
|
203
|
+
:return_type => return_type
|
204
|
+
)
|
205
|
+
|
206
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
207
|
+
if @api_client.config.debugging
|
208
|
+
@api_client.config.logger.debug "API called: StatusApi#unsubscribe\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
209
|
+
end
|
210
|
+
return data, status_code, headers
|
211
|
+
end
|
212
|
+
end
|
213
|
+
end
|
214
|
+
end
|