adzerk_decision_sdk 1.0.0.pre.beta.1 → 1.0.0.pre.beta.6
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 +6 -6
- data/README.md +28 -2
- data/adzerk_decision_sdk.gemspec +1 -1
- data/docs/Content.md +1 -1
- data/docs/Decision.md +2 -0
- data/docs/DecisionRequest.md +9 -1
- data/docs/MatchedPoint.md +19 -0
- data/docs/Placement.md +9 -1
- data/docs/RequestLocation.md +19 -0
- data/docs/UserdbApi.md +0 -49
- data/lib/adzerk_decision_sdk.rb +1 -1
- data/lib/adzerk_decision_sdk/api/decision_api.rb +1 -1
- data/lib/adzerk_decision_sdk/api/userdb_api.rb +1 -68
- data/lib/adzerk_decision_sdk/api_client.rb +8 -6
- 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 +1 -1
- data/lib/adzerk_decision_sdk/decision_client.rb +21 -10
- data/lib/adzerk_decision_sdk/models/consent_request.rb +1 -1
- data/lib/adzerk_decision_sdk/models/content.rb +2 -2
- data/lib/adzerk_decision_sdk/models/decision.rb +13 -2
- data/lib/adzerk_decision_sdk/models/decision_request.rb +46 -6
- data/lib/adzerk_decision_sdk/models/decision_response.rb +1 -1
- data/lib/adzerk_decision_sdk/models/event.rb +1 -1
- data/lib/adzerk_decision_sdk/models/{decision_data.rb → matched_point.rb} +17 -44
- data/lib/adzerk_decision_sdk/models/placement.rb +73 -6
- data/lib/adzerk_decision_sdk/models/pricing_data.rb +1 -1
- data/lib/adzerk_decision_sdk/models/request_location.rb +215 -0
- data/lib/adzerk_decision_sdk/models/user.rb +1 -1
- 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/pkg/adzerk_decision_sdk-1.0.0.pre.beta.3.gem +0 -0
- metadata +7 -5
- data/docs/DecisionData.md +0 -25
- data/pkg/adzerk_decision_sdk-1.0.0.gem +0 -0
@@ -36,8 +36,8 @@ module AdzerkDecisionSdk
|
|
36
36
|
api_client.default_headers['X-Adzerk-Sdk-Version'] = "adzerk-decision-sdk-ruby:#{version}"
|
37
37
|
|
38
38
|
@decisions = DecisionClient.new(network_id, site_id, api_client, configuration.logger)
|
39
|
-
@user_db = UserDbClient.new(network_id, api_client)
|
40
|
-
@pixels = PixelClient.new(api_client)
|
39
|
+
@user_db = UserDbClient.new(network_id, api_client, configuration.logger)
|
40
|
+
@pixels = PixelClient.new(api_client, configuration.logger)
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -2,11 +2,13 @@ require 'adzerk_decision_sdk/api/decision_api'
|
|
2
2
|
|
3
3
|
module AdzerkDecisionSdk
|
4
4
|
class DecisionClient
|
5
|
+
|
5
6
|
def initialize(network_id, site_id, api_client, logger)
|
6
7
|
@network_id = network_id
|
7
8
|
@site_id = site_id
|
8
9
|
@api = DecisionApi.new(api_client)
|
9
10
|
@logger = logger
|
11
|
+
@deprecated_placement_fields = [[:ecpm_partition, 'ecpm_partitions']]
|
10
12
|
end
|
11
13
|
|
12
14
|
def get(request, opts = {})
|
@@ -18,14 +20,22 @@ module AdzerkDecisionSdk
|
|
18
20
|
|
19
21
|
opts[:body][:enableBotFiltering] = false if not opts[:body].has_key?(:enableBotFiltering)
|
20
22
|
|
21
|
-
if !opts[:body].has_key?(:placements) or !opts[:body][:placements] or
|
23
|
+
if !opts[:body].has_key?(:placements) or !opts[:body][:placements] or opts[:body][:placements].length() == 0
|
22
24
|
fail ArgumentError, "Each request requires at least one placement"
|
23
25
|
end
|
24
26
|
|
25
27
|
opts[:body][:placements].each_with_index do |placement, idx|
|
26
|
-
if !placement.has_key?(:adTypes) or !
|
28
|
+
if !placement.has_key?(:adTypes) or !placement[:adTypes] or placement[:adTypes].length() == 0
|
27
29
|
fail ArgumentError, "Each placement needs at least one ad type"
|
28
30
|
end
|
31
|
+
|
32
|
+
@deprecated_placement_fields.each do |pair|
|
33
|
+
deprecated_field, replacement = pair
|
34
|
+
if placement.has_key?(deprecated_field) and !placement[deprecated_field].nil?
|
35
|
+
@logger.warn("DEPRECATION WARNING: #{deprecated_field} has been deprecated. Please use #{replacement} instead.")
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
29
39
|
placement[:networkId] = @network_id if not placement.has_key?(:networkId)
|
30
40
|
placement[:siteId] = @site_id if not placement.has_key?(:siteId)
|
31
41
|
placement[:divName] = "div#{idx}" if not placement.has_key?(:divName)
|
@@ -35,13 +45,13 @@ module AdzerkDecisionSdk
|
|
35
45
|
|
36
46
|
if opts.has_key?(:include_explanation) and opts[:include_explanation] == true
|
37
47
|
header_params['X-Adzerk-Explain'] = opts[:api_key]
|
38
|
-
@logger.
|
39
|
-
@logger.
|
40
|
-
@logger.
|
41
|
-
@logger.
|
42
|
-
@logger.
|
43
|
-
@logger.
|
44
|
-
@logger.
|
48
|
+
@logger.warn("--------------------------------------------------------------")
|
49
|
+
@logger.warn(" !!! WARNING - WARNING - WARNING !!! ")
|
50
|
+
@logger.warn("")
|
51
|
+
@logger.warn("You have opted to include explainer details with this request!")
|
52
|
+
@logger.warn("This will cause performance degradation and should not be done")
|
53
|
+
@logger.warn("in production environments.")
|
54
|
+
@logger.warn("--------------------------------------------------------------")
|
45
55
|
end
|
46
56
|
|
47
57
|
opts[:header_params] = header_params
|
@@ -50,9 +60,10 @@ module AdzerkDecisionSdk
|
|
50
60
|
@logger.info("Requesting with headers: #{opts[:header_params]}")
|
51
61
|
|
52
62
|
response = @api.get_decisions(opts)
|
63
|
+
@logger.info("Received response: #{response}")
|
53
64
|
|
54
65
|
parsed_response = parse_response(response)
|
55
|
-
@logger.info("
|
66
|
+
@logger.info("Parsed response: #{parsed_response}")
|
56
67
|
|
57
68
|
return parsed_response
|
58
69
|
end
|
@@ -6,7 +6,7 @@
|
|
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
|
|
@@ -41,7 +41,7 @@ module AdzerkDecisionSdk
|
|
41
41
|
:'type' => :'String',
|
42
42
|
:'template' => :'String',
|
43
43
|
:'custom_template' => :'String',
|
44
|
-
:'data' => :'
|
44
|
+
:'data' => :'Object',
|
45
45
|
:'body' => :'String'
|
46
46
|
}
|
47
47
|
end
|
@@ -6,7 +6,7 @@
|
|
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
|
|
@@ -32,6 +32,8 @@ module AdzerkDecisionSdk
|
|
32
32
|
|
33
33
|
attr_accessor :events
|
34
34
|
|
35
|
+
attr_accessor :matched_points
|
36
|
+
|
35
37
|
attr_accessor :pricing
|
36
38
|
|
37
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -46,6 +48,7 @@ module AdzerkDecisionSdk
|
|
46
48
|
:'contents' => :'contents',
|
47
49
|
:'impression_url' => :'impressionUrl',
|
48
50
|
:'events' => :'events',
|
51
|
+
:'matched_points' => :'matchedPoints',
|
49
52
|
:'pricing' => :'pricing'
|
50
53
|
}
|
51
54
|
end
|
@@ -62,6 +65,7 @@ module AdzerkDecisionSdk
|
|
62
65
|
:'contents' => :'Array<Content>',
|
63
66
|
:'impression_url' => :'String',
|
64
67
|
:'events' => :'Array<Event>',
|
68
|
+
:'matched_points' => :'Array<MatchedPoint>',
|
65
69
|
:'pricing' => :'PricingData'
|
66
70
|
}
|
67
71
|
end
|
@@ -127,6 +131,12 @@ module AdzerkDecisionSdk
|
|
127
131
|
end
|
128
132
|
end
|
129
133
|
|
134
|
+
if attributes.key?(:'matched_points')
|
135
|
+
if (value = attributes[:'matched_points']).is_a?(Array)
|
136
|
+
self.matched_points = value
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
130
140
|
if attributes.key?(:'pricing')
|
131
141
|
self.pricing = attributes[:'pricing']
|
132
142
|
end
|
@@ -159,6 +169,7 @@ module AdzerkDecisionSdk
|
|
159
169
|
contents == o.contents &&
|
160
170
|
impression_url == o.impression_url &&
|
161
171
|
events == o.events &&
|
172
|
+
matched_points == o.matched_points &&
|
162
173
|
pricing == o.pricing
|
163
174
|
end
|
164
175
|
|
@@ -171,7 +182,7 @@ module AdzerkDecisionSdk
|
|
171
182
|
# Calculates hash code according to all attributes.
|
172
183
|
# @return [Integer] Hash code
|
173
184
|
def hash
|
174
|
-
[ad_id, creative_id, flight_id, campaign_id, priority_id, click_url, contents, impression_url, events, pricing].hash
|
185
|
+
[ad_id, creative_id, flight_id, campaign_id, priority_id, click_url, contents, impression_url, events, matched_points, pricing].hash
|
175
186
|
end
|
176
187
|
|
177
188
|
# Builds the object from hash
|
@@ -6,7 +6,7 @@
|
|
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
|
|
@@ -55,6 +55,14 @@ module AdzerkDecisionSdk
|
|
55
55
|
# RTB requests only - sets an Identifier for Advertisers (IFA or IDFA)
|
56
56
|
attr_accessor :device_id
|
57
57
|
|
58
|
+
attr_accessor :parallel
|
59
|
+
|
60
|
+
attr_accessor :intended_latitude
|
61
|
+
|
62
|
+
attr_accessor :intended_longitude
|
63
|
+
|
64
|
+
attr_accessor :include_matched_points
|
65
|
+
|
58
66
|
# Attribute mapping from ruby-style variable name to JSON key.
|
59
67
|
def self.attribute_map
|
60
68
|
{
|
@@ -71,7 +79,11 @@ module AdzerkDecisionSdk
|
|
71
79
|
:'enable_bot_filtering' => :'enableBotFiltering',
|
72
80
|
:'enable_user_dbip' => :'enableUserDBIP',
|
73
81
|
:'consent' => :'consent',
|
74
|
-
:'device_id' => :'deviceID'
|
82
|
+
:'device_id' => :'deviceID',
|
83
|
+
:'parallel' => :'parallel',
|
84
|
+
:'intended_latitude' => :'intendedLatitude',
|
85
|
+
:'intended_longitude' => :'intendedLongitude',
|
86
|
+
:'include_matched_points' => :'includeMatchedPoints'
|
75
87
|
}
|
76
88
|
end
|
77
89
|
|
@@ -91,7 +103,11 @@ module AdzerkDecisionSdk
|
|
91
103
|
:'enable_bot_filtering' => :'Boolean',
|
92
104
|
:'enable_user_dbip' => :'Boolean',
|
93
105
|
:'consent' => :'Object',
|
94
|
-
:'device_id' => :'String'
|
106
|
+
:'device_id' => :'String',
|
107
|
+
:'parallel' => :'Boolean',
|
108
|
+
:'intended_latitude' => :'String',
|
109
|
+
:'intended_longitude' => :'String',
|
110
|
+
:'include_matched_points' => :'Boolean'
|
95
111
|
}
|
96
112
|
end
|
97
113
|
|
@@ -109,7 +125,11 @@ module AdzerkDecisionSdk
|
|
109
125
|
:'enable_bot_filtering',
|
110
126
|
:'enable_user_dbip',
|
111
127
|
:'consent',
|
112
|
-
:'device_id'
|
128
|
+
:'device_id',
|
129
|
+
:'parallel',
|
130
|
+
:'intended_latitude',
|
131
|
+
:'intended_longitude',
|
132
|
+
:'include_matched_points'
|
113
133
|
])
|
114
134
|
end
|
115
135
|
|
@@ -189,6 +209,22 @@ module AdzerkDecisionSdk
|
|
189
209
|
if attributes.key?(:'device_id')
|
190
210
|
self.device_id = attributes[:'device_id']
|
191
211
|
end
|
212
|
+
|
213
|
+
if attributes.key?(:'parallel')
|
214
|
+
self.parallel = attributes[:'parallel']
|
215
|
+
end
|
216
|
+
|
217
|
+
if attributes.key?(:'intended_latitude')
|
218
|
+
self.intended_latitude = attributes[:'intended_latitude']
|
219
|
+
end
|
220
|
+
|
221
|
+
if attributes.key?(:'intended_longitude')
|
222
|
+
self.intended_longitude = attributes[:'intended_longitude']
|
223
|
+
end
|
224
|
+
|
225
|
+
if attributes.key?(:'include_matched_points')
|
226
|
+
self.include_matched_points = attributes[:'include_matched_points']
|
227
|
+
end
|
192
228
|
end
|
193
229
|
|
194
230
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -227,7 +263,11 @@ module AdzerkDecisionSdk
|
|
227
263
|
enable_bot_filtering == o.enable_bot_filtering &&
|
228
264
|
enable_user_dbip == o.enable_user_dbip &&
|
229
265
|
consent == o.consent &&
|
230
|
-
device_id == o.device_id
|
266
|
+
device_id == o.device_id &&
|
267
|
+
parallel == o.parallel &&
|
268
|
+
intended_latitude == o.intended_latitude &&
|
269
|
+
intended_longitude == o.intended_longitude &&
|
270
|
+
include_matched_points == o.include_matched_points
|
231
271
|
end
|
232
272
|
|
233
273
|
# @see the `==` method
|
@@ -239,7 +279,7 @@ module AdzerkDecisionSdk
|
|
239
279
|
# Calculates hash code according to all attributes.
|
240
280
|
# @return [Integer] Hash code
|
241
281
|
def hash
|
242
|
-
[placements, user, keywords, url, referrer, ip, blocked_creatives, is_mobile, include_pricing_data, notrack, enable_bot_filtering, enable_user_dbip, consent, device_id].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
|
243
283
|
end
|
244
284
|
|
245
285
|
# Builds the object from hash
|
@@ -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 MatchedPoint
|
17
|
+
attr_accessor :lat
|
18
18
|
|
19
|
-
attr_accessor :
|
20
|
-
|
21
|
-
attr_accessor :width
|
22
|
-
|
23
|
-
attr_accessor :height
|
24
|
-
|
25
|
-
attr_accessor :custom_data
|
19
|
+
attr_accessor :lon
|
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
|
+
:'lat' => :'lat',
|
25
|
+
:'lon' => :'lon'
|
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
|
+
:'lat' => :'String',
|
33
|
+
:'lon' => :'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::MatchedPoint` 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::MatchedPoint`. 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?(:'lat')
|
59
|
+
self.lat = attributes[:'lat']
|
84
60
|
end
|
85
61
|
|
86
|
-
if attributes.key?(:'
|
87
|
-
self.
|
62
|
+
if attributes.key?(:'lon')
|
63
|
+
self.lon = attributes[:'lon']
|
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
|
+
lat == o.lat &&
|
86
|
+
lon == o.lon
|
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
|
+
[lat, lon].hash
|
126
99
|
end
|
127
100
|
|
128
101
|
# Builds the object from hash
|
@@ -6,7 +6,7 @@
|
|
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
|
|
@@ -62,6 +62,15 @@ module AdzerkDecisionSdk
|
|
62
62
|
# (BETA) The name of the eCPM Partition that should be used to source eCPM data for auctions
|
63
63
|
attr_accessor :ecpm_partition
|
64
64
|
|
65
|
+
# (BETA) The names of the eCPM Partitions that should be used to source eCPM data for auctions
|
66
|
+
attr_accessor :ecpm_partitions
|
67
|
+
|
68
|
+
attr_accessor :event_multiplier
|
69
|
+
|
70
|
+
attr_accessor :skip_selection
|
71
|
+
|
72
|
+
attr_accessor :ad_query
|
73
|
+
|
65
74
|
# Attribute mapping from ruby-style variable name to JSON key.
|
66
75
|
def self.attribute_map
|
67
76
|
{
|
@@ -80,7 +89,11 @@ module AdzerkDecisionSdk
|
|
80
89
|
:'content_keys' => :'contentKeys',
|
81
90
|
:'count' => :'count',
|
82
91
|
:'proportionality' => :'proportionality',
|
83
|
-
:'ecpm_partition' => :'ecpmPartition'
|
92
|
+
:'ecpm_partition' => :'ecpmPartition',
|
93
|
+
:'ecpm_partitions' => :'ecpmPartitions',
|
94
|
+
:'event_multiplier' => :'eventMultiplier',
|
95
|
+
:'skip_selection' => :'skipSelection',
|
96
|
+
:'ad_query' => :'adQuery'
|
84
97
|
}
|
85
98
|
end
|
86
99
|
|
@@ -102,7 +115,11 @@ module AdzerkDecisionSdk
|
|
102
115
|
:'content_keys' => :'Hash<String, Integer>',
|
103
116
|
:'count' => :'Integer',
|
104
117
|
:'proportionality' => :'Boolean',
|
105
|
-
:'ecpm_partition' => :'String'
|
118
|
+
:'ecpm_partition' => :'String',
|
119
|
+
:'ecpm_partitions' => :'Array<String>',
|
120
|
+
:'event_multiplier' => :'Integer',
|
121
|
+
:'skip_selection' => :'Boolean',
|
122
|
+
:'ad_query' => :'Object'
|
106
123
|
}
|
107
124
|
end
|
108
125
|
|
@@ -120,7 +137,11 @@ module AdzerkDecisionSdk
|
|
120
137
|
:'content_keys',
|
121
138
|
:'count',
|
122
139
|
:'proportionality',
|
123
|
-
:'ecpm_partition'
|
140
|
+
:'ecpm_partition',
|
141
|
+
:'ecpm_partitions',
|
142
|
+
:'event_multiplier',
|
143
|
+
:'skip_selection',
|
144
|
+
:'ad_query'
|
124
145
|
])
|
125
146
|
end
|
126
147
|
|
@@ -210,21 +231,63 @@ module AdzerkDecisionSdk
|
|
210
231
|
if attributes.key?(:'ecpm_partition')
|
211
232
|
self.ecpm_partition = attributes[:'ecpm_partition']
|
212
233
|
end
|
234
|
+
|
235
|
+
if attributes.key?(:'ecpm_partitions')
|
236
|
+
if (value = attributes[:'ecpm_partitions']).is_a?(Array)
|
237
|
+
self.ecpm_partitions = value
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
if attributes.key?(:'event_multiplier')
|
242
|
+
self.event_multiplier = attributes[:'event_multiplier']
|
243
|
+
end
|
244
|
+
|
245
|
+
if attributes.key?(:'skip_selection')
|
246
|
+
self.skip_selection = attributes[:'skip_selection']
|
247
|
+
end
|
248
|
+
|
249
|
+
if attributes.key?(:'ad_query')
|
250
|
+
self.ad_query = attributes[:'ad_query']
|
251
|
+
end
|
213
252
|
end
|
214
253
|
|
215
254
|
# Show invalid properties with the reasons. Usually used together with valid?
|
216
255
|
# @return Array for valid properties with the reasons
|
217
256
|
def list_invalid_properties
|
218
257
|
invalid_properties = Array.new
|
258
|
+
if !@event_multiplier.nil? && @event_multiplier > 100000000
|
259
|
+
invalid_properties.push('invalid value for "event_multiplier", must be smaller than or equal to 100000000.')
|
260
|
+
end
|
261
|
+
|
262
|
+
if !@event_multiplier.nil? && @event_multiplier < -100000000
|
263
|
+
invalid_properties.push('invalid value for "event_multiplier", must be greater than or equal to -100000000.')
|
264
|
+
end
|
265
|
+
|
219
266
|
invalid_properties
|
220
267
|
end
|
221
268
|
|
222
269
|
# Check to see if the all the properties in the model are valid
|
223
270
|
# @return true if the model is valid
|
224
271
|
def valid?
|
272
|
+
return false if !@event_multiplier.nil? && @event_multiplier > 100000000
|
273
|
+
return false if !@event_multiplier.nil? && @event_multiplier < -100000000
|
225
274
|
true
|
226
275
|
end
|
227
276
|
|
277
|
+
# Custom attribute writer method with validation
|
278
|
+
# @param [Object] event_multiplier Value to be assigned
|
279
|
+
def event_multiplier=(event_multiplier)
|
280
|
+
if !event_multiplier.nil? && event_multiplier > 100000000
|
281
|
+
fail ArgumentError, 'invalid value for "event_multiplier", must be smaller than or equal to 100000000.'
|
282
|
+
end
|
283
|
+
|
284
|
+
if !event_multiplier.nil? && event_multiplier < -100000000
|
285
|
+
fail ArgumentError, 'invalid value for "event_multiplier", must be greater than or equal to -100000000.'
|
286
|
+
end
|
287
|
+
|
288
|
+
@event_multiplier = event_multiplier
|
289
|
+
end
|
290
|
+
|
228
291
|
# Checks equality by comparing each attribute.
|
229
292
|
# @param [Object] Object to be compared
|
230
293
|
def ==(o)
|
@@ -245,7 +308,11 @@ module AdzerkDecisionSdk
|
|
245
308
|
content_keys == o.content_keys &&
|
246
309
|
count == o.count &&
|
247
310
|
proportionality == o.proportionality &&
|
248
|
-
ecpm_partition == o.ecpm_partition
|
311
|
+
ecpm_partition == o.ecpm_partition &&
|
312
|
+
ecpm_partitions == o.ecpm_partitions &&
|
313
|
+
event_multiplier == o.event_multiplier &&
|
314
|
+
skip_selection == o.skip_selection &&
|
315
|
+
ad_query == o.ad_query
|
249
316
|
end
|
250
317
|
|
251
318
|
# @see the `==` method
|
@@ -257,7 +324,7 @@ module AdzerkDecisionSdk
|
|
257
324
|
# Calculates hash code according to all attributes.
|
258
325
|
# @return [Integer] Hash code
|
259
326
|
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
|
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
|
261
328
|
end
|
262
329
|
|
263
330
|
# Builds the object from hash
|