zernio-sdk 0.0.825 → 0.0.827

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e45c3b1ad4a7289f771b285143d405d2ea20352ba73ba89ab6ff71751cf5c5b2
4
- data.tar.gz: 5bf1d0ecd41260e109ade8714f5bc7755f58fde55930766b7c6006372bc90f33
3
+ metadata.gz: 4b58144b3f772896b868e6c6f764729caf6ac0f8eff8f03bbd0a906f607ce83f
4
+ data.tar.gz: 4d9aa39a326bf2cb9f0c04288d8dfadde26863a00763ea41039ce7f6639212b7
5
5
  SHA512:
6
- metadata.gz: 49e9ccd7eef5f092f680ef20c7228bebf950127442d1690f9d1b013b9a2e0c15566409477783a12e66d4be8ead24a11b4309f8fde16d5ff0548012b10444cf89
7
- data.tar.gz: 5050299eaae0d8283644c46a67aae97bd25d2d0539dfac7906303e3495fb52e105e918c82af988cb1a1ce77edd91189d92f6040fbe0088c0153dbcba4aadd7ff
6
+ metadata.gz: 2af8170bbcafc79dd5837950eadaba68491eaf6ceb22351771f478b95af51592456aa07a96a99b023a06d0cdcc7e5c2408016dfe82735a449f474f555ab07af6
7
+ data.tar.gz: 0c73bdd561e5db4622402d2d10836a64924767fb96d114ff80fabad27679406e41d847e526494f87401ed0724f09c044f56929c580872e2b0cd2e9703da8ee89
data/docs/AnalyticsApi.md CHANGED
@@ -1985,7 +1985,7 @@ end
1985
1985
 
1986
1986
  Sync an external post
1987
1987
 
1988
- Fetch an account's latest external posts (published directly on the platform, not through Zernio) on demand, so a just-published post is retrievable within seconds instead of waiting for the background sync (which refreshes each account at most every ~90 minutes). Primary use case: verifying a submitted post. When a user publishes on the platform and immediately pastes the post URL into your app, call this with `accountId` plus `url` (or `postId`) to confirm the post exists and return its metadata. Behavior: - We check our stored copy first and return immediately if the post is already known (no platform call). - Otherwise we fetch the account's latest posts live from the platform, then match and return the submitted post. - Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped. `accountId` is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts). LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a `url` is REQUIRED and imports that single post. Pass any LinkedIn post URL (`linkedin.com/posts/…`, `linkedin.com/feed/update/urn:li:activity:…`) or a `urn:li:share:…` / `urn:li:ugcPost:…` URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles). `url` accepts any format the platform uses (e.g. `instagram.com/p/…`, `instagram.com/reel/…`, `youtu.be/…`, `youtube.com/shorts/…`, `tiktok.com/@user/video/…`, and `vm.tiktok.com` short links). Pass `postId` (the platform media/video id) as an alternative locator. Note: post-level analytics (reach, impressions) still carry the platform's own delay (e.g. ~24h on Instagram). This endpoint confirms the post exists and returns its metadata plus basic engagement (likes, comments), not delayed insights.
1988
+ Fetch an account's latest external posts (published directly on the platform, not through Zernio) on demand, so a just-published post is retrievable within seconds instead of waiting for the background sync (which refreshes each account at most every ~90 minutes). Primary use case: verifying a submitted post. When a user publishes on the platform and immediately pastes the post URL into your app, call this with `accountId` plus `url` (or `postId`) to confirm the post exists and return its metadata. Behavior: - We check our stored copy first and return immediately if the post is already known (no platform call). - Otherwise we fetch the account's latest posts live from the platform, then match and return the submitted post. - Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped. `accountId` is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts). LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a `url` is REQUIRED and imports that single post. Pass any LinkedIn post URL (`linkedin.com/posts/…`, `linkedin.com/feed/update/urn:li:activity:…`) or a `urn:li:share:…` / `urn:li:ugcPost:…` URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles). `url` accepts any format the platform uses (e.g. `instagram.com/p/…`, `instagram.com/reel/…`, `youtu.be/…`, `youtube.com/shorts/…`, `tiktok.com/@user/video/…`, `vm.tiktok.com` short links, `pinterest.com/pin/…` on any regional domain, and `pin.it` short links). Pass `postId` (the platform media/video/pin id) as an alternative locator. Note: post-level analytics (reach, impressions) still carry the platform's own delay (e.g. ~24h on Instagram). This endpoint confirms the post exists and returns its metadata plus basic engagement (likes, comments), not delayed insights.
1989
1989
 
1990
1990
  ### Examples
1991
1991
 
@@ -28,7 +28,10 @@
28
28
  | **headline** | **String** | Required for Meta, Google, Pinterest, LinkedIn, and OpenAI Ads on legacy + attach shapes (skip for multi-creative — use `creatives[].headline`). Ignored for TikTok and X/Twitter. Max: Meta=255, Google=30, Pinterest=100, LinkedIn=400, OpenAI=50 (min 3). On LinkedIn this is the ad's headline (the bold text on the creative); for traffic ads it's the link card title. On OpenAI Ads this is the chat card's title. | [optional] |
29
29
  | **long_headline** | **String** | Google Display only — defaults to `headline` if omitted. On LinkedIn, reused as the optional secondary description text on traffic (link) ads; omitted if not provided. | [optional] |
