late-sdk 0.0.950 → 0.0.952

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.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -0
  3. data/docs/AdCampaignsApi.md +155 -1
  4. data/docs/AdKeyword.md +3 -1
  5. data/docs/AdKeywordQuality.md +24 -0
  6. data/docs/AdScheduleWindow.md +32 -0
  7. data/docs/BoostPostRequest.md +2 -0
  8. data/docs/BoostPostRequestPromotedObject.md +20 -0
  9. data/docs/GetCampaignAdSchedule200Response.md +28 -0
  10. data/docs/GetCampaignAdSchedule200ResponsePerformance.md +22 -0
  11. data/docs/GetCampaignAdSchedule200ResponsePerformanceByDayOfWeekInner.md +26 -0
  12. data/docs/GetCampaignAdSchedule200ResponsePerformanceByHourInner.md +26 -0
  13. data/docs/UpdateCampaignAdSchedule200Response.md +22 -0
  14. data/docs/UpdateCampaignAdScheduleRequest.md +18 -0
  15. data/docs/UpdateCampaignAdScheduleRequestScheduleInner.md +28 -0
  16. data/lib/zernio-sdk/api/ad_campaigns_api.rb +166 -2
  17. data/lib/zernio-sdk/models/ad_keyword.rb +11 -2
  18. data/lib/zernio-sdk/models/ad_keyword_quality.rb +241 -0
  19. data/lib/zernio-sdk/models/ad_schedule_window.rb +329 -0
  20. data/lib/zernio-sdk/models/boost_post_request.rb +10 -1
  21. data/lib/zernio-sdk/models/boost_post_request_promoted_object.rb +159 -0
  22. data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response.rb +197 -0
  23. data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response_performance.rb +174 -0
  24. data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response_performance_by_day_of_week_inner.rb +218 -0
  25. data/lib/zernio-sdk/models/get_campaign_ad_schedule200_response_performance_by_hour_inner.rb +212 -0
  26. data/lib/zernio-sdk/models/update_campaign_ad_schedule200_response.rb +167 -0
  27. data/lib/zernio-sdk/models/update_campaign_ad_schedule_request.rb +176 -0
  28. data/lib/zernio-sdk/models/update_campaign_ad_schedule_request_schedule_inner.rb +362 -0
  29. data/lib/zernio-sdk/version.rb +1 -1
  30. data/lib/zernio-sdk.rb +10 -0
  31. data/openapi.yaml +230 -7
  32. data/spec/api/ad_campaigns_api_spec.rb +31 -1
  33. data/spec/models/ad_keyword_quality_spec.rb +66 -0
  34. data/spec/models/ad_keyword_spec.rb +6 -0
  35. data/spec/models/ad_schedule_window_spec.rb +90 -0
  36. data/spec/models/boost_post_request_promoted_object_spec.rb +42 -0
  37. data/spec/models/boost_post_request_spec.rb +6 -0
  38. data/spec/models/get_campaign_ad_schedule200_response_performance_by_day_of_week_inner_spec.rb +64 -0
  39. data/spec/models/get_campaign_ad_schedule200_response_performance_by_hour_inner_spec.rb +60 -0
  40. data/spec/models/get_campaign_ad_schedule200_response_performance_spec.rb +48 -0
  41. data/spec/models/get_campaign_ad_schedule200_response_spec.rb +66 -0
  42. data/spec/models/update_campaign_ad_schedule200_response_spec.rb +48 -0
  43. data/spec/models/update_campaign_ad_schedule_request_schedule_inner_spec.rb +78 -0
  44. data/spec/models/update_campaign_ad_schedule_request_spec.rb +36 -0
  45. data/zernio-sdk-0.0.952.gem +0 -0
  46. metadata +43 -3
  47. data/zernio-sdk-0.0.950.gem +0 -0
