adzerk_decision_sdk 1.0.0.pre.beta.4 → 1.0.0.pre.beta.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d830e7e6e25ec7ae418affc0b46b52890aeb194c09eec309f4cf96eea8c1117
4
- data.tar.gz: d3ab9c88d2bb6bcda4a10bfa0868144de86392b038dab1896d07ad9cdb5e258f
3
+ metadata.gz: 4154c223439a9d6cfedb9305e6b3e91b0b9a6330b90d5c33550dcb6cde8b8c8a
4
+ data.tar.gz: 5547ecb242a0315d73c801f74cf092eac70d061e1b1e6ff5fd8271a5ba633fd9
5
5
  SHA512:
6
- metadata.gz: d7bc469e35b4578389cc518337b495d54df6650bd1c5e97ec00bf333668623da24fb05325a6d15a59bf47dc134cbc1941ac023f117f97668f018ae332340bf40
7
- data.tar.gz: cb2e7afe0f9ec11cba6eed0389e2ea81e99b5686e927d297ba15024931c62e69ba6a27736cb8d1f1b8b87cd613a7046f80144f1f611fe145a92c48517a4d1271
6
+ metadata.gz: 78e46ff3095a383b3f1d33df22bce69ab27243250d21e6a8ec28e655e814655a663342024a701009e2b09128e8ee25b2561e67e4d2b32b2cef2598fe91d4d3f1
7
+ data.tar.gz: d13e458a93075865334562e4efc4f671b621ca451c8baa510cd2e5e0278346f4977f6cf4e1dea7ca32b3847988a4507b967f38c94ac1da192f76dcfe2494b164
@@ -7,7 +7,7 @@ Name | Type | Description | Notes
7
7
  **type** | **String** | | [optional]
8
8
  **template** | **String** | | [optional]
9
9
  **custom_template** | **String** | | [optional]
10
- **data** | [**DecisionData**](DecisionData.md) | | [optional]
10
+ **data** | [**Object**](.md) | | [optional]
11
11
  **body** | **String** | | [optional]
12
12
 
13
13
  ## Code Sample
@@ -13,6 +13,7 @@ Name | Type | Description | Notes
13
13
  **contents** | [**Array<Content>**](Content.md) | | [optional]
14
14
  **impression_url** | **String** | | [optional]
15
15
  **events** | [**Array<Event>**](Event.md) | | [optional]
16
+ **matched_points** | [**Array<MatchedPoint>**](MatchedPoint.md) | | [optional]
16
17
  **pricing** | [**PricingData**](PricingData.md) | | [optional]
17
18
 
18
19
  ## Code Sample
@@ -29,6 +30,7 @@ instance = AdzerkDecisionSdk::Decision.new(ad_id: null,
29
30
  contents: null,
30
31
  impression_url: null,
31
32
  events: null,
33
+ matched_points: null,
32
34
  pricing: null)
33
35
  ```
34
36
 
@@ -18,6 +18,10 @@ Name | Type | Description | Notes
18
18
  **enable_user_dbip** | **Boolean** | If true, override the IP address of the request with the IP address supplied on the UserKey. If no IP address is found on the UserKey, this will fall back to the IP address on the request. Requires UserDB | [optional]
19
19
  **consent** | [**Object**](.md) | Object that sets the data consent preferences. Other consent settings are available in the GDPR settings documentation. | [optional]
20
20
  **device_id** | **String** | RTB requests only - sets an Identifier for Advertisers (IFA or IDFA) | [optional]
21
+ **parallel** | **Boolean** | | [optional]
22
+ **intended_latitude** | **String** | | [optional]
23
+ **intended_longitude** | **String** | | [optional]
24
+ **include_matched_points** | **Boolean** | | [optional]
21
25
 
22
26
  ## Code Sample
23
27
 
@@ -37,7 +41,11 @@ instance = AdzerkDecisionSdk::DecisionRequest.new(placements: null,
37
41
  enable_bot_filtering: null,
38
42
  enable_user_dbip: null,
39
43
  consent: null,
40
- device_id: null)
44
+ device_id: null,
45
+ parallel: null,
46
+ intended_latitude: null,
47
+ intended_longitude: null,
48
+ include_matched_points: null)
41
49
  ```
