hubspot-api-client 20.0.0 → 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.
@@ -0,0 +1,272 @@
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
+ # 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.
20
+ class ErrorDetail
21
+ # The status code associated with the error detail
22
+ attr_accessor :code
23
+
24
+ # Context about the error condition
25
+ attr_accessor :context
26
+
27
+ # The name of the field or parameter in which the error was found.
28
+ attr_accessor :_in
29
+
30
+ # A human readable message describing the error along with remediation steps where appropriate
31
+ attr_accessor :message
32
+
33
+ # A specific category that contains more specific detail about the error
34
+ attr_accessor :sub_category
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'code' => :'code',
40
+ :'context' => :'context',
41
+ :'_in' => :'in',
42
+ :'message' => :'message',
43
+ :'sub_category' => :'subCategory'
44
+ }
45
+ end
46
+
47
+ # Returns all the JSON keys this model knows about
48
+ def self.acceptable_attributes
49
+ attribute_map.values
50
+ end
51
+
52
+ # Attribute type mapping.
53
+ def self.openapi_types
54
+ {
55
+ :'code' => :'String',
56
+ :'context' => :'Hash<String, Array<String>>',
57
+ :'_in' => :'String',
58
+ :'message' => :'String',
59
+ :'sub_category' => :'String'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Oauth::V3::ErrorDetail` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!self.class.attribute_map.key?(k.to_sym))
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
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'code')
85
+ self.code = attributes[:'code']
86
+ end
87
+
88
+ if attributes.key?(:'context')
89
+ if (value = attributes[:'context']).is_a?(Hash)
90
+ self.context = value
91
+ end
92
+ end
93
+
94
+ if attributes.key?(:'_in')
95
+ self._in = attributes[:'_in']
96
+ end
97
+
98
+ if attributes.key?(:'message')
99
+ self.message = attributes[:'message']
100
+ end
101
+
102
+ if attributes.key?(:'sub_category')
103
+ self.sub_category = attributes[:'sub_category']
104
+ end
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properties with the reasons
109
+ def list_invalid_properties
110
+ invalid_properties = Array.new
111
+ if @message.nil?
112
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
113
+ end
114
+
115
+ invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+ return false if @message.nil?
122
+ true
123
+ end
124
+
125
+ # Checks equality by comparing each attribute.
126
+ # @param [Object] Object to be compared
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ code == o.code &&
131
+ context == o.context &&
132
+ _in == o._in &&
133
+ message == o.message &&
134
+ sub_category == o.sub_category
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [code, context, _in, message, sub_category].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ new.build_from_hash(attributes)
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def build_from_hash(attributes)
160
+ return nil unless attributes.is_a?(Hash)
161
+ attributes = attributes.transform_keys(&:to_sym)
162
+ self.class.openapi_types.each_pair do |key, type|
163
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
164
+ self.send("#{key}=", nil)
165
+ elsif type =~ /\AArray<(.*)>/i
166
+ # check to ensure the input is an array given that the attribute
167
+ # is documented as an array but the input is not
168
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
169
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
170
+ end
171
+ elsif !attributes[self.class.attribute_map[key]].nil?
172
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
173
+ end
174
+ end
175
+
176
+ self
177
+ end
178
+
179
+ # Deserializes the data based on type
180
+ # @param string type Data type
181
+ # @param string value Value to be deserialized
182
+ # @return [Object] Deserialized data
183
+ def _deserialize(type, value)
184
+ case type.to_sym
185
+ when :Time
186
+ Time.parse(value)
187
+ when :Date
188
+ Date.parse(value)
189
+ when :String
190
+ value.to_s
191
+ when :Integer
192
+ value.to_i
193
+ when :Float
194
+ value.to_f
195
+ when :Boolean
196
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
197
+ true
198
+ else
199
+ false
200
+ end
201
+ when :Object
202
+ # generic object (usually a Hash), return directly
203
+ value
204
+ when /\AArray<(?<inner_type>.+)>\z/
205
+ inner_type = Regexp.last_match[:inner_type]
206
+ value.map { |v| _deserialize(inner_type, v) }
207
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
208
+ k_type = Regexp.last_match[:k_type]
209
+ v_type = Regexp.last_match[:v_type]
210
+ {}.tap do |hash|
211
+ value.each do |k, v|
212
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
213
+ end
214
+ end
215
+ else # model
216
+ # models (e.g. Pet) or oneOf
217
+ klass = Hubspot::Oauth::V3.const_get(type)
218
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
219
+ end
220
+ end
221
+
222
+ # Returns the string representation of the object
223
+ # @return [String] String presentation of the object
224
+ def to_s
225
+ to_hash.to_s
226
+ end
227
+
228
+ # to_body is an alias to to_hash (backward compatibility)
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_body
231
+ to_hash
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ if value.nil?
241
+ is_nullable = self.class.openapi_nullable.include?(attr)
242
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
243
+ end
244
+
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ # Outputs non-array value in the form of hash
251
+ # For object, use to_hash. Otherwise, just return the value
252
+ # @param [Object] value Any valid value
253
+ # @return [Hash] Returns the value in the form of hash
254
+ def _to_hash(value)
255
+ if value.is_a?(Array)
256
+ value.compact.map { |v| _to_hash(v) }
257
+ elsif value.is_a?(Hash)
258
+ {}.tap do |hash|
259
+ value.each { |k, v| hash[k] = _to_hash(v) }
260
+ end
261
+ elsif value.respond_to? :to_hash
262
+ value.to_hash
263
+ else
264
+ value
265
+ end
266
+ end
267
+
268
+ end
269
+
270
+ end
271
+ end
272
+ end
@@ -0,0 +1,438 @@
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 PublicAccessTokenInfoResponse
20
+ attr_accessor :active
21
+
22
+ attr_accessor :app_id
23
+
24
+ attr_accessor :client_id
25
+
26
+ attr_accessor :expires_in
27
+
28
+ attr_accessor :hub_domain
29
+
30
+ attr_accessor :hub_id
31
+
32
+ attr_accessor :is_private_distribution
33
+
34
+ attr_accessor :scopes
35
+
36
+ attr_accessor :signed_access_token
37
+
38
+ attr_accessor :token
39
+
40
+ attr_accessor :token_type
41
+
42
+ attr_accessor :token_use
43
+
44
+ attr_accessor :user
45
+
46
+ attr_accessor :user_id
47
+
48
+ class EnumAttributeValidator
49
+ attr_reader :datatype
50
+ attr_reader :allowable_values
51
+
52
+ def initialize(datatype, allowable_values)
53
+ @allowable_values = allowable_values.map do |value|
54
+ case datatype.to_s
55
+ when /Integer/i
56
+ value.to_i
57
+ when /Float/i
58
+ value.to_f
59
+ else
60
+ value
61
+ end
62
+ end
63
+ end
64
+
65
+ def valid?(value)
66
+ !value || allowable_values.include?(value)
67
+ end
68
+ end
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'active' => :'active',
74
+ :'app_id' => :'app_id',
75
+ :'client_id' => :'client_id',
76
+ :'expires_in' => :'expires_in',
77
+ :'hub_domain' => :'hub_domain',
78
+ :'hub_id' => :'hub_id',
79
+ :'is_private_distribution' => :'is_private_distribution',
80
+ :'scopes' => :'scopes',
81
+ :'signed_access_token' => :'signed_access_token',
82
+ :'token' => :'token',
83
+ :'token_type' => :'token_type',
84
+ :'token_use' => :'token_use',
85
+ :'user' => :'user',
86
+ :'user_id' => :'user_id'
87
+ }
88
+ end
89
+
90
+ # Returns all the JSON keys this model knows about
91
+ def self.acceptable_attributes
92
+ attribute_map.values
93
+ end
94
+
95
+ # Attribute type mapping.
96
+ def self.openapi_types
97
+ {
98
+ :'active' => :'Boolean',
99
+ :'app_id' => :'Integer',
100
+ :'client_id' => :'String',
101
+ :'expires_in' => :'Integer',
102
+ :'hub_domain' => :'String',
103
+ :'hub_id' => :'Integer',
104
+ :'is_private_distribution' => :'Boolean',
105
+ :'scopes' => :'Array<String>',
106
+ :'signed_access_token' => :'SignedAccessToken',
107
+ :'token' => :'String',
108
+ :'token_type' => :'String',
109
+ :'token_use' => :'String',
110
+ :'user' => :'String',
111
+ :'user_id' => :'Integer'
112
+ }
113
+ end
114
+
115
+ # List of attributes with nullable: true
116
+ def self.openapi_nullable
117
+ Set.new([
118
+ ])
119
+ end
120
+
121
+ # Initializes the object
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ def initialize(attributes = {})
124
+ if (!attributes.is_a?(Hash))
125
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Hubspot::Oauth::V3::PublicAccessTokenInfoResponse` initialize method"
126
+ end
127
+
128
+ # check to see if the attribute exists and convert string to symbol for hash key
129
+ attributes = attributes.each_with_object({}) { |(k, v), h|
130
+ if (!self.class.attribute_map.key?(k.to_sym))
131
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Hubspot::Oauth::V3::PublicAccessTokenInfoResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
132
+ end
133
+ h[k.to_sym] = v
134
+ }
135
+
136
+ if attributes.key?(:'active')
137
+ self.active = attributes[:'active']
138
+ end
139
+
140
+ if attributes.key?(:'app_id')
141
+ self.app_id = attributes[:'app_id']
142
+ end
143
+
144
+ if attributes.key?(:'client_id')
145
+ self.client_id = attributes[:'client_id']
146
+ end
147
+
148
+ if attributes.key?(:'expires_in')
149
+ self.expires_in = attributes[:'expires_in']
150
+ end
151
+
152
+ if attributes.key?(:'hub_domain')
153
+ self.hub_domain = attributes[:'hub_domain']
154
+ end
155
+
156
+ if attributes.key?(:'hub_id')
157
+ self.hub_id = attributes[:'hub_id']
158
+ end
159
+
160
+ if attributes.key?(:'is_private_distribution')
161
+ self.is_private_distribution = attributes[:'is_private_distribution']
162
+ end
163
+
164
+ if attributes.key?(:'scopes')
165
+ if (value = attributes[:'scopes']).is_a?(Array)
166
+ self.scopes = value
167
+ end
168
+ end
169
+
170
+ if attributes.key?(:'signed_access_token')
171
+ self.signed_access_token = attributes[:'signed_access_token']
172
+ end
173
+
174
+ if attributes.key?(:'token')
175
+ self.token = attributes[:'token']
176
+ end
177
+
178
+ if attributes.key?(:'token_type')
179
+ self.token_type = attributes[:'token_type']
180
+ end
181
+
182
+ if attributes.key?(:'token_use')
183
+ self.token_use = attributes[:'token_use']
184
+ else
185
+ self.token_use = 'access_token'
186
+ end
187
+
188
+ if attributes.key?(:'user')
189
+ self.user = attributes[:'user']
190
+ end
191
+
192
+ if attributes.key?(:'user_id')
193
+ self.user_id = attributes[:'user_id']
194
+ end
195
+ end
196
+
197
+ # Show invalid properties with the reasons. Usually used together with valid?
198
+ # @return Array for valid properties with the reasons
199
+ def list_invalid_properties
200
+ invalid_properties = Array.new
201
+ if @active.nil?
202
+ invalid_properties.push('invalid value for "active", active cannot be nil.')
203
+ end
204
+
205
+ if @app_id.nil?
206
+ invalid_properties.push('invalid value for "app_id", app_id cannot be nil.')
207
+ end
208
+
209
+ if @client_id.nil?
210
+ invalid_properties.push('invalid value for "client_id", client_id cannot be nil.')
211
+ end
212
+
213
+ if @expires_in.nil?
214
+ invalid_properties.push('invalid value for "expires_in", expires_in cannot be nil.')
215
+ end
216
+
217
+ if @hub_id.nil?
218
+ invalid_properties.push('invalid value for "hub_id", hub_id cannot be nil.')
219
+ end
220
+
221
+ if @is_private_distribution.nil?
222
+ invalid_properties.push('invalid value for "is_private_distribution", is_private_distribution cannot be nil.')
223
+ end
224
+
225
+ if @scopes.nil?
226
+ invalid_properties.push('invalid value for "scopes", scopes cannot be nil.')
227
+ end
228
+
229
+ if @signed_access_token.nil?
230
+ invalid_properties.push('invalid value for "signed_access_token", signed_access_token cannot be nil.')
231
+ end
232
+
233
+ if @token.nil?
234
+ invalid_properties.push('invalid value for "token", token cannot be nil.')
235
+ end
236
+
237
+ if @token_type.nil?
238
+ invalid_properties.push('invalid value for "token_type", token_type cannot be nil.')
239
+ end
240
+
241
+ if @token_use.nil?
242
+ invalid_properties.push('invalid value for "token_use", token_use cannot be nil.')
243
+ end
244
+
245
+ if @user_id.nil?
246
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
247
+ end
248
+
249
+ invalid_properties
250
+ end
251
+
252
+ # Check to see if the all the properties in the model are valid
253
+ # @return true if the model is valid
254
+ def valid?
255
+ return false if @active.nil?
256
+ return false if @app_id.nil?
257
+ return false if @client_id.nil?
258
+ return false if @expires_in.nil?
259
+ return false if @hub_id.nil?
260
+ return false if @is_private_distribution.nil?
261
+ return false if @scopes.nil?
262
+ return false if @signed_access_token.nil?
263
+ return false if @token.nil?
264
+ return false if @token_type.nil?
265
+ return false if @token_use.nil?
266
+ token_use_validator = EnumAttributeValidator.new('String', ["access_token"])
267
+ return false unless token_use_validator.valid?(@token_use)
268
+ return false if @user_id.nil?
269
+ true
270
+ end
271
+
272
+ # Custom attribute writer method checking allowed values (enum).
273
+ # @param [Object] token_use Object to be assigned
274
+ def token_use=(token_use)
275
+ validator = EnumAttributeValidator.new('String', ["access_token"])
276
+ unless validator.valid?(token_use)
277
+ fail ArgumentError, "invalid value for \"token_use\", must be one of #{validator.allowable_values}."
278
+ end
279
+ @token_use = token_use
280
+ end
281
+
282
+ # Checks equality by comparing each attribute.
283
+ # @param [Object] Object to be compared
284
+ def ==(o)
285
+ return true if self.equal?(o)
286
+ self.class == o.class &&
287
+ active == o.active &&
288
+ app_id == o.app_id &&
289
+ client_id == o.client_id &&
290
+ expires_in == o.expires_in &&
291
+ hub_domain == o.hub_domain &&
292
+ hub_id == o.hub_id &&
293
+ is_private_distribution == o.is_private_distribution &&
294
+ scopes == o.scopes &&
295
+ signed_access_token == o.signed_access_token &&
296
+ token == o.token &&
297
+ token_type == o.token_type &&
298
+ token_use == o.token_use &&
299
+ user == o.user &&
300
+ user_id == o.user_id
301
+ end
302
+
303
+ # @see the `==` method
304
+ # @param [Object] Object to be compared
305
+ def eql?(o)
306
+ self == o
307
+ end
308
+
309
+ # Calculates hash code according to all attributes.
310
+ # @return [Integer] Hash code
311
+ def hash
312
+ [active, app_id, client_id, expires_in, hub_domain, hub_id, is_private_distribution, scopes, signed_access_token, token, token_type, token_use, user, user_id].hash
313
+ end
314
+
315
+ # Builds the object from hash
316
+ # @param [Hash] attributes Model attributes in the form of hash
317
+ # @return [Object] Returns the model itself
318
+ def self.build_from_hash(attributes)
319
+ new.build_from_hash(attributes)
320
+ end
321
+
322
+ # Builds the object from hash
323
+ # @param [Hash] attributes Model attributes in the form of hash
324
+ # @return [Object] Returns the model itself
325
+ def build_from_hash(attributes)
326
+ return nil unless attributes.is_a?(Hash)
327
+ attributes = attributes.transform_keys(&:to_sym)
328
+ self.class.openapi_types.each_pair do |key, type|
329
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
330
+ self.send("#{key}=", nil)
331
+ elsif type =~ /\AArray<(.*)>/i
332
+ # check to ensure the input is an array given that the attribute
333
+ # is documented as an array but the input is not
334
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
335
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
336
+ end
337
+ elsif !attributes[self.class.attribute_map[key]].nil?
338
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
339
+ end
340
+ end
341
+
342
+ self
343
+ end
344
+
345
+ # Deserializes the data based on type
346
+ # @param string type Data type
347
+ # @param string value Value to be deserialized
348
+ # @return [Object] Deserialized data
349
+ def _deserialize(type, value)
350
+ case type.to_sym
351
+ when :Time
352
+ Time.parse(value)
353
+ when :Date
354
+ Date.parse(value)
355
+ when :String
356
+ value.to_s
357
+ when :Integer
358
+ value.to_i
359
+ when :Float
360
+ value.to_f
361
+ when :Boolean
362
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
363
+ true
364
+ else
365
+ false
366
+ end
367
+ when :Object
368
+ # generic object (usually a Hash), return directly
369
+ value
370
+ when /\AArray<(?<inner_type>.+)>\z/
371
+ inner_type = Regexp.last_match[:inner_type]
372
+ value.map { |v| _deserialize(inner_type, v) }
373
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
374
+ k_type = Regexp.last_match[:k_type]
375
+ v_type = Regexp.last_match[:v_type]
376
+ {}.tap do |hash|
377
+ value.each do |k, v|
378
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
379
+ end
380
+ end
381
+ else # model
382
+ # models (e.g. Pet) or oneOf
383
+ klass = Hubspot::Oauth::V3.const_get(type)
384
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
385
+ end
386
+ end
387
+
388
+ # Returns the string representation of the object
389
+ # @return [String] String presentation of the object
390
+ def to_s
391
+ to_hash.to_s
392
+ end
393
+
394
+ # to_body is an alias to to_hash (backward compatibility)
395
+ # @return [Hash] Returns the object in the form of hash
396
+ def to_body
397
+ to_hash
398
+ end
399
+
400
+ # Returns the object in the form of hash
401
+ # @return [Hash] Returns the object in the form of hash
402
+ def to_hash
403
+ hash = {}
404
+ self.class.attribute_map.each_pair do |attr, param|
405
+ value = self.send(attr)
406
+ if value.nil?
407
+ is_nullable = self.class.openapi_nullable.include?(attr)
408
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
409
+ end
410
+
411
+ hash[param] = _to_hash(value)
412
+ end
413
+ hash
414
+ end
415
+
416
+ # Outputs non-array value in the form of hash
417
+ # For object, use to_hash. Otherwise, just return the value
418
+ # @param [Object] value Any valid value
419
+ # @return [Hash] Returns the value in the form of hash
420
+ def _to_hash(value)
421
+ if value.is_a?(Array)
422
+ value.compact.map { |v| _to_hash(v) }
423
+ elsif value.is_a?(Hash)
424
+ {}.tap do |hash|
425
+ value.each { |k, v| hash[k] = _to_hash(v) }
426
+ end
427
+ elsif value.respond_to? :to_hash
428
+ value.to_hash
429
+ else
430
+ value
431
+ end
432
+ end
433
+
434
+ end
435
+
436
+ end
437
+ end
438
+ end