late-sdk 0.0.681 → 0.0.682

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 41c5dacaef01dfb7cff9a704d423e689678d13a09c7974e4c4645c7dec108bec
4
- data.tar.gz: f0f7b99d63f4290cb5cd6a991091caa12c1162da411e93ff57f903cdcbc59422
3
+ metadata.gz: 476de2764b955cb602604845141be530e2aab850ad9bd0c915ca75b0e9efbe2e
4
+ data.tar.gz: 74cde0d1a14ca577510cb7bf6d4c4b461225344ef35e62a1858c6afbb7032063
5
5
  SHA512:
6
- metadata.gz: 8a1bb79d897abd033a8222213053ad729188cb8fc930a16b88e658d00232aa0dc68d0b4ce5390a1eebcc03075ddaa577e295db5a7b2f79feee8ce597748e3ffa
7
- data.tar.gz: 730ed362bed1290577e93ec9265012cb2a7317d2881e27033dac506d62ff360b5e0498c941c1c5d76fc88eff234d1c2e15a1e9f021d103119ed441363e30ad0a
6
+ metadata.gz: '08b9195fc96cf88dffe2b1aa174b79ea05837c1cebc4bd1780030e4f954a221c44355b97fb4ad2aa79727e3463bb001824cec92f28c92ad8acd3fa0c54acdc89'
7
+ data.tar.gz: b15379bd7f9ba352a9111b1cf0fd6879dae8977a94abd6fff5106999b8f3e995472df58d5380a7b3691acade63db3f107edef472ba2d1a0c55d3b37cb400cb07
data/README.md CHANGED
@@ -624,6 +624,8 @@ Class | Method | HTTP request | Description
624
624
  - [Zernio::AdCampaignCampaignBudget](docs/AdCampaignCampaignBudget.md)
625
625
  - [Zernio::AdCreative](docs/AdCreative.md)
626
626
  - [Zernio::AdDailyMetrics](docs/AdDailyMetrics.md)
627
+ - [Zernio::AdEngagementCounts](docs/AdEngagementCounts.md)
628
+ - [Zernio::AdFunnelCounts](docs/AdFunnelCounts.md)
627
629
  - [Zernio::AdMetrics](docs/AdMetrics.md)
628
630
  - [Zernio::AdPromotedObject](docs/AdPromotedObject.md)
629
631
  - [Zernio::AdReviewStatus](docs/AdReviewStatus.md)
data/docs/Ad.md CHANGED
@@ -11,6 +11,7 @@
11
11
  | **configured_status** | **String** | The ad's own on/off toggle as configured on the platform (Meta `configured_status`: ACTIVE / PAUSED), unaffected by ancestor (ad set / campaign) pauses. Distinct from `status`, which is the ancestor-cascaded delivery status. Only present for Meta ads synced after this field was added. | [optional] |
12
12
  | **review_status** | [**AdReviewStatus**](AdReviewStatus.md) | Platform review state of this ad, independent of delivery `status` / `configuredStatus`. Absent when the platform reports no review signal. | [optional] |
13
13
  | **ad_type** | **String** | | [optional] |
14
+ | **creative_type** | **String** | Creative format, classified from the media the creative carries. `null` when the creative carries no media to classify — an unsynced creative and a genuine text-only ad are indistinguishable, so neither is guessed at. Returned by `GET /v1/ads`, `GET /v1/ads/{adId}` and the ad nodes of `GET /v1/ads/tree`. | [optional] |
14
15
  | **goal** | **String** | Available goals vary by platform. Meta (Facebook/Instagram) supports all 9 (incl. `lead_conversion` = website pixel lead optimization and `catalog_sales` = Advantage+ catalog ads). TikTok supports the 7 non-`lead_conversion` goals. LinkedIn supports all except app_promotion / lead_conversion. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views. | [optional] |
15
16
  | **is_external** | **Boolean** | True for ads synced from platform ad managers | [optional] |
16
17
  | **budget** | [**AdBudget**](AdBudget.md) | | [optional] |
