adzerk_decision_sdk 1.0.0.pre.beta.6 → 1.0.0.pre.beta.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -7
- data/README.md +58 -4
- data/adzerk_decision_sdk.gemspec +3 -4
- data/docs/ConsentRequest.md +10 -9
- data/docs/Content.md +16 -15
- data/docs/Decision.md +30 -27
- data/docs/DecisionApi.md +30 -13
- data/docs/DecisionRequest.md +44 -41
- data/docs/DecisionResponse.md +12 -11
- data/docs/Event.md +10 -9
- data/docs/MatchedPoint.md +10 -9
- data/docs/Placement.md +50 -45
- data/docs/PricingData.md +16 -15
- data/docs/User.md +8 -7
- data/docs/UserdbApi.md +259 -98
- data/lib/adzerk_decision_sdk/api/decision_api.rb +5 -4
- data/lib/adzerk_decision_sdk/api/userdb_api.rb +37 -28
- data/lib/adzerk_decision_sdk/api_client.rb +50 -48
- data/lib/adzerk_decision_sdk/api_error.rb +1 -1
- data/lib/adzerk_decision_sdk/client.rb +2 -1
- data/lib/adzerk_decision_sdk/configuration.rb +39 -10
- data/lib/adzerk_decision_sdk/decision_client.rb +6 -6
- data/lib/adzerk_decision_sdk/models/consent_request.rb +19 -7
- data/lib/adzerk_decision_sdk/models/content.rb +19 -7
- data/lib/adzerk_decision_sdk/models/decision.rb +29 -8
- data/lib/adzerk_decision_sdk/models/decision_request.rb +32 -10
- 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 +19 -7
- data/lib/adzerk_decision_sdk/models/placement.rb +44 -12
- data/lib/adzerk_decision_sdk/models/pricing_data.rb +19 -7
- data/lib/adzerk_decision_sdk/models/user.rb +19 -7
- data/lib/adzerk_decision_sdk/user_db_client.rb +2 -2
- data/lib/adzerk_decision_sdk/version.rb +1 -1
- data/openapitools.json +7 -0
- data/spec/spec_helper.rb +91 -0
- metadata +12 -30
- data/pkg/adzerk_decision_sdk-1.0.0.pre.beta.3.gem +0 -0
@@ -6,16 +6,19 @@
|
|
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.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module AdzerkDecisionSdk
|
16
17
|
class Decision
|
17
18
|
attr_accessor :ad_id
|
18
19
|
|
20
|
+
attr_accessor :advertiser_id
|
21
|
+
|
19
22
|
attr_accessor :creative_id
|
20
23
|
|
21
24
|
attr_accessor :flight_id
|
@@ -40,6 +43,7 @@ module AdzerkDecisionSdk
|
|
40
43
|
def self.attribute_map
|
41
44
|
{
|
42
45
|
:'ad_id' => :'adId',
|
46
|
+
:'advertiser_id' => :'advertiserId',
|
43
47
|
:'creative_id' => :'creativeId',
|
44
48
|
:'flight_id' => :'flightId',
|
45
49
|
:'campaign_id' => :'campaignId',
|
@@ -53,10 +57,16 @@ module AdzerkDecisionSdk
|
|
53
57
|
}
|
54
58
|
end
|
55
59
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
61
|
+
def self.acceptable_attributes
|
62
|
+
attribute_map.values
|
63
|
+
end
|
64
|
+
|
56
65
|
# Attribute type mapping.
|
57
66
|
def self.openapi_types
|
58
67
|
{
|
59
68
|
:'ad_id' => :'Integer',
|
69
|
+
:'advertiser_id' => :'Integer',
|
60
70
|
:'creative_id' => :'Integer',
|
61
71
|
:'flight_id' => :'Integer',
|
62
72
|
:'campaign_id' => :'Integer',
|
@@ -95,6 +105,10 @@ module AdzerkDecisionSdk
|
|
95
105
|
self.ad_id = attributes[:'ad_id']
|
96
106
|
end
|
97
107
|
|
108
|
+
if attributes.key?(:'advertiser_id')
|
109
|
+
self.advertiser_id = attributes[:'advertiser_id']
|
110
|
+
end
|
111
|
+
|
98
112
|
if attributes.key?(:'creative_id')
|
99
113
|
self.creative_id = attributes[:'creative_id']
|
100
114
|
end
|
@@ -161,6 +175,7 @@ module AdzerkDecisionSdk
|
|
161
175
|
return true if self.equal?(o)
|
162
176
|
self.class == o.class &&
|
163
177
|
ad_id == o.ad_id &&
|
178
|
+
advertiser_id == o.advertiser_id &&
|
164
179
|
creative_id == o.creative_id &&
|
165
180
|
flight_id == o.flight_id &&
|
166
181
|
campaign_id == o.campaign_id &&
|
@@ -182,7 +197,7 @@ module AdzerkDecisionSdk
|
|
182
197
|
# Calculates hash code according to all attributes.
|
183
198
|
# @return [Integer] Hash code
|
184
199
|
def hash
|
185
|
-
[ad_id, creative_id, flight_id, campaign_id, priority_id, click_url, contents, impression_url, events, matched_points, pricing].hash
|
200
|
+
[ad_id, advertiser_id, creative_id, flight_id, campaign_id, priority_id, click_url, contents, impression_url, events, matched_points, pricing].hash
|
186
201
|
end
|
187
202
|
|
188
203
|
# Builds the object from hash
|
@@ -198,7 +213,9 @@ module AdzerkDecisionSdk
|
|
198
213
|
def build_from_hash(attributes)
|
199
214
|
return nil unless attributes.is_a?(Hash)
|
200
215
|
self.class.openapi_types.each_pair do |key, type|
|
201
|
-
if
|
216
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
217
|
+
self.send("#{key}=", nil)
|
218
|
+
elsif type =~ /\AArray<(.*)>/i
|
202
219
|
# check to ensure the input is an array given that the attribute
|
203
220
|
# is documented as an array but the input is not
|
204
221
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -206,7 +223,7 @@ module AdzerkDecisionSdk
|
|
206
223
|
end
|
207
224
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
208
225
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
209
|
-
end
|
226
|
+
end
|
210
227
|
end
|
211
228
|
|
212
229
|
self
|
@@ -218,8 +235,8 @@ module AdzerkDecisionSdk
|
|
218
235
|
# @return [Object] Deserialized data
|
219
236
|
def _deserialize(type, value)
|
220
237
|
case type.to_sym
|
221
|
-
when :
|
222
|
-
|
238
|
+
when :Time
|
239
|
+
Time.parse(value)
|
223
240
|
when :Date
|
224
241
|
Date.parse(value)
|
225
242
|
when :String
|
@@ -249,7 +266,9 @@ module AdzerkDecisionSdk
|
|
249
266
|
end
|
250
267
|
end
|
251
268
|
else # model
|
252
|
-
|
269
|
+
# models (e.g. Pet) or oneOf
|
270
|
+
klass = AdzerkDecisionSdk.const_get(type)
|
271
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
253
272
|
end
|
254
273
|
end
|
255
274
|
|
@@ -275,7 +294,7 @@ module AdzerkDecisionSdk
|
|
275
294
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
276
295
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
277
296
|
end
|
278
|
-
|
297
|
+
|
279
298
|
hash[param] = _to_hash(value)
|
280
299
|
end
|
281
300
|
hash
|
@@ -298,5 +317,7 @@ module AdzerkDecisionSdk
|
|
298
317
|
value
|
299
318
|
end
|
300
319
|
end
|
320
|
+
|
301
321
|
end
|
322
|
+
|
302
323
|
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.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module AdzerkDecisionSdk
|
16
17
|
class DecisionRequest
|
@@ -61,6 +62,8 @@ module AdzerkDecisionSdk
|
|
61
62
|
|
62
63
|
attr_accessor :intended_longitude
|
63
64
|
|
65
|
+
attr_accessor :radius
|
66
|
+
|
64
67
|
attr_accessor :include_matched_points
|
65
68
|
|
66
69
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -83,10 +86,16 @@ module AdzerkDecisionSdk
|
|
83
86
|
:'parallel' => :'parallel',
|
84
87
|
:'intended_latitude' => :'intendedLatitude',
|
85
88
|
:'intended_longitude' => :'intendedLongitude',
|
89
|
+
:'radius' => :'radius',
|
86
90
|
:'include_matched_points' => :'includeMatchedPoints'
|
87
91
|
}
|
88
92
|
end
|
89
93
|
|
94
|
+
# Returns all the JSON keys this model knows about
|
95
|
+
def self.acceptable_attributes
|
96
|
+
attribute_map.values
|
97
|
+
end
|
98
|
+
|
90
99
|
# Attribute type mapping.
|
91
100
|
def self.openapi_types
|
92
101
|
{
|
@@ -105,8 +114,9 @@ module AdzerkDecisionSdk
|
|
105
114
|
:'consent' => :'Object',
|
106
115
|
:'device_id' => :'String',
|
107
116
|
:'parallel' => :'Boolean',
|
108
|
-
:'intended_latitude' => :'
|
109
|
-
:'intended_longitude' => :'
|
117
|
+
:'intended_latitude' => :'Float',
|
118
|
+
:'intended_longitude' => :'Float',
|
119
|
+
:'radius' => :'Float',
|
110
120
|
:'include_matched_points' => :'Boolean'
|
111
121
|
}
|
112
122
|
end
|
@@ -129,6 +139,7 @@ module AdzerkDecisionSdk
|
|
129
139
|
:'parallel',
|
130
140
|
:'intended_latitude',
|
131
141
|
:'intended_longitude',
|
142
|
+
:'radius',
|
132
143
|
:'include_matched_points'
|
133
144
|
])
|
134
145
|
end
|
@@ -222,6 +233,10 @@ module AdzerkDecisionSdk
|
|
222
233
|
self.intended_longitude = attributes[:'intended_longitude']
|
223
234
|
end
|
224
235
|
|
236
|
+
if attributes.key?(:'radius')
|
237
|
+
self.radius = attributes[:'radius']
|
238
|
+
end
|
239
|
+
|
225
240
|
if attributes.key?(:'include_matched_points')
|
226
241
|
self.include_matched_points = attributes[:'include_matched_points']
|
227
242
|
end
|
@@ -267,6 +282,7 @@ module AdzerkDecisionSdk
|
|
267
282
|
parallel == o.parallel &&
|
268
283
|
intended_latitude == o.intended_latitude &&
|
269
284
|
intended_longitude == o.intended_longitude &&
|
285
|
+
radius == o.radius &&
|
270
286
|
include_matched_points == o.include_matched_points
|
271
287
|
end
|
272
288
|
|
@@ -279,7 +295,7 @@ module AdzerkDecisionSdk
|
|
279
295
|
# Calculates hash code according to all attributes.
|
280
296
|
# @return [Integer] Hash code
|
281
297
|
def hash
|
282
|
-
[placements, user, keywords, url, referrer, ip, blocked_creatives, is_mobile, include_pricing_data, notrack, enable_bot_filtering, enable_user_dbip, consent, device_id, parallel, intended_latitude, intended_longitude, include_matched_points].hash
|
298
|
+
[placements, user, keywords, url, referrer, ip, blocked_creatives, is_mobile, include_pricing_data, notrack, enable_bot_filtering, enable_user_dbip, consent, device_id, parallel, intended_latitude, intended_longitude, radius, include_matched_points].hash
|
283
299
|
end
|
284
300
|
|
285
301
|
# Builds the object from hash
|
@@ -295,7 +311,9 @@ module AdzerkDecisionSdk
|
|
295
311
|
def build_from_hash(attributes)
|
296
312
|
return nil unless attributes.is_a?(Hash)
|
297
313
|
self.class.openapi_types.each_pair do |key, type|
|
298
|
-
if
|
314
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
315
|
+
self.send("#{key}=", nil)
|
316
|
+
elsif type =~ /\AArray<(.*)>/i
|
299
317
|
# check to ensure the input is an array given that the attribute
|
300
318
|
# is documented as an array but the input is not
|
301
319
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -303,7 +321,7 @@ module AdzerkDecisionSdk
|
|
303
321
|
end
|
304
322
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
305
323
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
306
|
-
end
|
324
|
+
end
|
307
325
|
end
|
308
326
|
|
309
327
|
self
|
@@ -315,8 +333,8 @@ module AdzerkDecisionSdk
|
|
315
333
|
# @return [Object] Deserialized data
|
316
334
|
def _deserialize(type, value)
|
317
335
|
case type.to_sym
|
318
|
-
when :
|
319
|
-
|
336
|
+
when :Time
|
337
|
+
Time.parse(value)
|
320
338
|
when :Date
|
321
339
|
Date.parse(value)
|
322
340
|
when :String
|
@@ -346,7 +364,9 @@ module AdzerkDecisionSdk
|
|
346
364
|
end
|
347
365
|
end
|
348
366
|
else # model
|
349
|
-
|
367
|
+
# models (e.g. Pet) or oneOf
|
368
|
+
klass = AdzerkDecisionSdk.const_get(type)
|
369
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
350
370
|
end
|
351
371
|
end
|
352
372
|
|
@@ -372,7 +392,7 @@ module AdzerkDecisionSdk
|
|
372
392
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
373
393
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
374
394
|
end
|
375
|
-
|
395
|
+
|
376
396
|
hash[param] = _to_hash(value)
|
377
397
|
end
|
378
398
|
hash
|
@@ -395,5 +415,7 @@ module AdzerkDecisionSdk
|
|
395
415
|
value
|
396
416
|
end
|
397
417
|
end
|
418
|
+
|
398
419
|
end
|
420
|
+
|
399
421
|
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.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module AdzerkDecisionSdk
|
16
17
|
class DecisionResponse
|
@@ -29,6 +30,11 @@ module AdzerkDecisionSdk
|
|
29
30
|
}
|
30
31
|
end
|
31
32
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
34
|
+
def self.acceptable_attributes
|
35
|
+
attribute_map.values
|
36
|
+
end
|
37
|
+
|
32
38
|
# Attribute type mapping.
|
33
39
|
def self.openapi_types
|
34
40
|
{
|
@@ -120,7 +126,9 @@ module AdzerkDecisionSdk
|
|
120
126
|
def build_from_hash(attributes)
|
121
127
|
return nil unless attributes.is_a?(Hash)
|
122
128
|
self.class.openapi_types.each_pair do |key, type|
|
123
|
-
if
|
129
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
130
|
+
self.send("#{key}=", nil)
|
131
|
+
elsif type =~ /\AArray<(.*)>/i
|
124
132
|
# check to ensure the input is an array given that the attribute
|
125
133
|
# is documented as an array but the input is not
|
126
134
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -128,7 +136,7 @@ module AdzerkDecisionSdk
|
|
128
136
|
end
|
129
137
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
130
138
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
131
|
-
end
|
139
|
+
end
|
132
140
|
end
|
133
141
|
|
134
142
|
self
|
@@ -140,8 +148,8 @@ module AdzerkDecisionSdk
|
|
140
148
|
# @return [Object] Deserialized data
|
141
149
|
def _deserialize(type, value)
|
142
150
|
case type.to_sym
|
143
|
-
when :
|
144
|
-
|
151
|
+
when :Time
|
152
|
+
Time.parse(value)
|
145
153
|
when :Date
|
146
154
|
Date.parse(value)
|
147
155
|
when :String
|
@@ -171,7 +179,9 @@ module AdzerkDecisionSdk
|
|
171
179
|
end
|
172
180
|
end
|
173
181
|
else # model
|
174
|
-
|
182
|
+
# models (e.g. Pet) or oneOf
|
183
|
+
klass = AdzerkDecisionSdk.const_get(type)
|
184
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
175
185
|
end
|
176
186
|
end
|
177
187
|
|
@@ -197,7 +207,7 @@ module AdzerkDecisionSdk
|
|
197
207
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
198
208
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
199
209
|
end
|
200
|
-
|
210
|
+
|
201
211
|
hash[param] = _to_hash(value)
|
202
212
|
end
|
203
213
|
hash
|
@@ -220,5 +230,7 @@ module AdzerkDecisionSdk
|
|
220
230
|
value
|
221
231
|
end
|
222
232
|
end
|
233
|
+
|
223
234
|
end
|
235
|
+
|
224
236
|
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.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module AdzerkDecisionSdk
|
16
17
|
class Event
|
@@ -26,6 +27,11 @@ module AdzerkDecisionSdk
|
|
26
27
|
}
|
27
28
|
end
|
28
29
|
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
29
35
|
# Attribute type mapping.
|
30
36
|
def self.openapi_types
|
31
37
|
{
|
@@ -111,7 +117,9 @@ module AdzerkDecisionSdk
|
|
111
117
|
def build_from_hash(attributes)
|
112
118
|
return nil unless attributes.is_a?(Hash)
|
113
119
|
self.class.openapi_types.each_pair do |key, type|
|
114
|
-
if
|
120
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
121
|
+
self.send("#{key}=", nil)
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
123
|
# check to ensure the input is an array given that the attribute
|
116
124
|
# is documented as an array but the input is not
|
117
125
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -119,7 +127,7 @@ module AdzerkDecisionSdk
|
|
119
127
|
end
|
120
128
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
129
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
-
end
|
130
|
+
end
|
123
131
|
end
|
124
132
|
|
125
133
|
self
|
@@ -131,8 +139,8 @@ module AdzerkDecisionSdk
|
|
131
139
|
# @return [Object] Deserialized data
|
132
140
|
def _deserialize(type, value)
|
133
141
|
case type.to_sym
|
134
|
-
when :
|
135
|
-
|
142
|
+
when :Time
|
143
|
+
Time.parse(value)
|
136
144
|
when :Date
|
137
145
|
Date.parse(value)
|
138
146
|
when :String
|
@@ -162,7 +170,9 @@ module AdzerkDecisionSdk
|
|
162
170
|
end
|
163
171
|
end
|
164
172
|
else # model
|
165
|
-
|
173
|
+
# models (e.g. Pet) or oneOf
|
174
|
+
klass = AdzerkDecisionSdk.const_get(type)
|
175
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
166
176
|
end
|
167
177
|
end
|
168
178
|
|
@@ -188,7 +198,7 @@ module AdzerkDecisionSdk
|
|
188
198
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
189
199
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
190
200
|
end
|
191
|
-
|
201
|
+
|
192
202
|
hash[param] = _to_hash(value)
|
193
203
|
end
|
194
204
|
hash
|
@@ -211,5 +221,7 @@ module AdzerkDecisionSdk
|
|
211
221
|
value
|
212
222
|
end
|
213
223
|
end
|
224
|
+
|
214
225
|
end
|
226
|
+
|
215
227
|
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.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module AdzerkDecisionSdk
|
16
17
|
class MatchedPoint
|
@@ -26,6 +27,11 @@ module AdzerkDecisionSdk
|
|
26
27
|
}
|
27
28
|
end
|
28
29
|
|
30
|
+
# Returns all the JSON keys this model knows about
|
31
|
+
def self.acceptable_attributes
|
32
|
+
attribute_map.values
|
33
|
+
end
|
34
|
+
|
29
35
|
# Attribute type mapping.
|
30
36
|
def self.openapi_types
|
31
37
|
{
|
@@ -111,7 +117,9 @@ module AdzerkDecisionSdk
|
|
111
117
|
def build_from_hash(attributes)
|
112
118
|
return nil unless attributes.is_a?(Hash)
|
113
119
|
self.class.openapi_types.each_pair do |key, type|
|
114
|
-
if
|
120
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
121
|
+
self.send("#{key}=", nil)
|
122
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
123
|
# check to ensure the input is an array given that the attribute
|
116
124
|
# is documented as an array but the input is not
|
117
125
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -119,7 +127,7 @@ module AdzerkDecisionSdk
|
|
119
127
|
end
|
120
128
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
129
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
-
end
|
130
|
+
end
|
123
131
|
end
|
124
132
|
|
125
133
|
self
|
@@ -131,8 +139,8 @@ module AdzerkDecisionSdk
|
|
131
139
|
# @return [Object] Deserialized data
|
132
140
|
def _deserialize(type, value)
|
133
141
|
case type.to_sym
|
134
|
-
when :
|
135
|
-
|
142
|
+
when :Time
|
143
|
+
Time.parse(value)
|
136
144
|
when :Date
|
137
145
|
Date.parse(value)
|
138
146
|
when :String
|
@@ -162,7 +170,9 @@ module AdzerkDecisionSdk
|
|
162
170
|
end
|
163
171
|
end
|
164
172
|
else # model
|
165
|
-
|
173
|
+
# models (e.g. Pet) or oneOf
|
174
|
+
klass = AdzerkDecisionSdk.const_get(type)
|
175
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
166
176
|
end
|
167
177
|
end
|
168
178
|
|
@@ -188,7 +198,7 @@ module AdzerkDecisionSdk
|
|
188
198
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
189
199
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
190
200
|
end
|
191
|
-
|
201
|
+
|
192
202
|
hash[param] = _to_hash(value)
|
193
203
|
end
|
194
204
|
hash
|
@@ -211,5 +221,7 @@ module AdzerkDecisionSdk
|
|
211
221
|
value
|
212
222
|
end
|
213
223
|
end
|
224
|
+
|
214
225
|
end
|
226
|
+
|
215
227
|
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.1.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
|
+
require 'time'
|
14
15
|
|
15
16
|
module AdzerkDecisionSdk
|
16
17
|
class Placement
|
@@ -71,6 +72,10 @@ module AdzerkDecisionSdk
|
|
71
72
|
|
72
73
|
attr_accessor :ad_query
|
73
74
|
|
75
|
+
attr_accessor :floor_price
|
76
|
+
|
77
|
+
attr_accessor :floor_cpc
|
78
|
+
|
74
79
|
# Attribute mapping from ruby-style variable name to JSON key.
|
75
80
|
def self.attribute_map
|
76
81
|
{
|
@@ -93,10 +98,17 @@ module AdzerkDecisionSdk
|
|
93
98
|
:'ecpm_partitions' => :'ecpmPartitions',
|
94
99
|
:'event_multiplier' => :'eventMultiplier',
|
95
100
|
:'skip_selection' => :'skipSelection',
|
96
|
-
:'ad_query' => :'adQuery'
|
101
|
+
:'ad_query' => :'adQuery',
|
102
|
+
:'floor_price' => :'floorPrice',
|
103
|
+
:'floor_cpc' => :'floorCpc'
|
97
104
|
}
|
98
105
|
end
|
99
106
|
|
107
|
+
# Returns all the JSON keys this model knows about
|
108
|
+
def self.acceptable_attributes
|
109
|
+
attribute_map.values
|
110
|
+
end
|
111
|
+
|
100
112
|
# Attribute type mapping.
|
101
113
|
def self.openapi_types
|
102
114
|
{
|
@@ -119,7 +131,9 @@ module AdzerkDecisionSdk
|
|
119
131
|
:'ecpm_partitions' => :'Array<String>',
|
120
132
|
:'event_multiplier' => :'Integer',
|
121
133
|
:'skip_selection' => :'Boolean',
|
122
|
-
:'ad_query' => :'Object'
|
134
|
+
:'ad_query' => :'Object',
|
135
|
+
:'floor_price' => :'Float',
|
136
|
+
:'floor_cpc' => :'Float'
|
123
137
|
}
|
124
138
|
end
|
125
139
|
|
@@ -141,7 +155,9 @@ module AdzerkDecisionSdk
|
|
141
155
|
:'ecpm_partitions',
|
142
156
|
:'event_multiplier',
|
143
157
|
:'skip_selection',
|
144
|
-
:'ad_query'
|
158
|
+
:'ad_query',
|
159
|
+
:'floor_price',
|
160
|
+
:'floor_cpc'
|
145
161
|
])
|
146
162
|
end
|
147
163
|
|
@@ -249,6 +265,14 @@ module AdzerkDecisionSdk
|
|
249
265
|
if attributes.key?(:'ad_query')
|
250
266
|
self.ad_query = attributes[:'ad_query']
|
251
267
|
end
|
268
|
+
|
269
|
+
if attributes.key?(:'floor_price')
|
270
|
+
self.floor_price = attributes[:'floor_price']
|
271
|
+
end
|
272
|
+
|
273
|
+
if attributes.key?(:'floor_cpc')
|
274
|
+
self.floor_cpc = attributes[:'floor_cpc']
|
275
|
+
end
|
252
276
|
end
|
253
277
|
|
254
278
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -312,7 +336,9 @@ module AdzerkDecisionSdk
|
|
312
336
|
ecpm_partitions == o.ecpm_partitions &&
|
313
337
|
event_multiplier == o.event_multiplier &&
|
314
338
|
skip_selection == o.skip_selection &&
|
315
|
-
ad_query == o.ad_query
|
339
|
+
ad_query == o.ad_query &&
|
340
|
+
floor_price == o.floor_price &&
|
341
|
+
floor_cpc == o.floor_cpc
|
316
342
|
end
|
317
343
|
|
318
344
|
# @see the `==` method
|
@@ -324,7 +350,7 @@ module AdzerkDecisionSdk
|
|
324
350
|
# Calculates hash code according to all attributes.
|
325
351
|
# @return [Integer] Hash code
|
326
352
|
def hash
|
327
|
-
[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
|
353
|
+
[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, floor_price, floor_cpc].hash
|
328
354
|
end
|
329
355
|
|
330
356
|
# Builds the object from hash
|
@@ -340,7 +366,9 @@ module AdzerkDecisionSdk
|
|
340
366
|
def build_from_hash(attributes)
|
341
367
|
return nil unless attributes.is_a?(Hash)
|
342
368
|
self.class.openapi_types.each_pair do |key, type|
|
343
|
-
if
|
369
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
370
|
+
self.send("#{key}=", nil)
|
371
|
+
elsif type =~ /\AArray<(.*)>/i
|
344
372
|
# check to ensure the input is an array given that the attribute
|
345
373
|
# is documented as an array but the input is not
|
346
374
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
@@ -348,7 +376,7 @@ module AdzerkDecisionSdk
|
|
348
376
|
end
|
349
377
|
elsif !attributes[self.class.attribute_map[key]].nil?
|
350
378
|
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
351
|
-
end
|
379
|
+
end
|
352
380
|
end
|
353
381
|
|
354
382
|
self
|
@@ -360,8 +388,8 @@ module AdzerkDecisionSdk
|
|
360
388
|
# @return [Object] Deserialized data
|
361
389
|
def _deserialize(type, value)
|
362
390
|
case type.to_sym
|
363
|
-
when :
|
364
|
-
|
391
|
+
when :Time
|
392
|
+
Time.parse(value)
|
365
393
|
when :Date
|
366
394
|
Date.parse(value)
|
367
395
|
when :String
|
@@ -391,7 +419,9 @@ module AdzerkDecisionSdk
|
|
391
419
|
end
|
392
420
|
end
|
393
421
|
else # model
|
394
|
-
|
422
|
+
# models (e.g. Pet) or oneOf
|
423
|
+
klass = AdzerkDecisionSdk.const_get(type)
|
424
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
395
425
|
end
|
396
426
|
end
|
397
427
|
|
@@ -417,7 +447,7 @@ module AdzerkDecisionSdk
|
|
417
447
|
is_nullable = self.class.openapi_nullable.include?(attr)
|
418
448
|
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
419
449
|
end
|
420
|
-
|
450
|
+
|
421
451
|
hash[param] = _to_hash(value)
|
422
452
|
end
|
423
453
|
hash
|
@@ -440,5 +470,7 @@ module AdzerkDecisionSdk
|
|
440
470
|
value
|
441
471
|
end
|
442
472
|
end
|
473
|
+
|
443
474
|
end
|
475
|
+
|
444
476
|
end
|