hubspot-api-client 20.0.0.pre.beta.1 → 20.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +42 -1
- data/Gemfile.lock +2 -2
- data/hubspot-api-client.gemspec +1 -1
- data/lib/hubspot/codegen/crm/companies/api/basic_api.rb +91 -22
- data/lib/hubspot/codegen/crm/companies/api/batch_api.rb +25 -17
- data/lib/hubspot/codegen/crm/companies/api/search_api.rb +4 -0
- data/lib/hubspot/codegen/crm/companies/models/association_spec.rb +12 -0
- data/lib/hubspot/codegen/crm/companies/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/companies/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/companies/models/public_associations_for_object.rb +10 -0
- data/lib/hubspot/codegen/crm/companies/models/public_merge_input.rb +2 -0
- data/lib/hubspot/codegen/crm/companies/models/public_object_id.rb +6 -0
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input.rb +4 -0
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input_for_create.rb +250 -0
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_batch_input_upsert.rb +4 -0
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input.rb +2 -10
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_input_for_create.rb +2 -10
- data/lib/hubspot/codegen/crm/companies/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/companies/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/crm/contacts/api/basic_api.rb +163 -26
- data/lib/hubspot/codegen/crm/contacts/api/batch_api.rb +27 -19
- data/lib/hubspot/codegen/crm/contacts/api/search_api.rb +4 -0
- data/lib/hubspot/codegen/crm/contacts/models/association_spec.rb +10 -0
- data/lib/hubspot/codegen/crm/contacts/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/contacts/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/contacts/models/public_associations_for_object.rb +10 -0
- data/lib/hubspot/codegen/crm/contacts/models/public_gdpr_delete_input.rb +2 -0
- data/lib/hubspot/codegen/crm/contacts/models/public_object_id.rb +5 -0
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input.rb +2 -0
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input_for_create.rb +250 -0
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_batch_input_upsert.rb +1 -0
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input.rb +1 -10
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_input_for_create.rb +1 -10
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_object_with_associations.rb +13 -1
- data/lib/hubspot/codegen/crm/contacts/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/crm/deals/api/basic_api.rb +67 -0
- data/lib/hubspot/codegen/crm/deals/api/batch_api.rb +11 -9
- data/lib/hubspot/codegen/crm/deals/models/association_spec.rb +10 -0
- data/lib/hubspot/codegen/crm/deals/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/deals/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/deals/models/public_associations_for_object.rb +10 -0
- data/lib/hubspot/codegen/crm/deals/models/public_object_id.rb +5 -0
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input.rb +2 -0
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input_for_create.rb +250 -0
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_batch_input_upsert.rb +1 -0
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input.rb +1 -10
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_input_for_create.rb +1 -10
- data/lib/hubspot/codegen/crm/deals/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/deals/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/basic_api.rb +3 -2
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/api/batch_api.rb +2 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/objects/feedback_submissions/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/objects/goals/api/basic_api.rb +1 -0
- data/lib/hubspot/codegen/crm/objects/goals/api/batch_api.rb +11 -9
- data/lib/hubspot/codegen/crm/objects/goals/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/objects/goals/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input.rb +2 -0
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input_for_create.rb +252 -0
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_batch_input_upsert.rb +1 -0
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input.rb +1 -10
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_input_for_create.rb +1 -15
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/objects/goals/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/crm/products/api/basic_api.rb +5 -4
- data/lib/hubspot/codegen/crm/products/api/batch_api.rb +11 -9
- data/lib/hubspot/codegen/crm/products/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/products/models/batch_read_input_simple_public_object_id.rb +1 -1
- data/lib/hubspot/codegen/crm/products/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/products/models/simple_public_object_batch_input_for_create.rb +250 -0
- data/lib/hubspot/codegen/crm/products/models/simple_public_object_input.rb +1 -10
- data/lib/hubspot/codegen/crm/products/models/simple_public_object_input_for_create.rb +6 -10
- data/lib/hubspot/codegen/crm/products/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/products/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/crm/tickets/api/basic_api.rb +73 -4
- data/lib/hubspot/codegen/crm/tickets/api/batch_api.rb +17 -9
- data/lib/hubspot/codegen/crm/tickets/api/search_api.rb +4 -0
- data/lib/hubspot/codegen/crm/tickets/models/association_spec.rb +10 -0
- data/lib/hubspot/codegen/crm/tickets/models/{batch_input_simple_public_object_input_for_create.rb → batch_input_simple_public_object_batch_input_for_create.rb} +4 -4
- data/lib/hubspot/codegen/crm/tickets/models/batch_read_input_simple_public_object_id.rb +1 -0
- data/lib/hubspot/codegen/crm/tickets/models/public_associations_for_object.rb +10 -0
- data/lib/hubspot/codegen/crm/tickets/models/public_object_id.rb +5 -0
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object.rb +10 -1
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input.rb +2 -0
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input_for_create.rb +250 -0
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_batch_input_upsert.rb +1 -0
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input.rb +1 -10
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_input_for_create.rb +1 -10
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_object_with_associations.rb +10 -1
- data/lib/hubspot/codegen/crm/tickets/models/simple_public_upsert_object.rb +10 -1
- data/lib/hubspot/codegen/files/api/files_api.rb +144 -104
- data/lib/hubspot/codegen/files/api/folders_api.rb +142 -57
- data/lib/hubspot/codegen/files/api_client.rb +1 -1
- data/lib/hubspot/codegen/files/api_error.rb +1 -1
- data/lib/hubspot/codegen/files/configuration.rb +1 -1
- data/lib/hubspot/codegen/files/models/collection_response_file.rb +2 -1
- data/lib/hubspot/codegen/files/models/collection_response_folder.rb +1 -1
- data/lib/hubspot/codegen/files/models/error.rb +1 -1
- data/lib/hubspot/codegen/files/models/error_detail.rb +1 -1
- data/lib/hubspot/codegen/files/models/file.rb +33 -14
- data/lib/hubspot/codegen/files/models/file_action_response.rb +1 -1
- data/lib/hubspot/codegen/files/models/file_stat.rb +1 -1
- data/lib/hubspot/codegen/files/models/file_update_input.rb +15 -5
- data/lib/hubspot/codegen/files/models/folder.rb +12 -12
- data/lib/hubspot/codegen/files/models/folder_action_response.rb +1 -1
- data/lib/hubspot/codegen/files/models/folder_input.rb +2 -1
- data/lib/hubspot/codegen/files/models/folder_update_input.rb +6 -20
- data/lib/hubspot/codegen/files/models/folder_update_input_with_id.rb +244 -0
- data/lib/hubspot/codegen/files/models/folder_update_task_locator.rb +2 -1
- data/lib/hubspot/codegen/files/models/import_from_url_input.rb +13 -4
- data/lib/hubspot/codegen/files/models/import_from_url_task_locator.rb +2 -1
- data/lib/hubspot/codegen/files/models/next_page.rb +1 -1
- data/lib/hubspot/codegen/files/models/paging.rb +1 -1
- data/lib/hubspot/codegen/files/models/previous_page.rb +1 -1
- data/lib/hubspot/codegen/files/models/signed_url.rb +18 -17
- data/lib/hubspot/codegen/files/models/standard_error.rb +1 -1
- data/lib/hubspot/codegen/oauth/api/access_tokens_api.rb +7 -3
- data/lib/hubspot/codegen/oauth/api/refresh_tokens_api.rb +13 -5
- data/lib/hubspot/codegen/oauth/api/tokens_api.rb +5 -1
- data/lib/hubspot/codegen/oauth/api_client.rb +2 -2
- data/lib/hubspot/codegen/oauth/api_error.rb +1 -1
- data/lib/hubspot/codegen/oauth/configuration.rb +1 -1
- data/lib/hubspot/codegen/oauth/models/access_token_info_response.rb +4 -4
- data/lib/hubspot/codegen/oauth/models/error.rb +4 -4
- data/lib/hubspot/codegen/oauth/models/error_detail.rb +4 -4
- data/lib/hubspot/codegen/oauth/models/refresh_token_info_response.rb +4 -4
- data/lib/hubspot/codegen/oauth/models/token_response_if.rb +4 -4
- data/lib/hubspot/codegen/oauth/v3/api/advanced_api.rb +273 -0
- data/lib/hubspot/codegen/{cms/performance → oauth/v3}/api_client.rb +5 -5
- data/lib/hubspot/codegen/{cms/performance → oauth/v3}/api_error.rb +4 -4
- data/lib/hubspot/codegen/{cms/performance → oauth/v3}/configuration.rb +11 -4
- data/lib/hubspot/codegen/{cms/performance/models/public_performance_response.rb → oauth/v3/models/access_token_response.rb} +97 -84
- data/lib/hubspot/codegen/oauth/v3/models/client_credentials_token_response.rb +344 -0
- data/lib/hubspot/codegen/{cms/performance → oauth/v3}/models/error.rb +40 -39
- data/lib/hubspot/codegen/{cms/performance → oauth/v3}/models/error_detail.rb +32 -31
- data/lib/hubspot/codegen/oauth/v3/models/public_access_token_info_response.rb +438 -0
- data/lib/hubspot/codegen/oauth/v3/models/public_refresh_token_info_response.rb +396 -0
- data/lib/hubspot/codegen/oauth/v3/models/signed_access_token.rb +452 -0
- data/lib/hubspot/codegen/oauth/v3/models/token_info_response_base_if.rb +59 -0
- data/lib/hubspot/codegen/oauth/v3/models/token_response_if.rb +59 -0
- data/lib/hubspot/discovery/base_api_client.rb +1 -1
- data/lib/hubspot/discovery/cms/client.rb +0 -1
- data/lib/hubspot/discovery/crm/companies/client.rb +0 -1
- data/lib/hubspot/discovery/crm/contacts/client.rb +0 -2
- data/lib/hubspot/discovery/crm/deals/client.rb +0 -1
- data/lib/hubspot/discovery/crm/tickets/client.rb +0 -1
- data/lib/hubspot/discovery/oauth/api/access_tokens_api.rb +1 -1
- data/lib/hubspot/discovery/oauth/api/refresh_tokens_api.rb +1 -1
- data/lib/hubspot/discovery/oauth/api/tokens_api.rb +1 -1
- data/lib/hubspot/discovery/oauth/client.rb +7 -1
- data/lib/hubspot/discovery/{crm/deals/api/merge_api.rb → oauth/v3/api/advanced_api.rb} +3 -3
- data/lib/hubspot/discovery/{cms/performance → oauth/v3}/client.rb +4 -4
- data/lib/hubspot/helpers/association_type.rb +233 -2
- data/lib/hubspot/helpers/camel_case.rb +0 -4
- data/lib/hubspot/version.rb +1 -1
- data/spec/discovery/cms/client_spec.rb +0 -1
- data/spec/discovery/crm/companies/basic_api_spec.rb +1 -0
- data/spec/discovery/crm/contacts/basic_api_spec.rb +1 -0
- data/spec/discovery/crm/deals/basic_api_spec.rb +1 -0
- data/spec/discovery/crm/tickets/basic_api_spec.rb +1 -0
- data/spec/discovery/files/files_api_spec.rb +2 -1
- data/spec/discovery/files/folders_api_spec.rb +1 -0
- data/spec/discovery/oauth/access_tokens_api_spec.rb +1 -1
- data/spec/discovery/oauth/refresh_tokens_api_spec.rb +1 -1
- data/spec/discovery/oauth/tokens_api_spec.rb +1 -1
- data/spec/discovery/oauth/v3/advanced_api_spec.rb +36 -0
- data/spec/discovery/oauth/v3/client_spec.rb +7 -0
- metadata +160 -169
- data/lib/hubspot/codegen/cms/performance/api/public_performance_api.rb +0 -188
- data/lib/hubspot/codegen/cms/performance/models/performance_view.rb +0 -526
- data/lib/hubspot/codegen/crm/companies/api/merge_api.rb +0 -92
- data/lib/hubspot/codegen/crm/contacts/api/gdpr_api.rb +0 -94
- data/lib/hubspot/codegen/crm/contacts/api/merge_api.rb +0 -92
- data/lib/hubspot/codegen/crm/deals/api/merge_api.rb +0 -92
- data/lib/hubspot/codegen/crm/tickets/api/merge_api.rb +0 -92
- data/lib/hubspot/discovery/cms/performance/api/public_performance_api.rb +0 -13
- data/lib/hubspot/discovery/crm/companies/api/merge_api.rb +0 -13
- data/lib/hubspot/discovery/crm/contacts/api/gdpr_api.rb +0 -13
- data/lib/hubspot/discovery/crm/contacts/api/merge_api.rb +0 -13
- data/lib/hubspot/discovery/crm/tickets/api/merge_api.rb +0 -13
- data/spec/discovery/cms/performance/public_performance_api_spec.rb +0 -8
- data/spec/discovery/crm/companies/merge_api_spec.rb +0 -7
- data/spec/discovery/crm/contacts/gdpr_api_spec.rb +0 -7
- data/spec/discovery/crm/contacts/merge_api_spec.rb +0 -7
- data/spec/discovery/crm/deals/merge_api_spec.rb +0 -7
- data/spec/discovery/crm/tickets/merge_api_spec.rb +0 -7
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Auth Oauth
|
|
3
|
+
|
|
4
|
+
#Basepom for all HubSpot Projects
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v3
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.2.1
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Hubspot
|
|
17
|
+
module Oauth
|
|
18
|
+
module V3
|
|
19
|
+
class ClientCredentialsTokenResponse
|
|
20
|
+
attr_accessor :access_token
|
|
21
|
+
|
|
22
|
+
attr_accessor :expires_in
|
|
23
|
+
|
|
24
|
+
attr_accessor :hub_id
|
|
25
|
+
|
|
26
|
+
attr_accessor :id_token
|
|
27
|
+
|
|
28
|
+
attr_accessor :scopes
|
|
29
|
+
|
|
30
|
+
attr_accessor :token_type
|
|
31
|
+
|
|
32
|
+
attr_accessor :token_use
|
|
33
|
+
|
|
34
|
+
attr_accessor :user_id
|
|
35
|
+
|
|
36
|
+
class EnumAttributeValidator
|
|
37
|
+
attr_reader :datatype
|
|
38
|
+
attr_reader :allowable_values
|
|
39
|
+
|
|
40
|
+
def initialize(datatype, allowable_values)
|
|
41
|
+
@allowable_values = allowable_values.map do |value|
|
|
42
|
+
case datatype.to_s
|
|
43
|
+
when /Integer/i
|
|
44
|
+
value.to_i
|
|
45
|
+
when /Float/i
|
|
46
|
+
value.to_f
|
|
47
|
+
else
|
|
48
|
+
value
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def valid?(value)
|
|
54
|
+
!value || allowable_values.include?(value)
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
59
|
+
def self.attribute_map
|
|
60
|
+
{
|
|
61
|
+
:'access_token' => :'access_token',
|
|
62
|
+
:'expires_in' => :'expires_in',
|
|
63
|
+
:'hub_id' => :'hub_id',
|
|
64
|
+
:'id_token' => :'id_token',
|
|
65
|
+
:'scopes' => :'scopes',
|
|
66
|
+
:'token_type' => :'token_type',
|
|
67
|
+
:'token_use' => :'token_use',
|
|
68
|
+
:'user_id' => :'user_id'
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns all the JSON keys this model knows about
|
|
73
|
+
def self.acceptable_attributes
|
|
74
|
+
attribute_map.values
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Attribute type mapping.
|
|
78
|
+
def self.openapi_types
|
|
79
|
+
{
|
|
80
|
+
:'access_token' => :'String',
|
|
81
|
+
:'expires_in' => :'Integer',
|
|
82
|
+
:'hub_id' => :'Integer',
|
|
83
|
+
:'id_token' => :'String',
|
|
84
|
+
:'scopes' => :'Array<String>',
|
|
85
|
+
:'token_type' => :'String',
|
|
86
|
+
:'token_use' => :'String',
|
|
87
|
+
:'user_id' => :'Integer'
|
|
88
|
+
}
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# List of attributes with nullable: true
|
|
92
|
+
def self.openapi_nullable
|
|
93
|
+
Set.new([
|
|
94
|
+
])
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Initializes the object
|
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
99
|
+
def initialize(attributes = {})
|
|
100
|
+
if (!attributes.is_a?(Hash))
|
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Oauth::V3::ClientCredentialsTokenResponse` initialize method"
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
105
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
106
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
107
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Oauth::V3::ClientCredentialsTokenResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
108
|
+
end
|
|
109
|
+
h[k.to_sym] = v
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'access_token')
|
|
113
|
+
self.access_token = attributes[:'access_token']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'expires_in')
|
|
117
|
+
self.expires_in = attributes[:'expires_in']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'hub_id')
|
|
121
|
+
self.hub_id = attributes[:'hub_id']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'id_token')
|
|
125
|
+
self.id_token = attributes[:'id_token']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'scopes')
|
|
129
|
+
if (value = attributes[:'scopes']).is_a?(Array)
|
|
130
|
+
self.scopes = value
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'token_type')
|
|
135
|
+
self.token_type = attributes[:'token_type']
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.key?(:'token_use')
|
|
139
|
+
self.token_use = attributes[:'token_use']
|
|
140
|
+
else
|
|
141
|
+
self.token_use = 'client_credentials'
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'user_id')
|
|
145
|
+
self.user_id = attributes[:'user_id']
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
150
|
+
# @return Array for valid properties with the reasons
|
|
151
|
+
def list_invalid_properties
|
|
152
|
+
invalid_properties = Array.new
|
|
153
|
+
if @access_token.nil?
|
|
154
|
+
invalid_properties.push('invalid value for "access_token", access_token cannot be nil.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if @expires_in.nil?
|
|
158
|
+
invalid_properties.push('invalid value for "expires_in", expires_in cannot be nil.')
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if @token_type.nil?
|
|
162
|
+
invalid_properties.push('invalid value for "token_type", token_type cannot be nil.')
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if @token_use.nil?
|
|
166
|
+
invalid_properties.push('invalid value for "token_use", token_use cannot be nil.')
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
invalid_properties
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Check to see if the all the properties in the model are valid
|
|
173
|
+
# @return true if the model is valid
|
|
174
|
+
def valid?
|
|
175
|
+
return false if @access_token.nil?
|
|
176
|
+
return false if @expires_in.nil?
|
|
177
|
+
return false if @token_type.nil?
|
|
178
|
+
return false if @token_use.nil?
|
|
179
|
+
token_use_validator = EnumAttributeValidator.new('String', ["client_credentials"])
|
|
180
|
+
return false unless token_use_validator.valid?(@token_use)
|
|
181
|
+
true
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
185
|
+
# @param [Object] token_use Object to be assigned
|
|
186
|
+
def token_use=(token_use)
|
|
187
|
+
validator = EnumAttributeValidator.new('String', ["client_credentials"])
|
|
188
|
+
unless validator.valid?(token_use)
|
|
189
|
+
fail ArgumentError, "invalid value for \"token_use\", must be one of #{validator.allowable_values}."
|
|
190
|
+
end
|
|
191
|
+
@token_use = token_use
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Checks equality by comparing each attribute.
|
|
195
|
+
# @param [Object] Object to be compared
|
|
196
|
+
def ==(o)
|
|
197
|
+
return true if self.equal?(o)
|
|
198
|
+
self.class == o.class &&
|
|
199
|
+
access_token == o.access_token &&
|
|
200
|
+
expires_in == o.expires_in &&
|
|
201
|
+
hub_id == o.hub_id &&
|
|
202
|
+
id_token == o.id_token &&
|
|
203
|
+
scopes == o.scopes &&
|
|
204
|
+
token_type == o.token_type &&
|
|
205
|
+
token_use == o.token_use &&
|
|
206
|
+
user_id == o.user_id
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# @see the `==` method
|
|
210
|
+
# @param [Object] Object to be compared
|
|
211
|
+
def eql?(o)
|
|
212
|
+
self == o
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Calculates hash code according to all attributes.
|
|
216
|
+
# @return [Integer] Hash code
|
|
217
|
+
def hash
|
|
218
|
+
[access_token, expires_in, hub_id, id_token, scopes, token_type, token_use, user_id].hash
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Builds the object from hash
|
|
222
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
223
|
+
# @return [Object] Returns the model itself
|
|
224
|
+
def self.build_from_hash(attributes)
|
|
225
|
+
new.build_from_hash(attributes)
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Builds the object from hash
|
|
229
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
230
|
+
# @return [Object] Returns the model itself
|
|
231
|
+
def build_from_hash(attributes)
|
|
232
|
+
return nil unless attributes.is_a?(Hash)
|
|
233
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
234
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
235
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
236
|
+
self.send("#{key}=", nil)
|
|
237
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
238
|
+
# check to ensure the input is an array given that the attribute
|
|
239
|
+
# is documented as an array but the input is not
|
|
240
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
241
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
242
|
+
end
|
|
243
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
244
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
self
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# Deserializes the data based on type
|
|
252
|
+
# @param string type Data type
|
|
253
|
+
# @param string value Value to be deserialized
|
|
254
|
+
# @return [Object] Deserialized data
|
|
255
|
+
def _deserialize(type, value)
|
|
256
|
+
case type.to_sym
|
|
257
|
+
when :Time
|
|
258
|
+
Time.parse(value)
|
|
259
|
+
when :Date
|
|
260
|
+
Date.parse(value)
|
|
261
|
+
when :String
|
|
262
|
+
value.to_s
|
|
263
|
+
when :Integer
|
|
264
|
+
value.to_i
|
|
265
|
+
when :Float
|
|
266
|
+
value.to_f
|
|
267
|
+
when :Boolean
|
|
268
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
269
|
+
true
|
|
270
|
+
else
|
|
271
|
+
false
|
|
272
|
+
end
|
|
273
|
+
when :Object
|
|
274
|
+
# generic object (usually a Hash), return directly
|
|
275
|
+
value
|
|
276
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
277
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
278
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
279
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
280
|
+
k_type = Regexp.last_match[:k_type]
|
|
281
|
+
v_type = Regexp.last_match[:v_type]
|
|
282
|
+
{}.tap do |hash|
|
|
283
|
+
value.each do |k, v|
|
|
284
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
285
|
+
end
|
|
286
|
+
end
|
|
287
|
+
else # model
|
|
288
|
+
# models (e.g. Pet) or oneOf
|
|
289
|
+
klass = Hubspot::Oauth::V3.const_get(type)
|
|
290
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
|
+
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
end
|
|
343
|
+
end
|
|
344
|
+
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Auth Oauth
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
#Basepom for all HubSpot Projects
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v3
|
|
7
7
|
|
|
@@ -14,11 +14,12 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Hubspot
|
|
17
|
-
module
|
|
18
|
-
module
|
|
17
|
+
module Oauth
|
|
18
|
+
module V3
|
|
19
|
+
# Represents an error response returned by the API when an operation fails. This component is used in various endpoints to provide detailed information about the error encountered.
|
|
19
20
|
class Error
|
|
20
|
-
#
|
|
21
|
-
attr_accessor :
|
|
21
|
+
# The error category
|
|
22
|
+
attr_accessor :category
|
|
22
23
|
|
|
23
24
|
# Context about the error condition
|
|
24
25
|
attr_accessor :context
|
|
@@ -26,28 +27,28 @@ module Hubspot
|
|
|
26
27
|
# A unique identifier for the request. Include this value with any error reports or support tickets
|
|
27
28
|
attr_accessor :correlation_id
|
|
28
29
|
|
|
30
|
+
# further information about the error
|
|
31
|
+
attr_accessor :errors
|
|
32
|
+
|
|
29
33
|
# A map of link names to associated URIs containing documentation about the error or recommended remediation steps
|
|
30
34
|
attr_accessor :links
|
|
31
35
|
|
|
32
36
|
# A human readable message describing the error along with remediation steps where appropriate
|
|
33
37
|
attr_accessor :message
|
|
34
38
|
|
|
35
|
-
#
|
|
36
|
-
attr_accessor :
|
|
37
|
-
|
|
38
|
-
# further information about the error
|
|
39
|
-
attr_accessor :errors
|
|
39
|
+
# A specific category that contains more specific detail about the error
|
|
40
|
+
attr_accessor :sub_category
|
|
40
41
|
|
|
41
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
42
43
|
def self.attribute_map
|
|
43
44
|
{
|
|
44
|
-
:'
|
|
45
|
+
:'category' => :'category',
|
|
45
46
|
:'context' => :'context',
|
|
46
47
|
:'correlation_id' => :'correlationId',
|
|
48
|
+
:'errors' => :'errors',
|
|
47
49
|
:'links' => :'links',
|
|
48
50
|
:'message' => :'message',
|
|
49
|
-
:'
|
|
50
|
-
:'errors' => :'errors'
|
|
51
|
+
:'sub_category' => :'subCategory'
|
|
51
52
|
}
|
|
52
53
|
end
|
|
53
54
|
|
|
@@ -59,13 +60,13 @@ module Hubspot
|
|
|
59
60
|
# Attribute type mapping.
|
|
60
61
|
def self.openapi_types
|
|
61
62
|
{
|
|
62
|
-
:'
|
|
63
|
+
:'category' => :'String',
|
|
63
64
|
:'context' => :'Hash<String, Array<String>>',
|
|
64
65
|
:'correlation_id' => :'String',
|
|
66
|
+
:'errors' => :'Array<ErrorDetail>',
|
|
65
67
|
:'links' => :'Hash<String, String>',
|
|
66
68
|
:'message' => :'String',
|
|
67
|
-
:'
|
|
68
|
-
:'errors' => :'Array<ErrorDetail>'
|
|
69
|
+
:'sub_category' => :'String'
|
|
69
70
|
}
|
|
70
71
|
end
|
|
71
72
|
|
|
@@ -79,19 +80,19 @@ module Hubspot
|
|
|
79
80
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
80
81
|
def initialize(attributes = {})
|
|
81
82
|
if (!attributes.is_a?(Hash))
|
|
82
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::
|
|
83
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Oauth::V3::Error` initialize method"
|
|
83
84
|
end
|
|
84
85
|
|
|
85
86
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
86
87
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
87
88
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
88
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::
|
|
89
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Oauth::V3::Error`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
89
90
|
end
|
|
90
91
|
h[k.to_sym] = v
|
|
91
92
|
}
|
|
92
93
|
|
|
93
|
-
if attributes.key?(:'
|
|
94
|
-
self.
|
|
94
|
+
if attributes.key?(:'category')
|
|
95
|
+
self.category = attributes[:'category']
|
|
95
96
|
end
|
|
96
97
|
|
|
97
98
|
if attributes.key?(:'context')
|
|
@@ -104,6 +105,12 @@ module Hubspot
|
|
|
104
105
|
self.correlation_id = attributes[:'correlation_id']
|
|
105
106
|
end
|
|
106
107
|
|
|
108
|
+
if attributes.key?(:'errors')
|
|
109
|
+
if (value = attributes[:'errors']).is_a?(Array)
|
|
110
|
+
self.errors = value
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
107
114
|
if attributes.key?(:'links')
|
|
108
115
|
if (value = attributes[:'links']).is_a?(Hash)
|
|
109
116
|
self.links = value
|
|
@@ -114,14 +121,8 @@ module Hubspot
|
|
|
114
121
|
self.message = attributes[:'message']
|
|
115
122
|
end
|
|
116
123
|
|
|
117
|
-
if attributes.key?(:'
|
|
118
|
-
self.
|
|
119
|
-
end
|
|
120
|
-
|
|
121
|
-
if attributes.key?(:'errors')
|
|
122
|
-
if (value = attributes[:'errors']).is_a?(Array)
|
|
123
|
-
self.errors = value
|
|
124
|
-
end
|
|
124
|
+
if attributes.key?(:'sub_category')
|
|
125
|
+
self.sub_category = attributes[:'sub_category']
|
|
125
126
|
end
|
|
126
127
|
end
|
|
127
128
|
|
|
@@ -129,6 +130,10 @@ module Hubspot
|
|
|
129
130
|
# @return Array for valid properties with the reasons
|
|
130
131
|
def list_invalid_properties
|
|
131
132
|
invalid_properties = Array.new
|
|
133
|
+
if @category.nil?
|
|
134
|
+
invalid_properties.push('invalid value for "category", category cannot be nil.')
|
|
135
|
+
end
|
|
136
|
+
|
|
132
137
|
if @correlation_id.nil?
|
|
133
138
|
invalid_properties.push('invalid value for "correlation_id", correlation_id cannot be nil.')
|
|
134
139
|
end
|
|
@@ -137,19 +142,15 @@ module Hubspot
|
|
|
137
142
|
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
|
138
143
|
end
|
|
139
144
|
|
|
140
|
-
if @category.nil?
|
|
141
|
-
invalid_properties.push('invalid value for "category", category cannot be nil.')
|
|
142
|
-
end
|
|
143
|
-
|
|
144
145
|
invalid_properties
|
|
145
146
|
end
|
|
146
147
|
|
|
147
148
|
# Check to see if the all the properties in the model are valid
|
|
148
149
|
# @return true if the model is valid
|
|
149
150
|
def valid?
|
|
151
|
+
return false if @category.nil?
|
|
150
152
|
return false if @correlation_id.nil?
|
|
151
153
|
return false if @message.nil?
|
|
152
|
-
return false if @category.nil?
|
|
153
154
|
true
|
|
154
155
|
end
|
|
155
156
|
|
|
@@ -158,13 +159,13 @@ module Hubspot
|
|
|
158
159
|
def ==(o)
|
|
159
160
|
return true if self.equal?(o)
|
|
160
161
|
self.class == o.class &&
|
|
161
|
-
|
|
162
|
+
category == o.category &&
|
|
162
163
|
context == o.context &&
|
|
163
164
|
correlation_id == o.correlation_id &&
|
|
165
|
+
errors == o.errors &&
|
|
164
166
|
links == o.links &&
|
|
165
167
|
message == o.message &&
|
|
166
|
-
|
|
167
|
-
errors == o.errors
|
|
168
|
+
sub_category == o.sub_category
|
|
168
169
|
end
|
|
169
170
|
|
|
170
171
|
# @see the `==` method
|
|
@@ -176,7 +177,7 @@ module Hubspot
|
|
|
176
177
|
# Calculates hash code according to all attributes.
|
|
177
178
|
# @return [Integer] Hash code
|
|
178
179
|
def hash
|
|
179
|
-
[
|
|
180
|
+
[category, context, correlation_id, errors, links, message, sub_category].hash
|
|
180
181
|
end
|
|
181
182
|
|
|
182
183
|
# Builds the object from hash
|
|
@@ -247,7 +248,7 @@ module Hubspot
|
|
|
247
248
|
end
|
|
248
249
|
else # model
|
|
249
250
|
# models (e.g. Pet) or oneOf
|
|
250
|
-
klass = Hubspot::
|
|
251
|
+
klass = Hubspot::Oauth::V3.const_get(type)
|
|
251
252
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
252
253
|
end
|
|
253
254
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
=begin
|
|
2
|
-
#
|
|
2
|
+
#Auth Oauth
|
|
3
3
|
|
|
4
|
-
#
|
|
4
|
+
#Basepom for all HubSpot Projects
|
|
5
5
|
|
|
6
6
|
The version of the OpenAPI document: v3
|
|
7
7
|
|
|
@@ -14,32 +14,33 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Hubspot
|
|
17
|
-
module
|
|
18
|
-
module
|
|
17
|
+
module Oauth
|
|
18
|
+
module V3
|
|
19
|
+
# Represents detailed information about an error that occurred in the API. This component is used to provide additional context and specifics about errors, typically as part of an error response.
|
|
19
20
|
class ErrorDetail
|
|
20
|
-
# A specific category that contains more specific detail about the error
|
|
21
|
-
attr_accessor :sub_category
|
|
22
|
-
|
|
23
21
|
# The status code associated with the error detail
|
|
24
22
|
attr_accessor :code
|
|
25
23
|
|
|
26
|
-
# The name of the field or parameter in which the error was found.
|
|
27
|
-
attr_accessor :_in
|
|
28
|
-
|
|
29
24
|
# Context about the error condition
|
|
30
25
|
attr_accessor :context
|
|
31
26
|
|
|
27
|
+
# The name of the field or parameter in which the error was found.
|
|
28
|
+
attr_accessor :_in
|
|
29
|
+
|
|
32
30
|
# A human readable message describing the error along with remediation steps where appropriate
|
|
33
31
|
attr_accessor :message
|
|
34
32
|
|
|
33
|
+
# A specific category that contains more specific detail about the error
|
|
34
|
+
attr_accessor :sub_category
|
|
35
|
+
|
|
35
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
36
37
|
def self.attribute_map
|
|
37
38
|
{
|
|
38
|
-
:'sub_category' => :'subCategory',
|
|
39
39
|
:'code' => :'code',
|
|
40
|
-
:'_in' => :'in',
|
|
41
40
|
:'context' => :'context',
|
|
42
|
-
:'
|
|
41
|
+
:'_in' => :'in',
|
|
42
|
+
:'message' => :'message',
|
|
43
|
+
:'sub_category' => :'subCategory'
|
|
43
44
|
}
|
|
44
45
|
end
|
|
45
46
|
|
|
@@ -51,11 +52,11 @@ module Hubspot
|
|
|
51
52
|
# Attribute type mapping.
|
|
52
53
|
def self.openapi_types
|
|
53
54
|
{
|
|
54
|
-
:'sub_category' => :'String',
|
|
55
55
|
:'code' => :'String',
|
|
56
|
-
:'_in' => :'String',
|
|
57
56
|
:'context' => :'Hash<String, Array<String>>',
|
|
58
|
-
:'
|
|
57
|
+
:'_in' => :'String',
|
|
58
|
+
:'message' => :'String',
|
|
59
|
+
:'sub_category' => :'String'
|
|
59
60
|
}
|
|
60
61
|
end
|
|
61
62
|
|
|
@@ -69,38 +70,38 @@ module Hubspot
|
|
|
69
70
|
# @param [Hash] attributes Model attributes in the form of hash
|
|
70
71
|
def initialize(attributes = {})
|
|
71
72
|
if (!attributes.is_a?(Hash))
|
|
72
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::
|
|
73
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Oauth::V3::ErrorDetail` initialize method"
|
|
73
74
|
end
|
|
74
75
|
|
|
75
76
|
# check to see if the attribute exists and convert string to symbol for hash key
|
|
76
77
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
77
78
|
if (!self.class.attribute_map.key?(k.to_sym))
|
|
78
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::
|
|
79
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Oauth::V3::ErrorDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
79
80
|
end
|
|
80
81
|
h[k.to_sym] = v
|
|
81
82
|
}
|
|
82
83
|
|
|
83
|
-
if attributes.key?(:'sub_category')
|
|
84
|
-
self.sub_category = attributes[:'sub_category']
|
|
85
|
-
end
|
|
86
|
-
|
|
87
84
|
if attributes.key?(:'code')
|
|
88
85
|
self.code = attributes[:'code']
|
|
89
86
|
end
|
|
90
87
|
|
|
91
|
-
if attributes.key?(:'_in')
|
|
92
|
-
self._in = attributes[:'_in']
|
|
93
|
-
end
|
|
94
|
-
|
|
95
88
|
if attributes.key?(:'context')
|
|
96
89
|
if (value = attributes[:'context']).is_a?(Hash)
|
|
97
90
|
self.context = value
|
|
98
91
|
end
|
|
99
92
|
end
|
|
100
93
|
|
|
94
|
+
if attributes.key?(:'_in')
|
|
95
|
+
self._in = attributes[:'_in']
|
|
96
|
+
end
|
|
97
|
+
|
|
101
98
|
if attributes.key?(:'message')
|
|
102
99
|
self.message = attributes[:'message']
|
|
103
100
|
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'sub_category')
|
|
103
|
+
self.sub_category = attributes[:'sub_category']
|
|
104
|
+
end
|
|
104
105
|
end
|
|
105
106
|
|
|
106
107
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -126,11 +127,11 @@ module Hubspot
|
|
|
126
127
|
def ==(o)
|
|
127
128
|
return true if self.equal?(o)
|
|
128
129
|
self.class == o.class &&
|
|
129
|
-
sub_category == o.sub_category &&
|
|
130
130
|
code == o.code &&
|
|
131
|
-
_in == o._in &&
|
|
132
131
|
context == o.context &&
|
|
133
|
-
|
|
132
|
+
_in == o._in &&
|
|
133
|
+
message == o.message &&
|
|
134
|
+
sub_category == o.sub_category
|
|
134
135
|
end
|
|
135
136
|
|
|
136
137
|
# @see the `==` method
|
|
@@ -142,7 +143,7 @@ module Hubspot
|
|
|
142
143
|
# Calculates hash code according to all attributes.
|
|
143
144
|
# @return [Integer] Hash code
|
|
144
145
|
def hash
|
|
145
|
-
[
|
|
146
|
+
[code, context, _in, message, sub_category].hash
|
|
146
147
|
end
|
|
147
148
|
|
|
148
149
|
# Builds the object from hash
|
|
@@ -213,7 +214,7 @@ module Hubspot
|
|
|
213
214
|
end
|
|
214
215
|
else # model
|
|
215
216
|
# models (e.g. Pet) or oneOf
|
|
216
|
-
klass = Hubspot::
|
|
217
|
+
klass = Hubspot::Oauth::V3.const_get(type)
|
|
217
218
|
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
218
219
|
end
|
|
219
220
|
end
|