@@ -51,6 +52,7 @@ instance = Zernio::Ad.new(
51
52
  configured_status: ACTIVE,
52
53
  review_status: null,
53
54
  ad_type: null,
55
+ creative_type: video,
54
56
  goal: null,
55
57
  is_external: null,
56
58
  budget: null,
@@ -27,6 +27,9 @@
27
27
  | **video_p95_watched_actions** | **Integer** | Views reaching 95% of the video's length. Meta `video_p95_watched_actions`. | [optional] |
28
28
  | **video_p100_watched_actions** | **Integer** | Views reaching 100% of the video's length. Meta `video_p100_watched_actions`. | [optional] |
29
29
  | **video_avg_time_watched_actions** | **Float** | Average seconds watched per play (Meta `video_avg_time_watched_actions`). Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages. | [optional] |
30
+ | **cost_per_thruplay** | **Float** | Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays. | [optional] |
31
+ | **funnel** | [**AdFunnelCounts**](AdFunnelCounts.md) | | [optional] |
32
+ | **engagement_breakdown** | [**AdEngagementCounts**](AdEngagementCounts.md) | | [optional] |
30
33
  | **last_synced_at** | **Time** | Present on individual ads only, not on campaign aggregations | [optional] |
31
34
  | **date** | **Date** | Calendar day (YYYY-MM-DD) these metrics apply to. | [optional] |
32
35
 
@@ -59,6 +62,9 @@ instance = Zernio::AdDailyMetrics.new(
59
62
  video_p95_watched_actions: null,
60
63
  video_p100_watched_actions: null,
61
64
  video_avg_time_watched_actions: null,
65
+ cost_per_thruplay: null,
66
+ funnel: null,
67
+ engagement_breakdown: null,
62
68
  last_synced_at: null,
63
69
  date: null
64
70
  )
@@ -0,0 +1,34 @@
1
+ # Zernio::AdEngagementCounts
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **post_engagement** | **Integer** | Meta's own post-engagement total (`post_engagement`). | [optional] |
8
+ | **page_engagement** | **Integer** | Meta's own page-engagement total (`page_engagement`). | [optional] |
9
+ | **reactions** | **Integer** | Reactions on the ad's post (`post_reaction`). | [optional] |
10
+ | **comments** | **Integer** | Comments on the ad's post. | [optional] |
11
+ | **shares** | **Integer** | Shares of the ad's post. Meta reports these under the action type literally named `post`. | [optional] |
12
+ | **saves** | **Integer** | Saves of the ad's post (`onsite_conversion.post_save`). | [optional] |
13
+ | **page_likes** | **Integer** | New Page likes attributed to the ad (`like`). | [optional] |
14
+ | **video_views** | **Integer** | 3-second video views (`video_view`). For completion-based counts use `videoThruplayWatchedActions`. | [optional] |
15
+ | **link_clicks** | **Integer** | Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session `inline_link_clicks` reported by `GET /v1/ads/{adId}/analytics`. | [optional] |
16
+
17
+ ## Example
18
+
19
+ ```ruby
20
+ require 'zernio-sdk'
21
+
22
+ instance = Zernio::AdEngagementCounts.new(
23
+ post_engagement: null,
24
+ page_engagement: null,
25
+ reactions: null,
26
+ comments: null,
27
+ shares: null,
28
+ saves: null,
29
+ page_likes: null,
30
+ video_views: null,
31
+ link_clicks: null
32
+ )
33
+ ```
34
+
@@ -0,0 +1,42 @@
1
+ # Zernio::AdFunnelCounts
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **landing_page_views** | **Integer** | Landing page views — the visitor actually loaded the destination, unlike a link click. Meta `landing_page_view`. | [optional] |
8
+ | **content_views** | **Integer** | Content views (Meta `ViewContent` pixel event). | [optional] |
9
+ | **searches** | **Integer** | On-site searches (Meta `Search` pixel event). | [optional] |
10
+ | **wishlist_adds** | **Integer** | Adds to wishlist (Meta `AddToWishlist` pixel event). | [optional] |
11
+ | **cart_adds** | **Integer** | Adds to cart (Meta `AddToCart` pixel event). | [optional] |
12
+ | **checkouts_initiated** | **Integer** | Checkouts started (Meta `InitiateCheckout` pixel event). | [optional] |
13
+ | **payment_info_adds** | **Integer** | Payment details added at checkout (Meta `AddPaymentInfo` pixel event). | [optional] |
14
+ | **purchases** | **Integer** | Purchases (Meta `Purchase` pixel event). Pair with `purchaseValue` for revenue. | [optional] |
15
+ | **leads** | **Integer** | Leads, from either the website pixel or an instant form — whichever the ad uses. | [optional] |
16
+ | **registrations_completed** | **Integer** | Completed registrations (Meta `CompleteRegistration` pixel event). | [optional] |
17
+ | **app_installs** | **Integer** | Mobile app installs attributed to the ad. | [optional] |
18
+ | **messaging_conversations_started** | **Integer** | Messaging conversations started within 7 days — the headline metric for click-to-WhatsApp and click-to-Messenger ads. | [optional] |
19
+ | **messaging_first_replies** | **Integer** | Messaging threads where the person sent a first reply. | [optional] |
20
+
21
+ ## Example
22
+
23
+ ```ruby
24
+ require 'zernio-sdk'
25
+
26
+ instance = Zernio::AdFunnelCounts.new(
27
+ landing_page_views: null,
28
+ content_views: null,
29
+ searches: null,
30
+ wishlist_adds: null,
31
+ cart_adds: null,
32
+ checkouts_initiated: null,
33
+ payment_info_adds: null,
34
+ purchases: null,
35
+ leads: null,
36
+ registrations_completed: null,
37
+ app_installs: null,
38
+ messaging_conversations_started: null,
39
+ messaging_first_replies: null
40
+ )
41
+ ```
42
+
data/docs/AdMetrics.md CHANGED
@@ -27,6 +27,9 @@
27
27
  | **video_p95_watched_actions** | **Integer** | Views reaching 95% of the video's length. Meta `video_p95_watched_actions`. | [optional] |
28
28
  | **video_p100_watched_actions** | **Integer** | Views reaching 100% of the video's length. Meta `video_p100_watched_actions`. | [optional] |
29
29
  | **video_avg_time_watched_actions** | **Float** | Average seconds watched per play (Meta `video_avg_time_watched_actions`). Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages. | [optional] |
30
+ | **cost_per_thruplay** | **Float** | Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays. | [optional] |
31
+ | **funnel** | [**AdFunnelCounts**](AdFunnelCounts.md) | | [optional] |
32
+ | **engagement_breakdown** | [**AdEngagementCounts**](AdEngagementCounts.md) | | [optional] |
30
33
  | **last_synced_at** | **Time** | Present on individual ads only, not on campaign aggregations | [optional] |
31
34
 
32
35
  ## Example
@@ -58,6 +61,9 @@ instance = Zernio::AdMetrics.new(
58
61
  video_p95_watched_actions: null,
59
62
  video_p100_watched_actions: null,
60
63
  video_avg_time_watched_actions: null,
64
+ cost_per_thruplay: null,
65
+ funnel: null,
66
+ engagement_breakdown: null,
61
67
  last_synced_at: null
62
68
  )
63
69
  ```
@@ -27,6 +27,9 @@
27
27
  | **video_p95_watched_actions** | **Integer** | Views reaching 95% of the video's length. Meta `video_p95_watched_actions`. | [optional] |
28
28
  | **video_p100_watched_actions** | **Integer** | Views reaching 100% of the video's length. Meta `video_p100_watched_actions`. | [optional] |
29
29
  | **video_avg_time_watched_actions** | **Float** | Average seconds watched per play (Meta `video_avg_time_watched_actions`). Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages. | [optional] |
30
+ | **cost_per_thruplay** | **Float** | Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays. | [optional] |
31
+ | **funnel** | [**AdFunnelCounts**](AdFunnelCounts.md) | | [optional] |
32
+ | **engagement_breakdown** | [**AdEngagementCounts**](AdEngagementCounts.md) | | [optional] |
30
33
  | **last_synced_at** | **Time** | Present on individual ads only, not on campaign aggregations | [optional] |
31
34
  | **date** | **Date** | | [optional] |
32
35
 
@@ -59,6 +62,9 @@ instance = Zernio::GetCampaignAnalytics200ResponseAnalyticsDailyInner.new(
59
62
  video_p95_watched_actions: null,
60
63
  video_p100_watched_actions: null,
61
64
  video_avg_time_watched_actions: null,
65
+ cost_per_thruplay: null,
66
+ funnel: null,
67
+ engagement_breakdown: null,
62
68
  last_synced_at: null,
63
69
  date: null
64
70
  )
@@ -1963,7 +1963,7 @@ nil (empty response body)
1963
1963
 
1964
1964
  Post recycled event
1965
1965
 
1966
- Fired when a post is recycled (cloned and re-scheduled for publishing).
1966
+ Fired when a post is recycled (cloned and re-scheduled for publishing). The new clone also fires a post.scheduled event.
1967
1967
 
1968
1968
  ### Examples
1969
1969
 
@@ -2031,7 +2031,7 @@ nil (empty response body)
2031
2031
 
2032
2032
  Post scheduled event
2033
2033
 
2034
- Fired when a post is created and scheduled for publishing.
2034
+ Fired whenever a post enters the scheduled state: created with a schedule, added to a queue, a draft promoted to scheduled or queued, a failed or partial post retried, or a recycled clone created. Not fired when an already-scheduled post is edited or rescheduled.
2035
2035
 
2036
2036
  ### Examples
2037
2037
 
@@ -1868,7 +1868,7 @@ module Zernio
1868
1868
  end
1869
1869
 
1870
1870
  # Post recycled event
1871
- # Fired when a post is recycled (cloned and re-scheduled for publishing).
1871
+ # Fired when a post is recycled (cloned and re-scheduled for publishing). The new clone also fires a post.scheduled event.
1872
1872
  # @param webhook_payload_post [WebhookPayloadPost]
1873
1873
  # @param [Hash] opts the optional parameters
1874
1874
  # @return [nil]
@@ -1878,7 +1878,7 @@ module Zernio
1878
1878
  end
1879
1879
 
1880
1880
  # Post recycled event
1881
- # Fired when a post is recycled (cloned and re-scheduled for publishing).
1881
+ # Fired when a post is recycled (cloned and re-scheduled for publishing). The new clone also fires a post.scheduled event.
1882
1882
  # @param webhook_payload_post [WebhookPayloadPost]
1883
1883
  # @param [Hash] opts the optional parameters
1884
1884
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -1934,7 +1934,7 @@ module Zernio
1934
1934
  end
1935
1935
 
1936
1936
  # Post scheduled event
1937
- # Fired when a post is created and scheduled for publishing.
1937
+ # Fired whenever a post enters the scheduled state: created with a schedule, added to a queue, a draft promoted to scheduled or queued, a failed or partial post retried, or a recycled clone created. Not fired when an already-scheduled post is edited or rescheduled.
1938
1938
  # @param webhook_payload_post [WebhookPayloadPost]
1939
1939
  # @param [Hash] opts the optional parameters
1940
1940
  # @return [nil]
@@ -1944,7 +1944,7 @@ module Zernio
1944
1944
  end
1945
1945
 
1946
1946
  # Post scheduled event
1947
- # Fired when a post is created and scheduled for publishing.
1947
+ # Fired whenever a post enters the scheduled state: created with a schedule, added to a queue, a draft promoted to scheduled or queued, a failed or partial post retried, or a recycled clone created. Not fired when an already-scheduled post is edited or rescheduled.
1948
1948
  # @param webhook_payload_post [WebhookPayloadPost]
1949
1949
  # @param [Hash] opts the optional parameters
1950
1950
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -32,6 +32,9 @@ module Zernio
32
32
 
33
33
  attr_accessor :ad_type
34
34
 
35
+ # Creative format, classified from the media the creative carries. `null` when the creative carries no media to classify — an unsynced creative and a genuine text-only ad are indistinguishable, so neither is guessed at. Returned by `GET /v1/ads`, `GET /v1/ads/{adId}` and the ad nodes of `GET /v1/ads/tree`.
36
+ attr_accessor :creative_type
37
+
35
38
  # Available goals vary by platform. Meta (Facebook/Instagram) supports all 9 (incl. `lead_conversion` = website pixel lead optimization and `catalog_sales` = Advantage+ catalog ads). TikTok supports the 7 non-`lead_conversion` goals. LinkedIn supports all except app_promotion / lead_conversion. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views.
36
39
  attr_accessor :goal
37
40
 
@@ -127,6 +130,7 @@ module Zernio
127
130
  :'configured_status' => :'configuredStatus',
128
131
  :'review_status' => :'reviewStatus',
129
132
  :'ad_type' => :'adType',
133
+ :'creative_type' => :'creativeType',
130
134
  :'goal' => :'goal',
131
135
  :'is_external' => :'isExternal',
132
136
  :'budget' => :'budget',
@@ -176,6 +180,7 @@ module Zernio
176
180
  :'configured_status' => :'String',
177
181
  :'review_status' => :'AdReviewStatus',
178
182
  :'ad_type' => :'String',
183
+ :'creative_type' => :'String',
179
184
  :'goal' => :'String',
180
185
  :'is_external' => :'Boolean',
181
186
  :'budget' => :'AdBudget',
@@ -209,6 +214,7 @@ module Zernio
209
214
  def self.openapi_nullable
210
215
  Set.new([
211
216
  :'configured_status',
217
+ :'creative_type',
212
218
  :'metrics',
213
219
  :'platform_objective',
214
220
  :'optimization_goal',
@@ -265,6 +271,10 @@ module Zernio
265
271
  self.ad_type = attributes[:'ad_type']
266
272
  end
267
273
 
274
+ if attributes.key?(:'creative_type')
275
+ self.creative_type = attributes[:'creative_type']
276
+ end
277
+
268
278
  if attributes.key?(:'goal')
269
279
  self.goal = attributes[:'goal']
270
280
  end
@@ -388,6 +398,8 @@ module Zernio
388
398
  return false unless platform_validator.valid?(@platform)
389
399
  ad_type_validator = EnumAttributeValidator.new('String', ["boost", "standalone"])
390
400
  return false unless ad_type_validator.valid?(@ad_type)
401
+ creative_type_validator = EnumAttributeValidator.new('String', ["carousel", "video", "document", "image"])
402
+ return false unless creative_type_validator.valid?(@creative_type)
391
403
  goal_validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "lead_conversion", "conversions", "app_promotion", "catalog_sales", "job_applicants"])
392
404
  return false unless goal_validator.valid?(@goal)
393
405
  true
@@ -413,6 +425,16 @@ module Zernio
413
425
  @ad_type = ad_type
414
426
  end
415
427
 
428
+ # Custom attribute writer method checking allowed values (enum).
429
+ # @param [Object] creative_type Object to be assigned
430
+ def creative_type=(creative_type)
431
+ validator = EnumAttributeValidator.new('String', ["carousel", "video", "document", "image"])
432
+ unless validator.valid?(creative_type)
433
+ fail ArgumentError, "invalid value for \"creative_type\", must be one of #{validator.allowable_values}."
434
+ end
435
+ @creative_type = creative_type
436
+ end
437
+
416
438
  # Custom attribute writer method checking allowed values (enum).
417
439
  # @param [Object] goal Object to be assigned
418
440
  def goal=(goal)
@@ -435,6 +457,7 @@ module Zernio
435
457
  configured_status == o.configured_status &&
436
458
  review_status == o.review_status &&
437
459
  ad_type == o.ad_type &&
460
+ creative_type == o.creative_type &&
438
461
  goal == o.goal &&
439
462
  is_external == o.is_external &&
440
463
  budget == o.budget &&
@@ -472,7 +495,7 @@ module Zernio
472
495
  # Calculates hash code according to all attributes.
473
496
  # @return [Integer] Hash code
474
497
  def hash
475
- [_id, name, platform, status, configured_status, review_status, ad_type, goal, is_external, budget, metrics, platform_ad_id, platform_ad_account_id, platform_campaign_id, platform_ad_set_id, campaign_name, ad_set_name, platform_objective, optimization_goal, cost_type, serving_statuses, platform_ad_account_name, platform_created_at, bid_strategy, bid_amount, roas_average_floor, promoted_object, creative, targeting, schedule, rejection_reason, created_at, updated_at].hash
498
+ [_id, name, platform, status, configured_status, review_status, ad_type, creative_type, goal, is_external, budget, metrics, platform_ad_id, platform_ad_account_id, platform_campaign_id, platform_ad_set_id, campaign_name, ad_set_name, platform_objective, optimization_goal, cost_type, serving_statuses, platform_ad_account_name, platform_created_at, bid_strategy, bid_amount, roas_average_floor, promoted_object, creative, targeting, schedule, rejection_reason, created_at, updated_at].hash
476
499
  end
477
500
 
478
501
  # Builds the object from hash
@@ -81,6 +81,13 @@ module Zernio
81
81
  # Average seconds watched per play (Meta `video_avg_time_watched_actions`). Aggregated over date ranges and across children as a play-weighted average (total watch time / total plays), never a plain average of averages.
82
82
  attr_accessor :video_avg_time_watched_actions
83
83
 
84
+ # Derived `spend / videoThruplayWatchedActions`, in ad-account native currency. Rounded to 4 decimals rather than the usual 2 because a ThruPlay routinely costs well under a cent. 0 when the ad has no ThruPlays.
85
+ attr_accessor :cost_per_thruplay
86
+
87
+ attr_accessor :funnel
88
+
89
+ attr_accessor :engagement_breakdown
90
+
84
91
  # Present on individual ads only, not on campaign aggregations
85
92
  attr_accessor :last_synced_at
86
93
 
@@ -113,6 +120,9 @@ module Zernio
113
120
  :'video_p95_watched_actions' => :'videoP95WatchedActions',
114
121
  :'video_p100_watched_actions' => :'videoP100WatchedActions',
115
122
  :'video_avg_time_watched_actions' => :'videoAvgTimeWatchedActions',
123
+ :'cost_per_thruplay' => :'costPerThruplay',
124
+ :'funnel' => :'funnel',
125
+ :'engagement_breakdown' => :'engagementBreakdown',
116
126
  :'last_synced_at' => :'lastSyncedAt',
117
127
  :'date' => :'date'
118
128
  }
@@ -154,6 +164,9 @@ module Zernio
154
164
  :'video_p95_watched_actions' => :'Integer',
155
165
  :'video_p100_watched_actions' => :'Integer',
156
166
  :'video_avg_time_watched_actions' => :'Float',
167
+ :'cost_per_thruplay' => :'Float',
168
+ :'funnel' => :'AdFunnelCounts',
169
+ :'engagement_breakdown' => :'AdEngagementCounts',
157
170
  :'last_synced_at' => :'Time',
158
171
  :'date' => :'Date'
159
172
  }
@@ -284,6 +297,18 @@ module Zernio
284
297
  self.video_avg_time_watched_actions = attributes[:'video_avg_time_watched_actions']
285
298
  end
286
299
 
300
+ if attributes.key?(:'cost_per_thruplay')
301
+ self.cost_per_thruplay = attributes[:'cost_per_thruplay']
302
+ end
303
+
304
+ if attributes.key?(:'funnel')
305
+ self.funnel = attributes[:'funnel']
306
+ end
307
+
308
+ if attributes.key?(:'engagement_breakdown')
309
+ self.engagement_breakdown = attributes[:'engagement_breakdown']
310
+ end
311
+
287
312
  if attributes.key?(:'last_synced_at')
288
313
  self.last_synced_at = attributes[:'last_synced_at']
289
314
  end
@@ -336,6 +361,9 @@ module Zernio
336
361
  video_p95_watched_actions == o.video_p95_watched_actions &&
337
362
  video_p100_watched_actions == o.video_p100_watched_actions &&
338
363
  video_avg_time_watched_actions == o.video_avg_time_watched_actions &&
364
+ cost_per_thruplay == o.cost_per_thruplay &&
365
+ funnel == o.funnel &&
366
+ engagement_breakdown == o.engagement_breakdown &&
339
367
  last_synced_at == o.last_synced_at &&
340
368
  date == o.date
341
369
  end
@@ -349,7 +377,7 @@ module Zernio
349
377
  # Calculates hash code according to all attributes.
350
378
  # @return [Integer] Hash code
351
379
  def hash
352
- [spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, 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, last_synced_at, date].hash
380
+ [spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, 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
353
381
  end
354
382
 
355
383
  # Builds the object from hash
@@ -0,0 +1,229 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
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
+ # The single `engagement` total split into the interactions behind it. Note that `engagement` is not the sum of these: Meta's own `post_engagement` and `page_engagement` totals already contain the individual interactions, and all of them are counted into `engagement`. Use these fields when you need a specific interaction, and `engagement` only as the coarse total it has always been. Meta-only; other platforms leave these at 0.
18
+ class AdEngagementCounts < ApiModelBase
19
+ # Meta's own post-engagement total (`post_engagement`).
20
+ attr_accessor :post_engagement
21
+
22
+ # Meta's own page-engagement total (`page_engagement`).
23
+ attr_accessor :page_engagement
24
+
25
+ # Reactions on the ad's post (`post_reaction`).
26
+ attr_accessor :reactions
27
+
28
+ # Comments on the ad's post.
29
+ attr_accessor :comments
30
+
31
+ # Shares of the ad's post. Meta reports these under the action type literally named `post`.
32
+ attr_accessor :shares
33
+
34
+ # Saves of the ad's post (`onsite_conversion.post_save`).
35
+ attr_accessor :saves
36
+
37
+ # New Page likes attributed to the ad (`like`).
38
+ attr_accessor :page_likes
39
+
40
+ # 3-second video views (`video_view`). For completion-based counts use `videoThruplayWatchedActions`.
41
+ attr_accessor :video_views
42
+
43
+ # Attributed link clicks (`link_click`). This is the attribution-window count, which differs from the in-session `inline_link_clicks` reported by `GET /v1/ads/{adId}/analytics`.
44
+ attr_accessor :link_clicks
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'post_engagement' => :'postEngagement',
50
+ :'page_engagement' => :'pageEngagement',
51
+ :'reactions' => :'reactions',
52
+ :'comments' => :'comments',
53
+ :'shares' => :'shares',
54
+ :'saves' => :'saves',
55
+ :'page_likes' => :'pageLikes',
56
+ :'video_views' => :'videoViews',
57
+ :'link_clicks' => :'linkClicks'
58
+ }
59
+ end
60
+
61
+ # Returns attribute mapping this model knows about
62
+ def self.acceptable_attribute_map
63
+ attribute_map
64
+ end
65
+
66
+ # Returns all the JSON keys this model knows about
67
+ def self.acceptable_attributes
68
+ acceptable_attribute_map.values
69
+ end
70
+
71
+ # Attribute type mapping.
72
+ def self.openapi_types
73
+ {
74
+ :'post_engagement' => :'Integer',
75
+ :'page_engagement' => :'Integer',
76
+ :'reactions' => :'Integer',
77
+ :'comments' => :'Integer',
78
+ :'shares' => :'Integer',
79
+ :'saves' => :'Integer',
80
+ :'page_likes' => :'Integer',
81
+ :'video_views' => :'Integer',
82
+ :'link_clicks' => :'Integer'
83
+ }
84
+ end
85
+
86
+ # List of attributes with nullable: true
87
+ def self.openapi_nullable
88
+ Set.new([
89
+ ])
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ if (!attributes.is_a?(Hash))
96
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::AdEngagementCounts` initialize method"
97
+ end
98
+
99
+ # check to see if the attribute exists and convert string to symbol for hash key
100
+ acceptable_attribute_map = self.class.acceptable_attribute_map
101
+ attributes = attributes.each_with_object({}) { |(k, v), h|
102
+ if (!acceptable_attribute_map.key?(k.to_sym))
103
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::AdEngagementCounts`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
104
+ end
105
+ h[k.to_sym] = v
106
+ }
107
+
108
+ if attributes.key?(:'post_engagement')
109
+ self.post_engagement = attributes[:'post_engagement']
110
+ end
111
+
112
+ if attributes.key?(:'page_engagement')
113
+ self.page_engagement = attributes[:'page_engagement']
114
+ end
115
+
116
+ if attributes.key?(:'reactions')
117
+ self.reactions = attributes[:'reactions']
118
+ end
119
+
120
+ if attributes.key?(:'comments')
121
+ self.comments = attributes[:'comments']
122
+ end
123
+
124
+ if attributes.key?(:'shares')
125
+ self.shares = attributes[:'shares']
126
+ end
127
+
128
+ if attributes.key?(:'saves')
129
+ self.saves = attributes[:'saves']
130
+ end
131
+
132
+ if attributes.key?(:'page_likes')
133
+ self.page_likes = attributes[:'page_likes']
134
+ end
135
+
136
+ if attributes.key?(:'video_views')
137
+ self.video_views = attributes[:'video_views']
138
+ end
139
+
140
+ if attributes.key?(:'link_clicks')
141
+ self.link_clicks = attributes[:'link_clicks']
142
+ end
143
+ end
144
+
145
+ # Show invalid properties with the reasons. Usually used together with valid?
146
+ # @return Array for valid properties with the reasons
147
+ def list_invalid_properties
148
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
149
+ invalid_properties = Array.new
150
+ invalid_properties
151
+ end
152
+
153
+ # Check to see if the all the properties in the model are valid
154
+ # @return true if the model is valid
155
+ def valid?
156
+ warn '[DEPRECATED] the `valid?` method is obsolete'
157
+ true
158
+ end
159
+
160
+ # Checks equality by comparing each attribute.
161
+ # @param [Object] Object to be compared
162
+ def ==(o)
163
+ return true if self.equal?(o)
164
+ self.class == o.class &&
165
+ post_engagement == o.post_engagement &&
166
+ page_engagement == o.page_engagement &&
167
+ reactions == o.reactions &&
168
+ comments == o.comments &&
169
+ shares == o.shares &&
170
+ saves == o.saves &&
171
+ page_likes == o.page_likes &&
172
+ video_views == o.video_views &&
173
+ link_clicks == o.link_clicks
174
+ end
175
+
176
+ # @see the `==` method
177
+ # @param [Object] Object to be compared
178
+ def eql?(o)
179
+ self == o
180
+ end
181
+
182
+ # Calculates hash code according to all attributes.
183
+ # @return [Integer] Hash code
184
+ def hash
185
+ [post_engagement, page_engagement, reactions, comments, shares, saves, page_likes, video_views, link_clicks].hash
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def self.build_from_hash(attributes)
192
+ return nil unless attributes.is_a?(Hash)
193
+ attributes = attributes.transform_keys(&:to_sym)
194
+ transformed_hash = {}
195
+ openapi_types.each_pair do |key, type|
196
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
197
+ transformed_hash["#{key}"] = nil
198
+ elsif type =~ /\AArray<(.*)>/i
199
+ # check to ensure the input is an array given that the attribute
200
+ # is documented as an array but the input is not
201
+ if attributes[attribute_map[key]].is_a?(Array)
202
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
203
+ end
204
+ elsif !attributes[attribute_map[key]].nil?
205
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
206
+ end
207
+ end
208
+ new(transformed_hash)
209
+ end
210
+
211
+ # Returns the object in the form of hash
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_hash
214
+ hash = {}
215
+ self.class.attribute_map.each_pair do |attr, param|
216
+ value = self.send(attr)
217
+ if value.nil?
218
+ is_nullable = self.class.openapi_nullable.include?(attr)
219
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
220
+ end
221
+
222
+ hash[param] = _to_hash(value)
223
+ end
224
+ hash
225
+ end
226
+
227
+ end
228
+
229
+ end