adzerk_decision_sdk 1.0.0.pre.beta.2 → 1.0.0.pre.beta.7
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/Gemfile +1 -1
- data/Gemfile.lock +8 -10
- data/README.md +44 -4
- data/adzerk_decision_sdk.gemspec +3 -4
- data/docs/ConsentRequest.md +10 -9
- data/docs/Content.md +16 -15
- data/docs/Decision.md +28 -25
- data/docs/DecisionApi.md +30 -13
- data/docs/DecisionRequest.md +44 -33
- data/docs/DecisionResponse.md +12 -11
- data/docs/Event.md +10 -9
- data/docs/MatchedPoint.md +20 -0
- data/docs/Placement.md +46 -37
- data/docs/PricingData.md +16 -15
- data/docs/RequestLocation.md +19 -0
- data/docs/User.md +8 -7
- data/docs/UserdbApi.md +252 -140
- data/lib/adzerk_decision_sdk.rb +1 -1
- data/lib/adzerk_decision_sdk/api/decision_api.rb +5 -4
- data/lib/adzerk_decision_sdk/api/userdb_api.rb +37 -95
- data/lib/adzerk_decision_sdk/api_client.rb +50 -46
- data/lib/adzerk_decision_sdk/api_error.rb +1 -1
- data/lib/adzerk_decision_sdk/client.rb +2 -2
- data/lib/adzerk_decision_sdk/configuration.rb +39 -10
- data/lib/adzerk_decision_sdk/decision_client.rb +12 -1
- data/lib/adzerk_decision_sdk/models/consent_request.rb +19 -7
- data/lib/adzerk_decision_sdk/models/content.rb +20 -8
- data/lib/adzerk_decision_sdk/models/decision.rb +31 -8
- data/lib/adzerk_decision_sdk/models/decision_request.rb +74 -12
- data/lib/adzerk_decision_sdk/models/decision_response.rb +19 -7
- data/lib/adzerk_decision_sdk/models/event.rb +19 -7
- data/lib/adzerk_decision_sdk/models/matched_point.rb +227 -0
- data/lib/adzerk_decision_sdk/models/placement.rb +91 -12
- data/lib/adzerk_decision_sdk/models/pricing_data.rb +19 -7
- data/lib/adzerk_decision_sdk/models/{decision_data.rb → request_location.rb} +17 -44
- data/lib/adzerk_decision_sdk/models/user.rb +19 -7
- data/lib/adzerk_decision_sdk/pixel_client.rb +8 -2
- data/lib/adzerk_decision_sdk/user_db_client.rb +16 -2
- data/lib/adzerk_decision_sdk/version.rb +2 -2
- data/spec/spec_helper.rb +91 -0
- metadata +15 -33
- data/docs/DecisionData.md +0 -25
- data/pkg/adzerk_decision_sdk-1.0.0.gem +0 -0
- data/pkg/adzerk_decision_sdk-1.0.0.pre.beta.1.gem +0 -0
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module AdzerkDecisionSdk
|
16
17
|
class Placement
|
@@ -62,6 +63,15 @@ module AdzerkDecisionSdk
|
|
62
63
|
# (BETA) The name of the eCPM Partition that should be used to source eCPM data for auctions
|
63
64
|
attr_accessor :ecpm_partition
|
64
65
|
|
66
|
+
# (BETA) The names of the eCPM Partitions that should be used to source eCPM data for auctions
|
67
|
+
attr_accessor :ecpm_partitions
|
68
|
+
|
69
|
+
attr_accessor :event_multiplier
|
70
|
+
|
71
|
+
attr_accessor :skip_selection
|
72
|
+
|
73
|
+
attr_accessor :ad_query
|
74
|
+
|
65
75
|
# Attribute mapping from ruby-style variable name to JSON key.
|
66
76
|
def self.attribute_map
|
67
77
|
{
|
@@ -80,10 +90,19 @@ module AdzerkDecisionSdk
|
|
80
90
|
:'content_keys' => :'contentKeys',
|
81
91
|
:'count' => :'count',
|
82
92
|
:'proportionality' => :'proportionality',
|
83
|
-
:'ecpm_partition' => :'ecpmPartition'
|
93
|
+
:'ecpm_partition' => :'ecpmPartition',
|
94
|
+
:'ecpm_partitions' => :'ecpmPartitions',
|
95
|
+
:'event_multiplier' => :'eventMultiplier',
|
96
|
+
:'skip_selection' => :'skipSelection',
|
97
|
+
:'ad_query' => :'adQuery'
|
84
98
|
}
|
85
99
|
end
|
86
100
|
|
101
|
+
# Returns all the JSON keys this model knows about
|
102
|
+
def self.acceptable_attributes
|
103
|
+
attribute_map.values
|
104
|
+
end
|
105
|
+
|
87
106
|
# Attribute type mapping.
|
88
107
|
def self.openapi_types
|
89
108
|
{
|
@@ -102,7 +121,11 @@ module AdzerkDecisionSdk
|
|
102
121
|
:'content_keys' => :'Hash<String, Integer>',
|
103
122
|
:'count' => :'Integer',
|
104
123
|
:'proportionality' => :'Boolean',
|
105
|
-
:'ecpm_partition' => :'String'
|
124
|
+
:'ecpm_partition' => :'String',
|
125
|
+
:'ecpm_partitions' => :'Array<String>',
|
126
|
+
:'event_multiplier' => :'Integer',
|
127
|
+
:'skip_selection' => :'Boolean',
|
128
|
+
:'ad_query' => :'Object'
|
106
129
|
}
|
107
130
|
end
|
108
131
|
|
@@ -120,7 +143,11 @@ module AdzerkDecisionSdk
|
|
120
143
|
:'content_keys',
|
121
144
|
:'count',
|
122
145
|
:'proportionality',
|
123
|
-
:'ecpm_partition'
|
146
|
+
:'ecpm_partition',
|
147
|
+
:'ecpm_partitions',
|
148
|
+
:'event_multiplier',
|
149
|
+
:'skip_selection',
|
150
|
+
:'ad_query'
|
124
151
|
])
|
125
152
|
end
|
126
153
|
|
@@ -210,21 +237,63 @@ module AdzerkDecisionSdk
|
|
210
237
|
if attributes.key?(:'ecpm_partition')
|
211
238
|
self.ecpm_partition = attributes[:'ecpm_partition']
|
212
239
|
end
|
240
|
+
|
241
|
+
if attributes.key?(:'ecpm_partitions')
|
242
|
+
if (value = attributes[:'ecpm_partitions']).is_a?(Array)
|
243
|
+
self.ecpm_partitions = value
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
if attributes.key?(:'event_multiplier')
|
248
|
+
self.event_multiplier = attributes[:'event_multiplier']
|
249
|
+
end
|
250
|
+
|
251
|
+
if attributes.key?(:'skip_selection')
|
252
|
+
self.skip_selection = attributes[:'skip_selection']
|
253
|
+
end
|
254
|
+
|
255
|
+
if attributes.key?(:'ad_query')
|
256
|
+
self.ad_query = attributes[:'ad_query']
|
257
|
+
end
|
213
258
|
end
|
214
259
|
|
215
260
|
# Show invalid properties with the reasons. Usually used together with valid?
|
216
261
|
# @return Array for valid properties with the reasons
|
217
262
|
def list_invalid_properties
|
218
263
|
invalid_properties = Array.new
|
264
|
+
if !@event_multiplier.nil? && @event_multiplier > 100000000
|
265
|
+
invalid_properties.push('invalid value for "event_multiplier", must be smaller than or equal to 100000000.')
|
266
|
+
end
|
267
|
+
|
268
|
+
if !@event_multiplier.nil? && @event_multiplier < -100000000
|
269
|
+
invalid_properties.push('invalid value for "event_multiplier", must be greater than or equal to -100000000.')
|
270
|
+
end
|
271
|
+
|
219
272
|
invalid_properties
|
220
273
|
end
|
221
274
|
|
222
275
|
# Check to see if the all the properties in the model are valid
|
223
276
|
# @return true if the model is valid
|
224
277
|
def valid?
|
278
|
+
return false if !@event_multiplier.nil? && @event_multiplier > 100000000
|
279
|
+
return false if !@event_multiplier.nil? && @event_multiplier < -100000000
|
225
280
|
true
|
226
281
|
end
|
227
282
|
|
283
|
+
# Custom attribute writer method with validation
|
284
|
+
# @param [Object] event_multiplier Value to be assigned
|
285
|
+
def event_multiplier=(event_multiplier)
|
286
|
+
if !event_multiplier.nil? && event_multiplier > 100000000
|
287
|
+
fail ArgumentError, 'invalid value for "event_multiplier", must be smaller than or equal to 100000000.'
|
288
|
+
end
|
289
|
+
|
290
|
+
if !event_multiplier.nil? && event_multiplier < -100000000
|
291
|
+
fail ArgumentError, 'invalid value for "event_multiplier", must be greater than or equal to -100000000.'
|
292
|
+
end
|
293
|
+
|
294
|
+
@event_multiplier = event_multiplier
|
295
|
+
end
|
296
|
+
|
228
297
|
# Checks equality by comparing each attribute.
|
229
298
|
# @param [Object] Object to be compared
|
230
299
|
def ==(o)
|
@@ -245,7 +314,11 @@ module AdzerkDecisionSdk
|
|
245
314
|
content_keys == o.content_keys &&
|
246
315
|
count == o.count &&
|
247
316
|
proportionality == o.proportionality &&
|
248
|
-
ecpm_partition == o.ecpm_partition
|
317
|
+
ecpm_partition == o.ecpm_partition &&
|
318
|
+
ecpm_partitions == o.ecpm_partitions &&
|
319
|
+
event_multiplier == o.event_multiplier &&
|
320
|
+
skip_selection == o.skip_selection &&
|
321
|
+
ad_query == o.ad_query
|
249
322
|
end
|
250
323
|
|
251
324
|
# @see the `==` method
|
@@ -257,7 +330,7 @@ module AdzerkDecisionSdk
|
|
257
330
|
# Calculates hash code according to all attributes.
|
258
331
|
# @return [Integer] Hash code
|
259
332
|
def hash
|
260
|
-
[div_name, network_id, site_id, ad_types, zone_ids, campaign_id, flight_id, ad_id, click_url, properties, event_ids, overrides, content_keys, count, proportionality, ecpm_partition].hash
|
333
|
+
[div_name, network_id, site_id, ad_types, zone_ids, campaign_id, flight_id, ad_id, click_url, properties, event_ids, overrides, content_keys, count, proportionality, ecpm_partition, ecpm_partitions, event_multiplier, skip_selection, ad_query].hash
|
261
334
|
end
|
262
335
|
|
263
336
|
# Builds the object from hash
|
@@ -273,7 +346,9 @@ module AdzerkDecisionSdk
|
|
273
346
|
def build_from_hash(attributes)
|
274
347
|
return nil unless attributes.is_a?(Hash)
|
275
348
|
self.class.openapi_types.each_pair do |key, type|
|
276
|
-
if
|
349
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
350
|
+
self.send("#{key}=", nil)
|
351
|
+
elsif type =~ /\AArray<(.*)>/i
|
277
352
|
# check to ensure the input is an array given that the attribute
|
278
353
|
# is documented as an array but the input is not
|
279
354
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -281,7 +356,7 @@ module AdzerkDecisionSdk
|
|
281
356
|
end
|
282
357
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
283
358
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
284
|
-
end
|
359
|
+
end
|
285
360
|
end
|
286
361
|
|
287
362
|
self
|
@@ -293,8 +368,8 @@ module AdzerkDecisionSdk
|
|
293
368
|
# @return [Object] Deserialized data
|
294
369
|
def _deserialize(type, value)
|
295
370
|
case type.to_sym
|
296
|
-
when :
|
297
|
-
|
371
|
+
when :Time
|
372
|
+
Time.parse(value)
|
298
373
|
when :Date
|
299
374
|
Date.parse(value)
|
300
375
|
when :String
|
@@ -324,7 +399,9 @@ module AdzerkDecisionSdk
|
|
324
399
|
end
|
325
400
|
end
|
326
401
|
else # model
|
327
|
-
|
402
|
+
# models (e.g. Pet) or oneOf
|
403
|
+
klass = AdzerkDecisionSdk.const_get(type)
|
404
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
328
405
|
end
|
329
406
|
end
|
330
407
|
|
@@ -350,7 +427,7 @@ module AdzerkDecisionSdk
|
|
350
427
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
351
428
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
352
429
|
end
|
353
|
-
|
430
|
+
|
354
431
|
hash[param] = _to_hash(value)
|
355
432
|
end
|
356
433
|
hash
|
@@ -373,5 +450,7 @@ module AdzerkDecisionSdk
|
|
373
450
|
value
|
374
451
|
end
|
375
452
|
end
|
453
|
+
|
376
454
|
end
|
455
|
+
|
377
456
|
end
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module AdzerkDecisionSdk
|
16
17
|
class PricingData
|
@@ -35,6 +36,11 @@ module AdzerkDecisionSdk
|
|
35
36
|
}
|
36
37
|
end
|
37
38
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
40
|
+
def self.acceptable_attributes
|
41
|
+
attribute_map.values
|
42
|
+
end
|
43
|
+
|
38
44
|
# Attribute type mapping.
|
39
45
|
def self.openapi_types
|
40
46
|
{
|
@@ -138,7 +144,9 @@ module AdzerkDecisionSdk
|
|
138
144
|
def build_from_hash(attributes)
|
139
145
|
return nil unless attributes.is_a?(Hash)
|
140
146
|
self.class.openapi_types.each_pair do |key, type|
|
141
|
-
if
|
147
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
148
|
+
self.send("#{key}=", nil)
|
149
|
+
elsif type =~ /\AArray<(.*)>/i
|
142
150
|
# check to ensure the input is an array given that the attribute
|
143
151
|
# is documented as an array but the input is not
|
144
152
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -146,7 +154,7 @@ module AdzerkDecisionSdk
|
|
146
154
|
end
|
147
155
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
148
156
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
149
|
-
end
|
157
|
+
end
|
150
158
|
end
|
151
159
|
|
152
160
|
self
|
@@ -158,8 +166,8 @@ module AdzerkDecisionSdk
|
|
158
166
|
# @return [Object] Deserialized data
|
159
167
|
def _deserialize(type, value)
|
160
168
|
case type.to_sym
|
161
|
-
when :
|
162
|
-
|
169
|
+
when :Time
|
170
|
+
Time.parse(value)
|
163
171
|
when :Date
|
164
172
|
Date.parse(value)
|
165
173
|
when :String
|
@@ -189,7 +197,9 @@ module AdzerkDecisionSdk
|
|
189
197
|
end
|
190
198
|
end
|
191
199
|
else # model
|
192
|
-
|
200
|
+
# models (e.g. Pet) or oneOf
|
201
|
+
klass = AdzerkDecisionSdk.const_get(type)
|
202
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
193
203
|
end
|
194
204
|
end
|
195
205
|
|
@@ -215,7 +225,7 @@ module AdzerkDecisionSdk
|
|
215
225
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
216
226
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
217
227
|
end
|
218
|
-
|
228
|
+
|
219
229
|
hash[param] = _to_hash(value)
|
220
230
|
end
|
221
231
|
hash
|
@@ -238,5 +248,7 @@ module AdzerkDecisionSdk
|
|
238
248
|
value
|
239
249
|
end
|
240
250
|
end
|
251
|
+
|
241
252
|
end
|
253
|
+
|
242
254
|
end
|
@@ -6,43 +6,31 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module AdzerkDecisionSdk
|
16
|
-
class
|
17
|
-
attr_accessor :
|
16
|
+
class RequestLocation
|
17
|
+
attr_accessor :latitude
|
18
18
|
|
19
|
-
attr_accessor :
|
20
|
-
|
21
|
-
attr_accessor :width
|
22
|
-
|
23
|
-
attr_accessor :height
|
24
|
-
|
25
|
-
attr_accessor :custom_data
|
19
|
+
attr_accessor :longitude
|
26
20
|
|
27
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
22
|
def self.attribute_map
|
29
23
|
{
|
30
|
-
:'
|
31
|
-
:'
|
32
|
-
:'width' => :'width',
|
33
|
-
:'height' => :'height',
|
34
|
-
:'custom_data' => :'customData'
|
24
|
+
:'latitude' => :'latitude',
|
25
|
+
:'longitude' => :'longitude'
|
35
26
|
}
|
36
27
|
end
|
37
28
|
|
38
29
|
# Attribute type mapping.
|
39
30
|
def self.openapi_types
|
40
31
|
{
|
41
|
-
:'
|
42
|
-
:'
|
43
|
-
:'width' => :'Integer',
|
44
|
-
:'height' => :'Integer',
|
45
|
-
:'custom_data' => :'Object'
|
32
|
+
:'latitude' => :'String',
|
33
|
+
:'longitude' => :'String'
|
46
34
|
}
|
47
35
|
end
|
48
36
|
|
@@ -56,35 +44,23 @@ module AdzerkDecisionSdk
|
|
56
44
|
# @param [Hash] attributes Model attributes in the form of hash
|
57
45
|
def initialize(attributes = {})
|
58
46
|
if (!attributes.is_a?(Hash))
|
59
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `AdzerkDecisionSdk::
|
47
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AdzerkDecisionSdk::RequestLocation` initialize method"
|
60
48
|
end
|
61
49
|
|
62
50
|
# check to see if the attribute exists and convert string to symbol for hash key
|
63
51
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
64
52
|
if (!self.class.attribute_map.key?(k.to_sym))
|
65
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `AdzerkDecisionSdk::
|
53
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AdzerkDecisionSdk::RequestLocation`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
66
54
|
end
|
67
55
|
h[k.to_sym] = v
|
68
56
|
}
|
69
57
|
|
70
|
-
if attributes.key?(:'
|
71
|
-
self.
|
72
|
-
end
|
73
|
-
|
74
|
-
if attributes.key?(:'title')
|
75
|
-
self.title = attributes[:'title']
|
76
|
-
end
|
77
|
-
|
78
|
-
if attributes.key?(:'width')
|
79
|
-
self.width = attributes[:'width']
|
80
|
-
end
|
81
|
-
|
82
|
-
if attributes.key?(:'height')
|
83
|
-
self.height = attributes[:'height']
|
58
|
+
if attributes.key?(:'latitude')
|
59
|
+
self.latitude = attributes[:'latitude']
|
84
60
|
end
|
85
61
|
|
86
|
-
if attributes.key?(:'
|
87
|
-
self.
|
62
|
+
if attributes.key?(:'longitude')
|
63
|
+
self.longitude = attributes[:'longitude']
|
88
64
|
end
|
89
65
|
end
|
90
66
|
|
@@ -106,11 +82,8 @@ module AdzerkDecisionSdk
|
|
106
82
|
def ==(o)
|
107
83
|
return true if self.equal?(o)
|
108
84
|
self.class == o.class &&
|
109
|
-
|
110
|
-
|
111
|
-
width == o.width &&
|
112
|
-
height == o.height &&
|
113
|
-
custom_data == o.custom_data
|
85
|
+
latitude == o.latitude &&
|
86
|
+
longitude == o.longitude
|
114
87
|
end
|
115
88
|
|
116
89
|
# @see the `==` method
|
@@ -122,7 +95,7 @@ module AdzerkDecisionSdk
|
|
122
95
|
# Calculates hash code according to all attributes.
|
123
96
|
# @return [Integer] Hash code
|
124
97
|
def hash
|
125
|
-
[
|
98
|
+
[latitude, longitude].hash
|
126
99
|
end
|
127
100
|
|
128
101
|
# Builds the object from hash
|
@@ -6,11 +6,12 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 5.0.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module AdzerkDecisionSdk
|
16
17
|
# Object containing the UserKey used for [UserDB targeting](https://dev.adzerk.com/docs/userdb-1)
|
@@ -25,6 +26,11 @@ module AdzerkDecisionSdk
|
|
25
26
|
}
|
26
27
|
end
|
27
28
|
|
29
|
+
# Returns all the JSON keys this model knows about
|
30
|
+
def self.acceptable_attributes
|
31
|
+
attribute_map.values
|
32
|
+
end
|
33
|
+
|
28
34
|
# Attribute type mapping.
|
29
35
|
def self.openapi_types
|
30
36
|
{
|
@@ -104,7 +110,9 @@ module AdzerkDecisionSdk
|
|
104
110
|
def build_from_hash(attributes)
|
105
111
|
return nil unless attributes.is_a?(Hash)
|
106
112
|
self.class.openapi_types.each_pair do |key, type|
|
107
|
-
if
|
113
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
114
|
+
self.send("#{key}=", nil)
|
115
|
+
elsif type =~ /\AArray<(.*)>/i
|
108
116
|
# check to ensure the input is an array given that the attribute
|
109
117
|
# is documented as an array but the input is not
|
110
118
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -112,7 +120,7 @@ module AdzerkDecisionSdk
|
|
112
120
|
end
|
113
121
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
114
122
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
115
|
-
end
|
123
|
+
end
|
116
124
|
end
|
117
125
|
|
118
126
|
self
|
@@ -124,8 +132,8 @@ module AdzerkDecisionSdk
|
|
124
132
|
# @return [Object] Deserialized data
|
125
133
|
def _deserialize(type, value)
|
126
134
|
case type.to_sym
|
127
|
-
when :
|
128
|
-
|
135
|
+
when :Time
|
136
|
+
Time.parse(value)
|
129
137
|
when :Date
|
130
138
|
Date.parse(value)
|
131
139
|
when :String
|
@@ -155,7 +163,9 @@ module AdzerkDecisionSdk
|
|
155
163
|
end
|
156
164
|
end
|
157
165
|
else # model
|
158
|
-
|
166
|
+
# models (e.g. Pet) or oneOf
|
167
|
+
klass = AdzerkDecisionSdk.const_get(type)
|
168
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
159
169
|
end
|
160
170
|
end
|
161
171
|
|
@@ -181,7 +191,7 @@ module AdzerkDecisionSdk
|
|
181
191
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
182
192
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
183
193
|
end
|
184
|
-
|
194
|
+
|
185
195
|
hash[param] = _to_hash(value)
|
186
196
|
end
|
187
197
|
hash
|
@@ -204,5 +214,7 @@ module AdzerkDecisionSdk
|
|
204
214
|
value
|
205
215
|
end
|
206
216
|
end
|
217
|
+
|
207
218
|
end
|
219
|
+
|
208
220
|
end
|