42
50
 
43
51
 
@@ -0,0 +1,19 @@
1
+ # AdzerkDecisionSdk::MatchedPoint
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **lat** | **String** | | [optional]
8
+ **lon** | **String** | | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'AdzerkDecisionSdk'
14
+
15
+ instance = AdzerkDecisionSdk::MatchedPoint.new(lat: null,
16
+ lon: null)
17
+ ```
18
+
19
+
@@ -21,6 +21,7 @@ Name | Type | Description | Notes
21
21
  **proportionality** | **Boolean** | (BETA) If true, fills ads in a multi-winner placement in proportion to the flight's goals | [optional]
22
22
  **ecpm_partition** | **String** | (BETA) The name of the eCPM Partition that should be used to source eCPM data for auctions | [optional]
23
23
  **event_multiplier** | **Integer** | | [optional]
24
+ **skip_selection** | **Boolean** | | [optional]
24
25
 
25
26
  ## Code Sample
26
27
 
@@ -43,7 +44,8 @@ instance = AdzerkDecisionSdk::Placement.new(div_name: null,
43
44
  count: null,
44
45
  proportionality: null,
45
46
  ecpm_partition: null,
46
- event_multiplier: null)
47
+ event_multiplier: null,
48
+ skip_selection: null)
47
49
  ```
48
50
 
49
51
 
@@ -0,0 +1,19 @@
1
+ # AdzerkDecisionSdk::RequestLocation
2
+
3
+ ## Properties
4
+
5
+ Name | Type | Description | Notes
6
+ ------------ | ------------- | ------------- | -------------
7
+ **latitude** | **String** | | [optional]
8
+ **longitude** | **String** | | [optional]
9
+
10
+ ## Code Sample
11
+
12
+ ```ruby
13
+ require 'AdzerkDecisionSdk'
14
+
15
+ instance = AdzerkDecisionSdk::RequestLocation.new(latitude: null,
16
+ longitude: null)
17
+ ```
18
+
19
+
@@ -24,13 +24,13 @@ require 'adzerk_decision_sdk/configuration'
24
24
  require 'adzerk_decision_sdk/models/consent_request'
25
25
  require 'adzerk_decision_sdk/models/content'
26
26
  require 'adzerk_decision_sdk/models/decision'
27
- require 'adzerk_decision_sdk/models/decision_data'
28
27
  require 'adzerk_decision_sdk/models/event'
29
28
  require 'adzerk_decision_sdk/models/placement'
30
29
  require 'adzerk_decision_sdk/models/pricing_data'
31
30
  require 'adzerk_decision_sdk/models/decision_request'
32
31
  require 'adzerk_decision_sdk/models/decision_response'
33
32
  require 'adzerk_decision_sdk/models/user'
33
+ require 'adzerk_decision_sdk/models/matched_point'
34
34
 
35
35
  # APIs
36
36
  require 'adzerk_decision_sdk/api/decision_api'
@@ -50,9 +50,10 @@ module AdzerkDecisionSdk
50
50
  @logger.info("Requesting with headers: #{opts[:header_params]}")
51
51
 
52
52
  response = @api.get_decisions(opts)
53
+ @logger.info("Received response: #{response}")
53
54
 
54
55
  parsed_response = parse_response(response)
55
- @logger.info("Received response: #{parsed_response}")
56
+ @logger.info("Parsed response: #{parsed_response}")
56
57
 
57
58
  return parsed_response
58
59
  end
@@ -41,7 +41,7 @@ module AdzerkDecisionSdk
41
41
  :'type' => :'String',
42
42
  :'template' => :'String',
43
43
  :'custom_template' => :'String',
44
- :'data' => :'DecisionData',
44
+ :'data' => :'Object',
45
45
  :'body' => :'String'
46
46
  }
47
47
  end
