late-sdk 0.0.896 → 0.0.897
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/AdCampaignsApi.md +1 -1
- data/docs/AdCreative.md +2 -0
- data/docs/BoostPostRequest.md +3 -3
- data/docs/CreateCallAdRequest.md +1 -1
- data/docs/CreateMessagingAdRequest.md +1 -1
- data/docs/CtwaAdRequestBody.md +1 -1
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +2 -2
- data/lib/zernio-sdk/models/ad_creative.rb +11 -1
- data/lib/zernio-sdk/models/boost_post_request.rb +3 -3
- data/lib/zernio-sdk/models/create_call_ad_request.rb +1 -1
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +1 -1
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +1 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +9 -5
- data/spec/api/ad_campaigns_api_spec.rb +1 -1
- data/spec/models/ad_creative_spec.rb +6 -0
- data/zernio-sdk-0.0.897.gem +0 -0
- metadata +2 -2
- data/zernio-sdk-0.0.896.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f8958df8e529d3c1779b84996c2f7e9f7985383f539b208fb1f869d34e694cad
|
|
4
|
+
data.tar.gz: 2f7e91e736793f88f5e4c701ce037238c1cb4edd3144bded727e208d0d88dd50
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4e406e07e57829db26c0942af4dbda76c8b3f9c13828016ffd77acf85775bdd552574932080334446e2d4c880b022d4d3b47a2daf21ad809475d0c233a6d5c92
|
|
7
|
+
data.tar.gz: 16fa3ec320abc933c0ca307dab57bcda3cbb573ad115275f1e952f9e22edc4cf9ae275f7ad0b55cfce8d38a5d8ed64944fcdd26b2a418984fafcde85b4b279fc
|
data/docs/AdCampaignsApi.md
CHANGED
|
@@ -191,7 +191,7 @@ end
|
|
|
191
191
|
|
|
192
192
|
Boost post as ad
|
|
193
193
|
|
|
194
|
-
Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType`, `whatsappPhoneNumber` and `adSetId` are Meta-only and return 400 on other platforms. **Messaging boosts (Meta).** Use `goal: engagement` with `callToAction: WHATSAPP_MESSAGE`, `MESSAGE_PAGE`, or `INSTAGRAM_MESSAGE`. The CTA implies WHATSAPP, MESSENGER, or INSTAGRAM_DIRECT respectively; `destinationType` alone
|
|
194
|
+
Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType`, `whatsappPhoneNumber` and `adSetId` are Meta-only and return 400 on other platforms. **Messaging boosts (Meta).** Use `goal: engagement` with `callToAction: WHATSAPP_MESSAGE`, `MESSAGE_PAGE`, or `INSTAGRAM_MESSAGE`. The CTA implies WHATSAPP, MESSENGER, or INSTAGRAM_DIRECT respectively; `destinationType` alone does not select a messaging CTA. Omit `linkUrl` only for messaging CTAs. Plain link CTAs keep their goal and link behavior when combined with an independent `destinationType`. The campaign uses OUTCOME_ENGAGEMENT and the ad set uses CONVERSATIONS with the promoted Page. Optional `whatsappPhoneNumber` selects a number already paired with that Page. Conflicting CTA/destination, instant form, goal, or optimizationGoal inputs return 400. Attach requires the target ad set destination to match. Existing post references preserve social proof; an Instagram reel rejected by Meta is not re-uploaded as a new post for a messaging boost. **Retries.** Boosts are NOT idempotent and can take minutes when Meta requires re-hosting an Instagram video, so do not retry on client timeout. Send an Idempotency-Key header to make retries safe: same key and body replays the original 201, and distinct keys always create distinct ads. Without the header, an identical request is treated as a retry: while one is in flight it returns 409, and within 10 minutes of a completed boost it returns the already-created ad instead of creating another. To intentionally duplicate an ad, send distinct Idempotency-Keys (or vary the body, e.g. the name).
|
|
195
195
|
|
|
196
196
|
### Examples
|
|
197
197
|
|
data/docs/AdCreative.md
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
| **google_headline** | **String** | Google Ads headline | [optional] |
|
|
24
24
|
| **google_description** | **String** | Google Ads description | [optional] |
|
|
25
25
|
| **link_url** | **String** | Destination URL | [optional] |
|
|
26
|
+
| **whatsapp_phone_number** | **String** | Explicit E.164 WhatsApp number supplied when creating a Meta boost or messaging ad. Absent when omitted by the caller or on older records. | [optional] |
|
|
26
27
|
| **pinterest_image_url** | **String** | | [optional] |
|
|
27
28
|
| **pinterest_title** | **String** | | [optional] |
|
|
28
29
|
| **pinterest_description** | **String** | | [optional] |
|
|
@@ -52,6 +53,7 @@ instance = Zernio::AdCreative.new(
|
|
|
52
53
|
google_headline: null,
|
|
53
54
|
google_description: null,
|
|
54
55
|
link_url: null,
|
|
56
|
+
whatsapp_phone_number: +12025550123,
|
|
55
57
|
pinterest_image_url: null,
|
|
56
58
|
pinterest_title: null,
|
|
57
59
|
pinterest_description: null
|
data/docs/BoostPostRequest.md
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
| **ad_set_id** | **String** | Meta only. Attach the boosted post to this existing ad set instead of creating a campaign. The ad set then owns budget, schedule and targeting; sending those too is a 400. | [optional] |
|
|
14
14
|
| **budget** | [**BoostPostRequestBudget**](BoostPostRequestBudget.md) | | [optional] |
|
|
15
15
|
| **instagram_account_id** | **String** | Meta only. Instagram identity the ad runs AS (creative.instagram_user_id), overriding the account linked to the Page. Live-verified against a Page-post creative. | [optional] |
|
|
16
|
-
| **destination_type** | **String** | Meta only. Ad-set destination_type: where the click LANDS, as opposed to instagramAccountId which is who the ad runs as.
|
|
17
|
-
| **whatsapp_phone_number** | **String** | Meta WhatsApp only. E.164 number already paired with the Page. Omit to use the default pairing. Requires
|
|
16
|
+
| **destination_type** | **String** | Meta only. Ad-set destination_type: where the click LANDS, as opposed to instagramAccountId which is who the ad runs as. Independent of plain link CTAs and their goal. A messaging callToAction selects its destination automatically; an explicit destinationType must then match. Lead ads use ON_AD. | [optional] |
|
|
17
|
+
| **whatsapp_phone_number** | **String** | Meta WhatsApp only. E.164 number already paired with the Page. Omit to use the default pairing. Requires WHATSAPP_MESSAGE callToAction. Stored as creative.whatsappPhoneNumber on the ad. | [optional] |
|
|
18
18
|
| **currency** | **String** | ISO 4217 currency code matching the ad account's currency. Meta only. Optional: Zernio resolves it from the ad account when omitted. The value selects the minor-unit exponent Zernio converts budget/bid amounts by before calling Meta (most currencies are cents; zero-decimal currencies like JPY/KRW are sent as-is). | [optional] |
|
|
19
19
|
| **schedule** | [**BoostPostRequestSchedule**](BoostPostRequestSchedule.md) | | [optional] |
|
|
20
20
|
| **targeting** | [**BoostPostRequestTargeting**](BoostPostRequestTargeting.md) | | [optional] |
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
| **dsa_beneficiary** | **String** | Legal entity that benefits from the ad. Required when targeting EU users (EU DSA, Article 26). Optional if the ad account has a default beneficiary: set it once via `PATCH /v1/ads/accounts` or in Meta Ads Manager, and Meta fills it in whenever the field is omitted. | [optional] |
|
|
35
35
|
| **dsa_payor** | **String** | Legal entity that pays for the ad. Can differ from `dsaBeneficiary` (for example, an agency paying for a client's ads). Same rules as `dsaBeneficiary`: required for EU targeting unless the ad account has a default payor. | [optional] |
|
|
36
36
|
| **lead_gen_form_id** | **String** | Lead Gen form ID to attach to the boosted ad's creative. REQUIRED when `goal` is `lead_generation`. On Meta this is the leadgen_forms ID (create one via POST /v1/ads/lead-forms). On LinkedIn this is the adForm ID (create one via POST /v1/ads/lead-forms with a LinkedIn account); the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}`. Ignored for other goals. | [optional] |
|
|
37
|
-
| **status** | **String** | Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default); PAUSED creates them paused so you can review before they spend. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each). | [optional] |
|
|
37
|
+
| **status** | **String** | Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default); PAUSED creates them paused so you can review before they spend. On Meta a new campaign stays paused until explicitly activated; an attached ad is itself paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each). | [optional] |
|
|
38
38
|
| **optimization_goal** | **String** | Meta only. Explicit ad-set `optimization_goal` override. When omitted, defaults to the value derived from `goal`. Messaging boosts always use CONVERSATIONS and reject another optimizationGoal. Otherwise the value must be compatible with the objective Meta derives from `goal`, not with the objective used by `POST /v1/ads/create` for the same `goal` name: boost maps `goal: \"engagement\"` to objective `OUTCOME_AWARENESS`, which accepts `REACH`, `IMPRESSIONS`, `AD_RECALL_LIFT`, or THRUPLAY-class values, and rejects `POST_ENGAGEMENT` (that value is only valid under `OUTCOME_ENGAGEMENT`, which create uses for the same goal name). | [optional] |
|
|
39
39
|
|
|
40
40
|
## Example
|
data/docs/CreateCallAdRequest.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| **name** | **String** | Ad display name. Used to derive campaign / ad set names. On the multi-creative shape, each ad's Meta name gets a \" #N\" suffix (1-indexed) so Ads Manager shows them as a numbered batch. | |
|
|
10
10
|
| **existing_post_id** | **String** | Messaging and CTWA only. Platform post or reel ID, resolved like boost platformPostId. Facebook IDs become object_story_id; Instagram IDs become source_instagram_media_id using the connected Instagram identity. Mutually exclusive with objectStoryId and fresh creative fields. | [optional] |
|
|
11
11
|
| **object_story_id** | **String** | Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with existingPostId and fresh creative fields. | [optional] |
|
|
12
|
-
| **whatsapp_phone_number** | **String** | WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. | [optional] |
|
|
12
|
+
| **whatsapp_phone_number** | **String** | WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. Stored as creative.whatsappPhoneNumber on every created ad. | [optional] |
|
|
13
13
|
| **headline** | **String** | Single-creative shape only. Mutually exclusive with `creatives[]`. | [optional] |
|
|
14
14
|
| **body** | **String** | Primary text shown above the image / video. Single-creative shape only. Mutually exclusive with `creatives[]`. | [optional] |
|
|
15
15
|
| **image_url** | **String** | Image asset for single-creative shape. Mutually exclusive with `video` and with `creatives[]`. Required on the single-creative shape if neither `video` nor an existing post reference is supplied. | [optional] |
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| **name** | **String** | Ad display name. Used to derive campaign / ad set names. On the multi-creative shape, each ad's Meta name gets a \" #N\" suffix (1-indexed) so Ads Manager shows them as a numbered batch. | |
|
|
10
10
|
| **existing_post_id** | **String** | Messaging and CTWA only. Platform post or reel ID, resolved like boost platformPostId. Facebook IDs become object_story_id; Instagram IDs become source_instagram_media_id using the connected Instagram identity. Mutually exclusive with objectStoryId and fresh creative fields. | [optional] |
|
|
11
11
|
| **object_story_id** | **String** | Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with existingPostId and fresh creative fields. | [optional] |
|
|
12
|
-
| **whatsapp_phone_number** | **String** | WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. | [optional] |
|
|
12
|
+
| **whatsapp_phone_number** | **String** | WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. Stored as creative.whatsappPhoneNumber on every created ad. | [optional] |
|
|
13
13
|
| **headline** | **String** | Single-creative shape only. Mutually exclusive with `creatives[]`. | [optional] |
|
|
14
14
|
| **body** | **String** | Primary text shown above the image / video. Single-creative shape only. Mutually exclusive with `creatives[]`. | [optional] |
|
|
15
15
|
| **image_url** | **String** | Image asset for single-creative shape. Mutually exclusive with `video` and with `creatives[]`. Required on the single-creative shape if neither `video` nor an existing post reference is supplied. | [optional] |
|
data/docs/CtwaAdRequestBody.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| **name** | **String** | Ad display name. Used to derive campaign / ad set names. On the multi-creative shape, each ad's Meta name gets a \" #N\" suffix (1-indexed) so Ads Manager shows them as a numbered batch. | |
|
|
10
10
|
| **existing_post_id** | **String** | Messaging and CTWA only. Platform post or reel ID, resolved like boost platformPostId. Facebook IDs become object_story_id; Instagram IDs become source_instagram_media_id using the connected Instagram identity. Mutually exclusive with objectStoryId and fresh creative fields. | [optional] |
|
|
11
11
|
| **object_story_id** | **String** | Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with existingPostId and fresh creative fields. | [optional] |
|
|
12
|
-
| **whatsapp_phone_number** | **String** | WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. | [optional] |
|
|
12
|
+
| **whatsapp_phone_number** | **String** | WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. Stored as creative.whatsappPhoneNumber on every created ad. | [optional] |
|
|
13
13
|
| **headline** | **String** | Single-creative shape only. Mutually exclusive with `creatives[]`. | [optional] |
|
|
14
14
|
| **body** | **String** | Primary text shown above the image / video. Single-creative shape only. Mutually exclusive with `creatives[]`. | [optional] |
|
|
15
15
|
| **image_url** | **String** | Image asset for single-creative shape. Mutually exclusive with `video` and with `creatives[]`. Required on the single-creative shape if neither `video` nor an existing post reference is supplied. | [optional] |
|
|
@@ -162,7 +162,7 @@ module Zernio
|
|
|
162
162
|
end
|
|
163
163
|
|
|
164
164
|
# Boost post as ad
|
|
165
|
-
# Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType`, `whatsappPhoneNumber` and `adSetId` are Meta-only and return 400 on other platforms. **Messaging boosts (Meta).** Use `goal: engagement` with `callToAction: WHATSAPP_MESSAGE`, `MESSAGE_PAGE`, or `INSTAGRAM_MESSAGE`. The CTA implies WHATSAPP, MESSENGER, or INSTAGRAM_DIRECT respectively; `destinationType` alone
|
|
165
|
+
# Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType`, `whatsappPhoneNumber` and `adSetId` are Meta-only and return 400 on other platforms. **Messaging boosts (Meta).** Use `goal: engagement` with `callToAction: WHATSAPP_MESSAGE`, `MESSAGE_PAGE`, or `INSTAGRAM_MESSAGE`. The CTA implies WHATSAPP, MESSENGER, or INSTAGRAM_DIRECT respectively; `destinationType` alone does not select a messaging CTA. Omit `linkUrl` only for messaging CTAs. Plain link CTAs keep their goal and link behavior when combined with an independent `destinationType`. The campaign uses OUTCOME_ENGAGEMENT and the ad set uses CONVERSATIONS with the promoted Page. Optional `whatsappPhoneNumber` selects a number already paired with that Page. Conflicting CTA/destination, instant form, goal, or optimizationGoal inputs return 400. Attach requires the target ad set destination to match. Existing post references preserve social proof; an Instagram reel rejected by Meta is not re-uploaded as a new post for a messaging boost. **Retries.** Boosts are NOT idempotent and can take minutes when Meta requires re-hosting an Instagram video, so do not retry on client timeout. Send an Idempotency-Key header to make retries safe: same key and body replays the original 201, and distinct keys always create distinct ads. Without the header, an identical request is treated as a retry: while one is in flight it returns 409, and within 10 minutes of a completed boost it returns the already-created ad instead of creating another. To intentionally duplicate an ad, send distinct Idempotency-Keys (or vary the body, e.g. the name).
|
|
166
166
|
# @param boost_post_request [BoostPostRequest]
|
|
167
167
|
# @param [Hash] opts the optional parameters
|
|
168
168
|
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
@@ -173,7 +173,7 @@ module Zernio
|
|
|
173
173
|
end
|
|
174
174
|
|
|
175
175
|
# Boost post as ad
|
|
176
|
-
# Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType`, `whatsappPhoneNumber` and `adSetId` are Meta-only and return 400 on other platforms. **Messaging boosts (Meta).** Use `goal: engagement` with `callToAction: WHATSAPP_MESSAGE`, `MESSAGE_PAGE`, or `INSTAGRAM_MESSAGE`. The CTA implies WHATSAPP, MESSENGER, or INSTAGRAM_DIRECT respectively; `destinationType` alone
|
|
176
|
+
# Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType`, `whatsappPhoneNumber` and `adSetId` are Meta-only and return 400 on other platforms. **Messaging boosts (Meta).** Use `goal: engagement` with `callToAction: WHATSAPP_MESSAGE`, `MESSAGE_PAGE`, or `INSTAGRAM_MESSAGE`. The CTA implies WHATSAPP, MESSENGER, or INSTAGRAM_DIRECT respectively; `destinationType` alone does not select a messaging CTA. Omit `linkUrl` only for messaging CTAs. Plain link CTAs keep their goal and link behavior when combined with an independent `destinationType`. The campaign uses OUTCOME_ENGAGEMENT and the ad set uses CONVERSATIONS with the promoted Page. Optional `whatsappPhoneNumber` selects a number already paired with that Page. Conflicting CTA/destination, instant form, goal, or optimizationGoal inputs return 400. Attach requires the target ad set destination to match. Existing post references preserve social proof; an Instagram reel rejected by Meta is not re-uploaded as a new post for a messaging boost. **Retries.** Boosts are NOT idempotent and can take minutes when Meta requires re-hosting an Instagram video, so do not retry on client timeout. Send an Idempotency-Key header to make retries safe: same key and body replays the original 201, and distinct keys always create distinct ads. Without the header, an identical request is treated as a retry: while one is in flight it returns 409, and within 10 minutes of a completed boost it returns the already-created ad instead of creating another. To intentionally duplicate an ad, send distinct Idempotency-Keys (or vary the body, e.g. the name).
|
|
177
177
|
# @param boost_post_request [BoostPostRequest]
|
|
178
178
|
# @param [Hash] opts the optional parameters
|
|
179
179
|
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
@@ -73,6 +73,9 @@ module Zernio
|
|
|
73
73
|
# Destination URL
|
|
74
74
|
attr_accessor :link_url
|
|
75
75
|
|
|
76
|
+
# Explicit E.164 WhatsApp number supplied when creating a Meta boost or messaging ad. Absent when omitted by the caller or on older records.
|
|
77
|
+
attr_accessor :whatsapp_phone_number
|
|
78
|
+
|
|
76
79
|
attr_accessor :pinterest_image_url
|
|
77
80
|
|
|
78
81
|
attr_accessor :pinterest_title
|
|
@@ -101,6 +104,7 @@ module Zernio
|
|
|
101
104
|
:'google_headline' => :'googleHeadline',
|
|
102
105
|
:'google_description' => :'googleDescription',
|
|
103
106
|
:'link_url' => :'linkUrl',
|
|
107
|
+
:'whatsapp_phone_number' => :'whatsappPhoneNumber',
|
|
104
108
|
:'pinterest_image_url' => :'pinterestImageUrl',
|
|
105
109
|
:'pinterest_title' => :'pinterestTitle',
|
|
106
110
|
:'pinterest_description' => :'pinterestDescription'
|
|
@@ -139,6 +143,7 @@ module Zernio
|
|
|
139
143
|
:'google_headline' => :'String',
|
|
140
144
|
:'google_description' => :'String',
|
|
141
145
|
:'link_url' => :'String',
|
|
146
|
+
:'whatsapp_phone_number' => :'String',
|
|
142
147
|
:'pinterest_image_url' => :'String',
|
|
143
148
|
:'pinterest_title' => :'String',
|
|
144
149
|
:'pinterest_description' => :'String'
|
|
@@ -258,6 +263,10 @@ module Zernio
|
|
|
258
263
|
self.link_url = attributes[:'link_url']
|
|
259
264
|
end
|
|
260
265
|
|
|
266
|
+
if attributes.key?(:'whatsapp_phone_number')
|
|
267
|
+
self.whatsapp_phone_number = attributes[:'whatsapp_phone_number']
|
|
268
|
+
end
|
|
269
|
+
|
|
261
270
|
if attributes.key?(:'pinterest_image_url')
|
|
262
271
|
self.pinterest_image_url = attributes[:'pinterest_image_url']
|
|
263
272
|
end
|
|
@@ -310,6 +319,7 @@ module Zernio
|
|
|
310
319
|
google_headline == o.google_headline &&
|
|
311
320
|
google_description == o.google_description &&
|
|
312
321
|
link_url == o.link_url &&
|
|
322
|
+
whatsapp_phone_number == o.whatsapp_phone_number &&
|
|
313
323
|
pinterest_image_url == o.pinterest_image_url &&
|
|
314
324
|
pinterest_title == o.pinterest_title &&
|
|
315
325
|
pinterest_description == o.pinterest_description
|
|
@@ -324,7 +334,7 @@ module Zernio
|
|
|
324
334
|
# Calculates hash code according to all attributes.
|
|
325
335
|
# @return [Integer] Hash code
|
|
326
336
|
def hash
|
|
327
|
-
[thumbnail_url, image_url, video_id, video_url, creative_id, object_type, object_story_id, effective_object_story_id, page_id, effective_instagram_media_id, instagram_user_id, instagram_permalink_url, media_urls, is_serving, serving_hold_reasons, body, google_headline, google_description, link_url, pinterest_image_url, pinterest_title, pinterest_description].hash
|
|
337
|
+
[thumbnail_url, image_url, video_id, video_url, creative_id, object_type, object_story_id, effective_object_story_id, page_id, effective_instagram_media_id, instagram_user_id, instagram_permalink_url, media_urls, is_serving, serving_hold_reasons, body, google_headline, google_description, link_url, whatsapp_phone_number, pinterest_image_url, pinterest_title, pinterest_description].hash
|
|
328
338
|
end
|
|
329
339
|
|
|
330
340
|
# Builds the object from hash
|
|
@@ -40,10 +40,10 @@ module Zernio
|
|
|
40
40
|
# Meta only. Instagram identity the ad runs AS (creative.instagram_user_id), overriding the account linked to the Page. Live-verified against a Page-post creative.
|
|
41
41
|
attr_accessor :instagram_account_id
|
|
42
42
|
|
|
43
|
-
# Meta only. Ad-set destination_type: where the click LANDS, as opposed to instagramAccountId which is who the ad runs as.
|
|
43
|
+
# Meta only. Ad-set destination_type: where the click LANDS, as opposed to instagramAccountId which is who the ad runs as. Independent of plain link CTAs and their goal. A messaging callToAction selects its destination automatically; an explicit destinationType must then match. Lead ads use ON_AD.
|
|
44
44
|
attr_accessor :destination_type
|
|
45
45
|
|
|
46
|
-
# Meta WhatsApp only. E.164 number already paired with the Page. Omit to use the default pairing. Requires
|
|
46
|
+
# Meta WhatsApp only. E.164 number already paired with the Page. Omit to use the default pairing. Requires WHATSAPP_MESSAGE callToAction. Stored as creative.whatsappPhoneNumber on the ad.
|
|
47
47
|
attr_accessor :whatsapp_phone_number
|
|
48
48
|
|
|
49
49
|
# ISO 4217 currency code matching the ad account's currency. Meta only. Optional: Zernio resolves it from the ad account when omitted. The value selects the minor-unit exponent Zernio converts budget/bid amounts by before calling Meta (most currencies are cents; zero-decimal currencies like JPY/KRW are sent as-is).
|
|
@@ -99,7 +99,7 @@ module Zernio
|
|
|
99
99
|
# Lead Gen form ID to attach to the boosted ad's creative. REQUIRED when `goal` is `lead_generation`. On Meta this is the leadgen_forms ID (create one via POST /v1/ads/lead-forms). On LinkedIn this is the adForm ID (create one via POST /v1/ads/lead-forms with a LinkedIn account); the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}`. Ignored for other goals.
|
|
100
100
|
attr_accessor :lead_gen_form_id
|
|
101
101
|
|
|
102
|
-
# Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default); PAUSED creates them paused so you can review before they spend. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
102
|
+
# Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default); PAUSED creates them paused so you can review before they spend. On Meta a new campaign stays paused until explicitly activated; an attached ad is itself paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).
|
|
103
103
|
attr_accessor :status
|
|
104
104
|
|
|
105
105
|
# Meta only. Explicit ad-set `optimization_goal` override. When omitted, defaults to the value derived from `goal`. Messaging boosts always use CONVERSATIONS and reject another optimizationGoal. Otherwise the value must be compatible with the objective Meta derives from `goal`, not with the objective used by `POST /v1/ads/create` for the same `goal` name: boost maps `goal: \"engagement\"` to objective `OUTCOME_AWARENESS`, which accepts `REACH`, `IMPRESSIONS`, `AD_RECALL_LIFT`, or THRUPLAY-class values, and rejects `POST_ENGAGEMENT` (that value is only valid under `OUTCOME_ENGAGEMENT`, which create uses for the same goal name).
|
|
@@ -30,7 +30,7 @@ module Zernio
|
|
|
30
30
|
# Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with existingPostId and fresh creative fields.
|
|
31
31
|
attr_accessor :object_story_id
|
|
32
32
|
|
|
33
|
-
# WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set.
|
|
33
|
+
# WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. Stored as creative.whatsappPhoneNumber on every created ad.
|
|
34
34
|
attr_accessor :whatsapp_phone_number
|
|
35
35
|
|
|
36
36
|
# Single-creative shape only. Mutually exclusive with `creatives[]`.
|
|
@@ -30,7 +30,7 @@ module Zernio
|
|
|
30
30
|
# Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with existingPostId and fresh creative fields.
|
|
31
31
|
attr_accessor :object_story_id
|
|
32
32
|
|
|
33
|
-
# WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set.
|
|
33
|
+
# WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. Stored as creative.whatsappPhoneNumber on every created ad.
|
|
34
34
|
attr_accessor :whatsapp_phone_number
|
|
35
35
|
|
|
36
36
|
# Single-creative shape only. Mutually exclusive with `creatives[]`.
|
|
@@ -31,7 +31,7 @@ module Zernio
|
|
|
31
31
|
# Messaging and CTWA only. Raw Facebook pageId_postId reference, used as object_story_id even with an Instagram account. Mutually exclusive with existingPostId and fresh creative fields.
|
|
32
32
|
attr_accessor :object_story_id
|
|
33
33
|
|
|
34
|
-
# WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set.
|
|
34
|
+
# WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. Stored as creative.whatsappPhoneNumber on every created ad.
|
|
35
35
|
attr_accessor :whatsapp_phone_number
|
|
36
36
|
|
|
37
37
|
# Single-creative shape only. Mutually exclusive with `creatives[]`.
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -913,7 +913,7 @@ components:
|
|
|
913
913
|
whatsappPhoneNumber:
|
|
914
914
|
type: string
|
|
915
915
|
pattern: '^\+[1-9]\d{6,14}$'
|
|
916
|
-
description: 'WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set.'
|
|
916
|
+
description: 'WhatsApp only. Optional E.164 number already paired with the Facebook Page. Omit to let Meta select the paired number. Sent to the creative CTA and, when creating a new ad set, its promoted_object. Attach requests do not change the existing ad set. Stored as creative.whatsappPhoneNumber on every created ad.'
|
|
917
917
|
headline:
|
|
918
918
|
type: string
|
|
919
919
|
minLength: 1
|
|
@@ -9188,6 +9188,7 @@ components:
|
|
|
9188
9188
|
googleHeadline: { type: string, description: Google Ads headline }
|
|
9189
9189
|
googleDescription: { type: string, description: Google Ads description }
|
|
9190
9190
|
linkUrl: { type: string, description: Destination URL }
|
|
9191
|
+
whatsappPhoneNumber: { type: string, description: 'Explicit E.164 WhatsApp number supplied when creating a Meta boost or messaging ad. Absent when omitted by the caller or on older records.', example: '+12025550123' }
|
|
9191
9192
|
pinterestImageUrl: { type: string }
|
|
9192
9193
|
pinterestTitle: { type: string }
|
|
9193
9194
|
pinterestDescription: { type: string }
|
|
@@ -47453,7 +47454,9 @@ paths:
|
|
|
47453
47454
|
**Messaging boosts (Meta).** Use `goal: engagement` with
|
|
47454
47455
|
`callToAction: WHATSAPP_MESSAGE`, `MESSAGE_PAGE`, or `INSTAGRAM_MESSAGE`.
|
|
47455
47456
|
The CTA implies WHATSAPP, MESSENGER, or INSTAGRAM_DIRECT respectively;
|
|
47456
|
-
`destinationType` alone
|
|
47457
|
+
`destinationType` alone does not select a messaging CTA. Omit `linkUrl`
|
|
47458
|
+
only for messaging CTAs. Plain link CTAs keep their goal and link behavior
|
|
47459
|
+
when combined with an independent `destinationType`.
|
|
47457
47460
|
The campaign uses OUTCOME_ENGAGEMENT and the ad set uses CONVERSATIONS
|
|
47458
47461
|
with the promoted Page. Optional `whatsappPhoneNumber` selects a number
|
|
47459
47462
|
already paired with that Page. Conflicting CTA/destination, instant form,
|
|
@@ -47498,8 +47501,8 @@ paths:
|
|
|
47498
47501
|
amount: { type: number, description: "Minimum varies: TikTok=$20, Pinterest=$5, others=$1" }
|
|
47499
47502
|
type: { type: string, enum: [daily, lifetime] }
|
|
47500
47503
|
instagramAccountId: { type: string, description: "Meta only. Instagram identity the ad runs AS (creative.instagram_user_id), overriding the account linked to the Page. Live-verified against a Page-post creative." }
|
|
47501
|
-
destinationType: { type: string, enum: [INSTAGRAM_PROFILE, WEBSITE, ON_AD, MESSENGER, WHATSAPP, INSTAGRAM_DIRECT], description: "Meta only. Ad-set destination_type: where the click LANDS, as opposed to instagramAccountId which is who the ad runs as.
|
|
47502
|
-
whatsappPhoneNumber: { type: string, pattern: '^\+[1-9]\d{6,14}$', description: 'Meta WhatsApp only. E.164 number already paired with the Page. Omit to use the default pairing. Requires
|
|
47504
|
+
destinationType: { type: string, enum: [INSTAGRAM_PROFILE, WEBSITE, ON_AD, MESSENGER, WHATSAPP, INSTAGRAM_DIRECT], description: "Meta only. Ad-set destination_type: where the click LANDS, as opposed to instagramAccountId which is who the ad runs as. Independent of plain link CTAs and their goal. A messaging callToAction selects its destination automatically; an explicit destinationType must then match. Lead ads use ON_AD." }
|
|
47505
|
+
whatsappPhoneNumber: { type: string, pattern: '^\+[1-9]\d{6,14}$', description: 'Meta WhatsApp only. E.164 number already paired with the Page. Omit to use the default pairing. Requires WHATSAPP_MESSAGE callToAction. Stored as creative.whatsappPhoneNumber on the ad.' }
|
|
47503
47506
|
currency: { type: string, minLength: 3, maxLength: 3, example: USD, description: "ISO 4217 currency code matching the ad account's currency. Meta only. Optional: Zernio resolves it from the ad account when omitted. The value selects the minor-unit exponent Zernio converts budget/bid amounts by before calling Meta (most currencies are cents; zero-decimal currencies like JPY/KRW are sent as-is)." }
|
|
47504
47507
|
schedule:
|
|
47505
47508
|
type: object
|
|
@@ -47734,7 +47737,7 @@ paths:
|
|
|
47734
47737
|
status:
|
|
47735
47738
|
type: string
|
|
47736
47739
|
enum: [ACTIVE, PAUSED]
|
|
47737
|
-
description: 'Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default); PAUSED creates them paused so you can review before they spend. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).'
|
|
47740
|
+
description: 'Meta, TikTok, and LinkedIn. Publish state of the created entities. Omitted or ACTIVE publishes live (default); PAUSED creates them paused so you can review before they spend. On Meta a new campaign stays paused until explicitly activated; an attached ad is itself paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each).'
|
|
47738
47741
|
optimizationGoal:
|
|
47739
47742
|
type: string
|
|
47740
47743
|
description: |
|
|
@@ -47754,6 +47757,7 @@ paths:
|
|
|
47754
47757
|
name: WhatsApp post boost
|
|
47755
47758
|
goal: engagement
|
|
47756
47759
|
callToAction: WHATSAPP_MESSAGE
|
|
47760
|
+
whatsappPhoneNumber: '+12025550123'
|
|
47757
47761
|
budget: { amount: 2.61, type: daily }
|
|
47758
47762
|
status: PAUSED
|
|
47759
47763
|
responses:
|
|
@@ -59,7 +59,7 @@ describe 'AdCampaignsApi' do
|
|
|
59
59
|
|
|
60
60
|
# unit tests for boost_post
|
|
61
61
|
# Boost post as ad
|
|
62
|
-
# Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType`, `whatsappPhoneNumber` and `adSetId` are Meta-only and return 400 on other platforms. **Messaging boosts (Meta).** Use `goal: engagement` with `callToAction: WHATSAPP_MESSAGE`, `MESSAGE_PAGE`, or `INSTAGRAM_MESSAGE`. The CTA implies WHATSAPP, MESSENGER, or INSTAGRAM_DIRECT respectively; `destinationType` alone
|
|
62
|
+
# Creates a paid ad from an existing published post, keeping the post's engagement. By default it provisions the whole hierarchy (campaign, ad set, ad). **Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING ad set instead, so that ad set keeps its learning phase. It then owns `budget`, `schedule` and `targeting`, and sending any of those alongside `adSetId` is a 400 rather than a silent drop. `budget` is required only without `adSetId`. `instagramAccountId`, `destinationType`, `whatsappPhoneNumber` and `adSetId` are Meta-only and return 400 on other platforms. **Messaging boosts (Meta).** Use `goal: engagement` with `callToAction: WHATSAPP_MESSAGE`, `MESSAGE_PAGE`, or `INSTAGRAM_MESSAGE`. The CTA implies WHATSAPP, MESSENGER, or INSTAGRAM_DIRECT respectively; `destinationType` alone does not select a messaging CTA. Omit `linkUrl` only for messaging CTAs. Plain link CTAs keep their goal and link behavior when combined with an independent `destinationType`. The campaign uses OUTCOME_ENGAGEMENT and the ad set uses CONVERSATIONS with the promoted Page. Optional `whatsappPhoneNumber` selects a number already paired with that Page. Conflicting CTA/destination, instant form, goal, or optimizationGoal inputs return 400. Attach requires the target ad set destination to match. Existing post references preserve social proof; an Instagram reel rejected by Meta is not re-uploaded as a new post for a messaging boost. **Retries.** Boosts are NOT idempotent and can take minutes when Meta requires re-hosting an Instagram video, so do not retry on client timeout. Send an Idempotency-Key header to make retries safe: same key and body replays the original 201, and distinct keys always create distinct ads. Without the header, an identical request is treated as a retry: while one is in flight it returns 409, and within 10 minutes of a completed boost it returns the already-created ad instead of creating another. To intentionally duplicate an ad, send distinct Idempotency-Keys (or vary the body, e.g. the name).
|
|
63
63
|
# @param boost_post_request
|
|
64
64
|
# @param [Hash] opts the optional parameters
|
|
65
65
|
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
@@ -141,6 +141,12 @@ describe Zernio::AdCreative do
|
|
|
141
141
|
end
|
|
142
142
|
end
|
|
143
143
|
|
|
144
|
+
describe 'test attribute "whatsapp_phone_number"' do
|
|
145
|
+
it 'should work' do
|
|
146
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
144
150
|
describe 'test attribute "pinterest_image_url"' do
|
|
145
151
|
it 'should work' do
|
|
146
152
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: late-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.897
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -6109,7 +6109,7 @@ files:
|
|
|
6109
6109
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
6110
6110
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
6111
6111
|
- spec/spec_helper.rb
|
|
6112
|
-
- zernio-sdk-0.0.
|
|
6112
|
+
- zernio-sdk-0.0.897.gem
|
|
6113
6113
|
- zernio-sdk.gemspec
|
|
6114
6114
|
homepage: https://openapi-generator.tech
|
|
6115
6115
|
licenses:
|
data/zernio-sdk-0.0.896.gem
DELETED
|
Binary file
|