late-sdk 0.0.644 → 0.0.646

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 (34) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/docs/AdCampaignsApi.md +2 -2
  4. data/docs/AdDailyMetrics.md +1 -1
  5. data/docs/AdMetrics.md +1 -1
  6. data/docs/AdTreeCampaign.md +1 -1
  7. data/docs/GetAdsTimeline200ResponseRowsInner.md +1 -1
  8. data/docs/GetCampaignAnalytics200ResponseAnalyticsDailyInner.md +1 -1
  9. data/docs/GetInboxConversation200ResponseData.md +3 -1
  10. data/docs/GetInboxConversation200ResponseDataMetadata.md +38 -0
  11. data/docs/ListInboxConversations200ResponseDataInner.md +3 -1
  12. data/docs/ListInboxConversations200ResponseDataInnerMetadata.md +50 -0
  13. data/lib/zernio-sdk/api/ad_campaigns_api.rb +2 -2
  14. data/lib/zernio-sdk/api/messages_api.rb +1 -1
  15. data/lib/zernio-sdk/models/ad_daily_metrics.rb +2 -1
  16. data/lib/zernio-sdk/models/ad_metrics.rb +1 -0
  17. data/lib/zernio-sdk/models/ad_tree_campaign.rb +1 -1
  18. data/lib/zernio-sdk/models/get_ads_timeline200_response_rows_inner.rb +1 -0
  19. data/lib/zernio-sdk/models/get_campaign_analytics200_response_analytics_daily_inner.rb +1 -0
  20. data/lib/zernio-sdk/models/get_inbox_conversation200_response_data.rb +13 -4
  21. data/lib/zernio-sdk/models/get_inbox_conversation200_response_data_metadata.rb +249 -0
  22. data/lib/zernio-sdk/models/list_inbox_conversations200_response_data_inner.rb +13 -4
  23. data/lib/zernio-sdk/models/list_inbox_conversations200_response_data_inner_metadata.rb +309 -0
  24. data/lib/zernio-sdk/version.rb +1 -1
  25. data/lib/zernio-sdk.rb +2 -0
  26. data/openapi.yaml +158 -6
  27. data/spec/api/ad_campaigns_api_spec.rb +1 -1
  28. data/spec/models/get_inbox_conversation200_response_data_metadata_spec.rb +96 -0
  29. data/spec/models/get_inbox_conversation200_response_data_spec.rb +6 -0
  30. data/spec/models/list_inbox_conversations200_response_data_inner_metadata_spec.rb +132 -0
  31. data/spec/models/list_inbox_conversations200_response_data_inner_spec.rb +6 -0
  32. data/zernio-sdk-0.0.646.gem +0 -0
  33. metadata +10 -2
  34. data/zernio-sdk-0.0.644.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0c37e96a5200bb19db198f77b363ecf71a95d9099150878d25bb132689f3c0c9
4
- data.tar.gz: a5fb7b3a484807b2cd8672e8532c2c5f950f71b8d74de17f139aee79d2b6d109
3
+ metadata.gz: 978cc54b12b88c8dbce3617d7759d0e15727a984c5b62a0082b12d94e9390d3c
4
+ data.tar.gz: ea95c6c0bbc61bb30e7b3844a7f46dd88e2210871d1f448e80554a8dbcee330d
5
5
  SHA512:
6
- metadata.gz: 0ee47da80536a16c94f908770374ffd1dce9ed2aa68708610dcffac71225d19edd4199f2fb8c542fcfc1f4186a167acf56dbebf12e97f4f24708d24fba58681a
7
- data.tar.gz: a5fef5e5b8e4bc87bce0900a26610316b5471309f72611b6c87724a66473de9c4b70347767995c1ca299e6177d06d3bf0711b082166f6ea7cde59fd47799d556
6
+ metadata.gz: 8881623a149e17881dee2aabc1a2fc4f230fb6e299b68b601e62c21cb0ed7431a033b0280c49c59c8b42ef0f183de5f43020de9a310fbfd80b3cd9d3765fffbe
7
+ data.tar.gz: 3a3db87cb68ff2a9685fa514b5c72033f4b21e74cae9e990feab434950acd453079c3672afc2ca10dda6fc2161bc8aebff6db10ef141e566a8cd80ed83ccb423
data/README.md CHANGED
@@ -1136,6 +1136,7 @@ Class | Method | HTTP request | Description
1136
1136
  - [Zernio::GetGoogleBusinessVerifications200ResponseVoiceOfMerchantStateVerify](docs/GetGoogleBusinessVerifications200ResponseVoiceOfMerchantStateVerify.md)
1137
1137
  - [Zernio::GetInboxConversation200Response](docs/GetInboxConversation200Response.md)