@@ -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
@@ -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
@@ -13,40 +13,24 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module AdzerkDecisionSdk
16
- class DecisionData
17
- attr_accessor :image_url
16
+ class MatchedPoint
17
+ attr_accessor :lat
18
18
 
19
- attr_accessor :file_name
20
-
21
- attr_accessor :title
22
-
23
- attr_accessor :width
24
-
25
- attr_accessor :height
26
-
27
- attr_accessor :custom_data
19
+ attr_accessor :lon
28
20
 
29
21
  # Attribute mapping from ruby-style variable name to JSON key.
30
22
  def self.attribute_map
31
23
  {
32
- :'image_url' => :'imageUrl',
33
- :'file_name' => :'fileName',
34
- :'title' => :'title',
35
- :'width' => :'width',
36
- :'height' => :'height',
37
- :'custom_data' => :'customData'
24
+ :'lat' => :'lat',
25
+ :'lon' => :'lon'
38
26
  }
39
27
  end
40
28
 
41
29
  # Attribute type mapping.
42
30
  def self.openapi_types
43
31
  {
44
- :'image_url' => :'String',
45
- :'file_name' => :'String',
46
- :'title' => :'String',
47
- :'width' => :'Integer',
48
- :'height' => :'Integer',
49
- :'custom_data' => :'Object'
32
+ :'lat' => :'String',
33
+ :'lon' => :'String'
50
34
  }
51
35
  end
52
36
 
@@ -60,39 +44,23 @@ module AdzerkDecisionSdk
60
44
  # @param [Hash] attributes Model attributes in the form of hash
61
45
  def initialize(attributes = {})
62
46
  if (!attributes.is_a?(Hash))
63
- fail ArgumentError, "The input argument (attributes) must be a hash in `AdzerkDecisionSdk::DecisionData` initialize method"
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AdzerkDecisionSdk::MatchedPoint` initialize method"
64
48
  end
65
49
 
66
50
  # check to see if the attribute exists and convert string to symbol for hash key
67
51
  attributes = attributes.each_with_object({}) { |(k, v), h|
68
52
  if (!self.class.attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `AdzerkDecisionSdk::DecisionData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
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
70
54
  end
71
55
  h[k.to_sym] = v
72
56
  }
73
57
 
74
- if attributes.key?(:'image_url')
75
- self.image_url = attributes[:'image_url']
76
- end
77
-
78
- if attributes.key?(:'file_name')
79
- self.file_name = attributes[:'file_name']
80
- end
81
-
82
- if attributes.key?(:'title')
83
- self.title = attributes[:'title']
84
- end
85
-
86
- if attributes.key?(:'width')
87
- self.width = attributes[:'width']
88
- end
89
-
90
- if attributes.key?(:'height')
91
- self.height = attributes[:'height']
58
+ if attributes.key?(:'lat')
59
+ self.lat = attributes[:'lat']
92
60
  end
93
61
 
94
- if attributes.key?(:'custom_data')
95
- self.custom_data = attributes[:'custom_data']
62
+ if attributes.key?(:'lon')
63
+ self.lon = attributes[:'lon']
96
64
  end
97
65
  end
98
66
 
@@ -114,12 +82,8 @@ module AdzerkDecisionSdk
114
82
  def ==(o)
115
83
  return true if self.equal?(o)
116
84
  self.class == o.class &&
117
- image_url == o.image_url &&
118
- file_name == o.file_name &&
119
- title == o.title &&
120
- width == o.width &&
121
- height == o.height &&
122
- custom_data == o.custom_data
85
+ lat == o.lat &&
86
+ lon == o.lon
123
87
  end
124
88
 
125
89
  # @see the `==` method
@@ -131,7 +95,7 @@ module AdzerkDecisionSdk
131
95
  # Calculates hash code according to all attributes.
132
96
  # @return [Integer] Hash code
133
97
  def hash
134
- [image_url, file_name, title, width, height, custom_data].hash
98
+ [lat, lon].hash
135
99
  end
136
100
 
137
101
  # Builds the object from hash
