adzerk_decision_sdk 1.0.0.pre.beta.16 → 1.0.0.pre.beta.17
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 +2 -2
- data/Gemfile.lock +59 -41
- data/adzerk_decision_sdk.gemspec +2 -2
- data/docs/DecisionRequest.md +3 -1
- data/docs/Placement.md +3 -1
- data/docs/SkipFilters.md +32 -0
- data/docs/User.md +5 -1
- data/lib/adzerk_decision_sdk/models/decision_request.rb +16 -5
- data/lib/adzerk_decision_sdk/models/placement.rb +14 -5
- data/lib/adzerk_decision_sdk/models/skip_filters.rb +289 -0
- data/lib/adzerk_decision_sdk/models/user.rb +26 -4
- data/lib/adzerk_decision_sdk/version.rb +1 -1
- metadata +8 -18
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e3711d19d6f51bbaa565f87cfb76d0fc904b655b2d9471d4f700cab14f052205
|
|
4
|
+
data.tar.gz: 0214f5711e96dd5a33c42331e407267f2c9dc2cc85911afd6ac8bd82a6e7585d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 77bc89aa3a7a3dad0d65d152f89579a5e8b359f184b6aa599ee5aa507894235a2e22453cba7f40631fa3ac2b3f30b9382502d3658c8abc2b7f619a7e62a93a02
|
|
7
|
+
data.tar.gz: 348813d7c9c9a8322d990ce8c946e0669f7d4ebcdefc52d8a9f36813336b6611e03cf6ca781475145c6af237c7d8288a487f9ec3cc720fd2262334a3c6d4fcdb
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,60 +1,78 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
adzerk_decision_sdk (1.0.0.pre.beta.
|
|
5
|
-
typhoeus (~> 1.
|
|
4
|
+
adzerk_decision_sdk (1.0.0.pre.beta.17)
|
|
5
|
+
typhoeus (~> 1.4)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
8
8
|
remote: https://rubygems.org/
|
|
9
9
|
specs:
|
|
10
|
-
ast (2.4.
|
|
11
|
-
byebug (
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
ast (2.4.3)
|
|
11
|
+
byebug (13.0.0)
|
|
12
|
+
reline (>= 0.6.0)
|
|
13
|
+
coderay (1.1.3)
|
|
14
|
+
diff-lcs (1.6.2)
|
|
14
15
|
ethon (0.18.0)
|
|
15
16
|
ffi (>= 1.15.0)
|
|
16
17
|
logger
|
|
17
18
|
ffi (1.17.3)
|
|
18
|
-
|
|
19
|
+
io-console (0.8.2)
|
|
20
|
+
json (2.18.1)
|
|
21
|
+
language_server-protocol (3.17.0.5)
|
|
22
|
+
lint_roller (1.1.0)
|
|
19
23
|
logger (1.7.0)
|
|
20
|
-
method_source (
|
|
21
|
-
parallel (1.
|
|
22
|
-
parser (
|
|
23
|
-
ast (~> 2.4.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
rspec
|
|
24
|
+
method_source (1.1.0)
|
|
25
|
+
parallel (1.27.0)
|
|
26
|
+
parser (3.3.10.1)
|
|
27
|
+
ast (~> 2.4.1)
|
|
28
|
+
racc
|
|
29
|
+
prism (1.9.0)
|
|
30
|
+
pry (0.16.0)
|
|
31
|
+
coderay (~> 1.1)
|
|
32
|
+
method_source (~> 1.0)
|
|
33
|
+
reline (>= 0.6.0)
|
|
34
|
+
pry-byebug (3.12.0)
|
|
35
|
+
byebug (~> 13.0)
|
|
36
|
+
pry (>= 0.13, < 0.17)
|
|
37
|
+
racc (1.8.1)
|
|
38
|
+
rainbow (3.1.1)
|
|
39
|
+
rake (13.3.1)
|
|
40
|
+
regexp_parser (2.11.3)
|
|
41
|
+
reline (0.6.3)
|
|
42
|
+
io-console (~> 0.5)
|
|
43
|
+
rspec (3.13.2)
|
|
44
|
+
rspec-core (~> 3.13.0)
|
|
45
|
+
rspec-expectations (~> 3.13.0)
|
|
46
|
+
rspec-mocks (~> 3.13.0)
|
|
47
|
+
rspec-core (3.13.6)
|
|
48
|
+
rspec-support (~> 3.13.0)
|
|
49
|
+
rspec-expectations (3.13.5)
|
|
40
50
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
41
|
-
rspec-support (~> 3.
|
|
42
|
-
rspec-mocks (3.
|
|
51
|
+
rspec-support (~> 3.13.0)
|
|
52
|
+
rspec-mocks (3.13.7)
|
|
43
53
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
44
|
-
rspec-support (~> 3.
|
|
45
|
-
rspec-support (3.
|
|
46
|
-
rubocop (
|
|
47
|
-
|
|
54
|
+
rspec-support (~> 3.13.0)
|
|
55
|
+
rspec-support (3.13.7)
|
|
56
|
+
rubocop (1.84.1)
|
|
57
|
+
json (~> 2.3)
|
|
58
|
+
language_server-protocol (~> 3.17.0.2)
|
|
59
|
+
lint_roller (~> 1.1.0)
|
|
48
60
|
parallel (~> 1.10)
|
|
49
|
-
parser (>=
|
|
50
|
-
psych (>= 3.1.0)
|
|
61
|
+
parser (>= 3.3.0.2)
|
|
51
62
|
rainbow (>= 2.2.2, < 4.0)
|
|
63
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
|
64
|
+
rubocop-ast (>= 1.49.0, < 2.0)
|
|
52
65
|
ruby-progressbar (~> 1.7)
|
|
53
|
-
unicode-display_width (>=
|
|
54
|
-
|
|
66
|
+
unicode-display_width (>= 2.4.0, < 4.0)
|
|
67
|
+
rubocop-ast (1.49.0)
|
|
68
|
+
parser (>= 3.3.7.2)
|
|
69
|
+
prism (~> 1.7)
|
|
70
|
+
ruby-progressbar (1.13.0)
|
|
55
71
|
typhoeus (1.6.0)
|
|
56
72
|
ethon (>= 0.18.0)
|
|
57
|
-
unicode-display_width (
|
|
73
|
+
unicode-display_width (3.2.0)
|
|
74
|
+
unicode-emoji (~> 4.1)
|
|
75
|
+
unicode-emoji (4.2.0)
|
|
58
76
|
|
|
59
77
|
PLATFORMS
|
|
60
78
|
ruby
|
|
@@ -62,9 +80,9 @@ PLATFORMS
|
|
|
62
80
|
DEPENDENCIES
|
|
63
81
|
adzerk_decision_sdk!
|
|
64
82
|
pry-byebug
|
|
65
|
-
rake (~> 13.
|
|
66
|
-
rspec (~> 3.
|
|
67
|
-
rubocop (~>
|
|
83
|
+
rake (~> 13.2)
|
|
84
|
+
rspec (~> 3.12)
|
|
85
|
+
rubocop (~> 1.50)
|
|
68
86
|
|
|
69
87
|
BUNDLED WITH
|
|
70
88
|
2.1.2
|
data/adzerk_decision_sdk.gemspec
CHANGED
|
@@ -27,9 +27,9 @@ Gem::Specification.new do |s|
|
|
|
27
27
|
s.license = "Apache-2.0"
|
|
28
28
|
s.required_ruby_version = ">= 2.4"
|
|
29
29
|
|
|
30
|
-
s.add_runtime_dependency 'typhoeus', '~> 1.
|
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.4'
|
|
31
31
|
|
|
32
|
-
s.add_development_dependency 'rspec', '~> 3.
|
|
32
|
+
s.add_development_dependency 'rspec', '~> 3.12'
|
|
33
33
|
|
|
34
34
|
s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
|
|
35
35
|
s.test_files = `find spec/*`.split("\n")
|
data/docs/DecisionRequest.md
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
| **intended_longitude** | **Float** | | [optional] |
|
|
24
24
|
| **radius** | **Float** | | [optional] |
|
|
25
25
|
| **include_matched_points** | **Boolean** | | [optional] |
|
|
26
|
+
| **search_term** | **String** | A way to target ads based on shopper search terms | [optional] |
|
|
26
27
|
|
|
27
28
|
## Example
|
|
28
29
|
|
|
@@ -48,7 +49,8 @@ instance = AdzerkDecisionSdk::DecisionRequest.new(
|
|
|
48
49
|
intended_latitude: null,
|
|
49
50
|
intended_longitude: null,
|
|
50
51
|
radius: null,
|
|
51
|
-
include_matched_points: null
|
|
52
|
+
include_matched_points: null,
|
|
53
|
+
search_term: null
|
|
52
54
|
)
|
|
53
55
|
```
|
|
54
56
|
|
data/docs/Placement.md
CHANGED
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
| **ad_query** | **Object** | | [optional] |
|
|
27
27
|
| **floor_price** | **Float** | | [optional] |
|
|
28
28
|
| **floor_cpc** | **Float** | | [optional] |
|
|
29
|
+
| **skip_filters** | [**SkipFilters**](SkipFilters.md) | | [optional] |
|
|
29
30
|
|
|
30
31
|
## Example
|
|
31
32
|
|
|
@@ -54,7 +55,8 @@ instance = AdzerkDecisionSdk::Placement.new(
|
|
|
54
55
|
skip_selection: null,
|
|
55
56
|
ad_query: null,
|
|
56
57
|
floor_price: null,
|
|
57
|
-
floor_cpc: null
|
|
58
|
+
floor_cpc: null,
|
|
59
|
+
skip_filters: null
|
|
58
60
|
)
|
|
59
61
|
```
|
|
60
62
|
|
data/docs/SkipFilters.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# AdzerkDecisionSdk::SkipFilters
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **distance** | **Boolean** | Geodistance filter, which skips geodistance targeting if true. | [optional] |
|
|
8
|
+
| **facet** | **Boolean** | Facet targeting filter, which skips facet targeting if true. | [optional] |
|
|
9
|
+
| **geodistance** | **Boolean** | Geodistance filter, which skips geodistance targeting if true. | [optional] |
|
|
10
|
+
| **geolocation** | **Boolean** | Geolocation filter, which skips location targeting if true. | [optional] |
|
|
11
|
+
| **keyword** | **Boolean** | Keyword limit filter, which skips all (ad and/or flight) keyword targeting if true. | [optional] |
|
|
12
|
+
| **location** | **Boolean** | Geolocation filter, which skips location targeting if true. | [optional] |
|
|
13
|
+
| **placement_limit** | **Boolean** | Placement limit filter, where no advertiser placement limit if true. | [optional] |
|
|
14
|
+
| **site_zone** | **Boolean** | Site/zone limit filter, which skips site/zone targeting if true. | [optional] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'adzerk_decision_sdk'
|
|
20
|
+
|
|
21
|
+
instance = AdzerkDecisionSdk::SkipFilters.new(
|
|
22
|
+
distance: null,
|
|
23
|
+
facet: null,
|
|
24
|
+
geodistance: null,
|
|
25
|
+
geolocation: null,
|
|
26
|
+
keyword: null,
|
|
27
|
+
location: null,
|
|
28
|
+
placement_limit: null,
|
|
29
|
+
site_zone: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
data/docs/User.md
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **key** | **String** | The UserKey used for UserDB Targeting | [optional] |
|
|
8
|
+
| **group** | **Integer** | The assigned cohort for the User | [optional] |
|
|
9
|
+
| **segments** | **Array<Integer>** | Array of Segment Ids that will override any set on the UserDB record for the User | [optional] |
|
|
8
10
|
|
|
9
11
|
## Example
|
|
10
12
|
|
|
@@ -12,7 +14,9 @@
|
|
|
12
14
|
require 'adzerk_decision_sdk'
|
|
13
15
|
|
|
14
16
|
instance = AdzerkDecisionSdk::User.new(
|
|
15
|
-
key: null
|
|
17
|
+
key: null,
|
|
18
|
+
group: null,
|
|
19
|
+
segments: null
|
|
16
20
|
)
|
|
17
21
|
```
|
|
18
22
|
|
|
@@ -66,6 +66,9 @@ module AdzerkDecisionSdk
|
|
|
66
66
|
|
|
67
67
|
attr_accessor :include_matched_points
|
|
68
68
|
|
|
69
|
+
# A way to target ads based on shopper search terms
|
|
70
|
+
attr_accessor :search_term
|
|
71
|
+
|
|
69
72
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
70
73
|
def self.attribute_map
|
|
71
74
|
{
|
|
@@ -87,7 +90,8 @@ module AdzerkDecisionSdk
|
|
|
87
90
|
:'intended_latitude' => :'intendedLatitude',
|
|
88
91
|
:'intended_longitude' => :'intendedLongitude',
|
|
89
92
|
:'radius' => :'radius',
|
|
90
|
-
:'include_matched_points' => :'includeMatchedPoints'
|
|
93
|
+
:'include_matched_points' => :'includeMatchedPoints',
|
|
94
|
+
:'search_term' => :'searchTerm'
|
|
91
95
|
}
|
|
92
96
|
end
|
|
93
97
|
|
|
@@ -117,7 +121,8 @@ module AdzerkDecisionSdk
|
|
|
117
121
|
:'intended_latitude' => :'Float',
|
|
118
122
|
:'intended_longitude' => :'Float',
|
|
119
123
|
:'radius' => :'Float',
|
|
120
|
-
:'include_matched_points' => :'Boolean'
|
|
124
|
+
:'include_matched_points' => :'Boolean',
|
|
125
|
+
:'search_term' => :'String'
|
|
121
126
|
}
|
|
122
127
|
end
|
|
123
128
|
|
|
@@ -140,7 +145,8 @@ module AdzerkDecisionSdk
|
|
|
140
145
|
:'intended_latitude',
|
|
141
146
|
:'intended_longitude',
|
|
142
147
|
:'radius',
|
|
143
|
-
:'include_matched_points'
|
|
148
|
+
:'include_matched_points',
|
|
149
|
+
:'search_term'
|
|
144
150
|
])
|
|
145
151
|
end
|
|
146
152
|
|
|
@@ -240,6 +246,10 @@ module AdzerkDecisionSdk
|
|
|
240
246
|
if attributes.key?(:'include_matched_points')
|
|
241
247
|
self.include_matched_points = attributes[:'include_matched_points']
|
|
242
248
|
end
|
|
249
|
+
|
|
250
|
+
if attributes.key?(:'search_term')
|
|
251
|
+
self.search_term = attributes[:'search_term']
|
|
252
|
+
end
|
|
243
253
|
end
|
|
244
254
|
|
|
245
255
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -283,7 +293,8 @@ module AdzerkDecisionSdk
|
|
|
283
293
|
intended_latitude == o.intended_latitude &&
|
|
284
294
|
intended_longitude == o.intended_longitude &&
|
|
285
295
|
radius == o.radius &&
|
|
286
|
-
include_matched_points == o.include_matched_points
|
|
296
|
+
include_matched_points == o.include_matched_points &&
|
|
297
|
+
search_term == o.search_term
|
|
287
298
|
end
|
|
288
299
|
|
|
289
300
|
# @see the `==` method
|
|
@@ -295,7 +306,7 @@ module AdzerkDecisionSdk
|
|
|
295
306
|
# Calculates hash code according to all attributes.
|
|
296
307
|
# @return [Integer] Hash code
|
|
297
308
|
def 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
|
|
309
|
+
[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, search_term].hash
|
|
299
310
|
end
|
|
300
311
|
|
|
301
312
|
# Builds the object from hash
|
|
@@ -76,6 +76,8 @@ module AdzerkDecisionSdk
|
|
|
76
76
|
|
|
77
77
|
attr_accessor :floor_cpc
|
|
78
78
|
|
|
79
|
+
attr_accessor :skip_filters
|
|
80
|
+
|
|
79
81
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
80
82
|
def self.attribute_map
|
|
81
83
|
{
|
|
@@ -100,7 +102,8 @@ module AdzerkDecisionSdk
|
|
|
100
102
|
:'skip_selection' => :'skipSelection',
|
|
101
103
|
:'ad_query' => :'adQuery',
|
|
102
104
|
:'floor_price' => :'floorPrice',
|
|
103
|
-
:'floor_cpc' => :'floorCpc'
|
|
105
|
+
:'floor_cpc' => :'floorCpc',
|
|
106
|
+
:'skip_filters' => :'skipFilters'
|
|
104
107
|
}
|
|
105
108
|
end
|
|
106
109
|
|
|
@@ -133,7 +136,8 @@ module AdzerkDecisionSdk
|
|
|
133
136
|
:'skip_selection' => :'Boolean',
|
|
134
137
|
:'ad_query' => :'Object',
|
|
135
138
|
:'floor_price' => :'Float',
|
|
136
|
-
:'floor_cpc' => :'Float'
|
|
139
|
+
:'floor_cpc' => :'Float',
|
|
140
|
+
:'skip_filters' => :'SkipFilters'
|
|
137
141
|
}
|
|
138
142
|
end
|
|
139
143
|
|
|
@@ -157,7 +161,7 @@ module AdzerkDecisionSdk
|
|
|
157
161
|
:'skip_selection',
|
|
158
162
|
:'ad_query',
|
|
159
163
|
:'floor_price',
|
|
160
|
-
:'floor_cpc'
|
|
164
|
+
:'floor_cpc',
|
|
161
165
|
])
|
|
162
166
|
end
|
|
163
167
|
|
|
@@ -273,6 +277,10 @@ module AdzerkDecisionSdk
|
|
|
273
277
|
if attributes.key?(:'floor_cpc')
|
|
274
278
|
self.floor_cpc = attributes[:'floor_cpc']
|
|
275
279
|
end
|
|
280
|
+
|
|
281
|
+
if attributes.key?(:'skip_filters')
|
|
282
|
+
self.skip_filters = attributes[:'skip_filters']
|
|
283
|
+
end
|
|
276
284
|
end
|
|
277
285
|
|
|
278
286
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -338,7 +346,8 @@ module AdzerkDecisionSdk
|
|
|
338
346
|
skip_selection == o.skip_selection &&
|
|
339
347
|
ad_query == o.ad_query &&
|
|
340
348
|
floor_price == o.floor_price &&
|
|
341
|
-
floor_cpc == o.floor_cpc
|
|
349
|
+
floor_cpc == o.floor_cpc &&
|
|
350
|
+
skip_filters == o.skip_filters
|
|
342
351
|
end
|
|
343
352
|
|
|
344
353
|
# @see the `==` method
|
|
@@ -350,7 +359,7 @@ module AdzerkDecisionSdk
|
|
|
350
359
|
# Calculates hash code according to all attributes.
|
|
351
360
|
# @return [Integer] Hash code
|
|
352
361
|
def 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
|
|
362
|
+
[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, skip_filters].hash
|
|
354
363
|
end
|
|
355
364
|
|
|
356
365
|
# Builds the object from hash
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Adzerk Decision API
|
|
3
|
+
|
|
4
|
+
#Adzerk Decision API
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.1.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module AdzerkDecisionSdk
|
|
17
|
+
class SkipFilters
|
|
18
|
+
# Geodistance filter, which skips geodistance targeting if true.
|
|
19
|
+
attr_accessor :distance
|
|
20
|
+
|
|
21
|
+
# Facet targeting filter, which skips facet targeting if true.
|
|
22
|
+
attr_accessor :facet
|
|
23
|
+
|
|
24
|
+
# Geodistance filter, which skips geodistance targeting if true.
|
|
25
|
+
attr_accessor :geodistance
|
|
26
|
+
|
|
27
|
+
# Geolocation filter, which skips location targeting if true.
|
|
28
|
+
attr_accessor :geolocation
|
|
29
|
+
|
|
30
|
+
# Keyword limit filter, which skips all (ad and/or flight) keyword targeting if true.
|
|
31
|
+
attr_accessor :keyword
|
|
32
|
+
|
|
33
|
+
# Geolocation filter, which skips location targeting if true.
|
|
34
|
+
attr_accessor :location
|
|
35
|
+
|
|
36
|
+
# Placement limit filter, where no advertiser placement limit if true.
|
|
37
|
+
attr_accessor :placement_limit
|
|
38
|
+
|
|
39
|
+
# Site/zone limit filter, which skips site/zone targeting if true.
|
|
40
|
+
attr_accessor :site_zone
|
|
41
|
+
|
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
|
+
def self.attribute_map
|
|
44
|
+
{
|
|
45
|
+
:'distance' => :'distance',
|
|
46
|
+
:'facet' => :'facet',
|
|
47
|
+
:'geodistance' => :'geodistance',
|
|
48
|
+
:'geolocation' => :'geolocation',
|
|
49
|
+
:'keyword' => :'keyword',
|
|
50
|
+
:'location' => :'location',
|
|
51
|
+
:'placement_limit' => :'placementLimit',
|
|
52
|
+
:'site_zone' => :'siteZone'
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Returns all the JSON keys this model knows about
|
|
57
|
+
def self.acceptable_attributes
|
|
58
|
+
attribute_map.values
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Attribute type mapping.
|
|
62
|
+
def self.openapi_types
|
|
63
|
+
{
|
|
64
|
+
:'distance' => :'Boolean',
|
|
65
|
+
:'facet' => :'Boolean',
|
|
66
|
+
:'geodistance' => :'Boolean',
|
|
67
|
+
:'geolocation' => :'Boolean',
|
|
68
|
+
:'keyword' => :'Boolean',
|
|
69
|
+
:'location' => :'Boolean',
|
|
70
|
+
:'placement_limit' => :'Boolean',
|
|
71
|
+
:'site_zone' => :'Boolean'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# List of attributes with nullable: true
|
|
76
|
+
def self.openapi_nullable
|
|
77
|
+
Set.new([
|
|
78
|
+
])
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Initializes the object
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AdzerkDecisionSdk::SkipFilters` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AdzerkDecisionSdk::SkipFilters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'distance')
|
|
97
|
+
self.distance = attributes[:'distance']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'facet')
|
|
101
|
+
self.facet = attributes[:'facet']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
if attributes.key?(:'geodistance')
|
|
105
|
+
self.geodistance = attributes[:'geodistance']
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
if attributes.key?(:'geolocation')
|
|
109
|
+
self.geolocation = attributes[:'geolocation']
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
if attributes.key?(:'keyword')
|
|
113
|
+
self.keyword = attributes[:'keyword']
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'location')
|
|
117
|
+
self.location = attributes[:'location']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'placement_limit')
|
|
121
|
+
self.placement_limit = attributes[:'placement_limit']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'site_zone')
|
|
125
|
+
self.site_zone = attributes[:'site_zone']
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
130
|
+
# @return Array for valid properties with the reasons
|
|
131
|
+
def list_invalid_properties
|
|
132
|
+
invalid_properties = Array.new
|
|
133
|
+
invalid_properties
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Check to see if the all the properties in the model are valid
|
|
137
|
+
# @return true if the model is valid
|
|
138
|
+
def valid?
|
|
139
|
+
true
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Checks equality by comparing each attribute.
|
|
143
|
+
# @param [Object] Object to be compared
|
|
144
|
+
def ==(o)
|
|
145
|
+
return true if self.equal?(o)
|
|
146
|
+
self.class == o.class &&
|
|
147
|
+
distance == o.distance &&
|
|
148
|
+
facet == o.facet &&
|
|
149
|
+
geodistance == o.geodistance &&
|
|
150
|
+
geolocation == o.geolocation &&
|
|
151
|
+
keyword == o.keyword &&
|
|
152
|
+
location == o.location &&
|
|
153
|
+
placement_limit == o.placement_limit &&
|
|
154
|
+
site_zone == o.site_zone
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# @see the `==` method
|
|
158
|
+
# @param [Object] Object to be compared
|
|
159
|
+
def eql?(o)
|
|
160
|
+
self == o
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Calculates hash code according to all attributes.
|
|
164
|
+
# @return [Integer] Hash code
|
|
165
|
+
def hash
|
|
166
|
+
[distance, facet, geodistance, geolocation, keyword, location, placement_limit, site_zone].hash
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Builds the object from hash
|
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
171
|
+
# @return [Object] Returns the model itself
|
|
172
|
+
def self.build_from_hash(attributes)
|
|
173
|
+
new.build_from_hash(attributes)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Builds the object from hash
|
|
177
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
178
|
+
# @return [Object] Returns the model itself
|
|
179
|
+
def build_from_hash(attributes)
|
|
180
|
+
return nil unless attributes.is_a?(Hash)
|
|
181
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
182
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
183
|
+
self.send("#{key}=", nil)
|
|
184
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
185
|
+
# check to ensure the input is an array given that the attribute
|
|
186
|
+
# is documented as an array but the input is not
|
|
187
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
188
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
189
|
+
end
|
|
190
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
191
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
self
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Deserializes the data based on type
|
|
199
|
+
# @param string type Data type
|
|
200
|
+
# @param string value Value to be deserialized
|
|
201
|
+
# @return [Object] Deserialized data
|
|
202
|
+
def _deserialize(type, value)
|
|
203
|
+
case type.to_sym
|
|
204
|
+
when :Time
|
|
205
|
+
Time.parse(value)
|
|
206
|
+
when :Date
|
|
207
|
+
Date.parse(value)
|
|
208
|
+
when :String
|
|
209
|
+
value.to_s
|
|
210
|
+
when :Integer
|
|
211
|
+
value.to_i
|
|
212
|
+
when :Float
|
|
213
|
+
value.to_f
|
|
214
|
+
when :Boolean
|
|
215
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
216
|
+
true
|
|
217
|
+
else
|
|
218
|
+
false
|
|
219
|
+
end
|
|
220
|
+
when :Object
|
|
221
|
+
# generic object (usually a Hash), return directly
|
|
222
|
+
value
|
|
223
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
224
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
225
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
226
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
227
|
+
k_type = Regexp.last_match[:k_type]
|
|
228
|
+
v_type = Regexp.last_match[:v_type]
|
|
229
|
+
{}.tap do |hash|
|
|
230
|
+
value.each do |k, v|
|
|
231
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
else # model
|
|
235
|
+
# models (e.g. Pet) or oneOf
|
|
236
|
+
klass = AdzerkDecisionSdk.const_get(type)
|
|
237
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
# Returns the string representation of the object
|
|
242
|
+
# @return [String] String presentation of the object
|
|
243
|
+
def to_s
|
|
244
|
+
to_hash.to_s
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
248
|
+
# @return [Hash] Returns the object in the form of hash
|
|
249
|
+
def to_body
|
|
250
|
+
to_hash
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Returns the object in the form of hash
|
|
254
|
+
# @return [Hash] Returns the object in the form of hash
|
|
255
|
+
def to_hash
|
|
256
|
+
hash = {}
|
|
257
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
258
|
+
value = self.send(attr)
|
|
259
|
+
if value.nil?
|
|
260
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
261
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
hash[param] = _to_hash(value)
|
|
265
|
+
end
|
|
266
|
+
hash
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Outputs non-array value in the form of hash
|
|
270
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
271
|
+
# @param [Object] value Any valid value
|
|
272
|
+
# @return [Hash] Returns the value in the form of hash
|
|
273
|
+
def _to_hash(value)
|
|
274
|
+
if value.is_a?(Array)
|
|
275
|
+
value.compact.map { |v| _to_hash(v) }
|
|
276
|
+
elsif value.is_a?(Hash)
|
|
277
|
+
{}.tap do |hash|
|
|
278
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
279
|
+
end
|
|
280
|
+
elsif value.respond_to? :to_hash
|
|
281
|
+
value.to_hash
|
|
282
|
+
else
|
|
283
|
+
value
|
|
284
|
+
end
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
end
|
|
@@ -19,10 +19,18 @@ module AdzerkDecisionSdk
|
|
|
19
19
|
# The UserKey used for UserDB Targeting
|
|
20
20
|
attr_accessor :key
|
|
21
21
|
|
|
22
|
+
# The assigned cohort for the User
|
|
23
|
+
attr_accessor :group
|
|
24
|
+
|
|
25
|
+
# Array of Segment Ids that will override any set on the UserDB record for the User
|
|
26
|
+
attr_accessor :segments
|
|
27
|
+
|
|
22
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
29
|
def self.attribute_map
|
|
24
30
|
{
|
|
25
|
-
:'key' => :'key'
|
|
31
|
+
:'key' => :'key',
|
|
32
|
+
:'group' => :'group',
|
|
33
|
+
:'segments' => :'segments'
|
|
26
34
|
}
|
|
27
35
|
end
|
|
28
36
|
|
|
@@ -34,7 +42,9 @@ module AdzerkDecisionSdk
|
|
|
34
42
|
# Attribute type mapping.
|
|
35
43
|
def self.openapi_types
|
|
36
44
|
{
|
|
37
|
-
:'key' => :'String'
|
|
45
|
+
:'key' => :'String',
|
|
46
|
+
:'group' => :'Integer',
|
|
47
|
+
:'segments' => :'Array<Integer>'
|
|
38
48
|
}
|
|
39
49
|
end
|
|
40
50
|
|
|
@@ -62,6 +72,16 @@ module AdzerkDecisionSdk
|
|
|
62
72
|
if attributes.key?(:'key')
|
|
63
73
|
self.key = attributes[:'key']
|
|
64
74
|
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'group')
|
|
77
|
+
self.group = attributes[:'group']
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'segments')
|
|
81
|
+
if (value = attributes[:'segments']).is_a?(Array)
|
|
82
|
+
self.segments = value
|
|
83
|
+
end
|
|
84
|
+
end
|
|
65
85
|
end
|
|
66
86
|
|
|
67
87
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -82,7 +102,9 @@ module AdzerkDecisionSdk
|
|
|
82
102
|
def ==(o)
|
|
83
103
|
return true if self.equal?(o)
|
|
84
104
|
self.class == o.class &&
|
|
85
|
-
key == o.key
|
|
105
|
+
key == o.key &&
|
|
106
|
+
group == o.group &&
|
|
107
|
+
segments == o.segments
|
|
86
108
|
end
|
|
87
109
|
|
|
88
110
|
# @see the `==` method
|
|
@@ -94,7 +116,7 @@ module AdzerkDecisionSdk
|
|
|
94
116
|
# Calculates hash code according to all attributes.
|
|
95
117
|
# @return [Integer] Hash code
|
|
96
118
|
def hash
|
|
97
|
-
[key].hash
|
|
119
|
+
[key, group, segments].hash
|
|
98
120
|
end
|
|
99
121
|
|
|
100
122
|
# Builds the object from hash
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: adzerk_decision_sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.0.pre.beta.
|
|
4
|
+
version: 1.0.0.pre.beta.17
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adzerk, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -16,40 +16,28 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1.
|
|
20
|
-
- - ">="
|
|
21
|
-
- !ruby/object:Gem::Version
|
|
22
|
-
version: 1.0.1
|
|
19
|
+
version: '1.4'
|
|
23
20
|
type: :runtime
|
|
24
21
|
prerelease: false
|
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
23
|
requirements:
|
|
27
24
|
- - "~>"
|
|
28
25
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '1.
|
|
30
|
-
- - ">="
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: 1.0.1
|
|
26
|
+
version: '1.4'
|
|
33
27
|
- !ruby/object:Gem::Dependency
|
|
34
28
|
name: rspec
|
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
|
36
30
|
requirements:
|
|
37
31
|
- - "~>"
|
|
38
32
|
- !ruby/object:Gem::Version
|
|
39
|
-
version: '3.
|
|
40
|
-
- - ">="
|
|
41
|
-
- !ruby/object:Gem::Version
|
|
42
|
-
version: 3.6.0
|
|
33
|
+
version: '3.12'
|
|
43
34
|
type: :development
|
|
44
35
|
prerelease: false
|
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
46
37
|
requirements:
|
|
47
38
|
- - "~>"
|
|
48
39
|
- !ruby/object:Gem::Version
|
|
49
|
-
version: '3.
|
|
50
|
-
- - ">="
|
|
51
|
-
- !ruby/object:Gem::Version
|
|
52
|
-
version: 3.6.0
|
|
40
|
+
version: '3.12'
|
|
53
41
|
description: Ruby library for the Adzerk Decision API
|
|
54
42
|
email:
|
|
55
43
|
- engineering@adzerk.com
|
|
@@ -78,6 +66,7 @@ files:
|
|
|
78
66
|
- docs/RequestConsent.md
|
|
79
67
|
- docs/RequestLocation.md
|
|
80
68
|
- docs/Response.md
|
|
69
|
+
- docs/SkipFilters.md
|
|
81
70
|
- docs/User.md
|
|
82
71
|
- docs/UserdbApi.md
|
|
83
72
|
- git_push.sh
|
|
@@ -100,6 +89,7 @@ files:
|
|
|
100
89
|
- lib/adzerk_decision_sdk/models/placement.rb
|
|
101
90
|
- lib/adzerk_decision_sdk/models/pricing_data.rb
|
|
102
91
|
- lib/adzerk_decision_sdk/models/request_location.rb
|
|
92
|
+
- lib/adzerk_decision_sdk/models/skip_filters.rb
|
|
103
93
|
- lib/adzerk_decision_sdk/models/user.rb
|
|
104
94
|
- lib/adzerk_decision_sdk/pixel_client.rb
|
|
105
95
|
- lib/adzerk_decision_sdk/rate_type.rb
|