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.
Files changed (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -0
  3. data/docs/AdCampaignsApi.md +1 -1
  4. data/docs/AdDailyMetrics.md +2 -0
  5. data/docs/AdLibraryApi.md +109 -0
  6. data/docs/AdMetrics.md +2 -0
  7. data/docs/AdsTimelineResponseRowsInner.md +2 -0
  8. data/docs/CampaignAnalyticsResponseAnalyticsDailyInner.md +2 -0
  9. data/docs/SearchAdLibrary200Response.md +22 -0
  10. data/docs/SearchAdLibrary200ResponsePaging.md +20 -0
  11. data/lib/zernio-sdk/api/ad_campaigns_api.rb +2 -2
  12. data/lib/zernio-sdk/api/ad_library_api.rb +163 -0
  13. data/lib/zernio-sdk/models/ad_daily_metrics.rb +11 -1
  14. data/lib/zernio-sdk/models/ad_metrics.rb +11 -1
  15. data/lib/zernio-sdk/models/ads_timeline_response_rows_inner.rb +11 -1
  16. data/lib/zernio-sdk/models/campaign_analytics_response_analytics_daily_inner.rb +11 -1
  17. data/lib/zernio-sdk/models/search_ad_library200_response.rb +242 -0
  18. data/lib/zernio-sdk/models/search_ad_library200_response_paging.rb +159 -0
  19. data/lib/zernio-sdk/version.rb +1 -1
  20. data/lib/zernio-sdk.rb +3 -0
  21. data/openapi.yaml +135 -0
  22. data/spec/api/ad_campaigns_api_spec.rb +1 -1
  23. data/spec/api/ad_library_api_spec.rb +62 -0
  24. data/spec/models/ad_daily_metrics_spec.rb +6 -0
  25. data/spec/models/ad_metrics_spec.rb +6 -0
  26. data/spec/models/ads_timeline_response_rows_inner_spec.rb +6 -0
  27. data/spec/models/campaign_analytics_response_analytics_daily_inner_spec.rb +6 -0
  28. data/spec/models/search_ad_library200_response_paging_spec.rb +42 -0
  29. data/spec/models/search_ad_library200_response_spec.rb +52 -0
  30. data/zernio-sdk-0.0.855.gem +0 -0
  31. metadata +14 -2
  32. data/zernio-sdk-0.0.853.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05ae9f355f4dd47957afe2f4f8e1403fba96297e7c02031236ebd830ace68a6a
4
- data.tar.gz: 62f0a3861bdb2fe95f82faca7e164f2775ae71035fa3d2459dcac0b495c13cef
3
+ metadata.gz: 1ab1864cbcad536ce6cf08e16d3ecaeb86ceacdee6c4cfbd30aa3261563f81fa
4
+ data.tar.gz: e5fbd5ef7c080df833cc544848741742a42a4597a4860578eb7a5eed9bcac3db
5
5
  SHA512:
6
- metadata.gz: 263e5a939465443af1b8400a47e78d1ff5afb62abeed6cc5356de1d417128aa3a7aa000a012f79c7ee6166d5accb970108033a0f6997928a3eff3ecf32c412e2
7
- data.tar.gz: e09470ba96c3f930f1bc294fcb9eff5b0da1ef18b630f5bb51b79320910efa2054e529495235aa10df26bc1340da65132803e5400bc8f5b054b8ad95780e6f26
6
+ metadata.gz: 2214e8ba6fd2266d69de612848e72086c2fa64cf2615c3ccae521255e92437fb1eca1f49cfcaa72fb39d3da53b611227b0cc74808754528cae2ca8c28d0f970d
7
+ data.tar.gz: 8e82cd61afe4a6cdcda8dcec3ba25426046ef011467593e010012c72b40fdbbba57a5d8a3176e86707d0e44892cc5cdc19c133331c6b9421ea92d3a1a25c41c3
data/README.md CHANGED
@@ -182,6 +182,7 @@ Class | Method | HTTP request | Description
182
182
  *Zernio::AdInsightsApi* | [**list_local_services_lead_conversations**](docs/AdInsightsApi.md#list_local_services_lead_conversations) | **GET** /v1/ads/local-services/leads/{leadId}/conversations | Conversations of a Local Services lead
183
183
  *Zernio::AdInsightsApi* | [**list_local_services_leads**](docs/AdInsightsApi.md#list_local_services_leads) | **GET** /v1/ads/local-services/leads | Google Local Services Ads leads
184
184
  *Zernio::AdInsightsApi* | [**query_ad_insights**](docs/AdInsightsApi.md#query_ad_insights) | **GET** /v1/ads/insights | Flexible live insights query
185
+ *Zernio::AdLibraryApi* | [**search_ad_library**](docs/AdLibraryApi.md#search_ad_library) | **GET** /v1/ads/library | Search the public Ad Library
185
186
  *Zernio::AdTargetingApi* | [**estimate_ad_reach**](docs/AdTargetingApi.md#estimate_ad_reach) | **POST** /v1/ads/targeting/reach-estimate | Estimate audience reach
186
187
  *Zernio::AdTargetingApi* | [**get_linked_in_bid_pricing**](docs/AdTargetingApi.md#get_linked_in_bid_pricing) | **POST** /v1/ads/targeting/bid-pricing | Suggested bid and budget bounds
187
188
  *Zernio::AdTargetingApi* | [**get_linked_in_supply_forecast**](docs/AdTargetingApi.md#get_linked_in_supply_forecast) | **POST** /v1/ads/targeting/supply-forecast | Impressions, clicks and spend forecast
@@ -1904,6 +1905,8 @@ Class | Method | HTTP request | Description
1904
1905
  - [Zernio::ScheduleBroadcastRequest](docs/ScheduleBroadcastRequest.md)
1905
1906
  - [Zernio::SearchAdInterests200Response](docs/SearchAdInterests200Response.md)
1906
1907
  - [Zernio::SearchAdInterests200ResponseInterestsInner](docs/SearchAdInterests200ResponseInterestsInner.md)
1908
+ - [Zernio::SearchAdLibrary200Response](docs/SearchAdLibrary200Response.md)
1909
+ - [Zernio::SearchAdLibrary200ResponsePaging](docs/SearchAdLibrary200ResponsePaging.md)
1907
1910
  - [Zernio::SearchAdTargeting200Response](docs/SearchAdTargeting200Response.md)
1908
1911
  - [Zernio::SearchAdTargeting200ResponseResultsInner](docs/SearchAdTargeting200ResponseResultsInner.md)
1909
1912
  - [Zernio::SearchAvailablePhoneNumbers200Response](docs/SearchAvailablePhoneNumbers200Response.md)
@@ -1076,7 +1076,7 @@ end
1076
1076
 
1077
1077
  Get daily account metrics
1078
1078
 
1079
- Returns daily aggregate metrics across all ads in a SocialAccount as a single time series — one row per calendar day in the requested range. Use this for dashboards that draw a daily-spend or daily-conversions chart, instead of calling `/v1/ads/tree` once per day. `accountId` is required. The lookup is sibling-expanded so passing the `metaads` ID also includes ads under the linked `facebook` / `instagram` posting account (and vice-versa) — same convention as `/v1/ads/tree` and `/v1/ads`. Date range defaults to the last 90 days. Capped at 730 days. Ranges older than the ingested history return a `202` immediately with the covered part and `backfillPending: true` while the rest is backfilled in the background; repeat the request shortly until it returns 200 with full data.
1079
+ Returns daily aggregate metrics across all ads in a SocialAccount as a single time series — one row per calendar day in the requested range. Use this for dashboards that draw a daily-spend or daily-conversions chart, instead of calling `/v1/ads/tree` once per day. `accountId` is required. The lookup is sibling-expanded so passing the `metaads` ID also includes ads under the linked `facebook` / `instagram` posting account (and vice-versa) — same convention as `/v1/ads/tree` and `/v1/ads`. Date range defaults to the last 90 days. Capped at 730 days. Ranges older than the ingested history return a `202` immediately with the covered part and `backfillPending: true` while the rest is backfilled in the background; repeat the request shortly until it returns 200 with full data. With adAccountId set to a Google customer id this is the customer-level performance report (clicks, cost, impressions, conversions, all conversions per day).
1080
1080
 
1081
1081
  ### Examples
1082
1082
 
@@ -13,6 +13,7 @@
13
13
  | **cpm** | **Float** | Cost per 1000 impressions | [optional] |
14
14
  | **engagement** | **Integer** | | [optional] |
15
15
  | **conversions** | **Float** | 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. | [optional] |
16
+ | **all_conversions** | **Float** | All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept. | [optional] |
16
17
  | **cost_per_conversion** | **Float** | Derived spend / conversions in the same currency as spend. 0 when conversions is 0. | [optional] |
17
18
  | **actions** | **Hash<String, Integer>** | Per-action-type counts summed over the date range, keyed by the platform's action-type names. Meta: raw Insights action_type keys (link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped, ...) — both engagement and conversion events. TikTok: pixel conversions (purchase, add_to_cart, initiate_checkout, view_content, complete_payment, lead) plus the paid-engagement family (follow, post_reaction for paid likes, comment, share) — follow is how FOLLOWERS-goal campaigns report their result. X: conversion types (purchase, sign_up, site_visit, download, custom). LinkedIn: conversion types (post_click, post_view, lead_gen). Google returns {} (its per-action names aren't synced per ad). Empty object when no actions are reported. NOTE: keys differ by platform, so branch on the ad's platform when interpreting them. | [optional] |
18
19
  | **action_values** | **Hash<String, Float>** | Monetary mirror of `actions`, from Meta's Insights `action_values[]` array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as `spend`; see the campaign node's `currency` field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
@@ -55,6 +56,7 @@ instance = Zernio::AdDailyMetrics.new(
55
56
  cpm: null,
56
57
  engagement: null,
57
58
  conversions: null,
59
+ all_conversions: null,
58
60
  cost_per_conversion: null,
59
61
  actions: {link_click=160, post_engagement=300, offsite_conversion.fb_pixel_purchase=42},
60
62
  action_values: {offsite_conversion.fb_pixel_purchase=2456.78, offsite_conversion.fb_pixel_add_to_cart=980.5},
@@ -0,0 +1,109 @@
1
+ # Zernio::AdLibraryApi
2
+
3
+ All URIs are relative to *https://zernio.com/api*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**search_ad_library**](AdLibraryApi.md#search_ad_library) | **GET** /v1/ads/library | Search the public Ad Library |
8
+
9
+
10
+ ## search_ad_library
11
+
12
+ > <SearchAdLibrary200Response> search_ad_library(account_id, opts)
13
+
14
+ Search the public Ad Library
15
+
16
+ Competitor and market research over the platform's public ad archive, searched with the customer's own connected token (no extra scope): Meta's Ad Library (`GET /ads_archive`) for a `facebook` / `instagram` / `metaads` account, LinkedIn's Ad Library (`GET /rest/adLibrary`) for a `linkedin` / `linkedinads` account. Rows are returned in the platform's raw shape under `data`; `paging.after` is an opaque cursor on both (`null` when exhausted). **Meta coverage.** Political and social-issue ads are searchable worldwide. Every other ad is in the archive only if it was delivered to the EU or UK within the last year, so a US-only commercial advertiser is invisible. Spend, impressions and demographics are political-only fields and are left out of the default projection; request them via `fields`. Meta serves the archive only to people who confirmed their identity and location at facebook.com/ID: until the Facebook user behind the connection has done so, the call fails with `meta_identity_confirmation_required` (403). **LinkedIn coverage.** Ads served after June 1 2023, worldwide, kept for a year after their last impression. EU-delivered ads carry impression ranges and the disclosed targeting facets. Pages are capped at 25 ads (`limit` > 25 is a 400); `after` is the next offset. Which params apply: `q`, `countries`, `since`, `until`, `limit`, `after` on both; `pageIds`, `adType`, `status`, `platforms`, `mediaType`, `languages`, `searchType`, `fields` are Meta-only; `advertiser` is LinkedIn-only. Passing a param the account's platform does not support is a 400 naming the param.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'zernio-sdk'
23
+ # setup authorization
24
+ Zernio.configure do |config|
25
+ # Configure Bearer authorization (JWT): bearerAuth
26
+ config.access_token = 'YOUR_BEARER_TOKEN'
27
+ end
28
+
29
+ api_instance = Zernio::AdLibraryApi.new
30
+ account_id = 'account_id_example' # String | Zernio SocialAccount id (facebook / instagram / metaads for Meta, linkedin / linkedinads for LinkedIn). Its token is the one that searches.
31
+ opts = {
32
+ q: 'q_example', # String | Keyword search. Meta does not translate it, so write it in the ads' language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given.
33
+ page_ids: 'page_ids_example', # String | Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.
34
+ advertiser: 'advertiser_example', # String | LinkedIn only. Advertiser (Page) name to search.
35
+ countries: 'countries_example', # String | Comma-separated ISO 3166-1 alpha-2 codes the ads reached. Meta defaults to ALL (an explicit ALL is Meta-only); LinkedIn searches every market when omitted.
36
+ ad_type: 'ALL', # String | Meta only.
37
+ status: 'ACTIVE', # String | Meta only. ACTIVE = eligible for delivery right now.
38
+ platforms: 'platforms_example', # String | Meta only. Comma-separated publisher platforms: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, WHATSAPP, OCULUS, THREADS, STREAMING_SERVICES.
39
+ media_type: 'ALL', # String | Meta only.
40
+ languages: 'languages_example', # String | Meta only. Comma-separated ISO 639-1 codes of the ad text.
41
+ since: Date.parse('2013-10-20'), # Date | Earliest delivery date (YYYY-MM-DD).
42
+ _until: Date.parse('2013-10-20'), # Date | Latest delivery date (YYYY-MM-DD).
43
+ search_type: 'KEYWORD_UNORDERED', # String | Meta only. Whether q matches words in any order or as an exact phrase (comma-separate phrases to match all of them).
44
+ fields: 'fields_example', # String | Meta only. Raw Graph projection override, e.g. add spend,impressions,demographic_distribution for political ads.
45
+ limit: 56, # Integer | Rows per page. LinkedIn accepts at most 25.
46
+ after: 'after_example' # String | paging.after of the previous page.
47
+ }
48
+
49
+ begin
50
+ # Search the public Ad Library
51
+ result = api_instance.search_ad_library(account_id, opts)
52
+ p result
53
+ rescue Zernio::ApiError => e
54
+ puts "Error when calling AdLibraryApi->search_ad_library: #{e}"
55
+ end
56
+ ```
57
+
58
+ #### Using the search_ad_library_with_http_info variant
59
+
60
+ This returns an Array which contains the response data, status code and headers.
61
+
62
+ > <Array(<SearchAdLibrary200Response>, Integer, Hash)> search_ad_library_with_http_info(account_id, opts)
63
+
64
+ ```ruby
65
+ begin
66
+ # Search the public Ad Library
67
+ data, status_code, headers = api_instance.search_ad_library_with_http_info(account_id, opts)
68
+ p status_code # => 2xx
69
+ p headers # => { ... }
70
+ p data # => <SearchAdLibrary200Response>
71
+ rescue Zernio::ApiError => e
72
+ puts "Error when calling AdLibraryApi->search_ad_library_with_http_info: #{e}"
73
+ end
74
+ ```
75
+
76
+ ### Parameters
77
+
78
+ | Name | Type | Description | Notes |
79
+ | ---- | ---- | ----------- | ----- |
80
+ | **account_id** | **String** | Zernio SocialAccount id (facebook / instagram / metaads for Meta, linkedin / linkedinads for LinkedIn). Its token is the one that searches. | |
81
+ | **q** | **String** | Keyword search. Meta does not translate it, so write it in the ads&#39; language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given. | [optional] |
82
+ | **page_ids** | **String** | Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list. | [optional] |
83
+ | **advertiser** | **String** | LinkedIn only. Advertiser (Page) name to search. | [optional] |
84
+ | **countries** | **String** | Comma-separated ISO 3166-1 alpha-2 codes the ads reached. Meta defaults to ALL (an explicit ALL is Meta-only); LinkedIn searches every market when omitted. | [optional] |
85
+ | **ad_type** | **String** | Meta only. | [optional][default to &#39;ALL&#39;] |
86
+ | **status** | **String** | Meta only. ACTIVE &#x3D; eligible for delivery right now. | [optional][default to &#39;ACTIVE&#39;] |
87
+ | **platforms** | **String** | Meta only. Comma-separated publisher platforms: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, WHATSAPP, OCULUS, THREADS, STREAMING_SERVICES. | [optional] |
88
+ | **media_type** | **String** | Meta only. | [optional] |
89
+ | **languages** | **String** | Meta only. Comma-separated ISO 639-1 codes of the ad text. | [optional] |
90
+ | **since** | **Date** | Earliest delivery date (YYYY-MM-DD). | [optional] |
91
+ | **_until** | **Date** | Latest delivery date (YYYY-MM-DD). | [optional] |
92
+ | **search_type** | **String** | Meta only. Whether q matches words in any order or as an exact phrase (comma-separate phrases to match all of them). | [optional][default to &#39;KEYWORD_UNORDERED&#39;] |
93
+ | **fields** | **String** | Meta only. Raw Graph projection override, e.g. add spend,impressions,demographic_distribution for political ads. | [optional] |
94
+ | **limit** | **Integer** | Rows per page. LinkedIn accepts at most 25. | [optional][default to 25] |
95
+ | **after** | **String** | paging.after of the previous page. | [optional] |
96
+
97
+ ### Return type
98
+
99
+ [**SearchAdLibrary200Response**](SearchAdLibrary200Response.md)
100
+
101
+ ### Authorization
102
+
103
+ [bearerAuth](../README.md#bearerAuth)
104
+
105
+ ### HTTP request headers
106
+
107
+ - **Content-Type**: Not defined
108
+ - **Accept**: application/json
109
+
data/docs/AdMetrics.md CHANGED
@@ -13,6 +13,7 @@
13
13
  | **cpm** | **Float** | Cost per 1000 impressions | [optional] |
14
14
  | **engagement** | **Integer** | | [optional] |
15
15
  | **conversions** | **Float** | 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&#39;s promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account&#39;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. | [optional] |
16
+ | **all_conversions** | **Float** | All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept. | [optional] |
16
17
  | **cost_per_conversion** | **Float** | Derived spend / conversions in the same currency as spend. 0 when conversions is 0. | [optional] |
17
18
  | **actions** | **Hash&lt;String, Integer&gt;** | Per-action-type counts summed over the date range, keyed by the platform&#39;s action-type names. Meta: raw Insights action_type keys (link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped, ...) — both engagement and conversion events. TikTok: pixel conversions (purchase, add_to_cart, initiate_checkout, view_content, complete_payment, lead) plus the paid-engagement family (follow, post_reaction for paid likes, comment, share) — follow is how FOLLOWERS-goal campaigns report their result. X: conversion types (purchase, sign_up, site_visit, download, custom). LinkedIn: conversion types (post_click, post_view, lead_gen). Google returns {} (its per-action names aren&#39;t synced per ad). Empty object when no actions are reported. NOTE: keys differ by platform, so branch on the ad&#39;s platform when interpreting them. | [optional] |
18
19
  | **action_values** | **Hash&lt;String, Float&gt;** | Monetary mirror of &#x60;actions&#x60;, from Meta&#39;s Insights &#x60;action_values[]&#x60; array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as &#x60;spend&#x60;; see the campaign node&#39;s &#x60;currency&#x60; field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
@@ -54,6 +55,7 @@ instance = Zernio::AdMetrics.new(
54
55
  cpm: null,
55
56
  engagement: null,
56
57
  conversions: null,
58
+ all_conversions: null,
57
59
  cost_per_conversion: null,
58
60
  actions: {link_click&#x3D;160, post_engagement&#x3D;300, offsite_conversion.fb_pixel_purchase&#x3D;42},
59
61
  action_values: {offsite_conversion.fb_pixel_purchase&#x3D;2456.78, offsite_conversion.fb_pixel_add_to_cart&#x3D;980.5},
@@ -14,6 +14,7 @@
14
14
  | **cpc** | **Float** | Cost per click in native currency. | [optional] |
15
15
  | **cpm** | **Float** | Cost per 1000 impressions in native currency. | [optional] |
16
16
  | **conversions** | **Float** | 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). | [optional] |
17
+ | **all_conversions** | **Float** | All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept. | [optional] |
17
18
  | **cost_per_conversion** | **Float** | | [optional] |
18
19
  | **actions** | **Hash&lt;String, Float&gt;** | Per-action-type counts merged across all ads on this day. Keys are platform-native action types. | [optional] |
19
20
  | **action_values** | **Hash&lt;String, Float&gt;** | Monetary mirror of &#x60;actions&#x60; in native currency. | [optional] |
@@ -36,6 +37,7 @@ instance = Zernio::AdsTimelineResponseRowsInner.new(
36
37
  cpc: null,
37
38
  cpm: null,
38
39
  conversions: null,
40
+ all_conversions: null,
39
41
  cost_per_conversion: null,
40
42
  actions: null,
41
43
  action_values: null,
@@ -13,6 +13,7 @@
13
13
  | **cpm** | **Float** | Cost per 1000 impressions | [optional] |
14
14
  | **engagement** | **Integer** | | [optional] |
15
15
  | **conversions** | **Float** | 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&#39;s promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account&#39;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. | [optional] |
16
+ | **all_conversions** | **Float** | All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept. | [optional] |
16
17
  | **cost_per_conversion** | **Float** | Derived spend / conversions in the same currency as spend. 0 when conversions is 0. | [optional] |
17
18
  | **actions** | **Hash&lt;String, Integer&gt;** | Per-action-type counts summed over the date range, keyed by the platform&#39;s action-type names. Meta: raw Insights action_type keys (link_click, offsite_conversion.fb_pixel_purchase, onsite_conversion.lead_grouped, ...) — both engagement and conversion events. TikTok: pixel conversions (purchase, add_to_cart, initiate_checkout, view_content, complete_payment, lead) plus the paid-engagement family (follow, post_reaction for paid likes, comment, share) — follow is how FOLLOWERS-goal campaigns report their result. X: conversion types (purchase, sign_up, site_visit, download, custom). LinkedIn: conversion types (post_click, post_view, lead_gen). Google returns {} (its per-action names aren&#39;t synced per ad). Empty object when no actions are reported. NOTE: keys differ by platform, so branch on the ad&#39;s platform when interpreting them. | [optional] |
18
19
  | **action_values** | **Hash&lt;String, Float&gt;** | Monetary mirror of &#x60;actions&#x60;, from Meta&#39;s Insights &#x60;action_values[]&#x60; array. Same keying — values are the revenue attributed to each action_type, in ad-account native currency (same unit as &#x60;spend&#x60;; see the campaign node&#39;s &#x60;currency&#x60; field). Use this to compute revenue-per-event (e.g. avg purchase value). Meta-only; other platforms return {}. | [optional] |
@@ -55,6 +56,7 @@ instance = Zernio::CampaignAnalyticsResponseAnalyticsDailyInner.new(
55
56
  cpm: null,
56
57
  engagement: null,
57
58
  conversions: null,
59
+ all_conversions: null,
58
60
  cost_per_conversion: null,
59
61
  actions: {link_click&#x3D;160, post_engagement&#x3D;300, offsite_conversion.fb_pixel_purchase&#x3D;42},
60
62
  action_values: {offsite_conversion.fb_pixel_purchase&#x3D;2456.78, offsite_conversion.fb_pixel_add_to_cart&#x3D;980.5},
@@ -0,0 +1,22 @@
1
+ # Zernio::SearchAdLibrary200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **platform** | **String** | | |
8
+ | **data** | **Array&lt;Object&gt;** | | |
9
+ | **paging** | [**SearchAdLibrary200ResponsePaging**](SearchAdLibrary200ResponsePaging.md) | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::SearchAdLibrary200Response.new(
17
+ platform: null,
18
+ data: null,
19
+ paging: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # Zernio::SearchAdLibrary200ResponsePaging
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **after** | **String** | Cursor for the next page; null when exhausted. | [optional] |
8
+ | **total** | **Integer** | LinkedIn only. Total matching ads. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::SearchAdLibrary200ResponsePaging.new(
16
+ after: null,
17
+ total: null
18
+ )
19
+ ```
20
+
@@ -1106,7 +1106,7 @@ module Zernio
1106
1106
  end
1107
1107
 
1108
1108
  # Get daily account metrics
1109
- # Returns daily aggregate metrics across all ads in a SocialAccount as a single time series — one row per calendar day in the requested range. Use this for dashboards that draw a daily-spend or daily-conversions chart, instead of calling `/v1/ads/tree` once per day. `accountId` is required. The lookup is sibling-expanded so passing the `metaads` ID also includes ads under the linked `facebook` / `instagram` posting account (and vice-versa) — same convention as `/v1/ads/tree` and `/v1/ads`. Date range defaults to the last 90 days. Capped at 730 days. Ranges older than the ingested history return a `202` immediately with the covered part and `backfillPending: true` while the rest is backfilled in the background; repeat the request shortly until it returns 200 with full data.
1109
+ # Returns daily aggregate metrics across all ads in a SocialAccount as a single time series — one row per calendar day in the requested range. Use this for dashboards that draw a daily-spend or daily-conversions chart, instead of calling `/v1/ads/tree` once per day. `accountId` is required. The lookup is sibling-expanded so passing the `metaads` ID also includes ads under the linked `facebook` / `instagram` posting account (and vice-versa) — same convention as `/v1/ads/tree` and `/v1/ads`. Date range defaults to the last 90 days. Capped at 730 days. Ranges older than the ingested history return a `202` immediately with the covered part and `backfillPending: true` while the rest is backfilled in the background; repeat the request shortly until it returns 200 with full data. With adAccountId set to a Google customer id this is the customer-level performance report (clicks, cost, impressions, conversions, all conversions per day).
1110
1110
  # @param account_id [String] Social account ID. Sibling-expanded to its linked posting↔ads pair.
1111
1111
  # @param [Hash] opts the optional parameters
1112
1112
  # @option opts [String] :ad_account_id Optional platform-native ad account ID (e.g. Meta &#x60;act_…&#x60;, TikTok advertiser ID). Use when the connection wraps multiple platform ad accounts and the chart should show one only. Note: rows ingested before 2026-05-13 don&#39;t carry this column; the recurring 7-day re-sync repopulates them naturally.
@@ -1120,7 +1120,7 @@ module Zernio
1120
1120
  end
1121
1121
 
1122
1122
  # Get daily account metrics
1123
- # Returns daily aggregate metrics across all ads in a SocialAccount as a single time series — one row per calendar day in the requested range. Use this for dashboards that draw a daily-spend or daily-conversions chart, instead of calling &#x60;/v1/ads/tree&#x60; once per day. &#x60;accountId&#x60; is required. The lookup is sibling-expanded so passing the &#x60;metaads&#x60; ID also includes ads under the linked &#x60;facebook&#x60; / &#x60;instagram&#x60; posting account (and vice-versa) — same convention as &#x60;/v1/ads/tree&#x60; and &#x60;/v1/ads&#x60;. Date range defaults to the last 90 days. Capped at 730 days. Ranges older than the ingested history return a &#x60;202&#x60; immediately with the covered part and &#x60;backfillPending: true&#x60; while the rest is backfilled in the background; repeat the request shortly until it returns 200 with full data.
1123
+ # Returns daily aggregate metrics across all ads in a SocialAccount as a single time series — one row per calendar day in the requested range. Use this for dashboards that draw a daily-spend or daily-conversions chart, instead of calling &#x60;/v1/ads/tree&#x60; once per day. &#x60;accountId&#x60; is required. The lookup is sibling-expanded so passing the &#x60;metaads&#x60; ID also includes ads under the linked &#x60;facebook&#x60; / &#x60;instagram&#x60; posting account (and vice-versa) — same convention as &#x60;/v1/ads/tree&#x60; and &#x60;/v1/ads&#x60;. Date range defaults to the last 90 days. Capped at 730 days. Ranges older than the ingested history return a &#x60;202&#x60; immediately with the covered part and &#x60;backfillPending: true&#x60; while the rest is backfilled in the background; repeat the request shortly until it returns 200 with full data. With adAccountId set to a Google customer id this is the customer-level performance report (clicks, cost, impressions, conversions, all conversions per day).
1124
1124
  # @param account_id [String] Social account ID. Sibling-expanded to its linked posting↔ads pair.
1125
1125
  # @param [Hash] opts the optional parameters
1126
1126
  # @option opts [String] :ad_account_id Optional platform-native ad account ID (e.g. Meta &#x60;act_…&#x60;, TikTok advertiser ID). Use when the connection wraps multiple platform ad accounts and the chart should show one only. Note: rows ingested before 2026-05-13 don&#39;t carry this column; the recurring 7-day re-sync repopulates them naturally.
@@ -0,0 +1,163 @@
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 'cgi'
14
+
15
+ module Zernio
16
+ class AdLibraryApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Search the public Ad Library
23
+ # Competitor and market research over the platform's public ad archive, searched with the customer's own connected token (no extra scope): Meta's Ad Library (`GET /ads_archive`) for a `facebook` / `instagram` / `metaads` account, LinkedIn's Ad Library (`GET /rest/adLibrary`) for a `linkedin` / `linkedinads` account. Rows are returned in the platform's raw shape under `data`; `paging.after` is an opaque cursor on both (`null` when exhausted). **Meta coverage.** Political and social-issue ads are searchable worldwide. Every other ad is in the archive only if it was delivered to the EU or UK within the last year, so a US-only commercial advertiser is invisible. Spend, impressions and demographics are political-only fields and are left out of the default projection; request them via `fields`. Meta serves the archive only to people who confirmed their identity and location at facebook.com/ID: until the Facebook user behind the connection has done so, the call fails with `meta_identity_confirmation_required` (403). **LinkedIn coverage.** Ads served after June 1 2023, worldwide, kept for a year after their last impression. EU-delivered ads carry impression ranges and the disclosed targeting facets. Pages are capped at 25 ads (`limit` > 25 is a 400); `after` is the next offset. Which params apply: `q`, `countries`, `since`, `until`, `limit`, `after` on both; `pageIds`, `adType`, `status`, `platforms`, `mediaType`, `languages`, `searchType`, `fields` are Meta-only; `advertiser` is LinkedIn-only. Passing a param the account's platform does not support is a 400 naming the param.
24
+ # @param account_id [String] Zernio SocialAccount id (facebook / instagram / metaads for Meta, linkedin / linkedinads for LinkedIn). Its token is the one that searches.
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [String] :q Keyword search. Meta does not translate it, so write it in the ads&#39; language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given.
27
+ # @option opts [String] :page_ids Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.
28
+ # @option opts [String] :advertiser LinkedIn only. Advertiser (Page) name to search.
29
+ # @option opts [String] :countries Comma-separated ISO 3166-1 alpha-2 codes the ads reached. Meta defaults to ALL (an explicit ALL is Meta-only); LinkedIn searches every market when omitted.
30
+ # @option opts [String] :ad_type Meta only. (default to 'ALL')
31
+ # @option opts [String] :status Meta only. ACTIVE &#x3D; eligible for delivery right now. (default to 'ACTIVE')
32
+ # @option opts [String] :platforms Meta only. Comma-separated publisher platforms: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, WHATSAPP, OCULUS, THREADS, STREAMING_SERVICES.
33
+ # @option opts [String] :media_type Meta only.
34
+ # @option opts [String] :languages Meta only. Comma-separated ISO 639-1 codes of the ad text.
35
+ # @option opts [Date] :since Earliest delivery date (YYYY-MM-DD).
36
+ # @option opts [Date] :_until Latest delivery date (YYYY-MM-DD).
37
+ # @option opts [String] :search_type Meta only. Whether q matches words in any order or as an exact phrase (comma-separate phrases to match all of them). (default to 'KEYWORD_UNORDERED')
38
+ # @option opts [String] :fields Meta only. Raw Graph projection override, e.g. add spend,impressions,demographic_distribution for political ads.
39
+ # @option opts [Integer] :limit Rows per page. LinkedIn accepts at most 25. (default to 25)
40
+ # @option opts [String] :after paging.after of the previous page.
41
+ # @return [SearchAdLibrary200Response]
42
+ def search_ad_library(account_id, opts = {})
43
+ data, _status_code, _headers = search_ad_library_with_http_info(account_id, opts)
44
+ data
45
+ end
46
+
47
+ # Search the public Ad Library
48
+ # Competitor and market research over the platform&#39;s public ad archive, searched with the customer&#39;s own connected token (no extra scope): Meta&#39;s Ad Library (&#x60;GET /ads_archive&#x60;) for a &#x60;facebook&#x60; / &#x60;instagram&#x60; / &#x60;metaads&#x60; account, LinkedIn&#39;s Ad Library (&#x60;GET /rest/adLibrary&#x60;) for a &#x60;linkedin&#x60; / &#x60;linkedinads&#x60; account. Rows are returned in the platform&#39;s raw shape under &#x60;data&#x60;; &#x60;paging.after&#x60; is an opaque cursor on both (&#x60;null&#x60; when exhausted). **Meta coverage.** Political and social-issue ads are searchable worldwide. Every other ad is in the archive only if it was delivered to the EU or UK within the last year, so a US-only commercial advertiser is invisible. Spend, impressions and demographics are political-only fields and are left out of the default projection; request them via &#x60;fields&#x60;. Meta serves the archive only to people who confirmed their identity and location at facebook.com/ID: until the Facebook user behind the connection has done so, the call fails with &#x60;meta_identity_confirmation_required&#x60; (403). **LinkedIn coverage.** Ads served after June 1 2023, worldwide, kept for a year after their last impression. EU-delivered ads carry impression ranges and the disclosed targeting facets. Pages are capped at 25 ads (&#x60;limit&#x60; &gt; 25 is a 400); &#x60;after&#x60; is the next offset. Which params apply: &#x60;q&#x60;, &#x60;countries&#x60;, &#x60;since&#x60;, &#x60;until&#x60;, &#x60;limit&#x60;, &#x60;after&#x60; on both; &#x60;pageIds&#x60;, &#x60;adType&#x60;, &#x60;status&#x60;, &#x60;platforms&#x60;, &#x60;mediaType&#x60;, &#x60;languages&#x60;, &#x60;searchType&#x60;, &#x60;fields&#x60; are Meta-only; &#x60;advertiser&#x60; is LinkedIn-only. Passing a param the account&#39;s platform does not support is a 400 naming the param.
49
+ # @param account_id [String] Zernio SocialAccount id (facebook / instagram / metaads for Meta, linkedin / linkedinads for LinkedIn). Its token is the one that searches.
50
+ # @param [Hash] opts the optional parameters
51
+ # @option opts [String] :q Keyword search. Meta does not translate it, so write it in the ads&#39; language. Required unless pageIds (Meta) or advertiser (LinkedIn) is given.
52
+ # @option opts [String] :page_ids Meta only. Comma-separated Facebook Page ids (max 10) whose ads to list.
53
+ # @option opts [String] :advertiser LinkedIn only. Advertiser (Page) name to search.
54
+ # @option opts [String] :countries Comma-separated ISO 3166-1 alpha-2 codes the ads reached. Meta defaults to ALL (an explicit ALL is Meta-only); LinkedIn searches every market when omitted.
55
+ # @option opts [String] :ad_type Meta only. (default to 'ALL')
56
+ # @option opts [String] :status Meta only. ACTIVE &#x3D; eligible for delivery right now. (default to 'ACTIVE')
57
+ # @option opts [String] :platforms Meta only. Comma-separated publisher platforms: FACEBOOK, INSTAGRAM, AUDIENCE_NETWORK, MESSENGER, WHATSAPP, OCULUS, THREADS, STREAMING_SERVICES.
58
+ # @option opts [String] :media_type Meta only.
59
+ # @option opts [String] :languages Meta only. Comma-separated ISO 639-1 codes of the ad text.
60
+ # @option opts [Date] :since Earliest delivery date (YYYY-MM-DD).
61
+ # @option opts [Date] :_until Latest delivery date (YYYY-MM-DD).
62
+ # @option opts [String] :search_type Meta only. Whether q matches words in any order or as an exact phrase (comma-separate phrases to match all of them). (default to 'KEYWORD_UNORDERED')
63
+ # @option opts [String] :fields Meta only. Raw Graph projection override, e.g. add spend,impressions,demographic_distribution for political ads.
64
+ # @option opts [Integer] :limit Rows per page. LinkedIn accepts at most 25. (default to 25)
65
+ # @option opts [String] :after paging.after of the previous page.
66
+ # @return [Array<(SearchAdLibrary200Response, Integer, Hash)>] SearchAdLibrary200Response data, response status code and response headers
67
+ def search_ad_library_with_http_info(account_id, opts = {})
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug 'Calling API: AdLibraryApi.search_ad_library ...'
70
+ end
71
+ # verify the required parameter 'account_id' is set
72
+ if @api_client.config.client_side_validation && account_id.nil?
73
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AdLibraryApi.search_ad_library"
74
+ end
75
+ if @api_client.config.client_side_validation && !opts[:'q'].nil? && opts[:'q'].to_s.length > 100
76
+ fail ArgumentError, 'invalid value for "opts[:"q"]" when calling AdLibraryApi.search_ad_library, the character length must be smaller than or equal to 100.'
77
+ end
78
+
79
+ if @api_client.config.client_side_validation && !opts[:'advertiser'].nil? && opts[:'advertiser'].to_s.length > 100
80
+ fail ArgumentError, 'invalid value for "opts[:"advertiser"]" when calling AdLibraryApi.search_ad_library, the character length must be smaller than or equal to 100.'
81
+ end
82
+
83
+ allowable_values = ["ALL", "POLITICAL_AND_ISSUE_ADS", "HOUSING_ADS", "EMPLOYMENT_ADS", "FINANCIAL_PRODUCTS_AND_SERVICES_ADS"]
84
+ if @api_client.config.client_side_validation && opts[:'ad_type'] && !allowable_values.include?(opts[:'ad_type'])
85
+ fail ArgumentError, "invalid value for \"ad_type\", must be one of #{allowable_values}"
86
+ end
87
+ allowable_values = ["ACTIVE", "INACTIVE", "ALL"]
88
+ if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
89
+ fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
90
+ end
91
+ allowable_values = ["ALL", "IMAGE", "MEME", "VIDEO", "NONE"]
92
+ if @api_client.config.client_side_validation && opts[:'media_type'] && !allowable_values.include?(opts[:'media_type'])
93
+ fail ArgumentError, "invalid value for \"media_type\", must be one of #{allowable_values}"
94
+ end
95
+ allowable_values = ["KEYWORD_UNORDERED", "KEYWORD_EXACT_PHRASE"]
96
+ if @api_client.config.client_side_validation && opts[:'search_type'] && !allowable_values.include?(opts[:'search_type'])
97
+ fail ArgumentError, "invalid value for \"search_type\", must be one of #{allowable_values}"
98
+ end
99
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdLibraryApi.search_ad_library, must be smaller than or equal to 100.'
101
+ end
102
+
103
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
104
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdLibraryApi.search_ad_library, must be greater than or equal to 1.'
105
+ end
106
+
107
+ # resource path
108
+ local_var_path = '/v1/ads/library'
109
+
110
+ # query parameters
111
+ query_params = opts[:query_params] || {}
112
+ query_params[:'accountId'] = account_id
113
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
114
+ query_params[:'pageIds'] = opts[:'page_ids'] if !opts[:'page_ids'].nil?
115
+ query_params[:'advertiser'] = opts[:'advertiser'] if !opts[:'advertiser'].nil?
116
+ query_params[:'countries'] = opts[:'countries'] if !opts[:'countries'].nil?
117
+ query_params[:'adType'] = opts[:'ad_type'] if !opts[:'ad_type'].nil?
118
+ query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
119
+ query_params[:'platforms'] = opts[:'platforms'] if !opts[:'platforms'].nil?
120
+ query_params[:'mediaType'] = opts[:'media_type'] if !opts[:'media_type'].nil?
121
+ query_params[:'languages'] = opts[:'languages'] if !opts[:'languages'].nil?
122
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
123
+ query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
124
+ query_params[:'searchType'] = opts[:'search_type'] if !opts[:'search_type'].nil?
125
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
126
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
127
+ query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
128
+
129
+ # header parameters
130
+ header_params = opts[:header_params] || {}
131
+ # HTTP header 'Accept' (if needed)
132
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
133
+
134
+ # form parameters
135
+ form_params = opts[:form_params] || {}
136
+
137
+ # http body (model)
138
+ post_body = opts[:debug_body]
139
+
140
+ # return_type
141
+ return_type = opts[:debug_return_type] || 'SearchAdLibrary200Response'
142
+
143
+ # auth_names
144
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
145
+
146
+ new_options = opts.merge(
147
+ :operation => :"AdLibraryApi.search_ad_library",
148
+ :header_params => header_params,
149
+ :query_params => query_params,
150
+ :form_params => form_params,
151
+ :body => post_body,
152
+ :auth_names => auth_names,
153
+ :return_type => return_type
154
+ )
155
+
156
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
157
+ if @api_client.config.debugging
158
+ @api_client.config.logger.debug "API called: AdLibraryApi#search_ad_library\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
159
+ end
160
+ return data, status_code, headers
161
+ end
162
+ end
163
+ end
@@ -39,6 +39,9 @@ module Zernio
39
39
  # 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.
40
40
  attr_accessor :conversions
41
41
 
42
+ # All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
43
+ attr_accessor :all_conversions
44
+
42
45
  # Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
43
46
  attr_accessor :cost_per_conversion
44
47
 
@@ -127,6 +130,7 @@ module Zernio
127
130
  :'cpm' => :'cpm',
128
131
  :'engagement' => :'engagement',
129
132
  :'conversions' => :'conversions',
133
+ :'all_conversions' => :'allConversions',
130
134
  :'cost_per_conversion' => :'costPerConversion',
131
135
  :'actions' => :'actions',
132
136
  :'action_values' => :'actionValues',
@@ -178,6 +182,7 @@ module Zernio
178
182
  :'cpm' => :'Float',
179
183
  :'engagement' => :'Integer',
180
184
  :'conversions' => :'Float',
185
+ :'all_conversions' => :'Float',
181
186
  :'cost_per_conversion' => :'Float',
182
187
  :'actions' => :'Hash<String, Integer>',
183
188
  :'action_values' => :'Hash<String, Float>',
@@ -272,6 +277,10 @@ module Zernio
272
277
  self.conversions = attributes[:'conversions']
273
278
  end
274
279
 
280
+ if attributes.key?(:'all_conversions')
281
+ self.all_conversions = attributes[:'all_conversions']
282
+ end
283
+
275
284
  if attributes.key?(:'cost_per_conversion')
276
285
  self.cost_per_conversion = attributes[:'cost_per_conversion']
277
286
  end
@@ -412,6 +421,7 @@ module Zernio
412
421
  cpm == o.cpm &&
413
422
  engagement == o.engagement &&
414
423
  conversions == o.conversions &&
424
+ all_conversions == o.all_conversions &&
415
425
  cost_per_conversion == o.cost_per_conversion &&
416
426
  actions == o.actions &&
417
427
  action_values == o.action_values &&
@@ -449,7 +459,7 @@ module Zernio
449
459
  # Calculates hash code according to all attributes.
450
460
  # @return [Integer] Hash code
451
461
  def hash
452
- [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
462
+ [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
453
463
  end
454
464
 
455
465
  # 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
 
@@ -123,6 +126,7 @@ module Zernio
123
126
  :'cpm' => :'cpm',
124
127
  :'engagement' => :'engagement',
125
128
  :'conversions' => :'conversions',
129
+ :'all_conversions' => :'allConversions',
126
130
  :'cost_per_conversion' => :'costPerConversion',
127
131
  :'actions' => :'actions',
128
132
  :'action_values' => :'actionValues',
@@ -173,6 +177,7 @@ module Zernio
173
177
  :'cpm' => :'Float',
174
178
  :'engagement' => :'Integer',
175
179
  :'conversions' => :'Float',
180
+ :'all_conversions' => :'Float',
176
181
  :'cost_per_conversion' => :'Float',
177
182
  :'actions' => :'Hash<String, Integer>',
178
183
  :'action_values' => :'Hash<String, Float>',
@@ -259,6 +264,10 @@ module Zernio
259
264
  self.conversions = attributes[:'conversions']
260
265
  end
261
266
 
267
+ if attributes.key?(:'all_conversions')
268
+ self.all_conversions = attributes[:'all_conversions']
269
+ end
270
+
262
271
  if attributes.key?(:'cost_per_conversion')
263
272
  self.cost_per_conversion = attributes[:'cost_per_conversion']
264
273
  end
@@ -395,6 +404,7 @@ module Zernio
395
404
  cpm == o.cpm &&
396
405
  engagement == o.engagement &&
397
406
  conversions == o.conversions &&
407
+ all_conversions == o.all_conversions &&
398
408
  cost_per_conversion == o.cost_per_conversion &&
399
409
  actions == o.actions &&
400
410
  action_values == o.action_values &&
@@ -431,7 +441,7 @@ module Zernio
431
441
  # Calculates hash code according to all attributes.
432
442
  # @return [Integer] Hash code
433
443
  def hash
434
- [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].hash
444
+ [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].hash
435
445
  end
436
446
 
437
447
  # Builds the object from hash