late-sdk 0.0.853 → 0.0.855
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/README.md +3 -0
- data/docs/AdCampaignsApi.md +1 -1
- data/docs/AdDailyMetrics.md +2 -0
- data/docs/AdLibraryApi.md +109 -0
- data/docs/AdMetrics.md +2 -0
- data/docs/AdsTimelineResponseRowsInner.md +2 -0
- data/docs/CampaignAnalyticsResponseAnalyticsDailyInner.md +2 -0
- data/docs/SearchAdLibrary200Response.md +22 -0
- data/docs/SearchAdLibrary200ResponsePaging.md +20 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +2 -2
- data/lib/zernio-sdk/api/ad_library_api.rb +163 -0
- data/lib/zernio-sdk/models/ad_daily_metrics.rb +11 -1
- data/lib/zernio-sdk/models/ad_metrics.rb +11 -1
- data/lib/zernio-sdk/models/ads_timeline_response_rows_inner.rb +11 -1
- data/lib/zernio-sdk/models/campaign_analytics_response_analytics_daily_inner.rb +11 -1
- data/lib/zernio-sdk/models/search_ad_library200_response.rb +242 -0
- data/lib/zernio-sdk/models/search_ad_library200_response_paging.rb +159 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +135 -0
- data/spec/api/ad_campaigns_api_spec.rb +1 -1
- data/spec/api/ad_library_api_spec.rb +62 -0
- data/spec/models/ad_daily_metrics_spec.rb +6 -0
- data/spec/models/ad_metrics_spec.rb +6 -0
- data/spec/models/ads_timeline_response_rows_inner_spec.rb +6 -0
- data/spec/models/campaign_analytics_response_analytics_daily_inner_spec.rb +6 -0
- data/spec/models/search_ad_library200_response_paging_spec.rb +42 -0
- data/spec/models/search_ad_library200_response_spec.rb +52 -0
- data/zernio-sdk-0.0.855.gem +0 -0
- metadata +14 -2
- data/zernio-sdk-0.0.853.gem +0 -0
|
@@ -41,6 +41,9 @@ module Zernio
|
|
|
41
41
|
# Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07).
|
|
42
42
|
attr_accessor :conversions
|
|
43
43
|
|
|
44
|
+
# All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
|
|
45
|
+
attr_accessor :all_conversions
|
|
46
|
+
|
|
44
47
|
attr_accessor :cost_per_conversion
|
|
45
48
|
|
|
46
49
|
# Per-action-type counts merged across all ads on this day. Keys are platform-native action types.
|
|
@@ -68,6 +71,7 @@ module Zernio
|
|
|
68
71
|
:'cpc' => :'cpc',
|
|
69
72
|
:'cpm' => :'cpm',
|
|
70
73
|
:'conversions' => :'conversions',
|
|
74
|
+
:'all_conversions' => :'allConversions',
|
|
71
75
|
:'cost_per_conversion' => :'costPerConversion',
|
|
72
76
|
:'actions' => :'actions',
|
|
73
77
|
:'action_values' => :'actionValues',
|
|
@@ -99,6 +103,7 @@ module Zernio
|
|
|
99
103
|
:'cpc' => :'Float',
|
|
100
104
|
:'cpm' => :'Float',
|
|
101
105
|
:'conversions' => :'Float',
|
|
106
|
+
:'all_conversions' => :'Float',
|
|
102
107
|
:'cost_per_conversion' => :'Float',
|
|
103
108
|
:'actions' => :'Hash<String, Float>',
|
|
104
109
|
:'action_values' => :'Hash<String, Float>',
|
|
@@ -169,6 +174,10 @@ module Zernio
|
|
|
169
174
|
self.conversions = attributes[:'conversions']
|
|
170
175
|
end
|
|
171
176
|
|
|
177
|
+
if attributes.key?(:'all_conversions')
|
|
178
|
+
self.all_conversions = attributes[:'all_conversions']
|
|
179
|
+
end
|
|
180
|
+
|
|
172
181
|
if attributes.key?(:'cost_per_conversion')
|
|
173
182
|
self.cost_per_conversion = attributes[:'cost_per_conversion']
|
|
174
183
|
end
|
|
@@ -224,6 +233,7 @@ module Zernio
|
|
|
224
233
|
cpc == o.cpc &&
|
|
225
234
|
cpm == o.cpm &&
|
|
226
235
|
conversions == o.conversions &&
|
|
236
|
+
all_conversions == o.all_conversions &&
|
|
227
237
|
cost_per_conversion == o.cost_per_conversion &&
|
|
228
238
|
actions == o.actions &&
|
|
229
239
|
action_values == o.action_values &&
|
|
@@ -240,7 +250,7 @@ module Zernio
|
|
|
240
250
|
# Calculates hash code according to all attributes.
|
|
241
251
|
# @return [Integer] Hash code
|
|
242
252
|
def hash
|
|
243
|
-
[date, spend, impressions, reach, clicks, engagement, ctr, cpc, cpm, conversions, cost_per_conversion, actions, action_values, purchase_value, roas].hash
|
|
253
|
+
[date, spend, impressions, reach, clicks, engagement, ctr, cpc, cpm, conversions, all_conversions, cost_per_conversion, actions, action_values, purchase_value, roas].hash
|
|
244
254
|
end
|
|
245
255
|
|
|
246
256
|
# Builds the object from hash
|
|
@@ -38,6 +38,9 @@ module Zernio
|
|
|
38
38
|
# Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
|
|
39
39
|
attr_accessor :conversions
|
|
40
40
|
|
|
41
|
+
# All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
|
|
42
|
+
attr_accessor :all_conversions
|
|
43
|
+
|
|
41
44
|
# Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
|
|
42
45
|
attr_accessor :cost_per_conversion
|
|
43
46
|
|
|
@@ -125,6 +128,7 @@ module Zernio
|
|
|
125
128
|
:'cpm' => :'cpm',
|
|
126
129
|
:'engagement' => :'engagement',
|
|
127
130
|
:'conversions' => :'conversions',
|
|
131
|
+
:'all_conversions' => :'allConversions',
|
|
128
132
|
:'cost_per_conversion' => :'costPerConversion',
|
|
129
133
|
:'actions' => :'actions',
|
|
130
134
|
:'action_values' => :'actionValues',
|
|
@@ -176,6 +180,7 @@ module Zernio
|
|
|
176
180
|
:'cpm' => :'Float',
|
|
177
181
|
:'engagement' => :'Integer',
|
|
178
182
|
:'conversions' => :'Float',
|
|
183
|
+
:'all_conversions' => :'Float',
|
|
179
184
|
:'cost_per_conversion' => :'Float',
|
|
180
185
|
:'actions' => :'Hash<String, Integer>',
|
|
181
186
|
:'action_values' => :'Hash<String, Float>',
|
|
@@ -270,6 +275,10 @@ module Zernio
|
|
|
270
275
|
self.conversions = attributes[:'conversions']
|
|
271
276
|
end
|
|
272
277
|
|
|
278
|
+
if attributes.key?(:'all_conversions')
|
|
279
|
+
self.all_conversions = attributes[:'all_conversions']
|
|
280
|
+
end
|
|
281
|
+
|
|
273
282
|
if attributes.key?(:'cost_per_conversion')
|
|
274
283
|
self.cost_per_conversion = attributes[:'cost_per_conversion']
|
|
275
284
|
end
|
|
@@ -410,6 +419,7 @@ module Zernio
|
|
|
410
419
|
cpm == o.cpm &&
|
|
411
420
|
engagement == o.engagement &&
|
|
412
421
|
conversions == o.conversions &&
|
|
422
|
+
all_conversions == o.all_conversions &&
|
|
413
423
|
cost_per_conversion == o.cost_per_conversion &&
|
|
414
424
|
actions == o.actions &&
|
|
415
425
|
action_values == o.action_values &&
|
|
@@ -447,7 +457,7 @@ module Zernio
|
|
|
447
457
|
# Calculates hash code according to all attributes.
|
|
448
458
|
# @return [Integer] Hash code
|
|
449
459
|
def hash
|
|
450
|
-
[spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, cost_per_action, outbound_clicks, outbound_clicks_ctr, inline_link_clicks, inline_link_click_ctr, unique_clicks, unique_ctr, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at, date].hash
|
|
460
|
+
[spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, all_conversions, cost_per_conversion, actions, action_values, purchase_value, roas, cost_per_action, outbound_clicks, outbound_clicks_ctr, inline_link_clicks, inline_link_click_ctr, unique_clicks, unique_ctr, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at, date].hash
|
|
451
461
|
end
|
|
452
462
|
|
|
453
463
|
# Builds the object from hash
|
|
@@ -0,0 +1,242 @@
|
|
|
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 SearchAdLibrary200Response < ApiModelBase
|
|
18
|
+
attr_accessor :platform
|
|
19
|
+
|
|
20
|
+
attr_accessor :data
|
|
21
|
+
|
|
22
|
+
attr_accessor :paging
|
|
23
|
+
|
|
24
|
+
class EnumAttributeValidator
|
|
25
|
+
attr_reader :datatype
|
|
26
|
+
attr_reader :allowable_values
|
|
27
|
+
|
|
28
|
+
def initialize(datatype, allowable_values)
|
|
29
|
+
@allowable_values = allowable_values.map do |value|
|
|
30
|
+
case datatype.to_s
|
|
31
|
+
when /Integer/i
|
|
32
|
+
value.to_i
|
|
33
|
+
when /Float/i
|
|
34
|
+
value.to_f
|
|
35
|
+
else
|
|
36
|
+
value
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def valid?(value)
|
|
42
|
+
!value || allowable_values.include?(value)
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
|
+
def self.attribute_map
|
|
48
|
+
{
|
|
49
|
+
:'platform' => :'platform',
|
|
50
|
+
:'data' => :'data',
|
|
51
|
+
:'paging' => :'paging'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Returns attribute mapping this model knows about
|
|
56
|
+
def self.acceptable_attribute_map
|
|
57
|
+
attribute_map
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Returns all the JSON keys this model knows about
|
|
61
|
+
def self.acceptable_attributes
|
|
62
|
+
acceptable_attribute_map.values
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Attribute type mapping.
|
|
66
|
+
def self.openapi_types
|
|
67
|
+
{
|
|
68
|
+
:'platform' => :'String',
|
|
69
|
+
:'data' => :'Array<Object>',
|
|
70
|
+
:'paging' => :'SearchAdLibrary200ResponsePaging'
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# List of attributes with nullable: true
|
|
75
|
+
def self.openapi_nullable
|
|
76
|
+
Set.new([
|
|
77
|
+
])
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Initializes the object
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
if (!attributes.is_a?(Hash))
|
|
84
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::SearchAdLibrary200Response` initialize method"
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
88
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
89
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
90
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
91
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::SearchAdLibrary200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
92
|
+
end
|
|
93
|
+
h[k.to_sym] = v
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if attributes.key?(:'platform')
|
|
97
|
+
self.platform = attributes[:'platform']
|
|
98
|
+
else
|
|
99
|
+
self.platform = nil
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'data')
|
|
103
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
104
|
+
self.data = value
|
|
105
|
+
end
|
|
106
|
+
else
|
|
107
|
+
self.data = nil
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'paging')
|
|
111
|
+
self.paging = attributes[:'paging']
|
|
112
|
+
else
|
|
113
|
+
self.paging = nil
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
118
|
+
# @return Array for valid properties with the reasons
|
|
119
|
+
def list_invalid_properties
|
|
120
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
121
|
+
invalid_properties = Array.new
|
|
122
|
+
if @platform.nil?
|
|
123
|
+
invalid_properties.push('invalid value for "platform", platform cannot be nil.')
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @data.nil?
|
|
127
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @paging.nil?
|
|
131
|
+
invalid_properties.push('invalid value for "paging", paging cannot be nil.')
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
invalid_properties
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# Check to see if the all the properties in the model are valid
|
|
138
|
+
# @return true if the model is valid
|
|
139
|
+
def valid?
|
|
140
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
141
|
+
return false if @platform.nil?
|
|
142
|
+
platform_validator = EnumAttributeValidator.new('String', ["meta", "linkedin"])
|
|
143
|
+
return false unless platform_validator.valid?(@platform)
|
|
144
|
+
return false if @data.nil?
|
|
145
|
+
return false if @paging.nil?
|
|
146
|
+
true
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
150
|
+
# @param [Object] platform Object to be assigned
|
|
151
|
+
def platform=(platform)
|
|
152
|
+
validator = EnumAttributeValidator.new('String', ["meta", "linkedin"])
|
|
153
|
+
unless validator.valid?(platform)
|
|
154
|
+
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
155
|
+
end
|
|
156
|
+
@platform = platform
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Custom attribute writer method with validation
|
|
160
|
+
# @param [Object] data Value to be assigned
|
|
161
|
+
def data=(data)
|
|
162
|
+
if data.nil?
|
|
163
|
+
fail ArgumentError, 'data cannot be nil'
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
@data = data
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Custom attribute writer method with validation
|
|
170
|
+
# @param [Object] paging Value to be assigned
|
|
171
|
+
def paging=(paging)
|
|
172
|
+
if paging.nil?
|
|
173
|
+
fail ArgumentError, 'paging cannot be nil'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
@paging = paging
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Checks equality by comparing each attribute.
|
|
180
|
+
# @param [Object] Object to be compared
|
|
181
|
+
def ==(o)
|
|
182
|
+
return true if self.equal?(o)
|
|
183
|
+
self.class == o.class &&
|
|
184
|
+
platform == o.platform &&
|
|
185
|
+
data == o.data &&
|
|
186
|
+
paging == o.paging
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# @see the `==` method
|
|
190
|
+
# @param [Object] Object to be compared
|
|
191
|
+
def eql?(o)
|
|
192
|
+
self == o
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Calculates hash code according to all attributes.
|
|
196
|
+
# @return [Integer] Hash code
|
|
197
|
+
def hash
|
|
198
|
+
[platform, data, paging].hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Builds the object from hash
|
|
202
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
203
|
+
# @return [Object] Returns the model itself
|
|
204
|
+
def self.build_from_hash(attributes)
|
|
205
|
+
return nil unless attributes.is_a?(Hash)
|
|
206
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
207
|
+
transformed_hash = {}
|
|
208
|
+
openapi_types.each_pair do |key, type|
|
|
209
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
210
|
+
transformed_hash["#{key}"] = nil
|
|
211
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
212
|
+
# check to ensure the input is an array given that the attribute
|
|
213
|
+
# is documented as an array but the input is not
|
|
214
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
215
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
216
|
+
end
|
|
217
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
218
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
new(transformed_hash)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Returns the object in the form of hash
|
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
|
226
|
+
def to_hash
|
|
227
|
+
hash = {}
|
|
228
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
229
|
+
value = self.send(attr)
|
|
230
|
+
if value.nil?
|
|
231
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
232
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
hash[param] = _to_hash(value)
|
|
236
|
+
end
|
|
237
|
+
hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
end
|
|
@@ -0,0 +1,159 @@
|
|
|
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 SearchAdLibrary200ResponsePaging < ApiModelBase
|
|
18
|
+
# Cursor for the next page; null when exhausted.
|
|
19
|
+
attr_accessor :after
|
|
20
|
+
|
|
21
|
+
# LinkedIn only. Total matching ads.
|
|
22
|
+
attr_accessor :total
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'after' => :'after',
|
|
28
|
+
:'total' => :'total'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'after' => :'String',
|
|
46
|
+
:'total' => :'Integer'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
:'after',
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::SearchAdLibrary200ResponsePaging` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::SearchAdLibrary200ResponsePaging`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'after')
|
|
74
|
+
self.after = attributes[:'after']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'total')
|
|
78
|
+
self.total = attributes[:'total']
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
83
|
+
# @return Array for valid properties with the reasons
|
|
84
|
+
def list_invalid_properties
|
|
85
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
86
|
+
invalid_properties = Array.new
|
|
87
|
+
invalid_properties
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Check to see if the all the properties in the model are valid
|
|
91
|
+
# @return true if the model is valid
|
|
92
|
+
def valid?
|
|
93
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def ==(o)
|
|
100
|
+
return true if self.equal?(o)
|
|
101
|
+
self.class == o.class &&
|
|
102
|
+
after == o.after &&
|
|
103
|
+
total == o.total
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @see the `==` method
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def eql?(o)
|
|
109
|
+
self == o
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Calculates hash code according to all attributes.
|
|
113
|
+
# @return [Integer] Hash code
|
|
114
|
+
def hash
|
|
115
|
+
[after, total].hash
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def self.build_from_hash(attributes)
|
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
124
|
+
transformed_hash = {}
|
|
125
|
+
openapi_types.each_pair do |key, type|
|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
127
|
+
transformed_hash["#{key}"] = nil
|
|
128
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
129
|
+
# check to ensure the input is an array given that the attribute
|
|
130
|
+
# is documented as an array but the input is not
|
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
133
|
+
end
|
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
new(transformed_hash)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Returns the object in the form of hash
|
|
142
|
+
# @return [Hash] Returns the object in the form of hash
|
|
143
|
+
def to_hash
|
|
144
|
+
hash = {}
|
|
145
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
146
|
+
value = self.send(attr)
|
|
147
|
+
if value.nil?
|
|
148
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
149
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
hash[param] = _to_hash(value)
|
|
153
|
+
end
|
|
154
|
+
hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -1242,6 +1242,8 @@ require 'zernio-sdk/models/schedule_broadcast200_response_broadcast'
|
|
|
1242
1242
|
require 'zernio-sdk/models/schedule_broadcast_request'
|
|
1243
1243
|
require 'zernio-sdk/models/search_ad_interests200_response'
|
|
1244
1244
|
require 'zernio-sdk/models/search_ad_interests200_response_interests_inner'
|
|
1245
|
+
require 'zernio-sdk/models/search_ad_library200_response'
|
|
1246
|
+
require 'zernio-sdk/models/search_ad_library200_response_paging'
|
|
1245
1247
|
require 'zernio-sdk/models/search_ad_targeting200_response'
|
|
1246
1248
|
require 'zernio-sdk/models/search_ad_targeting200_response_results_inner'
|
|
1247
1249
|
require 'zernio-sdk/models/search_available_phone_numbers200_response'
|
|
@@ -1805,6 +1807,7 @@ require 'zernio-sdk/api/ad_audiences_api'
|
|
|
1805
1807
|
require 'zernio-sdk/api/ad_campaigns_api'
|
|
1806
1808
|
require 'zernio-sdk/api/ad_creatives_api'
|
|
1807
1809
|
require 'zernio-sdk/api/ad_insights_api'
|
|
1810
|
+
require 'zernio-sdk/api/ad_library_api'
|
|
1808
1811
|
require 'zernio-sdk/api/ad_targeting_api'
|
|
1809
1812
|
require 'zernio-sdk/api/analytics_api'
|
|
1810
1813
|
require 'zernio-sdk/api/blogs_api'
|