ultracart_api 4.1.178 → 4.1.179

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,431 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class SfvbRecording
18
+ attr_accessor :ad_platform
19
+
20
+ # Browser name from the user agent.
21
+ attr_accessor :browser
22
+
23
+ # Browser version from the user agent.
24
+ attr_accessor :browser_version
25
+
26
+ # True when the session ended in an order.
27
+ attr_accessor :converted
28
+
29
+ # Device name from the user agent.
30
+ attr_accessor :device
31
+
32
+ # When the session ended, ISO-8601 in UTC.
33
+ attr_accessor :end_timestamp
34
+
35
+ # Country the visitor was in.
36
+ attr_accessor :geolocation_country
37
+
38
+ # State or region the visitor was in.
39
+ attr_accessor :geolocation_state
40
+
41
+ # The browser language.
42
+ attr_accessor :language_iso_code
43
+
44
+ # The order placed during the session, when there was one.
45
+ attr_accessor :order_id
46
+
47
+ # Operating system from the user agent.
48
+ attr_accessor :os
49
+
50
+ # How many pages the visitor viewed.
51
+ attr_accessor :page_view_count
52
+
53
+ # The pages viewed, in order.
54
+ attr_accessor :page_views
55
+
56
+ # The domain that referred the visitor.
57
+ attr_accessor :referrer_domain
58
+
59
+ # The rrweb version that recorded the session. Replay with the same version.
60
+ attr_accessor :rrweb_version
61
+
62
+ # Identifies the recording.
63
+ attr_accessor :screen_recording_uuid
64
+
65
+ # When the session started, ISO-8601 in UTC.
66
+ attr_accessor :start_timestamp
67
+
68
+ # Seconds the visitor spent on the site.
69
+ attr_accessor :time_on_site
70
+
71
+ # utm_campaign on arrival.
72
+ attr_accessor :utm_campaign
73
+
74
+ # utm_source on arrival.
75
+ attr_accessor :utm_source
76
+
77
+ # Browser window height in pixels.
78
+ attr_accessor :window_height
79
+
80
+ # Browser window width in pixels.
81
+ attr_accessor :window_width
82
+
83
+ # Attribute mapping from ruby-style variable name to JSON key.
84
+ def self.attribute_map
85
+ {
86
+ :'ad_platform' => :'ad_platform',
87
+ :'browser' => :'browser',
88
+ :'browser_version' => :'browser_version',
89
+ :'converted' => :'converted',
90
+ :'device' => :'device',
91
+ :'end_timestamp' => :'end_timestamp',
92
+ :'geolocation_country' => :'geolocation_country',
93
+ :'geolocation_state' => :'geolocation_state',
94
+ :'language_iso_code' => :'language_iso_code',
95
+ :'order_id' => :'order_id',
96
+ :'os' => :'os',
97
+ :'page_view_count' => :'page_view_count',
98
+ :'page_views' => :'page_views',
99
+ :'referrer_domain' => :'referrer_domain',
100
+ :'rrweb_version' => :'rrweb_version',
101
+ :'screen_recording_uuid' => :'screen_recording_uuid',
102
+ :'start_timestamp' => :'start_timestamp',
103
+ :'time_on_site' => :'time_on_site',
104
+ :'utm_campaign' => :'utm_campaign',
105
+ :'utm_source' => :'utm_source',
106
+ :'window_height' => :'window_height',
107
+ :'window_width' => :'window_width'
108
+ }
109
+ end
110
+
111
+ # Returns all the JSON keys this model knows about
112
+ def self.acceptable_attributes
113
+ attribute_map.values
114
+ end
115
+
116
+ # Attribute type mapping.
117
+ def self.openapi_types
118
+ {
119
+ :'ad_platform' => :'ScreenRecordingAdPlatform',
120
+ :'browser' => :'String',
121
+ :'browser_version' => :'String',
122
+ :'converted' => :'Boolean',
123
+ :'device' => :'String',
124
+ :'end_timestamp' => :'String',
125
+ :'geolocation_country' => :'String',
126
+ :'geolocation_state' => :'String',
127
+ :'language_iso_code' => :'String',
128
+ :'order_id' => :'String',
129
+ :'os' => :'String',
130
+ :'page_view_count' => :'Integer',
131
+ :'page_views' => :'Array<SfvbRecordingPageView>',
132
+ :'referrer_domain' => :'String',
133
+ :'rrweb_version' => :'String',
134
+ :'screen_recording_uuid' => :'String',
135
+ :'start_timestamp' => :'String',
136
+ :'time_on_site' => :'Integer',
137
+ :'utm_campaign' => :'String',
138
+ :'utm_source' => :'String',
139
+ :'window_height' => :'Integer',
140
+ :'window_width' => :'Integer'
141
+ }
142
+ end
143
+
144
+ # List of attributes with nullable: true
145
+ def self.openapi_nullable
146
+ Set.new([
147
+ ])
148
+ end
149
+
150
+ # Initializes the object
151
+ # @param [Hash] attributes Model attributes in the form of hash
152
+ def initialize(attributes = {})
153
+ if (!attributes.is_a?(Hash))
154
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbRecording` initialize method"
155
+ end
156
+
157
+ # check to see if the attribute exists and convert string to symbol for hash key
158
+ attributes = attributes.each_with_object({}) { |(k, v), h|
159
+ if (!self.class.attribute_map.key?(k.to_sym))
160
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbRecording`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
161
+ end
162
+ h[k.to_sym] = v
163
+ }
164
+
165
+ if attributes.key?(:'ad_platform')
166
+ self.ad_platform = attributes[:'ad_platform']
167
+ end
168
+
169
+ if attributes.key?(:'browser')
170
+ self.browser = attributes[:'browser']
171
+ end
172
+
173
+ if attributes.key?(:'browser_version')
174
+ self.browser_version = attributes[:'browser_version']
175
+ end
176
+
177
+ if attributes.key?(:'converted')
178
+ self.converted = attributes[:'converted']
179
+ end
180
+
181
+ if attributes.key?(:'device')
182
+ self.device = attributes[:'device']
183
+ end
184
+
185
+ if attributes.key?(:'end_timestamp')
186
+ self.end_timestamp = attributes[:'end_timestamp']
187
+ end
188
+
189
+ if attributes.key?(:'geolocation_country')
190
+ self.geolocation_country = attributes[:'geolocation_country']
191
+ end
192
+
193
+ if attributes.key?(:'geolocation_state')
194
+ self.geolocation_state = attributes[:'geolocation_state']
195
+ end
196
+
197
+ if attributes.key?(:'language_iso_code')
198
+ self.language_iso_code = attributes[:'language_iso_code']
199
+ end
200
+
201
+ if attributes.key?(:'order_id')
202
+ self.order_id = attributes[:'order_id']
203
+ end
204
+
205
+ if attributes.key?(:'os')
206
+ self.os = attributes[:'os']
207
+ end
208
+
209
+ if attributes.key?(:'page_view_count')
210
+ self.page_view_count = attributes[:'page_view_count']
211
+ end
212
+
213
+ if attributes.key?(:'page_views')
214
+ if (value = attributes[:'page_views']).is_a?(Array)
215
+ self.page_views = value
216
+ end
217
+ end
218
+
219
+ if attributes.key?(:'referrer_domain')
220
+ self.referrer_domain = attributes[:'referrer_domain']
221
+ end
222
+
223
+ if attributes.key?(:'rrweb_version')
224
+ self.rrweb_version = attributes[:'rrweb_version']
225
+ end
226
+
227
+ if attributes.key?(:'screen_recording_uuid')
228
+ self.screen_recording_uuid = attributes[:'screen_recording_uuid']
229
+ end
230
+
231
+ if attributes.key?(:'start_timestamp')
232
+ self.start_timestamp = attributes[:'start_timestamp']
233
+ end
234
+
235
+ if attributes.key?(:'time_on_site')
236
+ self.time_on_site = attributes[:'time_on_site']
237
+ end
238
+
239
+ if attributes.key?(:'utm_campaign')
240
+ self.utm_campaign = attributes[:'utm_campaign']
241
+ end
242
+
243
+ if attributes.key?(:'utm_source')
244
+ self.utm_source = attributes[:'utm_source']
245
+ end
246
+
247
+ if attributes.key?(:'window_height')
248
+ self.window_height = attributes[:'window_height']
249
+ end
250
+
251
+ if attributes.key?(:'window_width')
252
+ self.window_width = attributes[:'window_width']
253
+ end
254
+ end
255
+
256
+ # Show invalid properties with the reasons. Usually used together with valid?
257
+ # @return Array for valid properties with the reasons
258
+ def list_invalid_properties
259
+ invalid_properties = Array.new
260
+ invalid_properties
261
+ end
262
+
263
+ # Check to see if the all the properties in the model are valid
264
+ # @return true if the model is valid
265
+ def valid?
266
+ true
267
+ end
268
+
269
+ # Checks equality by comparing each attribute.
270
+ # @param [Object] Object to be compared
271
+ def ==(o)
272
+ return true if self.equal?(o)
273
+ self.class == o.class &&
274
+ ad_platform == o.ad_platform &&
275
+ browser == o.browser &&
276
+ browser_version == o.browser_version &&
277
+ converted == o.converted &&
278
+ device == o.device &&
279
+ end_timestamp == o.end_timestamp &&
280
+ geolocation_country == o.geolocation_country &&
281
+ geolocation_state == o.geolocation_state &&
282
+ language_iso_code == o.language_iso_code &&
283
+ order_id == o.order_id &&
284
+ os == o.os &&
285
+ page_view_count == o.page_view_count &&
286
+ page_views == o.page_views &&
287
+ referrer_domain == o.referrer_domain &&
288
+ rrweb_version == o.rrweb_version &&
289
+ screen_recording_uuid == o.screen_recording_uuid &&
290
+ start_timestamp == o.start_timestamp &&
291
+ time_on_site == o.time_on_site &&
292
+ utm_campaign == o.utm_campaign &&
293
+ utm_source == o.utm_source &&
294
+ window_height == o.window_height &&
295
+ window_width == o.window_width
296
+ end
297
+
298
+ # @see the `==` method
299
+ # @param [Object] Object to be compared
300
+ def eql?(o)
301
+ self == o
302
+ end
303
+
304
+ # Calculates hash code according to all attributes.
305
+ # @return [Integer] Hash code
306
+ def hash
307
+ [ad_platform, browser, browser_version, converted, device, end_timestamp, geolocation_country, geolocation_state, language_iso_code, order_id, os, page_view_count, page_views, referrer_domain, rrweb_version, screen_recording_uuid, start_timestamp, time_on_site, utm_campaign, utm_source, window_height, window_width].hash
308
+ end
309
+
310
+ # Builds the object from hash
311
+ # @param [Hash] attributes Model attributes in the form of hash
312
+ # @return [Object] Returns the model itself
313
+ def self.build_from_hash(attributes)
314
+ new.build_from_hash(attributes)
315
+ end
316
+
317
+ # Builds the object from hash
318
+ # @param [Hash] attributes Model attributes in the form of hash
319
+ # @return [Object] Returns the model itself
320
+ def build_from_hash(attributes)
321
+ return nil unless attributes.is_a?(Hash)
322
+ attributes = attributes.transform_keys(&:to_sym)
323
+ self.class.openapi_types.each_pair do |key, type|
324
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
325
+ self.send("#{key}=", nil)
326
+ elsif type =~ /\AArray<(.*)>/i
327
+ # check to ensure the input is an array given that the attribute
328
+ # is documented as an array but the input is not
329
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
330
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
331
+ end
332
+ elsif !attributes[self.class.attribute_map[key]].nil?
333
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
334
+ end
335
+ end
336
+
337
+ self
338
+ end
339
+
340
+ # Deserializes the data based on type
341
+ # @param string type Data type
342
+ # @param string value Value to be deserialized
343
+ # @return [Object] Deserialized data
344
+ def _deserialize(type, value)
345
+ case type.to_sym
346
+ when :Time
347
+ Time.parse(value)
348
+ when :Date
349
+ Date.parse(value)
350
+ when :String
351
+ value.to_s
352
+ when :Integer
353
+ value.to_i
354
+ when :Float
355
+ value.to_f
356
+ when :Boolean
357
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
358
+ true
359
+ else
360
+ false
361
+ end
362
+ when :Object
363
+ # generic object (usually a Hash), return directly
364
+ value
365
+ when /\AArray<(?<inner_type>.+)>\z/
366
+ inner_type = Regexp.last_match[:inner_type]
367
+ value.map { |v| _deserialize(inner_type, v) }
368
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
369
+ k_type = Regexp.last_match[:k_type]
370
+ v_type = Regexp.last_match[:v_type]
371
+ {}.tap do |hash|
372
+ value.each do |k, v|
373
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
374
+ end
375
+ end
376
+ else # model
377
+ # models (e.g. Pet) or oneOf
378
+ klass = UltracartClient.const_get(type)
379
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
380
+ end
381
+ end
382
+
383
+ # Returns the string representation of the object
384
+ # @return [String] String presentation of the object
385
+ def to_s
386
+ to_hash.to_s
387
+ end
388
+
389
+ # to_body is an alias to to_hash (backward compatibility)
390
+ # @return [Hash] Returns the object in the form of hash
391
+ def to_body
392
+ to_hash
393
+ end
394
+
395
+ # Returns the object in the form of hash
396
+ # @return [Hash] Returns the object in the form of hash
397
+ def to_hash
398
+ hash = {}
399
+ self.class.attribute_map.each_pair do |attr, param|
400
+ value = self.send(attr)
401
+ if value.nil?
402
+ is_nullable = self.class.openapi_nullable.include?(attr)
403
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
404
+ end
405
+
406
+ hash[param] = _to_hash(value)
407
+ end
408
+ hash
409
+ end
410
+
411
+ # Outputs non-array value in the form of hash
412
+ # For object, use to_hash. Otherwise, just return the value
413
+ # @param [Object] value Any valid value
414
+ # @return [Hash] Returns the value in the form of hash
415
+ def _to_hash(value)
416
+ if value.is_a?(Array)
417
+ value.compact.map { |v| _to_hash(v) }
418
+ elsif value.is_a?(Hash)
419
+ {}.tap do |hash|
420
+ value.each { |k, v| hash[k] = _to_hash(v) }
421
+ end
422
+ elsif value.respond_to? :to_hash
423
+ value.to_hash
424
+ else
425
+ value
426
+ end
427
+ end
428
+
429
+ end
430
+
431
+ end
@@ -0,0 +1,252 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class SfvbRecordingEvent
18
+ # The event name, such as rage click, script error, checkout error or add to cart.
19
+ attr_accessor :name
20
+
21
+ # The event's parameters as name and value pairs. Omitted for input change events, whose values are what the visitor typed.
22
+ attr_accessor :params
23
+
24
+ # A short human readable summary of the event, when the recorder produced one.
25
+ attr_accessor :sub_text
26
+
27
+ # When it happened, ISO-8601 in UTC. Subtract the page view's first_event_timestamp for the offset into the replay.
28
+ attr_accessor :timestamp
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'name' => :'name',
34
+ :'params' => :'params',
35
+ :'sub_text' => :'sub_text',
36
+ :'timestamp' => :'timestamp'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'name' => :'String',
49
+ :'params' => :'Array<SfvbRecordingParameter>',
50
+ :'sub_text' => :'String',
51
+ :'timestamp' => :'String'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbRecordingEvent` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbRecordingEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'name')
77
+ self.name = attributes[:'name']
78
+ end
79
+
80
+ if attributes.key?(:'params')
81
+ if (value = attributes[:'params']).is_a?(Array)
82
+ self.params = value
83
+ end
84
+ end
85
+
86
+ if attributes.key?(:'sub_text')
87
+ self.sub_text = attributes[:'sub_text']
88
+ end
89
+
90
+ if attributes.key?(:'timestamp')
91
+ self.timestamp = attributes[:'timestamp']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ invalid_properties = Array.new
99
+ invalid_properties
100
+ end
101
+
102
+ # Check to see if the all the properties in the model are valid
103
+ # @return true if the model is valid
104
+ def valid?
105
+ true
106
+ end
107
+
108
+ # Checks equality by comparing each attribute.
109
+ # @param [Object] Object to be compared
110
+ def ==(o)
111
+ return true if self.equal?(o)
112
+ self.class == o.class &&
113
+ name == o.name &&
114
+ params == o.params &&
115
+ sub_text == o.sub_text &&
116
+ timestamp == o.timestamp
117
+ end
118
+
119
+ # @see the `==` method
120
+ # @param [Object] Object to be compared
121
+ def eql?(o)
122
+ self == o
123
+ end
124
+
125
+ # Calculates hash code according to all attributes.
126
+ # @return [Integer] Hash code
127
+ def hash
128
+ [name, params, sub_text, timestamp].hash
129
+ end
130
+
131
+ # Builds the object from hash
132
+ # @param [Hash] attributes Model attributes in the form of hash
133
+ # @return [Object] Returns the model itself
134
+ def self.build_from_hash(attributes)
135
+ new.build_from_hash(attributes)
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def build_from_hash(attributes)
142
+ return nil unless attributes.is_a?(Hash)
143
+ attributes = attributes.transform_keys(&:to_sym)
144
+ self.class.openapi_types.each_pair do |key, type|
145
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
146
+ self.send("#{key}=", nil)
147
+ elsif type =~ /\AArray<(.*)>/i
148
+ # check to ensure the input is an array given that the attribute
149
+ # is documented as an array but the input is not
150
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
151
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
152
+ end
153
+ elsif !attributes[self.class.attribute_map[key]].nil?
154
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
155
+ end
156
+ end
157
+
158
+ self
159
+ end
160
+
161
+ # Deserializes the data based on type
162
+ # @param string type Data type
163
+ # @param string value Value to be deserialized
164
+ # @return [Object] Deserialized data
165
+ def _deserialize(type, value)
166
+ case type.to_sym
167
+ when :Time
168
+ Time.parse(value)
169
+ when :Date
170
+ Date.parse(value)
171
+ when :String
172
+ value.to_s
173
+ when :Integer
174
+ value.to_i
175
+ when :Float
176
+ value.to_f
177
+ when :Boolean
178
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
+ true
180
+ else
181
+ false
182
+ end
183
+ when :Object
184
+ # generic object (usually a Hash), return directly
185
+ value
186
+ when /\AArray<(?<inner_type>.+)>\z/
187
+ inner_type = Regexp.last_match[:inner_type]
188
+ value.map { |v| _deserialize(inner_type, v) }
189
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
+ k_type = Regexp.last_match[:k_type]
191
+ v_type = Regexp.last_match[:v_type]
192
+ {}.tap do |hash|
193
+ value.each do |k, v|
194
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
+ end
196
+ end
197
+ else # model
198
+ # models (e.g. Pet) or oneOf
199
+ klass = UltracartClient.const_get(type)
200
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
201
+ end
202
+ end
203
+
204
+ # Returns the string representation of the object
205
+ # @return [String] String presentation of the object
206
+ def to_s
207
+ to_hash.to_s
208
+ end
209
+
210
+ # to_body is an alias to to_hash (backward compatibility)
211
+ # @return [Hash] Returns the object in the form of hash
212
+ def to_body
213
+ to_hash
214
+ end
215
+
216
+ # Returns the object in the form of hash
217
+ # @return [Hash] Returns the object in the form of hash
218
+ def to_hash
219
+ hash = {}
220
+ self.class.attribute_map.each_pair do |attr, param|
221
+ value = self.send(attr)
222
+ if value.nil?
223
+ is_nullable = self.class.openapi_nullable.include?(attr)
224
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
225
+ end
226
+
227
+ hash[param] = _to_hash(value)
228
+ end
229
+ hash
230
+ end
231
+
232
+ # Outputs non-array value in the form of hash
233
+ # For object, use to_hash. Otherwise, just return the value
234
+ # @param [Object] value Any valid value
235
+ # @return [Hash] Returns the value in the form of hash
236
+ def _to_hash(value)
237
+ if value.is_a?(Array)
238
+ value.compact.map { |v| _to_hash(v) }
239
+ elsif value.is_a?(Hash)
240
+ {}.tap do |hash|
241
+ value.each { |k, v| hash[k] = _to_hash(v) }
242
+ end
243
+ elsif value.respond_to? :to_hash
244
+ value.to_hash
245
+ else
246
+ value
247
+ end
248
+ end
249
+
250
+ end
251
+
252
+ end