1138
1138
  - [Zernio::GetInboxConversation200ResponseData](docs/GetInboxConversation200ResponseData.md)
1139
+ - [Zernio::GetInboxConversation200ResponseDataMetadata](docs/GetInboxConversation200ResponseDataMetadata.md)
1139
1140
  - [Zernio::GetInboxConversationAnalytics200Response](docs/GetInboxConversationAnalytics200Response.md)
1140
1141
  - [Zernio::GetInboxConversationAnalytics200ResponseBySourceInner](docs/GetInboxConversationAnalytics200ResponseBySourceInner.md)
1141
1142
  - [Zernio::GetInboxConversationAnalytics200ResponseSummary](docs/GetInboxConversationAnalytics200ResponseSummary.md)
@@ -1458,6 +1459,7 @@ Class | Method | HTTP request | Description
1458
1459
  - [Zernio::ListInboxConversations200Response](docs/ListInboxConversations200Response.md)
1459
1460
  - [Zernio::ListInboxConversations200ResponseDataInner](docs/ListInboxConversations200ResponseDataInner.md)
1460
1461
  - [Zernio::ListInboxConversations200ResponseDataInnerInstagramProfile](docs/ListInboxConversations200ResponseDataInnerInstagramProfile.md)
1462
+ - [Zernio::ListInboxConversations200ResponseDataInnerMetadata](docs/ListInboxConversations200ResponseDataInnerMetadata.md)
1461
1463
  - [Zernio::ListInboxConversations200ResponseMeta](docs/ListInboxConversations200ResponseMeta.md)
1462
1464
  - [Zernio::ListInboxConversations200ResponseMetaFailedAccountsInner](docs/ListInboxConversations200ResponseMetaFailedAccountsInner.md)
1463
1465
  - [Zernio::ListInboxConversations200ResponsePagination](docs/ListInboxConversations200ResponsePagination.md)
@@ -855,7 +855,7 @@ opts = {
855
855
  from_date: Date.parse('2013-10-20'), # Date | Start of the METRICS date range (YYYY-MM-DD). Affects only the spend/impression numbers overlaid on each node, NOT which campaigns are returned. Defaults to 90 days ago.
856
856
  to_date: Date.parse('2013-10-20'), # Date | End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
857
857
  sort: 'newest', # String | Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end.
858
- time_increment: 1, # Integer | Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`. See `dailyLevel` to control which levels carry it.
858
+ time_increment: 1, # Integer | Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except Meta `reach`: the range total is Meta's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
859
859
  daily_level: 'campaign' # String | Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset.
860
860
  }
861
861
 
@@ -903,7 +903,7 @@ end
903
903
  | **from_date** | **Date** | Start of the METRICS date range (YYYY-MM-DD). Affects only the spend/impression numbers overlaid on each node, NOT which campaigns are returned. Defaults to 90 days ago. | [optional] |
904
904
  | **to_date** | **Date** | End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range. | [optional] |
905
905
  | **sort** | **String** | Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end. | [optional][default to 'newest'] |
