adzerk_decision_sdk 1.0.0.pre.beta.5 → 1.0.0.pre.beta.6

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: 4154c223439a9d6cfedb9305e6b3e91b0b9a6330b90d5c33550dcb6cde8b8c8a
4
- data.tar.gz: 5547ecb242a0315d73c801f74cf092eac70d061e1b1e6ff5fd8271a5ba633fd9
3
+ metadata.gz: fce29c00b972834e2083e8c1b2a76fb8a89c9a79d7ff19ec830b119f2556f658
4
+ data.tar.gz: 946df902d9a95dd4861d0d3c1d71b8e9a3a4456230806bbe6ac201c5e5cbbfa9
5
5
  SHA512:
6
- metadata.gz: 78e46ff3095a383b3f1d33df22bce69ab27243250d21e6a8ec28e655e814655a663342024a701009e2b09128e8ee25b2561e67e4d2b32b2cef2598fe91d4d3f1
7
- data.tar.gz: d13e458a93075865334562e4efc4f671b621ca451c8baa510cd2e5e0278346f4977f6cf4e1dea7ca32b3847988a4507b967f38c94ac1da192f76dcfe2494b164
6
+ metadata.gz: 55685179100bc74b81339c9c220700094b70f42f8635793708d37ba6241482fbd28ad855cd147e59dc3c261bf84caf98d05ab38354ffc9ae7438152d0ea3e4db
7
+ data.tar.gz: 324b1ffb753da43fabbfba416be61895def6ad26f0c96452bd7d3c0947c5d48feba923a5a0c3ac7d1f202355ae98e2387aca1295b6dfa47452e0ca249edf5606
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- adzerk_decision_sdk (1.0.0.pre.beta.3)
4
+ adzerk_decision_sdk (1.0.0.pre.beta.5)
5
5
  json (~> 2.1, >= 2.1.0)
6
6
  typhoeus (~> 1.0, >= 1.0.1)
7
7
 
@@ -20,8 +20,10 @@ Name | Type | Description | Notes
20
20
  **count** | **Integer** | (BETA) The number of ads to return per placement. Integer between 1 and 20 | [optional]
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
+ **ecpm_partitions** | **Array<String>** | (BETA) The names of the eCPM Partitions that should be used to source eCPM data for auctions | [optional]
23
24
  **event_multiplier** | **Integer** | | [optional]
24
25
  **skip_selection** | **Boolean** | | [optional]
26
+ **ad_query** | [**Object**](.md) | | [optional]
25
27
 
26
28
  ## Code Sample
27
29
 
@@ -44,8 +46,10 @@ instance = AdzerkDecisionSdk::Placement.new(div_name: null,
44
46
  count: null,
45
47
  proportionality: null,
46
48
  ecpm_partition: null,
49
+ ecpm_partitions: null,
47
50
  event_multiplier: null,
48
- skip_selection: null)
51
+ skip_selection: null,
52
+ ad_query: null)
49
53
  ```
50
54
 
51
55
 
@@ -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 = {})
@@ -26,6 +28,14 @@ module AdzerkDecisionSdk
26
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)
@@ -62,10 +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
+
65
68
  attr_accessor :event_multiplier
66
69
 
67
70
  attr_accessor :skip_selection
68
71
 
72
+ attr_accessor :ad_query
73
+
69
74
  # Attribute mapping from ruby-style variable name to JSON key.
70
75
  def self.attribute_map
71
76
  {
@@ -85,8 +90,10 @@ module AdzerkDecisionSdk
85
90
  :'count' => :'count',
86
91
  :'proportionality' => :'proportionality',
87
92
  :'ecpm_partition' => :'ecpmPartition',
93
+ :'ecpm_partitions' => :'ecpmPartitions',
88
94
  :'event_multiplier' => :'eventMultiplier',
89
- :'skip_selection' => :'skipSelection'
95
+ :'skip_selection' => :'skipSelection',
96
+ :'ad_query' => :'adQuery'
90
97
  }
91
98
  end
92
99
 
@@ -109,8 +116,10 @@ module AdzerkDecisionSdk
109
116
  :'count' => :'Integer',
110
117
  :'proportionality' => :'Boolean',
111
118
  :'ecpm_partition' => :'String',
119
+ :'ecpm_partitions' => :'Array<String>',
112
120
  :'event_multiplier' => :'Integer',
113
- :'skip_selection' => :'Boolean'
121
+ :'skip_selection' => :'Boolean',
122
+ :'ad_query' => :'Object'
114
123
  }
115
124
  end
116
125
 
@@ -129,8 +138,10 @@ module AdzerkDecisionSdk
129
138
  :'count',
130
139
  :'proportionality',
131
140
  :'ecpm_partition',
141
+ :'ecpm_partitions',
132
142
  :'event_multiplier',
133
- :'skip_selection'
143
+ :'skip_selection',
144
+ :'ad_query'
134
145
  ])
135
146
  end
136
147
 
@@ -221,6 +232,12 @@ module AdzerkDecisionSdk
221
232
  self.ecpm_partition = attributes[:'ecpm_partition']
222
233
  end
223
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
+
224
241
  if attributes.key?(:'event_multiplier')
225
242
  self.event_multiplier = attributes[:'event_multiplier']
226
243
  end
@@ -228,6 +245,10 @@ module AdzerkDecisionSdk
228
245
  if attributes.key?(:'skip_selection')
229
246
  self.skip_selection = attributes[:'skip_selection']
230
247
  end
248
+
249
+ if attributes.key?(:'ad_query')
250
+ self.ad_query = attributes[:'ad_query']
251
+ end
231
252
  end
232
253
 
233
254
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -288,8 +309,10 @@ module AdzerkDecisionSdk
288
309
  count == o.count &&
289
310
  proportionality == o.proportionality &&
290
311
  ecpm_partition == o.ecpm_partition &&
312
+ ecpm_partitions == o.ecpm_partitions &&
291
313
  event_multiplier == o.event_multiplier &&
292
- skip_selection == o.skip_selection
314
+ skip_selection == o.skip_selection &&
315
+ ad_query == o.ad_query
293
316
  end
294
317
 
295
318
  # @see the `==` method
@@ -301,7 +324,7 @@ module AdzerkDecisionSdk
301
324
  # Calculates hash code according to all attributes.
302
325
  # @return [Integer] Hash code
303
326
  def 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
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
305
328
  end
306
329
 
307
330
  # Builds the object from hash
@@ -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.5'
14
+ VERSION = '1.0.0-beta.6'
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.5
4
+ version: 1.0.0.pre.beta.6
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-10-28 00:00:00.000000000 Z
11
+ date: 2021-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus