ultracart_api 4.0.85.rc → 4.0.86.rc

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,363 @@
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 HitSessionStart
18
+ attr_accessor :bot
19
+
20
+ attr_accessor :bounce
21
+
22
+ attr_accessor :channel
23
+
24
+ attr_accessor :device_switch_detected
25
+
26
+ attr_accessor :fake_bot
27
+
28
+ attr_accessor :geolocation_country
29
+
30
+ attr_accessor :geolocation_latitude
31
+
32
+ attr_accessor :geolocation_longitude
33
+
34
+ attr_accessor :geolocation_province
35
+
36
+ attr_accessor :no_cookie_support
37
+
38
+ attr_accessor :prefetch
39
+
40
+ attr_accessor :referrer
41
+
42
+ attr_accessor :screen_height
43
+
44
+ attr_accessor :screen_width
45
+
46
+ attr_accessor :time_on_site
47
+
48
+ attr_accessor :user_agent
49
+
50
+ attr_accessor :user_ip
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'bot' => :'bot',
56
+ :'bounce' => :'bounce',
57
+ :'channel' => :'channel',
58
+ :'device_switch_detected' => :'device_switch_detected',
59
+ :'fake_bot' => :'fake_bot',
60
+ :'geolocation_country' => :'geolocation_country',
61
+ :'geolocation_latitude' => :'geolocation_latitude',
62
+ :'geolocation_longitude' => :'geolocation_longitude',
63
+ :'geolocation_province' => :'geolocation_province',
64
+ :'no_cookie_support' => :'no_cookie_support',
65
+ :'prefetch' => :'prefetch',
66
+ :'referrer' => :'referrer',
67
+ :'screen_height' => :'screen_height',
68
+ :'screen_width' => :'screen_width',
69
+ :'time_on_site' => :'time_on_Site',
70
+ :'user_agent' => :'user_agent',
71
+ :'user_ip' => :'user_ip'
72
+ }
73
+ end
74
+
75
+ # Returns all the JSON keys this model knows about
76
+ def self.acceptable_attributes
77
+ attribute_map.values
78
+ end
79
+
80
+ # Attribute type mapping.
81
+ def self.openapi_types
82
+ {
83
+ :'bot' => :'Boolean',
84
+ :'bounce' => :'Boolean',
85
+ :'channel' => :'String',
86
+ :'device_switch_detected' => :'Boolean',
87
+ :'fake_bot' => :'Boolean',
88
+ :'geolocation_country' => :'String',
89
+ :'geolocation_latitude' => :'Float',
90
+ :'geolocation_longitude' => :'Float',
91
+ :'geolocation_province' => :'String',
92
+ :'no_cookie_support' => :'Boolean',
93
+ :'prefetch' => :'Boolean',
94
+ :'referrer' => :'String',
95
+ :'screen_height' => :'Integer',
96
+ :'screen_width' => :'Integer',
97
+ :'time_on_site' => :'Float',
98
+ :'user_agent' => :'String',
99
+ :'user_ip' => :'String'
100
+ }
101
+ end
102
+
103
+ # List of attributes with nullable: true
104
+ def self.openapi_nullable
105
+ Set.new([
106
+ ])
107
+ end
108
+
109
+ # Initializes the object
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ def initialize(attributes = {})
112
+ if (!attributes.is_a?(Hash))
113
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::HitSessionStart` initialize method"
114
+ end
115
+
116
+ # check to see if the attribute exists and convert string to symbol for hash key
117
+ attributes = attributes.each_with_object({}) { |(k, v), h|
118
+ if (!self.class.attribute_map.key?(k.to_sym))
119
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::HitSessionStart`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
120
+ end
121
+ h[k.to_sym] = v
122
+ }
123
+
124
+ if attributes.key?(:'bot')
125
+ self.bot = attributes[:'bot']
126
+ end
127
+
128
+ if attributes.key?(:'bounce')
129
+ self.bounce = attributes[:'bounce']
130
+ end
131
+
132
+ if attributes.key?(:'channel')
133
+ self.channel = attributes[:'channel']
134
+ end
135
+
136
+ if attributes.key?(:'device_switch_detected')
137
+ self.device_switch_detected = attributes[:'device_switch_detected']
138
+ end
139
+
140
+ if attributes.key?(:'fake_bot')
141
+ self.fake_bot = attributes[:'fake_bot']
142
+ end
143
+
144
+ if attributes.key?(:'geolocation_country')
145
+ self.geolocation_country = attributes[:'geolocation_country']
146
+ end
147
+
148
+ if attributes.key?(:'geolocation_latitude')
149
+ self.geolocation_latitude = attributes[:'geolocation_latitude']
150
+ end
151
+
152
+ if attributes.key?(:'geolocation_longitude')
153
+ self.geolocation_longitude = attributes[:'geolocation_longitude']
154
+ end
155
+
156
+ if attributes.key?(:'geolocation_province')
157
+ self.geolocation_province = attributes[:'geolocation_province']
158
+ end
159
+
160
+ if attributes.key?(:'no_cookie_support')
161
+ self.no_cookie_support = attributes[:'no_cookie_support']
162
+ end
163
+
164
+ if attributes.key?(:'prefetch')
165
+ self.prefetch = attributes[:'prefetch']
166
+ end
167
+
168
+ if attributes.key?(:'referrer')
169
+ self.referrer = attributes[:'referrer']
170
+ end
171
+
172
+ if attributes.key?(:'screen_height')
173
+ self.screen_height = attributes[:'screen_height']
174
+ end
175
+
176
+ if attributes.key?(:'screen_width')
177
+ self.screen_width = attributes[:'screen_width']
178
+ end
179
+
180
+ if attributes.key?(:'time_on_site')
181
+ self.time_on_site = attributes[:'time_on_site']
182
+ end
183
+
184
+ if attributes.key?(:'user_agent')
185
+ self.user_agent = attributes[:'user_agent']
186
+ end
187
+
188
+ if attributes.key?(:'user_ip')
189
+ self.user_ip = attributes[:'user_ip']
190
+ end
191
+ end
192
+
193
+ # Show invalid properties with the reasons. Usually used together with valid?
194
+ # @return Array for valid properties with the reasons
195
+ def list_invalid_properties
196
+ invalid_properties = Array.new
197
+ invalid_properties
198
+ end
199
+
200
+ # Check to see if the all the properties in the model are valid
201
+ # @return true if the model is valid
202
+ def valid?
203
+ true
204
+ end
205
+
206
+ # Checks equality by comparing each attribute.
207
+ # @param [Object] Object to be compared
208
+ def ==(o)
209
+ return true if self.equal?(o)
210
+ self.class == o.class &&
211
+ bot == o.bot &&
212
+ bounce == o.bounce &&
213
+ channel == o.channel &&
214
+ device_switch_detected == o.device_switch_detected &&
215
+ fake_bot == o.fake_bot &&
216
+ geolocation_country == o.geolocation_country &&
217
+ geolocation_latitude == o.geolocation_latitude &&
218
+ geolocation_longitude == o.geolocation_longitude &&
219
+ geolocation_province == o.geolocation_province &&
220
+ no_cookie_support == o.no_cookie_support &&
221
+ prefetch == o.prefetch &&
222
+ referrer == o.referrer &&
223
+ screen_height == o.screen_height &&
224
+ screen_width == o.screen_width &&
225
+ time_on_site == o.time_on_site &&
226
+ user_agent == o.user_agent &&
227
+ user_ip == o.user_ip
228
+ end
229
+
230
+ # @see the `==` method
231
+ # @param [Object] Object to be compared
232
+ def eql?(o)
233
+ self == o
234
+ end
235
+
236
+ # Calculates hash code according to all attributes.
237
+ # @return [Integer] Hash code
238
+ def hash
239
+ [bot, bounce, channel, device_switch_detected, fake_bot, geolocation_country, geolocation_latitude, geolocation_longitude, geolocation_province, no_cookie_support, prefetch, referrer, screen_height, screen_width, time_on_site, user_agent, user_ip].hash
240
+ end
241
+
242
+ # Builds the object from hash
243
+ # @param [Hash] attributes Model attributes in the form of hash
244
+ # @return [Object] Returns the model itself
245
+ def self.build_from_hash(attributes)
246
+ new.build_from_hash(attributes)
247
+ end
248
+
249
+ # Builds the object from hash
250
+ # @param [Hash] attributes Model attributes in the form of hash
251
+ # @return [Object] Returns the model itself
252
+ def build_from_hash(attributes)
253
+ return nil unless attributes.is_a?(Hash)
254
+ attributes = attributes.transform_keys(&:to_sym)
255
+ self.class.openapi_types.each_pair do |key, type|
256
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
257
+ self.send("#{key}=", nil)
258
+ elsif type =~ /\AArray<(.*)>/i
259
+ # check to ensure the input is an array given that the attribute
260
+ # is documented as an array but the input is not
261
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
262
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
263
+ end
264
+ elsif !attributes[self.class.attribute_map[key]].nil?
265
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
266
+ end
267
+ end
268
+
269
+ self
270
+ end
271
+
272
+ # Deserializes the data based on type
273
+ # @param string type Data type
274
+ # @param string value Value to be deserialized
275
+ # @return [Object] Deserialized data
276
+ def _deserialize(type, value)
277
+ case type.to_sym
278
+ when :Time
279
+ Time.parse(value)
280
+ when :Date
281
+ Date.parse(value)
282
+ when :String
283
+ value.to_s
284
+ when :Integer
285
+ value.to_i
286
+ when :Float
287
+ value.to_f
288
+ when :Boolean
289
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
290
+ true
291
+ else
292
+ false
293
+ end
294
+ when :Object
295
+ # generic object (usually a Hash), return directly
296
+ value
297
+ when /\AArray<(?<inner_type>.+)>\z/
298
+ inner_type = Regexp.last_match[:inner_type]
299
+ value.map { |v| _deserialize(inner_type, v) }
300
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
301
+ k_type = Regexp.last_match[:k_type]
302
+ v_type = Regexp.last_match[:v_type]
303
+ {}.tap do |hash|
304
+ value.each do |k, v|
305
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
306
+ end
307
+ end
308
+ else # model
309
+ # models (e.g. Pet) or oneOf
310
+ klass = UltracartClient.const_get(type)
311
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
312
+ end
313
+ end
314
+
315
+ # Returns the string representation of the object
316
+ # @return [String] String presentation of the object
317
+ def to_s
318
+ to_hash.to_s
319
+ end
320
+
321
+ # to_body is an alias to to_hash (backward compatibility)
322
+ # @return [Hash] Returns the object in the form of hash
323
+ def to_body
324
+ to_hash
325
+ end
326
+
327
+ # Returns the object in the form of hash
328
+ # @return [Hash] Returns the object in the form of hash
329
+ def to_hash
330
+ hash = {}
331
+ self.class.attribute_map.each_pair do |attr, param|
332
+ value = self.send(attr)
333
+ if value.nil?
334
+ is_nullable = self.class.openapi_nullable.include?(attr)
335
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
336
+ end
337
+
338
+ hash[param] = _to_hash(value)
339
+ end
340
+ hash
341
+ end
342
+
343
+ # Outputs non-array value in the form of hash
344
+ # For object, use to_hash. Otherwise, just return the value
345
+ # @param [Object] value Any valid value
346
+ # @return [Hash] Returns the value in the form of hash
347
+ def _to_hash(value)
348
+ if value.is_a?(Array)
349
+ value.compact.map { |v| _to_hash(v) }
350
+ elsif value.is_a?(Hash)
351
+ {}.tap do |hash|
352
+ value.each { |k, v| hash[k] = _to_hash(v) }
353
+ end
354
+ elsif value.respond_to? :to_hash
355
+ value.to_hash
356
+ else
357
+ value
358
+ end
359
+ end
360
+
361
+ end
362
+
363
+ end
@@ -0,0 +1,345 @@
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 HitSessionUtm
18
+ attr_accessor :fb_ad_id
19
+
20
+ attr_accessor :fbclid
21
+
22
+ attr_accessor :gbraid
23
+
24
+ attr_accessor :gclid
25
+
26
+ attr_accessor :msclkid
27
+
28
+ attr_accessor :ttclid
29
+
30
+ attr_accessor :uc_message_id
31
+
32
+ attr_accessor :utm_campaign
33
+
34
+ attr_accessor :utm_content
35
+
36
+ attr_accessor :utm_id
37
+
38
+ attr_accessor :utm_medium
39
+
40
+ attr_accessor :utm_source
41
+
42
+ attr_accessor :utm_term
43
+
44
+ attr_accessor :vmcid
45
+
46
+ attr_accessor :wbraid
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'fb_ad_id' => :'fb_ad_id',
52
+ :'fbclid' => :'fbclid',
53
+ :'gbraid' => :'gbraid',
54
+ :'gclid' => :'gclid',
55
+ :'msclkid' => :'msclkid',
56
+ :'ttclid' => :'ttclid',
57
+ :'uc_message_id' => :'uc_message_id',
58
+ :'utm_campaign' => :'utm_campaign',
59
+ :'utm_content' => :'utm_content',
60
+ :'utm_id' => :'utm_id',
61
+ :'utm_medium' => :'utm_medium',
62
+ :'utm_source' => :'utm_source',
63
+ :'utm_term' => :'utm_term',
64
+ :'vmcid' => :'vmcid',
65
+ :'wbraid' => :'wbraid'
66
+ }
67
+ end
68
+
69
+ # Returns all the JSON keys this model knows about
70
+ def self.acceptable_attributes
71
+ attribute_map.values
72
+ end
73
+
74
+ # Attribute type mapping.
75
+ def self.openapi_types
76
+ {
77
+ :'fb_ad_id' => :'String',
78
+ :'fbclid' => :'String',
79
+ :'gbraid' => :'String',
80
+ :'gclid' => :'String',
81
+ :'msclkid' => :'String',
82
+ :'ttclid' => :'String',
83
+ :'uc_message_id' => :'String',
84
+ :'utm_campaign' => :'String',
85
+ :'utm_content' => :'String',
86
+ :'utm_id' => :'String',
87
+ :'utm_medium' => :'String',
88
+ :'utm_source' => :'String',
89
+ :'utm_term' => :'String',
90
+ :'vmcid' => :'String',
91
+ :'wbraid' => :'String'
92
+ }
93
+ end
94
+
95
+ # List of attributes with nullable: true
96
+ def self.openapi_nullable
97
+ Set.new([
98
+ ])
99
+ end
100
+
101
+ # Initializes the object
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ def initialize(attributes = {})
104
+ if (!attributes.is_a?(Hash))
105
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::HitSessionUtm` initialize method"
106
+ end
107
+
108
+ # check to see if the attribute exists and convert string to symbol for hash key
109
+ attributes = attributes.each_with_object({}) { |(k, v), h|
110
+ if (!self.class.attribute_map.key?(k.to_sym))
111
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::HitSessionUtm`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
112
+ end
113
+ h[k.to_sym] = v
114
+ }
115
+
116
+ if attributes.key?(:'fb_ad_id')
117
+ self.fb_ad_id = attributes[:'fb_ad_id']
118
+ end
119
+
120
+ if attributes.key?(:'fbclid')
121
+ self.fbclid = attributes[:'fbclid']
122
+ end
123
+
124
+ if attributes.key?(:'gbraid')
125
+ self.gbraid = attributes[:'gbraid']
126
+ end
127
+
128
+ if attributes.key?(:'gclid')
129
+ self.gclid = attributes[:'gclid']
130
+ end
131
+
132
+ if attributes.key?(:'msclkid')
133
+ self.msclkid = attributes[:'msclkid']
134
+ end
135
+
136
+ if attributes.key?(:'ttclid')
137
+ self.ttclid = attributes[:'ttclid']
138
+ end
139
+
140
+ if attributes.key?(:'uc_message_id')
141
+ self.uc_message_id = attributes[:'uc_message_id']
142
+ end
143
+
144
+ if attributes.key?(:'utm_campaign')
145
+ self.utm_campaign = attributes[:'utm_campaign']
146
+ end
147
+
148
+ if attributes.key?(:'utm_content')
149
+ self.utm_content = attributes[:'utm_content']
150
+ end
151
+
152
+ if attributes.key?(:'utm_id')
153
+ self.utm_id = attributes[:'utm_id']
154
+ end
155
+
156
+ if attributes.key?(:'utm_medium')
157
+ self.utm_medium = attributes[:'utm_medium']
158
+ end
159
+
160
+ if attributes.key?(:'utm_source')
161
+ self.utm_source = attributes[:'utm_source']
162
+ end
163
+
164
+ if attributes.key?(:'utm_term')
165
+ self.utm_term = attributes[:'utm_term']
166
+ end
167
+
168
+ if attributes.key?(:'vmcid')
169
+ self.vmcid = attributes[:'vmcid']
170
+ end
171
+
172
+ if attributes.key?(:'wbraid')
173
+ self.wbraid = attributes[:'wbraid']
174
+ end
175
+ end
176
+
177
+ # Show invalid properties with the reasons. Usually used together with valid?
178
+ # @return Array for valid properties with the reasons
179
+ def list_invalid_properties
180
+ invalid_properties = Array.new
181
+ invalid_properties
182
+ end
183
+
184
+ # Check to see if the all the properties in the model are valid
185
+ # @return true if the model is valid
186
+ def valid?
187
+ true
188
+ end
189
+
190
+ # Checks equality by comparing each attribute.
191
+ # @param [Object] Object to be compared
192
+ def ==(o)
193
+ return true if self.equal?(o)
194
+ self.class == o.class &&
195
+ fb_ad_id == o.fb_ad_id &&
196
+ fbclid == o.fbclid &&
197
+ gbraid == o.gbraid &&
198
+ gclid == o.gclid &&
199
+ msclkid == o.msclkid &&
200
+ ttclid == o.ttclid &&
201
+ uc_message_id == o.uc_message_id &&
202
+ utm_campaign == o.utm_campaign &&
203
+ utm_content == o.utm_content &&
204
+ utm_id == o.utm_id &&
205
+ utm_medium == o.utm_medium &&
206
+ utm_source == o.utm_source &&
207
+ utm_term == o.utm_term &&
208
+ vmcid == o.vmcid &&
209
+ wbraid == o.wbraid
210
+ end
211
+
212
+ # @see the `==` method
213
+ # @param [Object] Object to be compared
214
+ def eql?(o)
215
+ self == o
216
+ end
217
+
218
+ # Calculates hash code according to all attributes.
219
+ # @return [Integer] Hash code
220
+ def hash
221
+ [fb_ad_id, fbclid, gbraid, gclid, msclkid, ttclid, uc_message_id, utm_campaign, utm_content, utm_id, utm_medium, utm_source, utm_term, vmcid, wbraid].hash
222
+ end
223
+
224
+ # Builds the object from hash
225
+ # @param [Hash] attributes Model attributes in the form of hash
226
+ # @return [Object] Returns the model itself
227
+ def self.build_from_hash(attributes)
228
+ new.build_from_hash(attributes)
229
+ end
230
+
231
+ # Builds the object from hash
232
+ # @param [Hash] attributes Model attributes in the form of hash
233
+ # @return [Object] Returns the model itself
234
+ def build_from_hash(attributes)
235
+ return nil unless attributes.is_a?(Hash)
236
+ attributes = attributes.transform_keys(&:to_sym)
237
+ self.class.openapi_types.each_pair do |key, type|
238
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
239
+ self.send("#{key}=", nil)
240
+ elsif type =~ /\AArray<(.*)>/i
241
+ # check to ensure the input is an array given that the attribute
242
+ # is documented as an array but the input is not
243
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
244
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
245
+ end
246
+ elsif !attributes[self.class.attribute_map[key]].nil?
247
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
248
+ end
249
+ end
250
+
251
+ self
252
+ end
253
+
254
+ # Deserializes the data based on type
255
+ # @param string type Data type
256
+ # @param string value Value to be deserialized
257
+ # @return [Object] Deserialized data
258
+ def _deserialize(type, value)
259
+ case type.to_sym
260
+ when :Time
261
+ Time.parse(value)
262
+ when :Date
263
+ Date.parse(value)
264
+ when :String
265
+ value.to_s
266
+ when :Integer
267
+ value.to_i
268
+ when :Float
269
+ value.to_f
270
+ when :Boolean
271
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
272
+ true
273
+ else
274
+ false
275
+ end
276
+ when :Object
277
+ # generic object (usually a Hash), return directly
278
+ value
279
+ when /\AArray<(?<inner_type>.+)>\z/
280
+ inner_type = Regexp.last_match[:inner_type]
281
+ value.map { |v| _deserialize(inner_type, v) }
282
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
283
+ k_type = Regexp.last_match[:k_type]
284
+ v_type = Regexp.last_match[:v_type]
285
+ {}.tap do |hash|
286
+ value.each do |k, v|
287
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
288
+ end
289
+ end
290
+ else # model
291
+ # models (e.g. Pet) or oneOf
292
+ klass = UltracartClient.const_get(type)
293
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
294
+ end
295
+ end
296
+
297
+ # Returns the string representation of the object
298
+ # @return [String] String presentation of the object
299
+ def to_s
300
+ to_hash.to_s
301
+ end
302
+
303
+ # to_body is an alias to to_hash (backward compatibility)
304
+ # @return [Hash] Returns the object in the form of hash
305
+ def to_body
306
+ to_hash
307
+ end
308
+
309
+ # Returns the object in the form of hash
310
+ # @return [Hash] Returns the object in the form of hash
311
+ def to_hash
312
+ hash = {}
313
+ self.class.attribute_map.each_pair do |attr, param|
314
+ value = self.send(attr)
315
+ if value.nil?
316
+ is_nullable = self.class.openapi_nullable.include?(attr)
317
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
318
+ end
319
+
320
+ hash[param] = _to_hash(value)
321
+ end
322
+ hash
323
+ end
324
+
325
+ # Outputs non-array value in the form of hash
326
+ # For object, use to_hash. Otherwise, just return the value
327
+ # @param [Object] value Any valid value
328
+ # @return [Hash] Returns the value in the form of hash
329
+ def _to_hash(value)
330
+ if value.is_a?(Array)
331
+ value.compact.map { |v| _to_hash(v) }
332
+ elsif value.is_a?(Hash)
333
+ {}.tap do |hash|
334
+ value.each { |k, v| hash[k] = _to_hash(v) }
335
+ end
336
+ elsif value.respond_to? :to_hash
337
+ value.to_hash
338
+ else
339
+ value
340
+ end
341
+ end
342
+
343
+ end
344
+
345
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.85.rc'
14
+ VERSION = '4.0.86.rc'
15
15
  end