906
- | **time_increment** | **Integer** | Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`. See `dailyLevel` to control which levels carry it. | [optional] |
906
+ | **time_increment** | **Integer** | Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except Meta `reach`: the range total is Meta's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it. | [optional] |
907
907
  | **daily_level** | **String** | Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset. | [optional][default to 'campaign'] |
908
908
 
909
909
  ### Return type
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **spend** | **Float** | | [optional] |
8
8
  | **impressions** | **Integer** | | [optional] |
9
- | **reach** | **Integer** | | [optional] |
9
+ | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta. | [optional] |
10
10
  | **clicks** | **Integer** | | [optional] |
11
11
  | **ctr** | **Float** | Click-through rate (%) | [optional] |
12
12
  | **cpc** | **Float** | Cost per click | [optional] |
data/docs/AdMetrics.md CHANGED
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **spend** | **Float** | | [optional] |
8
8
  | **impressions** | **Integer** | | [optional] |
9
- | **reach** | **Integer** | | [optional] |
9
+ | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta. | [optional] |
10
10
  | **clicks** | **Integer** | | [optional] |
11
11
  | **ctr** | **Float** | Click-through rate (%) | [optional] |
12
12
  | **cpc** | **Float** | Cost per click | [optional] |
@@ -31,7 +31,7 @@
31
31
  | **roas_average_floor** | **Float** | Representative ROAS floor for the campaign — bubbled up from the top-spending ad set. Decimal multiplier (2.0 = 2.0x). | [optional] |
32
32
  | **promoted_object** | [**AdTreeCampaignPromotedObject**](AdTreeCampaignPromotedObject.md) | | [optional] |
33
33
  | **ad_sets** | [**Array<AdTreeAdSet>**](AdTreeAdSet.md) | | [optional] |
34
- | **daily** | [**Array<AdDailyMetrics>**](AdDailyMetrics.md) | Per-day metric series for this campaign. Present only when `GET /v1/ads/tree` is called with `timeIncrement=1` (any `dailyLevel`). This is the per-campaign daily trend — summing its additive fields reproduces the campaign `metrics` total. | [optional] |
34
+ | **daily** | [**Array<AdDailyMetrics>**](AdDailyMetrics.md) | Per-day metric series for this campaign. Present only when `GET /v1/ads/tree` is called with `timeIncrement=1` (any `dailyLevel`). This is the per-campaign daily trend — summing its additive fields reproduces the campaign `metrics` total, except `reach`: on Meta the range total is de-duplicated, so daily reach does not sum to it. | [optional] |
35
35
 
36
36
  ## Example
37
37
 
@@ -7,7 +7,7 @@
7
7
  | **date** | **Date** | | [optional] |
8
8
  | **spend** | **Float** | Native currency units (matches /ads/tree convention). | [optional] |
9
9
  | **impressions** | **Integer** | | [optional] |
10
- | **reach** | **Integer** | | [optional] |
10
+ | **reach** | **Integer** | Reach summed across the account's ads for this single day. A person seen by two ads the same day counts twice, and reach is de-duplicated per day only: do NOT sum it across days (people reached on multiple days would be double-counted). | [optional] |
11
11
  | **clicks** | **Integer** | | [optional] |
12
12
  | **engagement** | **Integer** | | [optional] |
13
13
  | **ctr** | **Float** | Click-through rate as a percentage (0–100). | [optional] |
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **spend** | **Float** | | [optional] |
8
8
  | **impressions** | **Integer** | | [optional] |
9
- | **reach** | **Integer** | | [optional] |
9
+ | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta. | [optional] |
10
10
  | **clicks** | **Integer** | | [optional] |
11
11
  | **ctr** | **Float** | Click-through rate (%) | [optional] |
12
12
  | **cpc** | **Float** | Cost per click | [optional] |
@@ -17,6 +17,7 @@
17
17
  | **updated_time** | **Time** | | [optional] |
18
18
  | **participants** | [**Array<UpdateFacebookPage200ResponseSelectedPage>**](UpdateFacebookPage200ResponseSelectedPage.md) | | [optional] |
19
19
  | **instagram_profile** | [**ListInboxConversations200ResponseDataInnerInstagramProfile**](ListInboxConversations200ResponseDataInnerInstagramProfile.md) | | [optional] |
20
+ | **metadata** | [**GetInboxConversation200ResponseDataMetadata**](GetInboxConversation200ResponseDataMetadata.md) | | [optional] |
20
21
 
21
22
  ## Example
22
23
 
@@ -36,7 +37,8 @@ instance = Zernio::GetInboxConversation200ResponseData.new(
36
37
  last_message_at: null,
37
38
  updated_time: null,
38
39
  participants: null,
39
- instagram_profile: null
40
+ instagram_profile: null,
41
+ metadata: null
40
42
  )
41
43
  ```
42
44
 
@@ -0,0 +1,38 @@
1
+ # Zernio::GetInboxConversation200ResponseDataMetadata
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **meta_ad_id** | **String** | The Meta ad ID the user clicked. Always present when a referral was captured. | [optional] |
8
+ | **meta_ad_source** | **String** | Meta-supplied source identifier, for example ADS. | [optional] |
9
+ | **meta_ad_type** | **String** | Meta-supplied referral type, for example OPEN_THREAD. | [optional] |
10
+ | **meta_ad_ref** | **String** | The ref parameter passed through from the ad creative. | [optional] |
11
+ | **meta_ad_title** | **String** | Title of the ad creative at click time. | [optional] |
12
+ | **meta_ad_photo_url** | **String** | Image of the ad creative at click time. | [optional] |
13
+ | **meta_ad_video_url** | **String** | Video of the ad creative at click time. | [optional] |
14
+ | **meta_ad_post_id** | **String** | The organic post the ad promoted, when the ad was a boosted post. | [optional] |
15
+ | **meta_ad_product_id** | **String** | The catalogue product the user clicked, for product ads. | [optional] |
16
+ | **meta_ad_flow_id** | **String** | The Meta flow the ad launched, for flow ads. | [optional] |
17
+ | **meta_ad_captured_at** | **Time** | When Zernio stored this referral. Always present when a referral was captured. | [optional] |
18
+
19
+ ## Example
20
+
21
+ ```ruby
22
+ require 'zernio-sdk'
23
+
24
+ instance = Zernio::GetInboxConversation200ResponseDataMetadata.new(
25
+ meta_ad_id: null,
26
+ meta_ad_source: null,
27
+ meta_ad_type: null,
28
+ meta_ad_ref: null,
29
+ meta_ad_title: null,
30
+ meta_ad_photo_url: null,
31
+ meta_ad_video_url: null,
32
+ meta_ad_post_id: null,
33
+ meta_ad_product_id: null,
34
+ meta_ad_flow_id: null,
35
+ meta_ad_captured_at: null
36
+ )
37
+ ```
38
+
@@ -18,6 +18,7 @@
18
18
  | **unread_count** | **Integer** | Number of unread messages | [optional] |