@@ -64,6 +64,8 @@ module AdzerkDecisionSdk
64
64
 
65
65
  attr_accessor :event_multiplier
66
66
 
67
+ attr_accessor :skip_selection
68
+
67
69
  # Attribute mapping from ruby-style variable name to JSON key.
68
70
  def self.attribute_map
69
71
  {
@@ -83,7 +85,8 @@ module AdzerkDecisionSdk
83
85
  :'count' => :'count',
84
86
  :'proportionality' => :'proportionality',
85
87
  :'ecpm_partition' => :'ecpmPartition',
86
- :'event_multiplier' => :'eventMultiplier'
88
+ :'event_multiplier' => :'eventMultiplier',
89
+ :'skip_selection' => :'skipSelection'
87
90
  }
88
91
  end
89
92
 
@@ -106,7 +109,8 @@ module AdzerkDecisionSdk
106
109
  :'count' => :'Integer',
107
110
  :'proportionality' => :'Boolean',
108
111
  :'ecpm_partition' => :'String',
109
- :'event_multiplier' => :'Integer'
112
+ :'event_multiplier' => :'Integer',
113
+ :'skip_selection' => :'Boolean'
110
114
  }
111
115
  end
112
116
 
@@ -125,7 +129,8 @@ module AdzerkDecisionSdk
125
129
  :'count',
126
130
  :'proportionality',
127
131
  :'ecpm_partition',
128
- :'event_multiplier'
132
+ :'event_multiplier',
133
+ :'skip_selection'
129
134
  ])
130
135
  end
131
136
 
@@ -219,6 +224,10 @@ module AdzerkDecisionSdk
219
224
  if attributes.key?(:'event_multiplier')
220
225
  self.event_multiplier = attributes[:'event_multiplier']
221
226
  end
227
+
228
+ if attributes.key?(:'skip_selection')
229
+ self.skip_selection = attributes[:'skip_selection']
230
+ end
222
231
  end
223
232
 
224
233
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -279,7 +288,8 @@ module AdzerkDecisionSdk
279
288
  count == o.count &&
280
289
  proportionality == o.proportionality &&
281
290
  ecpm_partition == o.ecpm_partition &&
282
- event_multiplier == o.event_multiplier
291
+ event_multiplier == o.event_multiplier &&
292
+ skip_selection == o.skip_selection
283
293
  end
284
294
 
285
295
  # @see the `==` method
@@ -291,7 +301,7 @@ module AdzerkDecisionSdk
291
301
  # Calculates hash code according to all attributes.
292
302
  # @return [Integer] Hash code
293
303
  def hash
294
- [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, event_multiplier].hash
304
+ [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, event_multiplier, skip_selection].hash
295
305
  end
296
306
 
297
307
  # Builds the object from hash
