zernio-sdk 0.0.821 → 0.0.823
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 +7 -0
- data/docs/AnalyticsApi.md +78 -0
- data/docs/AnalyticsDeltaEntry.md +34 -0
- data/docs/AnalyticsDeltaEntryMetrics.md +44 -0
- data/docs/AnalyticsDeltaResponse.md +22 -0
- data/docs/BoostPostRequest.md +3 -1
- data/docs/CreateCallAdRequest.md +3 -1
- data/docs/CreateMessagingAdRequest.md +3 -1
- data/docs/CreateStandaloneAdRequest.md +3 -1
- data/docs/CtwaAdRequestBody.md +4 -2
- data/docs/WebhookEventsApi.md +69 -0
- data/docs/WebhookPayloadAnalyticsSynced.md +26 -0
- data/docs/WebhookPayloadAnalyticsSyncedAccount.md +24 -0
- data/docs/WebhookPayloadAnalyticsSyncedSync.md +20 -0
- data/lib/zernio-sdk/api/analytics_api.rb +77 -0
- data/lib/zernio-sdk/api/webhook_events_api.rb +66 -0
- data/lib/zernio-sdk/models/analytics_delta_entry.rb +380 -0
- data/lib/zernio-sdk/models/analytics_delta_entry_metrics.rb +507 -0
- data/lib/zernio-sdk/models/analytics_delta_response.rb +221 -0
- data/lib/zernio-sdk/models/boost_post_request.rb +14 -2
- data/lib/zernio-sdk/models/create_call_ad_request.rb +14 -2
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +14 -2
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +14 -2
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +17 -5
- data/lib/zernio-sdk/models/webhook_payload_analytics_synced.rb +295 -0
- data/lib/zernio-sdk/models/webhook_payload_analytics_synced_account.rb +244 -0
- data/lib/zernio-sdk/models/webhook_payload_analytics_synced_sync.rb +193 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +6 -0
- data/openapi.yaml +392 -10
- data/spec/api/analytics_api_spec.rb +15 -0
- data/spec/models/analytics_delta_entry_metrics_spec.rb +114 -0
- data/spec/models/analytics_delta_entry_spec.rb +84 -0
- data/spec/models/analytics_delta_response_spec.rb +48 -0
- data/spec/models/boost_post_request_spec.rb +6 -0
- data/spec/models/create_call_ad_request_spec.rb +6 -0
- data/spec/models/create_messaging_ad_request_spec.rb +6 -0
- data/spec/models/create_standalone_ad_request_spec.rb +6 -0
- data/spec/models/create_webhook_settings_request_spec.rb +1 -1
- data/spec/models/ctwa_ad_request_body_spec.rb +6 -0
- data/spec/models/update_webhook_settings_request_spec.rb +1 -1
- data/spec/models/webhook_payload_analytics_synced_account_spec.rb +54 -0
- data/spec/models/webhook_payload_analytics_synced_spec.rb +64 -0
- data/spec/models/webhook_payload_analytics_synced_sync_spec.rb +42 -0
- data/spec/models/webhook_spec.rb +1 -1
- metadata +1773 -1749
|
@@ -0,0 +1,507 @@
|
|
|
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
|
+
# Metrics a platform does not report are 0, not absent.
|
|
18
|
+
class AnalyticsDeltaEntryMetrics < ApiModelBase
|
|
19
|
+
attr_accessor :impressions
|
|
20
|
+
|
|
21
|
+
attr_accessor :reach
|
|
22
|
+
|
|
23
|
+
attr_accessor :likes
|
|
24
|
+
|
|
25
|
+
attr_accessor :comments
|
|
26
|
+
|
|
27
|
+
attr_accessor :shares
|
|
28
|
+
|
|
29
|
+
attr_accessor :saves
|
|
30
|
+
|
|
31
|
+
attr_accessor :sends
|
|
32
|
+
|
|
33
|
+
attr_accessor :clicks
|
|
34
|
+
|
|
35
|
+
attr_accessor :views
|
|
36
|
+
|
|
37
|
+
# Follows attributed to this post (Instagram)
|
|
38
|
+
attr_accessor :follows
|
|
39
|
+
|
|
40
|
+
# Instagram Reels average watch time, in milliseconds
|
|
41
|
+
attr_accessor :ig_reels_avg_watch_time
|
|
42
|
+
|
|
43
|
+
# Instagram Reels total watch time, in milliseconds
|
|
44
|
+
attr_accessor :ig_reels_video_view_total_time
|
|
45
|
+
|
|
46
|
+
attr_accessor :reposts
|
|
47
|
+
|
|
48
|
+
# Instagram Reels skip rate, 0 to 1
|
|
49
|
+
attr_accessor :reels_skip_rate
|
|
50
|
+
|
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
52
|
+
def self.attribute_map
|
|
53
|
+
{
|
|
54
|
+
:'impressions' => :'impressions',
|
|
55
|
+
:'reach' => :'reach',
|
|
56
|
+
:'likes' => :'likes',
|
|
57
|
+
:'comments' => :'comments',
|
|
58
|
+
:'shares' => :'shares',
|
|
59
|
+
:'saves' => :'saves',
|
|
60
|
+
:'sends' => :'sends',
|
|
61
|
+
:'clicks' => :'clicks',
|
|
62
|
+
:'views' => :'views',
|
|
63
|
+
:'follows' => :'follows',
|
|
64
|
+
:'ig_reels_avg_watch_time' => :'igReelsAvgWatchTime',
|
|
65
|
+
:'ig_reels_video_view_total_time' => :'igReelsVideoViewTotalTime',
|
|
66
|
+
:'reposts' => :'reposts',
|
|
67
|
+
:'reels_skip_rate' => :'reelsSkipRate'
|
|
68
|
+
}
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Returns attribute mapping this model knows about
|
|
72
|
+
def self.acceptable_attribute_map
|
|
73
|
+
attribute_map
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Returns all the JSON keys this model knows about
|
|
77
|
+
def self.acceptable_attributes
|
|
78
|
+
acceptable_attribute_map.values
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Attribute type mapping.
|
|
82
|
+
def self.openapi_types
|
|
83
|
+
{
|
|
84
|
+
:'impressions' => :'Integer',
|
|
85
|
+
:'reach' => :'Integer',
|
|
86
|
+
:'likes' => :'Integer',
|
|
87
|
+
:'comments' => :'Integer',
|
|
88
|
+
:'shares' => :'Integer',
|
|
89
|
+
:'saves' => :'Integer',
|
|
90
|
+
:'sends' => :'Integer',
|
|
91
|
+
:'clicks' => :'Integer',
|
|
92
|
+
:'views' => :'Integer',
|
|
93
|
+
:'follows' => :'Integer',
|
|
94
|
+
:'ig_reels_avg_watch_time' => :'Integer',
|
|
95
|
+
:'ig_reels_video_view_total_time' => :'Integer',
|
|
96
|
+
:'reposts' => :'Integer',
|
|
97
|
+
:'reels_skip_rate' => :'Float'
|
|
98
|
+
}
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# List of attributes with nullable: true
|
|
102
|
+
def self.openapi_nullable
|
|
103
|
+
Set.new([
|
|
104
|
+
])
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Initializes the object
|
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
109
|
+
def initialize(attributes = {})
|
|
110
|
+
if (!attributes.is_a?(Hash))
|
|
111
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AnalyticsDeltaEntryMetrics` initialize method"
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
115
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
116
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
117
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
118
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AnalyticsDeltaEntryMetrics`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
119
|
+
end
|
|
120
|
+
h[k.to_sym] = v
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'impressions')
|
|
124
|
+
self.impressions = attributes[:'impressions']
|
|
125
|
+
else
|
|
126
|
+
self.impressions = nil
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'reach')
|
|
130
|
+
self.reach = attributes[:'reach']
|
|
131
|
+
else
|
|
132
|
+
self.reach = nil
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'likes')
|
|
136
|
+
self.likes = attributes[:'likes']
|
|
137
|
+
else
|
|
138
|
+
self.likes = nil
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'comments')
|
|
142
|
+
self.comments = attributes[:'comments']
|
|
143
|
+
else
|
|
144
|
+
self.comments = nil
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if attributes.key?(:'shares')
|
|
148
|
+
self.shares = attributes[:'shares']
|
|
149
|
+
else
|
|
150
|
+
self.shares = nil
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'saves')
|
|
154
|
+
self.saves = attributes[:'saves']
|
|
155
|
+
else
|
|
156
|
+
self.saves = nil
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if attributes.key?(:'sends')
|
|
160
|
+
self.sends = attributes[:'sends']
|
|
161
|
+
else
|
|
162
|
+
self.sends = nil
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'clicks')
|
|
166
|
+
self.clicks = attributes[:'clicks']
|
|
167
|
+
else
|
|
168
|
+
self.clicks = nil
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
if attributes.key?(:'views')
|
|
172
|
+
self.views = attributes[:'views']
|
|
173
|
+
else
|
|
174
|
+
self.views = nil
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
if attributes.key?(:'follows')
|
|
178
|
+
self.follows = attributes[:'follows']
|
|
179
|
+
else
|
|
180
|
+
self.follows = nil
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
if attributes.key?(:'ig_reels_avg_watch_time')
|
|
184
|
+
self.ig_reels_avg_watch_time = attributes[:'ig_reels_avg_watch_time']
|
|
185
|
+
else
|
|
186
|
+
self.ig_reels_avg_watch_time = nil
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'ig_reels_video_view_total_time')
|
|
190
|
+
self.ig_reels_video_view_total_time = attributes[:'ig_reels_video_view_total_time']
|
|
191
|
+
else
|
|
192
|
+
self.ig_reels_video_view_total_time = nil
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'reposts')
|
|
196
|
+
self.reposts = attributes[:'reposts']
|
|
197
|
+
else
|
|
198
|
+
self.reposts = nil
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if attributes.key?(:'reels_skip_rate')
|
|
202
|
+
self.reels_skip_rate = attributes[:'reels_skip_rate']
|
|
203
|
+
else
|
|
204
|
+
self.reels_skip_rate = nil
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
209
|
+
# @return Array for valid properties with the reasons
|
|
210
|
+
def list_invalid_properties
|
|
211
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
212
|
+
invalid_properties = Array.new
|
|
213
|
+
if @impressions.nil?
|
|
214
|
+
invalid_properties.push('invalid value for "impressions", impressions cannot be nil.')
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if @reach.nil?
|
|
218
|
+
invalid_properties.push('invalid value for "reach", reach cannot be nil.')
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if @likes.nil?
|
|
222
|
+
invalid_properties.push('invalid value for "likes", likes cannot be nil.')
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
if @comments.nil?
|
|
226
|
+
invalid_properties.push('invalid value for "comments", comments cannot be nil.')
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
if @shares.nil?
|
|
230
|
+
invalid_properties.push('invalid value for "shares", shares cannot be nil.')
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if @saves.nil?
|
|
234
|
+
invalid_properties.push('invalid value for "saves", saves cannot be nil.')
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
if @sends.nil?
|
|
238
|
+
invalid_properties.push('invalid value for "sends", sends cannot be nil.')
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
if @clicks.nil?
|
|
242
|
+
invalid_properties.push('invalid value for "clicks", clicks cannot be nil.')
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
if @views.nil?
|
|
246
|
+
invalid_properties.push('invalid value for "views", views cannot be nil.')
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
if @follows.nil?
|
|
250
|
+
invalid_properties.push('invalid value for "follows", follows cannot be nil.')
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
if @ig_reels_avg_watch_time.nil?
|
|
254
|
+
invalid_properties.push('invalid value for "ig_reels_avg_watch_time", ig_reels_avg_watch_time cannot be nil.')
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
if @ig_reels_video_view_total_time.nil?
|
|
258
|
+
invalid_properties.push('invalid value for "ig_reels_video_view_total_time", ig_reels_video_view_total_time cannot be nil.')
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
if @reposts.nil?
|
|
262
|
+
invalid_properties.push('invalid value for "reposts", reposts cannot be nil.')
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
if @reels_skip_rate.nil?
|
|
266
|
+
invalid_properties.push('invalid value for "reels_skip_rate", reels_skip_rate cannot be nil.')
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
invalid_properties
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Check to see if the all the properties in the model are valid
|
|
273
|
+
# @return true if the model is valid
|
|
274
|
+
def valid?
|
|
275
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
276
|
+
return false if @impressions.nil?
|
|
277
|
+
return false if @reach.nil?
|
|
278
|
+
return false if @likes.nil?
|
|
279
|
+
return false if @comments.nil?
|
|
280
|
+
return false if @shares.nil?
|
|
281
|
+
return false if @saves.nil?
|
|
282
|
+
return false if @sends.nil?
|
|
283
|
+
return false if @clicks.nil?
|
|
284
|
+
return false if @views.nil?
|
|
285
|
+
return false if @follows.nil?
|
|
286
|
+
return false if @ig_reels_avg_watch_time.nil?
|
|
287
|
+
return false if @ig_reels_video_view_total_time.nil?
|
|
288
|
+
return false if @reposts.nil?
|
|
289
|
+
return false if @reels_skip_rate.nil?
|
|
290
|
+
true
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
# Custom attribute writer method with validation
|
|
294
|
+
# @param [Object] impressions Value to be assigned
|
|
295
|
+
def impressions=(impressions)
|
|
296
|
+
if impressions.nil?
|
|
297
|
+
fail ArgumentError, 'impressions cannot be nil'
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
@impressions = impressions
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Custom attribute writer method with validation
|
|
304
|
+
# @param [Object] reach Value to be assigned
|
|
305
|
+
def reach=(reach)
|
|
306
|
+
if reach.nil?
|
|
307
|
+
fail ArgumentError, 'reach cannot be nil'
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
@reach = reach
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
# Custom attribute writer method with validation
|
|
314
|
+
# @param [Object] likes Value to be assigned
|
|
315
|
+
def likes=(likes)
|
|
316
|
+
if likes.nil?
|
|
317
|
+
fail ArgumentError, 'likes cannot be nil'
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
@likes = likes
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# Custom attribute writer method with validation
|
|
324
|
+
# @param [Object] comments Value to be assigned
|
|
325
|
+
def comments=(comments)
|
|
326
|
+
if comments.nil?
|
|
327
|
+
fail ArgumentError, 'comments cannot be nil'
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
@comments = comments
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
# Custom attribute writer method with validation
|
|
334
|
+
# @param [Object] shares Value to be assigned
|
|
335
|
+
def shares=(shares)
|
|
336
|
+
if shares.nil?
|
|
337
|
+
fail ArgumentError, 'shares cannot be nil'
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
@shares = shares
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Custom attribute writer method with validation
|
|
344
|
+
# @param [Object] saves Value to be assigned
|
|
345
|
+
def saves=(saves)
|
|
346
|
+
if saves.nil?
|
|
347
|
+
fail ArgumentError, 'saves cannot be nil'
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
@saves = saves
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# Custom attribute writer method with validation
|
|
354
|
+
# @param [Object] sends Value to be assigned
|
|
355
|
+
def sends=(sends)
|
|
356
|
+
if sends.nil?
|
|
357
|
+
fail ArgumentError, 'sends cannot be nil'
|
|
358
|
+
end
|
|
359
|
+
|
|
360
|
+
@sends = sends
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
# Custom attribute writer method with validation
|
|
364
|
+
# @param [Object] clicks Value to be assigned
|
|
365
|
+
def clicks=(clicks)
|
|
366
|
+
if clicks.nil?
|
|
367
|
+
fail ArgumentError, 'clicks cannot be nil'
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
@clicks = clicks
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# Custom attribute writer method with validation
|
|
374
|
+
# @param [Object] views Value to be assigned
|
|
375
|
+
def views=(views)
|
|
376
|
+
if views.nil?
|
|
377
|
+
fail ArgumentError, 'views cannot be nil'
|
|
378
|
+
end
|
|
379
|
+
|
|
380
|
+
@views = views
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Custom attribute writer method with validation
|
|
384
|
+
# @param [Object] follows Value to be assigned
|
|
385
|
+
def follows=(follows)
|
|
386
|
+
if follows.nil?
|
|
387
|
+
fail ArgumentError, 'follows cannot be nil'
|
|
388
|
+
end
|
|
389
|
+
|
|
390
|
+
@follows = follows
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# Custom attribute writer method with validation
|
|
394
|
+
# @param [Object] ig_reels_avg_watch_time Value to be assigned
|
|
395
|
+
def ig_reels_avg_watch_time=(ig_reels_avg_watch_time)
|
|
396
|
+
if ig_reels_avg_watch_time.nil?
|
|
397
|
+
fail ArgumentError, 'ig_reels_avg_watch_time cannot be nil'
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
@ig_reels_avg_watch_time = ig_reels_avg_watch_time
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
# Custom attribute writer method with validation
|
|
404
|
+
# @param [Object] ig_reels_video_view_total_time Value to be assigned
|
|
405
|
+
def ig_reels_video_view_total_time=(ig_reels_video_view_total_time)
|
|
406
|
+
if ig_reels_video_view_total_time.nil?
|
|
407
|
+
fail ArgumentError, 'ig_reels_video_view_total_time cannot be nil'
|
|
408
|
+
end
|
|
409
|
+
|
|
410
|
+
@ig_reels_video_view_total_time = ig_reels_video_view_total_time
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
# Custom attribute writer method with validation
|
|
414
|
+
# @param [Object] reposts Value to be assigned
|
|
415
|
+
def reposts=(reposts)
|
|
416
|
+
if reposts.nil?
|
|
417
|
+
fail ArgumentError, 'reposts cannot be nil'
|
|
418
|
+
end
|
|
419
|
+
|
|
420
|
+
@reposts = reposts
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
# Custom attribute writer method with validation
|
|
424
|
+
# @param [Object] reels_skip_rate Value to be assigned
|
|
425
|
+
def reels_skip_rate=(reels_skip_rate)
|
|
426
|
+
if reels_skip_rate.nil?
|
|
427
|
+
fail ArgumentError, 'reels_skip_rate cannot be nil'
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
@reels_skip_rate = reels_skip_rate
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
# Checks equality by comparing each attribute.
|
|
434
|
+
# @param [Object] Object to be compared
|
|
435
|
+
def ==(o)
|
|
436
|
+
return true if self.equal?(o)
|
|
437
|
+
self.class == o.class &&
|
|
438
|
+
impressions == o.impressions &&
|
|
439
|
+
reach == o.reach &&
|
|
440
|
+
likes == o.likes &&
|
|
441
|
+
comments == o.comments &&
|
|
442
|
+
shares == o.shares &&
|
|
443
|
+
saves == o.saves &&
|
|
444
|
+
sends == o.sends &&
|
|
445
|
+
clicks == o.clicks &&
|
|
446
|
+
views == o.views &&
|
|
447
|
+
follows == o.follows &&
|
|
448
|
+
ig_reels_avg_watch_time == o.ig_reels_avg_watch_time &&
|
|
449
|
+
ig_reels_video_view_total_time == o.ig_reels_video_view_total_time &&
|
|
450
|
+
reposts == o.reposts &&
|
|
451
|
+
reels_skip_rate == o.reels_skip_rate
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
# @see the `==` method
|
|
455
|
+
# @param [Object] Object to be compared
|
|
456
|
+
def eql?(o)
|
|
457
|
+
self == o
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# Calculates hash code according to all attributes.
|
|
461
|
+
# @return [Integer] Hash code
|
|
462
|
+
def hash
|
|
463
|
+
[impressions, reach, likes, comments, shares, saves, sends, clicks, views, follows, ig_reels_avg_watch_time, ig_reels_video_view_total_time, reposts, reels_skip_rate].hash
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
# Builds the object from hash
|
|
467
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
468
|
+
# @return [Object] Returns the model itself
|
|
469
|
+
def self.build_from_hash(attributes)
|
|
470
|
+
return nil unless attributes.is_a?(Hash)
|
|
471
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
472
|
+
transformed_hash = {}
|
|
473
|
+
openapi_types.each_pair do |key, type|
|
|
474
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
475
|
+
transformed_hash["#{key}"] = nil
|
|
476
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
477
|
+
# check to ensure the input is an array given that the attribute
|
|
478
|
+
# is documented as an array but the input is not
|
|
479
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
480
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
481
|
+
end
|
|
482
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
483
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
484
|
+
end
|
|
485
|
+
end
|
|
486
|
+
new(transformed_hash)
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
# Returns the object in the form of hash
|
|
490
|
+
# @return [Hash] Returns the object in the form of hash
|
|
491
|
+
def to_hash
|
|
492
|
+
hash = {}
|
|
493
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
494
|
+
value = self.send(attr)
|
|
495
|
+
if value.nil?
|
|
496
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
497
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
hash[param] = _to_hash(value)
|
|
501
|
+
end
|
|
502
|
+
hash
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
end
|
|
506
|
+
|
|
507
|
+
end
|