19
19
  | **url** | **String** | Direct link to open the conversation on the platform (if available) | [optional] |
20
20
  | **instagram_profile** | [**ListInboxConversations200ResponseDataInnerInstagramProfile**](ListInboxConversations200ResponseDataInnerInstagramProfile.md) | | [optional] |
21
+ | **metadata** | [**ListInboxConversations200ResponseDataInnerMetadata**](ListInboxConversations200ResponseDataInnerMetadata.md) | | [optional] |
21
22
 
22
23
  ## Example
23
24
 
@@ -38,7 +39,8 @@ instance = Zernio::ListInboxConversations200ResponseDataInner.new(
38
39
  status: null,
39
40
  unread_count: null,
40
41
  url: null,
41
- instagram_profile: null
42
+ instagram_profile: null,
43
+ metadata: null
42
44
  )
43
45
  ```
44
46
 
@@ -0,0 +1,50 @@
1
+ # Zernio::ListInboxConversations200ResponseDataInnerMetadata
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ctwa_clid** | **String** | WhatsApp only. Meta's click identifier, the value to forward to the Meta Conversions API for Business Messaging. Meta omits it on some numbers, so a WhatsApp referral can arrive without it. | [optional] |
8
+ | **ctwa_source_id** | **String** | WhatsApp only. The Meta ad ID the user clicked. This is the WhatsApp equivalent of meta_ad_id. | [optional] |
9
+ | **ctwa_source_type** | **String** | WhatsApp only. What the user clicked, as supplied by Meta (for example ad or post). | [optional] |
10
+ | **ctwa_source_url** | **String** | WhatsApp only. Meta's URL for the ad that was clicked, normally an fb.me short link. | [optional] |
11
+ | **ctwa_headline** | **String** | WhatsApp only. Headline of the ad creative at click time. | [optional] |
12
+ | **ctwa_captured_at** | **Time** | WhatsApp only. When Zernio stored this referral. Always present when a WhatsApp referral was captured. | [optional] |
13
+ | **meta_ad_id** | **String** | Instagram and Facebook only. The Meta ad ID the user clicked. Always present when an Instagram or Facebook referral was captured. | [optional] |
14
+ | **meta_ad_source** | **String** | Instagram and Facebook only. Meta-supplied source identifier, for example ADS. | [optional] |
15
+ | **meta_ad_type** | **String** | Instagram and Facebook only. Meta-supplied referral type, for example OPEN_THREAD. | [optional] |
16
+ | **meta_ad_ref** | **String** | Instagram and Facebook only. The ref parameter passed through from the ad creative. | [optional] |
17
+ | **meta_ad_title** | **String** | Instagram and Facebook only. Title of the ad creative at click time. | [optional] |
18
+ | **meta_ad_photo_url** | **String** | Instagram and Facebook only. Image of the ad creative at click time. | [optional] |
19
+ | **meta_ad_video_url** | **String** | Instagram and Facebook only. Video of the ad creative at click time. | [optional] |
20
+ | **meta_ad_post_id** | **String** | Instagram and Facebook only. The organic post the ad promoted, when the ad was a boosted post. | [optional] |
21
+ | **meta_ad_product_id** | **String** | Instagram and Facebook only. The catalogue product the user clicked, for product ads. | [optional] |
22
+ | **meta_ad_flow_id** | **String** | Instagram and Facebook only. The Meta flow the ad launched, for flow ads. | [optional] |
23
+ | **meta_ad_captured_at** | **Time** | Instagram and Facebook only. When Zernio stored this referral. Always present when an Instagram or Facebook referral was captured. | [optional] |
24
+
25
+ ## Example
26
+
27
+ ```ruby
28
+ require 'zernio-sdk'
29
+
30
+ instance = Zernio::ListInboxConversations200ResponseDataInnerMetadata.new(
31
+ ctwa_clid: null,
32
+ ctwa_source_id: null,
33
+ ctwa_source_type: null,
34
+ ctwa_source_url: null,
35
+ ctwa_headline: null,
36
+ ctwa_captured_at: null,
37
+ meta_ad_id: null,
38
+ meta_ad_source: null,
39
+ meta_ad_type: null,
40
+ meta_ad_ref: null,
41
+ meta_ad_title: null,
42
+ meta_ad_photo_url: null,
43
+ meta_ad_video_url: null,
44
+ meta_ad_post_id: null,
45
+ meta_ad_product_id: null,
46
+ meta_ad_flow_id: null,
47
+ meta_ad_captured_at: null
48
+ )
49
+ ```
50
+
@@ -833,7 +833,7 @@ module Zernio
833
833
  # @option opts [Date] :from_date Start of the METRICS date range (YYYY-MM-DD). Affects only the spend/impression numbers overlaid on each node, NOT which campaigns are returned. Defaults to 90 days ago.
834
834
  # @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
835
835
  # @option opts [String] :sort Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end. (default to 'newest')
836
- # @option opts [Integer] :time_increment Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`. See `dailyLevel` to control which levels carry it.
836
+ # @option opts [Integer] :time_increment Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except Meta `reach`: the range total is Meta's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
837
837
  # @option opts [String] :daily_level Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset. (default to 'campaign')