30
30
  | **body** | **String** | Required on legacy + attach shapes. For X/Twitter this is the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). On LinkedIn this is the post commentary (the intro text shown above the ad). On OpenAI Ads this is the chat card's body text. Max: Google=90, Pinterest=500, OpenAI=100. | [optional] |
31
- | **description** | **String** | Meta only (facebook/instagram). Link description — the secondary text shown below the headline (Meta's link_data.description; on video creatives mapped to video_data.link_description). When omitted, Meta auto-pulls the destination URL's OpenGraph description. Applies on legacy, attach, and placementAssets shapes; for multi-creative use creatives[].description (this field is the shared fallback). For multi-text variations use dynamicCreative.descriptions instead. | [optional] |
31
+ | **description** | **String** | Meta only (facebook/instagram). Link description — the secondary text shown below the headline (Meta's link_data.description; on video creatives mapped to video_data.link_description). When omitted, Meta auto-pulls the destination URL's OpenGraph description. Applies on legacy, attach, and placementAssets shapes; for multi-creative use creatives[].description (this field is the shared fallback). For multi-text variations use `descriptions` (array) instead. | [optional] |
32
+ | **bodies** | **Array<String>** | Meta only. Multiple Text Options (Advantage+ Flexible Format): supply 1-5 primary-text variations and Meta optimises delivery across them, WITHOUT enabling full Dynamic Creative (`dynamicCreative`). Uses `optimization_type: DEGREES_OF_FREEDOM` on the asset feed, so multiple ads per ad set are allowed (unlike `dynamicCreative` which is limited to one). Requires `imageUrl` or `video`, `linkUrl`, and `callToAction`. When set, the top-level `body` field is used as the `object_story_spec.link_data.message` (the preview text) and `headlines` must also be present. Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards`, and `creatives[]`. | [optional] |
33
+ | **headlines** | **Array<String>** | Meta only. Headline variations for Multiple Text Options. Must be sent alongside `bodies`. The top-level `headline` field is used as the `object_story_spec.link_data.name`. | [optional] |
34
+ | **descriptions** | **Array<String>** | Meta only. Optional description variations for Multiple Text Options. Sent alongside `bodies` and `headlines`. | [optional] |
32
35
  | **call_to_action** | **String** | Required on legacy + attach shapes for Meta. Honoured on TikTok (passes through to the Spark Ad creative's `call_to_action`) and on LinkedIn (the CTA button on the ad; defaults to LEARN_MORE when `linkUrl` is set). LinkedIn accepts: LEARN_MORE, SIGN_UP, DOWNLOAD, SUBSCRIBE, REGISTER, JOIN, ATTEND, REQUEST_DEMO, VIEW_QUOTE, APPLY, SEE_MORE, SHOP_NOW, BUY_NOW. Ignored by Google, Pinterest, and X/Twitter. | [optional] |
33
36
  | **link_url** | **String** | Required on legacy + attach shapes (skip for multi-creative). On LinkedIn it's the ad's destination URL; required for `traffic` ads, optional for `engagement` / `awareness`. NOT required when `goal` is `lead_generation` (the ad opens a Lead Gen form instead of a destination). On LinkedIn, `imageUrl` + `linkUrl` publishes an ARTICLE-content creative; this is LinkedIn's article ad format, with the image as thumbnail and `longHeadline` as description. Required for OpenAI Ads (the chat card's target_url). | [optional] |
34
37
  | **lead_gen_form_id** | **String** | Lead Gen form ID to attach to the ad's creative. REQUIRED when `goal` is `lead_generation`. Create one via POST /v1/ads/lead-forms. On Meta (facebook/instagram) this is the leadgen_forms ID; the ad set's promoted_object.page_id + LEAD_GENERATION optimization + destination_type ON_AD are derived automatically from the goal. On LinkedIn this is the adForm ID; the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}` and the campaign objective is set to MAX_LEAD. Forms must be owned by the sponsoredAccount (not the organization) for the URN to resolve. Also required on every Meta ATTACH (`adSetId`) call that targets a lead ad set (the form attaches per-ad; Meta rejects a formless ad in a lead ad set). Both `placementAssets` (per-placement creative) and `dynamicCreative` (multi-text / multi-asset pool, e.g. multiple headlines and primary texts) ARE supported on Meta instant-form lead ads. | [optional] |
@@ -129,6 +132,9 @@ instance = Zernio::CreateStandaloneAdRequest.new(
129
132
  long_headline: null,
130
133
  body: null,
131
134
  description: null,
135
+ bodies: null,
136
+ headlines: null,
137
+ descriptions: null,
132
138
  call_to_action: null,
133
139
  link_url: null,
134
140
  lead_gen_form_id: null,
@@ -1995,7 +1995,7 @@ module Zernio
1995
1995
  end
1996
1996
 
1997
1997
  # Sync an external post
1998
- # Fetch an account's latest external posts (published directly on the platform, not through Zernio) on demand, so a just-published post is retrievable within seconds instead of waiting for the background sync (which refreshes each account at most every ~90 minutes). Primary use case: verifying a submitted post. When a user publishes on the platform and immediately pastes the post URL into your app, call this with `accountId` plus `url` (or `postId`) to confirm the post exists and return its metadata. Behavior: - We check our stored copy first and return immediately if the post is already known (no platform call). - Otherwise we fetch the account's latest posts live from the platform, then match and return the submitted post. - Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped. `accountId` is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts). LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a `url` is REQUIRED and imports that single post. Pass any LinkedIn post URL (`linkedin.com/posts/…`, `linkedin.com/feed/update/urn:li:activity:…`) or a `urn:li:share:…` / `urn:li:ugcPost:…` URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles). `url` accepts any format the platform uses (e.g. `instagram.com/p/…`, `instagram.com/reel/…`, `youtu.be/…`, `youtube.com/shorts/…`, `tiktok.com/@user/video/…`, and `vm.tiktok.com` short links). Pass `postId` (the platform media/video id) as an alternative locator. Note: post-level analytics (reach, impressions) still carry the platform's own delay (e.g. ~24h on Instagram). This endpoint confirms the post exists and returns its metadata plus basic engagement (likes, comments), not delayed insights.
1998
+ # Fetch an account's latest external posts (published directly on the platform, not through Zernio) on demand, so a just-published post is retrievable within seconds instead of waiting for the background sync (which refreshes each account at most every ~90 minutes). Primary use case: verifying a submitted post. When a user publishes on the platform and immediately pastes the post URL into your app, call this with `accountId` plus `url` (or `postId`) to confirm the post exists and return its metadata. Behavior: - We check our stored copy first and return immediately if the post is already known (no platform call). - Otherwise we fetch the account's latest posts live from the platform, then match and return the submitted post. - Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped. `accountId` is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts). LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a `url` is REQUIRED and imports that single post. Pass any LinkedIn post URL (`linkedin.com/posts/…`, `linkedin.com/feed/update/urn:li:activity:…`) or a `urn:li:share:…` / `urn:li:ugcPost:…` URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles). `url` accepts any format the platform uses (e.g. `instagram.com/p/…`, `instagram.com/reel/…`, `youtu.be/…`, `youtube.com/shorts/…`, `tiktok.com/@user/video/…`, `vm.tiktok.com` short links, `pinterest.com/pin/…` on any regional domain, and `pin.it` short links). Pass `postId` (the platform media/video/pin id) as an alternative locator. Note: post-level analytics (reach, impressions) still carry the platform's own delay (e.g. ~24h on Instagram). This endpoint confirms the post exists and returns its metadata plus basic engagement (likes, comments), not delayed insights.
1999
1999
  # @param sync_external_posts_request [SyncExternalPostsRequest]
2000
2000
  # @param [Hash] opts the optional parameters
2001
2001
  # @return [SyncExternalPosts200Response]
@@ -2005,7 +2005,7 @@ module Zernio
2005
2005
  end
2006
2006
 
2007
2007
  # Sync an external post
2008
- # Fetch an account's latest external posts (published directly on the platform, not through Zernio) on demand, so a just-published post is retrievable within seconds instead of waiting for the background sync (which refreshes each account at most every ~90 minutes). Primary use case: verifying a submitted post. When a user publishes on the platform and immediately pastes the post URL into your app, call this with `accountId` plus `url` (or `postId`) to confirm the post exists and return its metadata. Behavior: - We check our stored copy first and return immediately if the post is already known (no platform call). - Otherwise we fetch the account's latest posts live from the platform, then match and return the submitted post. - Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped. `accountId` is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts). LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a `url` is REQUIRED and imports that single post. Pass any LinkedIn post URL (`linkedin.com/posts/…`, `linkedin.com/feed/update/urn:li:activity:…`) or a `urn:li:share:…` / `urn:li:ugcPost:…` URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles). `url` accepts any format the platform uses (e.g. `instagram.com/p/…`, `instagram.com/reel/…`, `youtu.be/…`, `youtube.com/shorts/…`, `tiktok.com/@user/video/…`, and `vm.tiktok.com` short links). Pass `postId` (the platform media/video id) as an alternative locator. Note: post-level analytics (reach, impressions) still carry the platform's own delay (e.g. ~24h on Instagram). This endpoint confirms the post exists and returns its metadata plus basic engagement (likes, comments), not delayed insights.
2008
+ # Fetch an account's latest external posts (published directly on the platform, not through Zernio) on demand, so a just-published post is retrievable within seconds instead of waiting for the background sync (which refreshes each account at most every ~90 minutes). Primary use case: verifying a submitted post. When a user publishes on the platform and immediately pastes the post URL into your app, call this with `accountId` plus `url` (or `postId`) to confirm the post exists and return its metadata. Behavior: - We check our stored copy first and return immediately if the post is already known (no platform call). - Otherwise we fetch the account's latest posts live from the platform, then match and return the submitted post. - Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped. `accountId` is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts). LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a `url` is REQUIRED and imports that single post. Pass any LinkedIn post URL (`linkedin.com/posts/…`, `linkedin.com/feed/update/urn:li:activity:…`) or a `urn:li:share:…` / `urn:li:ugcPost:…` URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles). `url` accepts any format the platform uses (e.g. `instagram.com/p/…`, `instagram.com/reel/…`, `youtu.be/…`, `youtube.com/shorts/…`, `tiktok.com/@user/video/…`, `vm.tiktok.com` short links, `pinterest.com/pin/…` on any regional domain, and `pin.it` short links). Pass `postId` (the platform media/video/pin id) as an alternative locator. Note: post-level analytics (reach, impressions) still carry the platform's own delay (e.g. ~24h on Instagram). This endpoint confirms the post exists and returns its metadata plus basic engagement (likes, comments), not delayed insights.
2009
2009
  # @param sync_external_posts_request [SyncExternalPostsRequest]
2010
2010
  # @param [Hash] opts the optional parameters
2011
2011
  # @return [Array<(SyncExternalPosts200Response, Integer, Hash)>] SyncExternalPosts200Response data, response status code and response headers
@@ -83,9 +83,18 @@ module Zernio
83
83
  # Required on legacy + attach shapes. For X/Twitter this is the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). On LinkedIn this is the post commentary (the intro text shown above the ad). On OpenAI Ads this is the chat card's body text. Max: Google=90, Pinterest=500, OpenAI=100.
84
84
  attr_accessor :body
85
85
 
86
- # Meta only (facebook/instagram). Link description — the secondary text shown below the headline (Meta's link_data.description; on video creatives mapped to video_data.link_description). When omitted, Meta auto-pulls the destination URL's OpenGraph description. Applies on legacy, attach, and placementAssets shapes; for multi-creative use creatives[].description (this field is the shared fallback). For multi-text variations use dynamicCreative.descriptions instead.
86
+ # Meta only (facebook/instagram). Link description — the secondary text shown below the headline (Meta's link_data.description; on video creatives mapped to video_data.link_description). When omitted, Meta auto-pulls the destination URL's OpenGraph description. Applies on legacy, attach, and placementAssets shapes; for multi-creative use creatives[].description (this field is the shared fallback). For multi-text variations use `descriptions` (array) instead.
87
87
  attr_accessor :description
88
88
 
89
+ # Meta only. Multiple Text Options (Advantage+ Flexible Format): supply 1-5 primary-text variations and Meta optimises delivery across them, WITHOUT enabling full Dynamic Creative (`dynamicCreative`). Uses `optimization_type: DEGREES_OF_FREEDOM` on the asset feed, so multiple ads per ad set are allowed (unlike `dynamicCreative` which is limited to one). Requires `imageUrl` or `video`, `linkUrl`, and `callToAction`. When set, the top-level `body` field is used as the `object_story_spec.link_data.message` (the preview text) and `headlines` must also be present. Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards`, and `creatives[]`.
90
+ attr_accessor :bodies
91
+
92
+ # Meta only. Headline variations for Multiple Text Options. Must be sent alongside `bodies`. The top-level `headline` field is used as the `object_story_spec.link_data.name`.
93
+ attr_accessor :headlines
94
+
95
+ # Meta only. Optional description variations for Multiple Text Options. Sent alongside `bodies` and `headlines`.
96
+ attr_accessor :descriptions
97
+
89
98
  # Required on legacy + attach shapes for Meta. Honoured on TikTok (passes through to the Spark Ad creative's `call_to_action`) and on LinkedIn (the CTA button on the ad; defaults to LEARN_MORE when `linkUrl` is set). LinkedIn accepts: LEARN_MORE, SIGN_UP, DOWNLOAD, SUBSCRIBE, REGISTER, JOIN, ATTEND, REQUEST_DEMO, VIEW_QUOTE, APPLY, SEE_MORE, SHOP_NOW, BUY_NOW. Ignored by Google, Pinterest, and X/Twitter.
90
99
  attr_accessor :call_to_action
91
100
 
@@ -330,6 +339,9 @@ module Zernio
330
339
  :'long_headline' => :'longHeadline',
331
340
  :'body' => :'body',
332
341
  :'description' => :'description',
342
+ :'bodies' => :'bodies',
343
+ :'headlines' => :'headlines',
344
+ :'descriptions' => :'descriptions',
333
345
  :'call_to_action' => :'callToAction',
334
346
  :'link_url' => :'linkUrl',
335
347
  :'lead_gen_form_id' => :'leadGenFormId',
@@ -439,6 +451,9 @@ module Zernio
439
451
  :'long_headline' => :'String',
440
452
  :'body' => :'String',
441
453
  :'description' => :'String',
454
+ :'bodies' => :'Array<String>',
455
+ :'headlines' => :'Array<String>',
456
+ :'descriptions' => :'Array<String>',
442
457
  :'call_to_action' => :'String',
443
458
  :'link_url' => :'String',
444
459
  :'lead_gen_form_id' => :'String',
@@ -642,6 +657,24 @@ module Zernio
642
657
  self.description = attributes[:'description']
643
658
  end
644
659
 
660
+ if attributes.key?(:'bodies')
661
+ if (value = attributes[:'bodies']).is_a?(Array)
662
+ self.bodies = value
663
+ end
664
+ end
665
+
666
+ if attributes.key?(:'headlines')
667
+ if (value = attributes[:'headlines']).is_a?(Array)
668
+ self.headlines = value
669
+ end
670
+ end
671
+
672
+ if attributes.key?(:'descriptions')
673
+ if (value = attributes[:'descriptions']).is_a?(Array)
674
+ self.descriptions = value
675
+ end
676
+ end
677
+
645
678
  if attributes.key?(:'call_to_action')
646
679
  self.call_to_action = attributes[:'call_to_action']
647
680
  end
@@ -1024,6 +1057,30 @@ module Zernio
1024
1057
  invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 255.')
1025
1058
  end
1026
1059
 
1060
+ if !@bodies.nil? && @bodies.length > 5
1061
+ invalid_properties.push('invalid value for "bodies", number of items must be less than or equal to 5.')
1062
+ end
1063
+
1064
+ if !@bodies.nil? && @bodies.length < 1
1065
+ invalid_properties.push('invalid value for "bodies", number of items must be greater than or equal to 1.')
1066
+ end
1067
+
1068
+ if !@headlines.nil? && @headlines.length > 5
1069
+ invalid_properties.push('invalid value for "headlines", number of items must be less than or equal to 5.')
1070
+ end
1071
+
1072
+ if !@headlines.nil? && @headlines.length < 1
1073
+ invalid_properties.push('invalid value for "headlines", number of items must be greater than or equal to 1.')
1074
+ end
1075
+
1076
+ if !@descriptions.nil? && @descriptions.length > 5
1077
+ invalid_properties.push('invalid value for "descriptions", number of items must be less than or equal to 5.')
1078
+ end
1079
+
1080
+ if !@descriptions.nil? && @descriptions.length < 1
1081
+ invalid_properties.push('invalid value for "descriptions", number of items must be greater than or equal to 1.')
1082
+ end
1083
+
1027
1084
  if !@creatives.nil? && @creatives.length < 1
1028
1085
  invalid_properties.push('invalid value for "creatives", number of items must be greater than or equal to 1.')
1029
1086
  end
@@ -1141,6 +1198,12 @@ module Zernio
1141
1198
  return false if !@currency.nil? && @currency.to_s.length < 3
1142
1199
  return false if !@long_headline.nil? && @long_headline.to_s.length > 90
1143
1200
  return false if !@description.nil? && @description.to_s.length > 255
1201
+ return false if !@bodies.nil? && @bodies.length > 5
1202
+ return false if !@bodies.nil? && @bodies.length < 1
1203
+ return false if !@headlines.nil? && @headlines.length > 5
1204
+ return false if !@headlines.nil? && @headlines.length < 1
1205
+ return false if !@descriptions.nil? && @descriptions.length > 5
1206
+ return false if !@descriptions.nil? && @descriptions.length < 1
1144
1207
  call_to_action_validator = EnumAttributeValidator.new('String', ["LEARN_MORE", "SHOP_NOW", "SIGN_UP", "BOOK_TRAVEL", "CONTACT_US", "DOWNLOAD", "GET_OFFER", "GET_QUOTE", "SUBSCRIBE", "WATCH_MORE", "ADD_TO_CART", "APPLY_NOW", "BOOK_NOW", "BUY_TICKETS", "DONATE", "DONATE_NOW", "GET_DIRECTIONS", "GET_SHOWTIMES", "LISTEN_NOW", "ORDER_NOW", "PLAY_GAME", "REQUEST_TIME", "SEE_MENU", "START_ORDER", "INSTALL_MOBILE_APP", "USE_APP", "REGISTER", "JOIN", "ATTEND", "REQUEST_DEMO", "VIEW_QUOTE", "APPLY", "SEE_MORE", "BUY_NOW"])
1145
1208
  return false unless call_to_action_validator.valid?(@call_to_action)
1146
1209
  return false if !@creatives.nil? && @creatives.length < 1
@@ -1369,6 +1432,60 @@ module Zernio
1369
1432
  @description = description
1370
1433
  end
1371
1434
 
1435
+ # Custom attribute writer method with validation
1436
+ # @param [Object] bodies Value to be assigned
1437
+ def bodies=(bodies)
1438
+ if bodies.nil?
1439
+ fail ArgumentError, 'bodies cannot be nil'
1440
+ end
1441
+
1442
+ if bodies.length > 5
1443
+ fail ArgumentError, 'invalid value for "bodies", number of items must be less than or equal to 5.'
1444
+ end
1445
+
1446
+ if bodies.length < 1
1447
+ fail ArgumentError, 'invalid value for "bodies", number of items must be greater than or equal to 1.'
1448
+ end
1449
+
1450
+ @bodies = bodies
1451
+ end
1452
+
1453
+ # Custom attribute writer method with validation
1454
+ # @param [Object] headlines Value to be assigned
1455
+ def headlines=(headlines)
1456
+ if headlines.nil?
1457
+ fail ArgumentError, 'headlines cannot be nil'
1458
+ end
1459
+
1460
+ if headlines.length > 5
1461
+ fail ArgumentError, 'invalid value for "headlines", number of items must be less than or equal to 5.'
1462
+ end
1463
+
1464
+ if headlines.length < 1
1465
+ fail ArgumentError, 'invalid value for "headlines", number of items must be greater than or equal to 1.'
1466
+ end
1467
+
1468
+ @headlines = headlines
1469
+ end
1470
+
1471
+ # Custom attribute writer method with validation
1472
+ # @param [Object] descriptions Value to be assigned
1473
+ def descriptions=(descriptions)
1474
+ if descriptions.nil?
1475
+ fail ArgumentError, 'descriptions cannot be nil'
1476
+ end
1477
+
1478
+ if descriptions.length > 5
1479
+ fail ArgumentError, 'invalid value for "descriptions", number of items must be less than or equal to 5.'
1480
+ end
1481
+
1482
+ if descriptions.length < 1
1483
+ fail ArgumentError, 'invalid value for "descriptions", number of items must be greater than or equal to 1.'
1484
+ end
1485
+
1486
+ @descriptions = descriptions
1487
+ end
1488
+
1372
1489
  # Custom attribute writer method checking allowed values (enum).
1373
1490
  # @param [Object] call_to_action Object to be assigned
1374
1491
  def call_to_action=(call_to_action)
@@ -1674,6 +1791,9 @@ module Zernio
1674
1791
  long_headline == o.long_headline &&
1675
1792
  body == o.body &&
1676
1793
  description == o.description &&
1794
+ bodies == o.bodies &&
1795
+ headlines == o.headlines &&
1796
+ descriptions == o.descriptions &&
1677
1797
  call_to_action == o.call_to_action &&
1678
1798
  link_url == o.link_url &&
1679
1799
  lead_gen_form_id == o.lead_gen_form_id &&
@@ -1753,7 +1873,7 @@ module Zernio
1753
1873
  # Calculates hash code according to all attributes.
1754
1874
  # @return [Integer] Hash code
1755
1875
  def hash
1756
- [account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, creative_features, multi_advertiser, validate_only, budget_amount, budget_type, status, campaign_status, budget_level, currency, headline, long_headline, body, description, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, existing_creative_id, business_name, board_id, organization_id, targeting, countries, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, work_positions, work_employers, work_industries, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, regional_regulated_categories, regional_regulation_identities, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, keywords, negative_keywords, additional_headlines, additional_descriptions, sitelinks, callouts, structured_snippets, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, smart_plus, promoted_object].hash
1876
+ [account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, optimization_goal, billing_event, buying_type, rf_prediction_id, creative_features, multi_advertiser, validate_only, budget_amount, budget_type, status, campaign_status, budget_level, currency, headline, long_headline, body, description, bodies, headlines, descriptions, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, existing_creative_id, business_name, board_id, organization_id, targeting, countries, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, work_positions, work_employers, work_industries, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, regional_regulated_categories, regional_regulation_identities, end_date, start_date, instagram_account_id, dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, keywords, negative_keywords, additional_headlines, additional_descriptions, sitelinks, callouts, structured_snippets, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_type, smart_plus, promoted_object].hash
1757
1877
  end
1758
1878
 
1759
1879
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.825'
14
+ VERSION = '0.0.827'
15
15
  end
data/openapi.yaml CHANGED
@@ -15463,7 +15463,7 @@ paths:
15463
15463
 
15464
15464
  LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a `url` is REQUIRED and imports that single post. Pass any LinkedIn post URL (`linkedin.com/posts/…`, `linkedin.com/feed/update/urn:li:activity:…`) or a `urn:li:share:…` / `urn:li:ugcPost:…` URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles).
15465
15465
 
15466
- `url` accepts any format the platform uses (e.g. `instagram.com/p/…`, `instagram.com/reel/…`, `youtu.be/…`, `youtube.com/shorts/…`, `tiktok.com/@user/video/…`, and `vm.tiktok.com` short links). Pass `postId` (the platform media/video id) as an alternative locator.
15466
+ `url` accepts any format the platform uses (e.g. `instagram.com/p/…`, `instagram.com/reel/…`, `youtu.be/…`, `youtube.com/shorts/…`, `tiktok.com/@user/video/…`, `vm.tiktok.com` short links, `pinterest.com/pin/…` on any regional domain, and `pin.it` short links). Pass `postId` (the platform media/video/pin id) as an alternative locator.
15467
15467
 
15468
15468
  Note: post-level analytics (reach, impressions) still carry the platform's own delay (e.g. ~24h on Instagram). This endpoint confirms the post exists and returns its metadata plus basic engagement (likes, comments), not delayed insights.
15469
15469
  requestBody:
@@ -44614,7 +44614,35 @@ paths:
44614
44614
  headline: { type: string, description: "Required for Meta, Google, Pinterest, LinkedIn, and OpenAI Ads on legacy + attach shapes (skip for multi-creative — use `creatives[].headline`). Ignored for TikTok and X/Twitter. Max: Meta=255, Google=30, Pinterest=100, LinkedIn=400, OpenAI=50 (min 3). On LinkedIn this is the ad's headline (the bold text on the creative); for traffic ads it's the link card title. On OpenAI Ads this is the chat card's title." }
44615
44615
  longHeadline: { type: string, maxLength: 90, description: "Google Display only — defaults to `headline` if omitted. On LinkedIn, reused as the optional secondary description text on traffic (link) ads; omitted if not provided." }
44616
44616
  body: { type: string, description: "Required on legacy + attach shapes. For X/Twitter this is the tweet text (max 280 chars including a ~24-char URL when `linkUrl` is set). On LinkedIn this is the post commentary (the intro text shown above the ad). On OpenAI Ads this is the chat card's body text. Max: Google=90, Pinterest=500, OpenAI=100." }
44617
- description: { type: string, maxLength: 255, description: "Meta only (facebook/instagram). Link description — the secondary text shown below the headline (Meta's link_data.description; on video creatives mapped to video_data.link_description). When omitted, Meta auto-pulls the destination URL's OpenGraph description. Applies on legacy, attach, and placementAssets shapes; for multi-creative use creatives[].description (this field is the shared fallback). For multi-text variations use dynamicCreative.descriptions instead." }
44617
+ description: { type: string, maxLength: 255, description: "Meta only (facebook/instagram). Link description — the secondary text shown below the headline (Meta's link_data.description; on video creatives mapped to video_data.link_description). When omitted, Meta auto-pulls the destination URL's OpenGraph description. Applies on legacy, attach, and placementAssets shapes; for multi-creative use creatives[].description (this field is the shared fallback). For multi-text variations use `descriptions` (array) instead." }
44618
+ bodies:
44619
+ type: array
44620
+ minItems: 1
44621
+ maxItems: 5
44622
+ items: { type: string }
44623
+ description: |
44624
+ Meta only. Multiple Text Options (Advantage+ Flexible Format): supply 1-5 primary-text
44625
+ variations and Meta optimises delivery across them, WITHOUT enabling full Dynamic Creative
44626
+ (`dynamicCreative`). Uses `optimization_type: DEGREES_OF_FREEDOM` on the asset feed, so
44627
+ multiple ads per ad set are allowed (unlike `dynamicCreative` which is limited to one).
44628
+ Requires `imageUrl` or `video`, `linkUrl`, and `callToAction`. When set, the top-level
44629
+ `body` field is used as the `object_story_spec.link_data.message` (the preview text) and
44630
+ `headlines` must also be present. Mutually exclusive with `dynamicCreative`,
44631
+ `placementAssets`, `carouselCards`, and `creatives[]`.
44632
+ headlines:
44633
+ type: array
44634
+ minItems: 1
44635
+ maxItems: 5
44636
+ items: { type: string, maxLength: 255 }
44637
+ description: |
44638
+ Meta only. Headline variations for Multiple Text Options. Must be sent alongside `bodies`.
44639
+ The top-level `headline` field is used as the `object_story_spec.link_data.name`.
44640
+ descriptions:
44641
+ type: array
44642
+ minItems: 1
44643
+ maxItems: 5
44644
+ items: { type: string, maxLength: 255 }
44645
+ description: 'Meta only. Optional description variations for Multiple Text Options. Sent alongside `bodies` and `headlines`.'
44618
44646
  callToAction: { type: string, enum: [LEARN_MORE, SHOP_NOW, SIGN_UP, BOOK_TRAVEL, CONTACT_US, DOWNLOAD, GET_OFFER, GET_QUOTE, SUBSCRIBE, WATCH_MORE, ADD_TO_CART, APPLY_NOW, BOOK_NOW, BUY_TICKETS, DONATE, DONATE_NOW, GET_DIRECTIONS, GET_SHOWTIMES, LISTEN_NOW, ORDER_NOW, PLAY_GAME, REQUEST_TIME, SEE_MENU, START_ORDER, INSTALL_MOBILE_APP, USE_APP, REGISTER, JOIN, ATTEND, REQUEST_DEMO, VIEW_QUOTE, APPLY, SEE_MORE, BUY_NOW], description: "Required on legacy + attach shapes for Meta. Honoured on TikTok (passes through to the Spark Ad creative's `call_to_action`) and on LinkedIn (the CTA button on the ad; defaults to LEARN_MORE when `linkUrl` is set). LinkedIn accepts: LEARN_MORE, SIGN_UP, DOWNLOAD, SUBSCRIBE, REGISTER, JOIN, ATTEND, REQUEST_DEMO, VIEW_QUOTE, APPLY, SEE_MORE, SHOP_NOW, BUY_NOW. Ignored by Google, Pinterest, and X/Twitter." }
44619
44647
  linkUrl: { type: string, format: uri, description: "Required on legacy + attach shapes (skip for multi-creative). On LinkedIn it's the ad's destination URL; required for `traffic` ads, optional for `engagement` / `awareness`. NOT required when `goal` is `lead_generation` (the ad opens a Lead Gen form instead of a destination). On LinkedIn, `imageUrl` + `linkUrl` publishes an ARTICLE-content creative; this is LinkedIn's article ad format, with the image as thumbnail and `longHeadline` as description. Required for OpenAI Ads (the chat card's target_url)." }
44620
44648
  leadGenFormId: { type: string, description: "Lead Gen form ID to attach to the ad's creative. REQUIRED when `goal` is `lead_generation`. Create one via POST /v1/ads/lead-forms. On Meta (facebook/instagram) this is the leadgen_forms ID; the ad set's promoted_object.page_id + LEAD_GENERATION optimization + destination_type ON_AD are derived automatically from the goal. On LinkedIn this is the adForm ID; the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}` and the campaign objective is set to MAX_LEAD. Forms must be owned by the sponsoredAccount (not the organization) for the URN to resolve. Also required on every Meta ATTACH (`adSetId`) call that targets a lead ad set (the form attaches per-ad; Meta rejects a formless ad in a lead ad set). Both `placementAssets` (per-placement creative) and `dynamicCreative` (multi-text / multi-asset pool, e.g. multiple headlines and primary texts) ARE supported on Meta instant-form lead ads." }
@@ -422,7 +422,7 @@ describe 'AnalyticsApi' do
422
422
 
423
423
  # unit tests for sync_external_posts
424
424
  # Sync an external post
425
- # Fetch an account&#39;s latest external posts (published directly on the platform, not through Zernio) on demand, so a just-published post is retrievable within seconds instead of waiting for the background sync (which refreshes each account at most every ~90 minutes). Primary use case: verifying a submitted post. When a user publishes on the platform and immediately pastes the post URL into your app, call this with &#x60;accountId&#x60; plus &#x60;url&#x60; (or &#x60;postId&#x60;) to confirm the post exists and return its metadata. Behavior: - We check our stored copy first and return immediately if the post is already known (no platform call). - Otherwise we fetch the account&#39;s latest posts live from the platform, then match and return the submitted post. - Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped. &#x60;accountId&#x60; is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts). LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a &#x60;url&#x60; is REQUIRED and imports that single post. Pass any LinkedIn post URL (&#x60;linkedin.com/posts/…&#x60;, &#x60;linkedin.com/feed/update/urn:li:activity:…&#x60;) or a &#x60;urn:li:share:…&#x60; / &#x60;urn:li:ugcPost:…&#x60; URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles). &#x60;url&#x60; accepts any format the platform uses (e.g. &#x60;instagram.com/p/…&#x60;, &#x60;instagram.com/reel/…&#x60;, &#x60;youtu.be/…&#x60;, &#x60;youtube.com/shorts/…&#x60;, &#x60;tiktok.com/@user/video/…&#x60;, and &#x60;vm.tiktok.com&#x60; short links). Pass &#x60;postId&#x60; (the platform media/video id) as an alternative locator. Note: post-level analytics (reach, impressions) still carry the platform&#39;s own delay (e.g. ~24h on Instagram). This endpoint confirms the post exists and returns its metadata plus basic engagement (likes, comments), not delayed insights.
425
+ # Fetch an account&#39;s latest external posts (published directly on the platform, not through Zernio) on demand, so a just-published post is retrievable within seconds instead of waiting for the background sync (which refreshes each account at most every ~90 minutes). Primary use case: verifying a submitted post. When a user publishes on the platform and immediately pastes the post URL into your app, call this with &#x60;accountId&#x60; plus &#x60;url&#x60; (or &#x60;postId&#x60;) to confirm the post exists and return its metadata. Behavior: - We check our stored copy first and return immediately if the post is already known (no platform call). - Otherwise we fetch the account&#39;s latest posts live from the platform, then match and return the submitted post. - Requests are debounced per account (~15s): if the account was just synced, the live fetch is skipped. &#x60;accountId&#x60; is required — a post URL or id alone cannot be resolved to an account, and the account must be connected to Zernio (we use its token to read the platform). Supported for every platform with a listing API (Instagram, Facebook, TikTok, YouTube, X, Threads, Pinterest, Reddit, Bluesky, Google Business, and LinkedIn organization accounts). LinkedIn personal profiles: LinkedIn has no listing API for personal profiles, so a &#x60;url&#x60; is REQUIRED and imports that single post. Pass any LinkedIn post URL (&#x60;linkedin.com/posts/…&#x60;, &#x60;linkedin.com/feed/update/urn:li:activity:…&#x60;) or a &#x60;urn:li:share:…&#x60; / &#x60;urn:li:ugcPost:…&#x60; URN. Works for posts published outside Zernio and before the account was connected, any age; the post must be authored by the connected member. Imported posts return full analytics (impressions, reach, reactions, comments, reshares, saves) and keep refreshing on the background analytics cycle, but carry no content/media (LinkedIn does not expose them for personal profiles). &#x60;url&#x60; accepts any format the platform uses (e.g. &#x60;instagram.com/p/…&#x60;, &#x60;instagram.com/reel/…&#x60;, &#x60;youtu.be/…&#x60;, &#x60;youtube.com/shorts/…&#x60;, &#x60;tiktok.com/@user/video/…&#x60;, &#x60;vm.tiktok.com&#x60; short links, &#x60;pinterest.com/pin/…&#x60; on any regional domain, and &#x60;pin.it&#x60; short links). Pass &#x60;postId&#x60; (the platform media/video/pin id) as an alternative locator. Note: post-level analytics (reach, impressions) still carry the platform&#39;s own delay (e.g. ~24h on Instagram). This endpoint confirms the post exists and returns its metadata plus basic engagement (likes, comments), not delayed insights.
426
426
  # @param sync_external_posts_request
427
427
  # @param [Hash] opts the optional parameters
428
428
  # @return [SyncExternalPosts200Response]
@@ -209,6 +209,24 @@ describe Zernio::CreateStandaloneAdRequest do
209
209
  end
210
210
  end
211
211
 
212
+ describe 'test attribute "bodies"' do
213
+ it 'should work' do
214
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
215
+ end
216
+ end
217
+
218
+ describe 'test attribute "headlines"' do
219
+ it 'should work' do
220
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
221
+ end
222
+ end
223
+
224
+ describe 'test attribute "descriptions"' do
225
+ it 'should work' do
226
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
227
+ end
228
+ end
229
+
212
230
  describe 'test attribute "call_to_action"' do
213
231
  it 'should work' do
214
232
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/