@@ -0,0 +1,362 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class UpdateCampaignAdScheduleRequestScheduleInner < ApiModelBase
18
+ attr_accessor :day_of_week
19
+
20
+ attr_accessor :start_hour
21
+
22
+ # Quarter-hours only.
23
+ attr_accessor :start_minute
24
+
25
+ # 24 means midnight at the end of the day.
26
+ attr_accessor :end_hour
27
+
28
+ # Quarter-hours only. Must be 0 when endHour is 24.
29
+ attr_accessor :end_minute
30
+
31
+ # Bid adjustment for this window. Null runs it at the campaign bid.
32
+ attr_accessor :bid_modifier
33
+
34
+ class EnumAttributeValidator
35
+ attr_reader :datatype
36
+ attr_reader :allowable_values
37
+
38
+ def initialize(datatype, allowable_values)
39
+ @allowable_values = allowable_values.map do |value|
40
+ case datatype.to_s
41
+ when /Integer/i
42
+ value.to_i
43
+ when /Float/i
44
+ value.to_f
45
+ else
46
+ value
47
+ end
48
+ end
49
+ end
50
+
51
+ def valid?(value)
52
+ !value || allowable_values.include?(value)
53
+ end
54
+ end
55
+
56
+ # Attribute mapping from ruby-style variable name to JSON key.
57
+ def self.attribute_map
58
+ {
59
+ :'day_of_week' => :'dayOfWeek',
60
+ :'start_hour' => :'startHour',
61
+ :'start_minute' => :'startMinute',
62
+ :'end_hour' => :'endHour',
63
+ :'end_minute' => :'endMinute',
64
+ :'bid_modifier' => :'bidModifier'
65
+ }
66
+ end
67
+
68
+ # Returns attribute mapping this model knows about
69
+ def self.acceptable_attribute_map
70
+ attribute_map
71
+ end
72
+
73
+ # Returns all the JSON keys this model knows about
74
+ def self.acceptable_attributes
75
+ acceptable_attribute_map.values
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.openapi_types
80
+ {
81
+ :'day_of_week' => :'String',
82
+ :'start_hour' => :'Integer',
83
+ :'start_minute' => :'Integer',
84
+ :'end_hour' => :'Integer',
85
+ :'end_minute' => :'Integer',
86
+ :'bid_modifier' => :'Float'
87
+ }
88
+ end
89
+
90
+ # List of attributes with nullable: true
91
+ def self.openapi_nullable
92
+ Set.new([
93
+ :'bid_modifier'
94
+ ])
95
+ end
96
+
97
+ # Initializes the object
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ def initialize(attributes = {})
100
+ if (!attributes.is_a?(Hash))
101
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::UpdateCampaignAdScheduleRequestScheduleInner` initialize method"
102
+ end
103
+
104
+ # check to see if the attribute exists and convert string to symbol for hash key
105
+ acceptable_attribute_map = self.class.acceptable_attribute_map
106
+ attributes = attributes.each_with_object({}) { |(k, v), h|
107
+ if (!acceptable_attribute_map.key?(k.to_sym))
108
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::UpdateCampaignAdScheduleRequestScheduleInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
109
+ end
110
+ h[k.to_sym] = v
111
+ }
112
+
113
+ if attributes.key?(:'day_of_week')
114
+ self.day_of_week = attributes[:'day_of_week']
115
+ else
116
+ self.day_of_week = nil
117
+ end
118
+
119
+ if attributes.key?(:'start_hour')
120
+ self.start_hour = attributes[:'start_hour']
121
+ else
122
+ self.start_hour = nil
123
+ end
124
+
125
+ if attributes.key?(:'start_minute')
126
+ self.start_minute = attributes[:'start_minute']
127
+ else
128
+ self.start_minute = START_MINUTE::N0
129
+ end
130
+
131
+ if attributes.key?(:'end_hour')
132
+ self.end_hour = attributes[:'end_hour']
133
+ else
134
+ self.end_hour = nil
135
+ end
136
+
137
+ if attributes.key?(:'end_minute')
138
+ self.end_minute = attributes[:'end_minute']
139
+ else
140
+ self.end_minute = END_MINUTE::N0
141
+ end
142
+
143
+ if attributes.key?(:'bid_modifier')
144
+ self.bid_modifier = attributes[:'bid_modifier']
145
+ else
146
+ self.bid_modifier = null
147
+ end
148
+ end
149
+
150
+ # Show invalid properties with the reasons. Usually used together with valid?
151
+ # @return Array for valid properties with the reasons
152
+ def list_invalid_properties
153
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
154
+ invalid_properties = Array.new
155
+ if @day_of_week.nil?
156
+ invalid_properties.push('invalid value for "day_of_week", day_of_week cannot be nil.')
157
+ end
158
+
159
+ if @start_hour.nil?
160
+ invalid_properties.push('invalid value for "start_hour", start_hour cannot be nil.')
161
+ end
162
+
163
+ if @start_hour > 23
164
+ invalid_properties.push('invalid value for "start_hour", must be smaller than or equal to 23.')
165
+ end
166
+
167
+ if @start_hour < 0
168
+ invalid_properties.push('invalid value for "start_hour", must be greater than or equal to 0.')
169
+ end
170
+
171
+ if @end_hour.nil?
172
+ invalid_properties.push('invalid value for "end_hour", end_hour cannot be nil.')
173
+ end
174
+
175
+ if @end_hour > 24
176
+ invalid_properties.push('invalid value for "end_hour", must be smaller than or equal to 24.')
177
+ end
178
+
179
+ if @end_hour < 0
180
+ invalid_properties.push('invalid value for "end_hour", must be greater than or equal to 0.')
181
+ end
182
+
183
+ if !@bid_modifier.nil? && @bid_modifier > 10
184
+ invalid_properties.push('invalid value for "bid_modifier", must be smaller than or equal to 10.')
185
+ end
186
+
187
+ if !@bid_modifier.nil? && @bid_modifier < 0.1
188
+ invalid_properties.push('invalid value for "bid_modifier", must be greater than or equal to 0.1.')
189
+ end
190
+
191
+ invalid_properties
192
+ end
193
+
194
+ # Check to see if the all the properties in the model are valid
195
+ # @return true if the model is valid
196
+ def valid?
197
+ warn '[DEPRECATED] the `valid?` method is obsolete'
198
+ return false if @day_of_week.nil?
199
+ day_of_week_validator = EnumAttributeValidator.new('String', ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"])
200
+ return false unless day_of_week_validator.valid?(@day_of_week)
201
+ return false if @start_hour.nil?
202
+ return false if @start_hour > 23
203
+ return false if @start_hour < 0
204
+ start_minute_validator = EnumAttributeValidator.new('Integer', [0, 15, 30, 45])
205
+ return false unless start_minute_validator.valid?(@start_minute)
206
+ return false if @end_hour.nil?
207
+ return false if @end_hour > 24
208
+ return false if @end_hour < 0
209
+ end_minute_validator = EnumAttributeValidator.new('Integer', [0, 15, 30, 45])
210
+ return false unless end_minute_validator.valid?(@end_minute)
211
+ return false if !@bid_modifier.nil? && @bid_modifier > 10
212
+ return false if !@bid_modifier.nil? && @bid_modifier < 0.1
213
+ true
214
+ end
215
+
216
+ # Custom attribute writer method checking allowed values (enum).
217
+ # @param [Object] day_of_week Object to be assigned
218
+ def day_of_week=(day_of_week)
219
+ validator = EnumAttributeValidator.new('String', ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"])
220
+ unless validator.valid?(day_of_week)
221
+ fail ArgumentError, "invalid value for \"day_of_week\", must be one of #{validator.allowable_values}."
222
+ end
223
+ @day_of_week = day_of_week
224
+ end
225
+
226
+ # Custom attribute writer method with validation
227
+ # @param [Object] start_hour Value to be assigned
228
+ def start_hour=(start_hour)
229
+ if start_hour.nil?
230
+ fail ArgumentError, 'start_hour cannot be nil'
231
+ end
232
+
233
+ if start_hour > 23
234
+ fail ArgumentError, 'invalid value for "start_hour", must be smaller than or equal to 23.'
235
+ end
236
+
237
+ if start_hour < 0
238
+ fail ArgumentError, 'invalid value for "start_hour", must be greater than or equal to 0.'
239
+ end
240
+
241
+ @start_hour = start_hour
242
+ end
243
+
244
+ # Custom attribute writer method checking allowed values (enum).
245
+ # @param [Object] start_minute Object to be assigned
246
+ def start_minute=(start_minute)
247
+ validator = EnumAttributeValidator.new('Integer', [0, 15, 30, 45])
248
+ unless validator.valid?(start_minute)
249
+ fail ArgumentError, "invalid value for \"start_minute\", must be one of #{validator.allowable_values}."
250
+ end
251
+ @start_minute = start_minute
252
+ end
253
+
254
+ # Custom attribute writer method with validation
255
+ # @param [Object] end_hour Value to be assigned
256
+ def end_hour=(end_hour)
257
+ if end_hour.nil?
258
+ fail ArgumentError, 'end_hour cannot be nil'
259
+ end
260
+
261
+ if end_hour > 24
262
+ fail ArgumentError, 'invalid value for "end_hour", must be smaller than or equal to 24.'
263
+ end
264
+
265
+ if end_hour < 0
266
+ fail ArgumentError, 'invalid value for "end_hour", must be greater than or equal to 0.'
267
+ end
268
+
269
+ @end_hour = end_hour
270
+ end
271
+
272
+ # Custom attribute writer method checking allowed values (enum).
273
+ # @param [Object] end_minute Object to be assigned
274
+ def end_minute=(end_minute)
275
+ validator = EnumAttributeValidator.new('Integer', [0, 15, 30, 45])
276
+ unless validator.valid?(end_minute)
277
+ fail ArgumentError, "invalid value for \"end_minute\", must be one of #{validator.allowable_values}."
278
+ end
279
+ @end_minute = end_minute
280
+ end
281
+
282
+ # Custom attribute writer method with validation
283
+ # @param [Object] bid_modifier Value to be assigned
284
+ def bid_modifier=(bid_modifier)
285
+ if !bid_modifier.nil? && bid_modifier > 10
286
+ fail ArgumentError, 'invalid value for "bid_modifier", must be smaller than or equal to 10.'
287
+ end
288
+
289
+ if !bid_modifier.nil? && bid_modifier < 0.1
290
+ fail ArgumentError, 'invalid value for "bid_modifier", must be greater than or equal to 0.1.'
291
+ end
292
+
293
+ @bid_modifier = bid_modifier
294
+ end
295
+
296
+ # Checks equality by comparing each attribute.
297
+ # @param [Object] Object to be compared
298
+ def ==(o)
299
+ return true if self.equal?(o)
300
+ self.class == o.class &&
301
+ day_of_week == o.day_of_week &&
302
+ start_hour == o.start_hour &&
303
+ start_minute == o.start_minute &&
304
+ end_hour == o.end_hour &&
305
+ end_minute == o.end_minute &&
306
+ bid_modifier == o.bid_modifier
307
+ end
308
+
309
+ # @see the `==` method
310
+ # @param [Object] Object to be compared
311
+ def eql?(o)
312
+ self == o
313
+ end
314
+
315
+ # Calculates hash code according to all attributes.
316
+ # @return [Integer] Hash code
317
+ def hash
318
+ [day_of_week, start_hour, start_minute, end_hour, end_minute, bid_modifier].hash
319
+ end
320
+
321
+ # Builds the object from hash
322
+ # @param [Hash] attributes Model attributes in the form of hash
323
+ # @return [Object] Returns the model itself
324
+ def self.build_from_hash(attributes)
325
+ return nil unless attributes.is_a?(Hash)
326
+ attributes = attributes.transform_keys(&:to_sym)
327
+ transformed_hash = {}
328
+ openapi_types.each_pair do |key, type|
329
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
330
+ transformed_hash["#{key}"] = nil
331
+ elsif type =~ /\AArray<(.*)>/i
332
+ # check to ensure the input is an array given that the attribute
333
+ # is documented as an array but the input is not
334
+ if attributes[attribute_map[key]].is_a?(Array)
335
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
336
+ end
337
+ elsif !attributes[attribute_map[key]].nil?
338
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
339
+ end
340
+ end
341
+ new(transformed_hash)
342
+ end
343
+
344
+ # Returns the object in the form of hash
345
+ # @return [Hash] Returns the object in the form of hash
346
+ def to_hash
347
+ hash = {}
348
+ self.class.attribute_map.each_pair do |attr, param|
349
+ value = self.send(attr)
350
+ if value.nil?
351
+ is_nullable = self.class.openapi_nullable.include?(attr)
352
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
353
+ end
354
+
355
+ hash[param] = _to_hash(value)
356
+ end
357
+ hash
358
+ end
359
+
360
+ end
361
+
362
+ end
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.950'
14
+ VERSION = '0.0.952'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -37,12 +37,14 @@ require 'zernio-sdk/models/ad_engagement_counts'
37
37
  require 'zernio-sdk/models/ad_funnel_counts'
38
38
  require 'zernio-sdk/models/ad_keyword'
39
39
  require 'zernio-sdk/models/ad_keyword_metrics'
40
+ require 'zernio-sdk/models/ad_keyword_quality'
40
41
  require 'zernio-sdk/models/ad_metrics'
41
42
  require 'zernio-sdk/models/ad_negative_keyword_list'
42
43
  require 'zernio-sdk/models/ad_negative_keyword_list_keyword'
43
44
  require 'zernio-sdk/models/ad_promoted_object'
44
45
  require 'zernio-sdk/models/ad_review_status'
45
46
  require 'zernio-sdk/models/ad_schedule'
47
+ require 'zernio-sdk/models/ad_schedule_window'
46
48
  require 'zernio-sdk/models/ad_status'
47
49
  require 'zernio-sdk/models/ad_tracking'
48
50
  require 'zernio-sdk/models/ad_tree_ad_set'
@@ -140,6 +142,7 @@ require 'zernio-sdk/models/bookmark_post_request'
140
142
  require 'zernio-sdk/models/boost_post_request'
141
143
  require 'zernio-sdk/models/boost_post_request_budget'
142
144
  require 'zernio-sdk/models/boost_post_request_platform_specific_data'
145
+ require 'zernio-sdk/models/boost_post_request_promoted_object'
143
146
  require 'zernio-sdk/models/boost_post_request_schedule'
144
147
  require 'zernio-sdk/models/boost_post_request_targeting'
145
148
  require 'zernio-sdk/models/boost_post_request_targeting_cities_inner'
@@ -638,6 +641,10 @@ require 'zernio-sdk/models/get_call200_response'
638
641
  require 'zernio-sdk/models/get_calls_usage200_response'
639
642
  require 'zernio-sdk/models/get_calls_usage200_response_groups_inner'
640
643
  require 'zernio-sdk/models/get_calls_usage200_response_totals'
644
+ require 'zernio-sdk/models/get_campaign_ad_schedule200_response'
645
+ require 'zernio-sdk/models/get_campaign_ad_schedule200_response_performance'
646
+ require 'zernio-sdk/models/get_campaign_ad_schedule200_response_performance_by_day_of_week_inner'
647
+ require 'zernio-sdk/models/get_campaign_ad_schedule200_response_performance_by_hour_inner'
641
648
  require 'zernio-sdk/models/get_campaign_analytics202_response'
642
649
  require 'zernio-sdk/models/get_campaign_bidding200_response'
643
650
  require 'zernio-sdk/models/get_campaign_targeting200_response'
@@ -1722,6 +1729,9 @@ require 'zernio-sdk/models/update_business_agent_settings_request'
1722
1729
  require 'zernio-sdk/models/update_business_agent_settings_request_followup'
1723
1730
  require 'zernio-sdk/models/update_business_agent_settings_request_handoff'
1724
1731
  require 'zernio-sdk/models/update_business_agent_settings_request_rollout'
1732
+ require 'zernio-sdk/models/update_campaign_ad_schedule200_response'
1733
+ require 'zernio-sdk/models/update_campaign_ad_schedule_request'
1734
+ require 'zernio-sdk/models/update_campaign_ad_schedule_request_schedule_inner'
1725
1735
  require 'zernio-sdk/models/update_campaign_assets200_response'
1726
1736
  require 'zernio-sdk/models/update_campaign_assets_request'
1727
1737
  require 'zernio-sdk/models/update_campaign_targeting200_response'