838
838
  # @return [GetAdTree200Response]
839
839
  def get_ad_tree(opts = {})
@@ -857,7 +857,7 @@ module Zernio
857
857
  # @option opts [Date] :from_date Start of the METRICS date range (YYYY-MM-DD). Affects only the spend/impression numbers overlaid on each node, NOT which campaigns are returned. Defaults to 90 days ago.
858
858
  # @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
859
859
  # @option opts [String] :sort Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end. (default to 'newest')
860
- # @option opts [Integer] :time_increment Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`. See `dailyLevel` to control which levels carry it.
860
+ # @option opts [Integer] :time_increment Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except Meta `reach`: the range total is Meta's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
861
861
  # @option opts [String] :daily_level Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset. (default to 'campaign')
862
862
  # @return [Array<(GetAdTree200Response, Integer, Hash)>] GetAdTree200Response data, response status code and response headers
863
863
  def get_ad_tree_with_http_info(opts = {})
@@ -515,7 +515,7 @@ module Zernio
515
515
  if @api_client.config.debugging
516
516
  @api_client.config.logger.debug 'Calling API: MessagesApi.list_inbox_conversations ...'
517
517
  end
518
- allowable_values = ["facebook", "instagram", "twitter", "bluesky", "reddit", "telegram"]
518
+ allowable_values = ["facebook", "instagram", "twitter", "bluesky", "reddit", "telegram", "whatsapp"]
519
519
  if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
520
520
  fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
521
521
  end
@@ -14,12 +14,13 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module Zernio
17
- # One day of metrics. Same fields as `AdMetrics` plus the `date` they apply to. Returned inside a node's `daily[]` when `GET /v1/ads/tree` is called with `timeIncrement=1`. Rate metrics (ctr/cpc/cpm/costPerConversion/ roas/videoAvgTimeWatchedActions) are recomputed per day from that day's sums, so summing the additive fields across a node's `daily[]` reproduces its aggregated `metrics` total. Do NOT sum or plain-average `videoAvgTimeWatchedActions` across days: the range value is the play-weighted average of the daily values.
17
+ # One day of metrics. Same fields as `AdMetrics` plus the `date` they apply to. Returned inside a node's `daily[]` when `GET /v1/ads/tree` is called with `timeIncrement=1`. Rate metrics (ctr/cpc/cpm/costPerConversion/ roas/videoAvgTimeWatchedActions) are recomputed per day from that day's sums, so summing the additive fields across a node's `daily[]` reproduces its aggregated `metrics` total. `reach` is the exception: on Meta the aggregated total is de-duplicated across the range, so daily reach does not sum to it. Do NOT sum or plain-average `videoAvgTimeWatchedActions` across days: the range value is the play-weighted average of the daily values.
18
18
  class AdDailyMetrics < ApiModelBase
19
19
  attr_accessor :spend
20
20
 
21
21
  attr_accessor :impressions
22
22
 
23
+ # Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta.
23
24
  attr_accessor :reach
24
25
 
25
26
  attr_accessor :clicks
@@ -19,6 +19,7 @@ module Zernio
19
19
 
20
20
  attr_accessor :impressions
21
21
 
22
+ # Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta.
22
23
  attr_accessor :reach
23
24
 
24
25
  attr_accessor :clicks
@@ -83,7 +83,7 @@ module Zernio
83
83
 
84
84
  attr_accessor :ad_sets
85
85
 
86
- # Per-day metric series for this campaign. Present only when `GET /v1/ads/tree` is called with `timeIncrement=1` (any `dailyLevel`). This is the per-campaign daily trend — summing its additive fields reproduces the campaign `metrics` total.
86
+ # Per-day metric series for this campaign. Present only when `GET /v1/ads/tree` is called with `timeIncrement=1` (any `dailyLevel`). This is the per-campaign daily trend — summing its additive fields reproduces the campaign `metrics` total, except `reach`: on Meta the range total is de-duplicated, so daily reach does not sum to it.
87
87
  attr_accessor :daily