@@ -0,0 +1,215 @@
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: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module AdzerkDecisionSdk
16
+ class RequestLocation
17
+ attr_accessor :latitude
18
+
19
+ attr_accessor :longitude
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'latitude' => :'latitude',
25
+ :'longitude' => :'longitude'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.openapi_types
31
+ {
32
+ :'latitude' => :'String',
33
+ :'longitude' => :'String'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.openapi_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AdzerkDecisionSdk::RequestLocation` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
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
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'latitude')
59
+ self.latitude = attributes[:'latitude']
60
+ end
61
+
62
+ if attributes.key?(:'longitude')
63
+ self.longitude = attributes[:'longitude']
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ latitude == o.latitude &&
86
+ longitude == o.longitude
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ def hash
98
+ [latitude, longitude].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ new.build_from_hash(attributes)
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ self.class.openapi_types.each_pair do |key, type|
114
+ if type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :DateTime
135
+ DateTime.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ AdzerkDecisionSdk.const_get(type).build_from_hash(value)
166
+ end
167
+ end
168
+
169
+ # Returns the string representation of the object
170
+ # @return [String] String presentation of the object
171
+ def to_s
172
+ to_hash.to_s
173
+ end
174
+
175
+ # to_body is an alias to to_hash (backward compatibility)
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_body
178
+ to_hash
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ if value.nil?
188
+ is_nullable = self.class.openapi_nullable.include?(attr)
189
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
190
+ end
191
+
192
+ hash[param] = _to_hash(value)
193
+ end
194
+ hash
195
+ end
196
+
197
+ # Outputs non-array value in the form of hash
198
+ # For object, use to_hash. Otherwise, just return the value
199
+ # @param [Object] value Any valid value
200
+ # @return [Hash] Returns the value in the form of hash
201
+ def _to_hash(value)
202
+ if value.is_a?(Array)
203
+ value.compact.map { |v| _to_hash(v) }
204
+ elsif value.is_a?(Hash)
205
+ {}.tap do |hash|
206
+ value.each { |k, v| hash[k] = _to_hash(v) }
207
+ end
208
+ elsif value.respond_to? :to_hash
209
+ value.to_hash
210
+ else
211
+ value
212
+ end
213
+ end
214
+ end
215
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module AdzerkDecisionSdk
14
- VERSION = '1.0.0-beta.4'
14
+ VERSION = '1.0.0-beta.5'
15
15
  end
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
4
+ version: 1.0.0.pre.beta.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adzerk, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-03 00:00:00.000000000 Z
11
+ date: 2020-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -87,15 +87,16 @@ files:
87
87
  - docs/Content.md
88
88
  - docs/Decision.md
89
89
  - docs/DecisionApi.md
90
- - docs/DecisionData.md
91
90
  - docs/DecisionRequest.md
92
91
  - docs/DecisionResponse.md
93
92
  - docs/Event.md
94
93
  - docs/GdprConsent.md
94
+ - docs/MatchedPoint.md
95
95
  - docs/Placement.md
96
96
  - docs/PricingData.md
97
97
  - docs/Request.md
98
98
  - docs/RequestConsent.md
99
+ - docs/RequestLocation.md
99
100
  - docs/Response.md
100
101
  - docs/User.md
101
102
  - docs/UserdbApi.md
@@ -112,12 +113,13 @@ files:
112
113
  - lib/adzerk_decision_sdk/models/consent_request.rb
113
114
  - lib/adzerk_decision_sdk/models/content.rb
114
115
  - lib/adzerk_decision_sdk/models/decision.rb
115
- - lib/adzerk_decision_sdk/models/decision_data.rb
116
116
  - lib/adzerk_decision_sdk/models/decision_request.rb
117
117
  - lib/adzerk_decision_sdk/models/decision_response.rb
118
118
  - lib/adzerk_decision_sdk/models/event.rb
119
+ - lib/adzerk_decision_sdk/models/matched_point.rb
119
120
  - lib/adzerk_decision_sdk/models/placement.rb
120
121
  - lib/adzerk_decision_sdk/models/pricing_data.rb
122
+ - lib/adzerk_decision_sdk/models/request_location.rb
121
123
  - lib/adzerk_decision_sdk/models/user.rb
122
124
  - lib/adzerk_decision_sdk/pixel_client.rb
123
125
  - lib/adzerk_decision_sdk/rate_type.rb
@@ -1,27 +0,0 @@
1
- # AdzerkDecisionSdk::DecisionData
2
-
3
- ## Properties
4
-
5
- Name | Type | Description | Notes
6
- ------------ | ------------- | ------------- | -------------
7
- **image_url** | **String** | | [optional]
8
- **file_name** | **String** | | [optional]
9
- **title** | **String** | | [optional]
10
- **width** | **Integer** | | [optional]
11
- **height** | **Integer** | | [optional]
12
- **custom_data** | [**Object**](.md) | | [optional]
13
-
14
- ## Code Sample
15
-
16
- ```ruby
17
- require 'AdzerkDecisionSdk'
18
-
19
- instance = AdzerkDecisionSdk::DecisionData.new(image_url: null,
20
- file_name: null,
21
- title: null,
22
- width: null,
23
- height: null,
24
- custom_data: null)
25
- ```
26
-
27
-