88
88
 
89
89
  class EnumAttributeValidator
@@ -22,6 +22,7 @@ module Zernio
22
22
 
23
23
  attr_accessor :impressions
24
24
 
25
+ # Reach summed across the account's ads for this single day. A person seen by two ads the same day counts twice, and reach is de-duplicated per day only: do NOT sum it across days (people reached on multiple days would be double-counted).
25
26
  attr_accessor :reach
26
27
 
27
28
  attr_accessor :clicks
@@ -19,6 +19,7 @@ module Zernio
19
19
 
20
20
  attr_accessor :impressions
21
21
 
22
+ # Unique people reached in the requested date range. Meta (facebook/instagram): Meta's own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta.
22
23
  attr_accessor :reach
23
24
 
24
25
  attr_accessor :clicks
@@ -42,6 +42,8 @@ module Zernio
42
42
 
43
43
  attr_accessor :instagram_profile
44
44
 
45
+ attr_accessor :metadata
46
+
45
47
  class EnumAttributeValidator
46
48
  attr_reader :datatype
47
49
  attr_reader :allowable_values
@@ -79,7 +81,8 @@ module Zernio
79
81
  :'last_message_at' => :'lastMessageAt',
80
82
  :'updated_time' => :'updatedTime',
81
83
  :'participants' => :'participants',
82
- :'instagram_profile' => :'instagramProfile'
84
+ :'instagram_profile' => :'instagramProfile',
85
+ :'metadata' => :'metadata'
83
86
  }
84
87
  end
85
88
 
@@ -108,7 +111,8 @@ module Zernio
108
111
  :'last_message_at' => :'Time',
109
112
  :'updated_time' => :'Time',
110
113
  :'participants' => :'Array<UpdateFacebookPage200ResponseSelectedPage>',
111
- :'instagram_profile' => :'ListInboxConversations200ResponseDataInnerInstagramProfile'
114
+ :'instagram_profile' => :'ListInboxConversations200ResponseDataInnerInstagramProfile',
115
+ :'metadata' => :'GetInboxConversation200ResponseDataMetadata'
112
116
  }
113
117
  end
114
118
 
@@ -188,6 +192,10 @@ module Zernio
188
192
  if attributes.key?(:'instagram_profile')
189
193
  self.instagram_profile = attributes[:'instagram_profile']
190
194
  end
195
+
196
+ if attributes.key?(:'metadata')
197
+ self.metadata = attributes[:'metadata']
198
+ end
191
199
  end
192
200
 
193
201
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -246,7 +254,8 @@ module Zernio
246
254
  last_message_at == o.last_message_at &&
247
255
  updated_time == o.updated_time &&
248
256
  participants == o.participants &&
249
- instagram_profile == o.instagram_profile
257
+ instagram_profile == o.instagram_profile &&
258
+ metadata == o.metadata
250
259
  end
251
260
 
252
261
  # @see the `==` method
@@ -258,7 +267,7 @@ module Zernio
258
267
  # Calculates hash code according to all attributes.
259
268
  # @return [Integer] Hash code
260
269
  def hash
261
- [id, account_id, account_username, platform, status, participant_name, participant_id, participant_verified_type, last_message, last_message_at, updated_time, participants, instagram_profile].hash
270
+ [id, account_id, account_username, platform, status, participant_name, participant_id, participant_verified_type, last_message, last_message_at, updated_time, participants, instagram_profile, metadata].hash
262
271
  end
263
272
 
264
273
  # Builds the object from hash
@@ -0,0 +1,249 @@
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
+ # Ad-click attribution for a conversation that started from a Meta ad. Absent when the conversation did not originate from an ad click. Captured once, on the first inbound message after the click, and never overwritten. If the same person later clicks a different ad, the original values are kept. Meta only sends the referral on that first message. This operation currently returns only the `meta_ad_*` family, which covers Instagram Click-to-Direct and Facebook Messenger Click-to-Message. WhatsApp Click-to-WhatsApp attribution (the `ctwa_*` keys, where the ad ID is `ctwa_source_id`) is returned by `GET /v1/inbox/conversations` instead. Every key is optional and only the keys Meta supplied are returned, so read defensively. Meta does not send a campaign or ad set ID, so none is exposed here. More keys may be added over time. Treat any key you do not recognise as an opaque string. Key names differ from the `message.received` webhook on purpose. The webhook forwards Meta's referral verbatim (`ad_id`, `source`, `type`) while the stored conversation record uses the prefixed names below. Renaming either side would break existing integrations, so both spellings are kept.
18
+ class GetInboxConversation200ResponseDataMetadata < ApiModelBase
19
+ # The Meta ad ID the user clicked. Always present when a referral was captured.
20
+ attr_accessor :meta_ad_id
21
+
22
+ # Meta-supplied source identifier, for example ADS.
23
+ attr_accessor :meta_ad_source
24
+
25
+ # Meta-supplied referral type, for example OPEN_THREAD.
26
+ attr_accessor :meta_ad_type
27
+
28
+ # The ref parameter passed through from the ad creative.
29
+ attr_accessor :meta_ad_ref
30
+
31
+ # Title of the ad creative at click time.
32
+ attr_accessor :meta_ad_title
33
+
34
+ # Image of the ad creative at click time.
35
+ attr_accessor :meta_ad_photo_url
36
+
37
+ # Video of the ad creative at click time.
38
+ attr_accessor :meta_ad_video_url
39
+
40
+ # The organic post the ad promoted, when the ad was a boosted post.
41
+ attr_accessor :meta_ad_post_id
42
+
43
+ # The catalogue product the user clicked, for product ads.
44
+ attr_accessor :meta_ad_product_id
45
+
46
+ # The Meta flow the ad launched, for flow ads.
47
+ attr_accessor :meta_ad_flow_id
48
+
49
+ # When Zernio stored this referral. Always present when a referral was captured.
50
+ attr_accessor :meta_ad_captured_at
51
+
52
+ # Attribute mapping from ruby-style variable name to JSON key.
53
+ def self.attribute_map
54
+ {
55
+ :'meta_ad_id' => :'meta_ad_id',
56
+ :'meta_ad_source' => :'meta_ad_source',
57
+ :'meta_ad_type' => :'meta_ad_type',
58
+ :'meta_ad_ref' => :'meta_ad_ref',
59
+ :'meta_ad_title' => :'meta_ad_title',
60
+ :'meta_ad_photo_url' => :'meta_ad_photo_url',
61
+ :'meta_ad_video_url' => :'meta_ad_video_url',
62
+ :'meta_ad_post_id' => :'meta_ad_post_id',
63
+ :'meta_ad_product_id' => :'meta_ad_product_id',
64
+ :'meta_ad_flow_id' => :'meta_ad_flow_id',
65
+ :'meta_ad_captured_at' => :'meta_ad_captured_at'
66
+ }
67
+ end
68
+
69
+ # Returns attribute mapping this model knows about
70
+ def self.acceptable_attribute_map
71
+ attribute_map
72
+ end
73
+
74
+ # Returns all the JSON keys this model knows about
75
+ def self.acceptable_attributes
76
+ acceptable_attribute_map.values
77
+ end
78
+
79
+ # Attribute type mapping.
80
+ def self.openapi_types
81
+ {
82
+ :'meta_ad_id' => :'String',
83
+ :'meta_ad_source' => :'String',
84
+ :'meta_ad_type' => :'String',
85
+ :'meta_ad_ref' => :'String',
86
+ :'meta_ad_title' => :'String',
87
+ :'meta_ad_photo_url' => :'String',
88
+ :'meta_ad_video_url' => :'String',
89
+ :'meta_ad_post_id' => :'String',
90
+ :'meta_ad_product_id' => :'String',
91
+ :'meta_ad_flow_id' => :'String',
92
+ :'meta_ad_captured_at' => :'Time'
93
+ }
94
+ end
95
+
96
+ # List of attributes with nullable: true
97
+ def self.openapi_nullable
98
+ Set.new([
99
+ ])
100
+ end
101
+
102
+ # Initializes the object
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ def initialize(attributes = {})
105
+ if (!attributes.is_a?(Hash))
106
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetInboxConversation200ResponseDataMetadata` initialize method"
107
+ end
108
+
109
+ # check to see if the attribute exists and convert string to symbol for hash key
110
+ acceptable_attribute_map = self.class.acceptable_attribute_map
111
+ attributes = attributes.each_with_object({}) { |(k, v), h|
112
+ if (!acceptable_attribute_map.key?(k.to_sym))
113
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetInboxConversation200ResponseDataMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
114
+ end
115
+ h[k.to_sym] = v
116
+ }
117
+
118
+ if attributes.key?(:'meta_ad_id')
119
+ self.meta_ad_id = attributes[:'meta_ad_id']
120
+ end
121
+
122
+ if attributes.key?(:'meta_ad_source')
123
+ self.meta_ad_source = attributes[:'meta_ad_source']
124
+ end
125
+
126
+ if attributes.key?(:'meta_ad_type')
127
+ self.meta_ad_type = attributes[:'meta_ad_type']
128
+ end
129
+
130
+ if attributes.key?(:'meta_ad_ref')
131
+ self.meta_ad_ref = attributes[:'meta_ad_ref']
132
+ end
133
+
134
+ if attributes.key?(:'meta_ad_title')
135
+ self.meta_ad_title = attributes[:'meta_ad_title']
136
+ end
137
+
138
+ if attributes.key?(:'meta_ad_photo_url')
139
+ self.meta_ad_photo_url = attributes[:'meta_ad_photo_url']
140
+ end
141
+
142
+ if attributes.key?(:'meta_ad_video_url')
143
+ self.meta_ad_video_url = attributes[:'meta_ad_video_url']
144
+ end
145
+
146
+ if attributes.key?(:'meta_ad_post_id')
147
+ self.meta_ad_post_id = attributes[:'meta_ad_post_id']
148
+ end
149
+
150
+ if attributes.key?(:'meta_ad_product_id')
151
+ self.meta_ad_product_id = attributes[:'meta_ad_product_id']
152
+ end
153
+
154
+ if attributes.key?(:'meta_ad_flow_id')
155
+ self.meta_ad_flow_id = attributes[:'meta_ad_flow_id']
156
+ end
157
+
158
+ if attributes.key?(:'meta_ad_captured_at')
159
+ self.meta_ad_captured_at = attributes[:'meta_ad_captured_at']
160
+ end
161
+ end
162
+
163
+ # Show invalid properties with the reasons. Usually used together with valid?
164
+ # @return Array for valid properties with the reasons
165
+ def list_invalid_properties
166
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
167
+ invalid_properties = Array.new
168
+ invalid_properties
169
+ end
170
+
171
+ # Check to see if the all the properties in the model are valid
172
+ # @return true if the model is valid
173
+ def valid?
174
+ warn '[DEPRECATED] the `valid?` method is obsolete'
175
+ true
176
+ end
177
+
178
+ # Checks equality by comparing each attribute.
179
+ # @param [Object] Object to be compared
180
+ def ==(o)
181
+ return true if self.equal?(o)
182
+ self.class == o.class &&
183
+ meta_ad_id == o.meta_ad_id &&
184
+ meta_ad_source == o.meta_ad_source &&
185
+ meta_ad_type == o.meta_ad_type &&
186
+ meta_ad_ref == o.meta_ad_ref &&
187
+ meta_ad_title == o.meta_ad_title &&
188
+ meta_ad_photo_url == o.meta_ad_photo_url &&
189
+ meta_ad_video_url == o.meta_ad_video_url &&
190
+ meta_ad_post_id == o.meta_ad_post_id &&
191
+ meta_ad_product_id == o.meta_ad_product_id &&
192
+ meta_ad_flow_id == o.meta_ad_flow_id &&
193
+ meta_ad_captured_at == o.meta_ad_captured_at
194
+ end
195
+
196
+ # @see the `==` method
197
+ # @param [Object] Object to be compared
198
+ def eql?(o)
199
+ self == o
200
+ end
201
+
202
+ # Calculates hash code according to all attributes.
203
+ # @return [Integer] Hash code
204
+ def hash
205
+ [meta_ad_id, meta_ad_source, meta_ad_type, meta_ad_ref, meta_ad_title, meta_ad_photo_url, meta_ad_video_url, meta_ad_post_id, meta_ad_product_id, meta_ad_flow_id, meta_ad_captured_at].hash
206
+ end
207
+
208
+ # Builds the object from hash
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ # @return [Object] Returns the model itself
211
+ def self.build_from_hash(attributes)
212
+ return nil unless attributes.is_a?(Hash)
213
+ attributes = attributes.transform_keys(&:to_sym)
214
+ transformed_hash = {}
215
+ openapi_types.each_pair do |key, type|
216
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
217
+ transformed_hash["#{key}"] = nil
218
+ elsif type =~ /\AArray<(.*)>/i
219
+ # check to ensure the input is an array given that the attribute
220
+ # is documented as an array but the input is not
221
+ if attributes[attribute_map[key]].is_a?(Array)
222
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
223
+ end
224
+ elsif !attributes[attribute_map[key]].nil?
225
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
226
+ end
227
+ end
228
+ new(transformed_hash)
229
+ end
230
+
231
+ # Returns the object in the form of hash
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_hash
234
+ hash = {}
235
+ self.class.attribute_map.each_pair do |attr, param|
236
+ value = self.send(attr)
237
+ if value.nil?
238
+ is_nullable = self.class.openapi_nullable.include?(attr)
239
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
240
+ end
241
+
242
+ hash[param] = _to_hash(value)
243
+ end
244
+ hash
245
+ end
246
+
247
+ end
248
+
249
+ end