late-sdk 0.0.694 → 0.0.696
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 +2 -2
- data/docs/BoostPostRequest.md +9 -3
- data/docs/CreateCallAdRequest.md +4 -2
- data/docs/CreateMessagingAdRequest.md +4 -2
- data/docs/CtwaAdRequestBody.md +4 -2
- data/docs/MessagingAdsApi.md +4 -4
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +2 -2
- data/lib/zernio-sdk/api/messaging_ads_api.rb +2 -2
- data/lib/zernio-sdk/models/boost_post_request.rb +42 -17
- data/lib/zernio-sdk/models/boost_post_request_budget.rb +1 -0
- data/lib/zernio-sdk/models/create_call_ad_request.rb +13 -26
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +13 -26
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +13 -26
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +57 -16
- data/spec/api/ad_campaigns_api_spec.rb +1 -1
- data/spec/api/messaging_ads_api_spec.rb +1 -1
- data/spec/models/boost_post_request_spec.rb +22 -0
- data/spec/models/create_call_ad_request_spec.rb +6 -0
- data/spec/models/create_messaging_ad_request_spec.rb +6 -0
- data/spec/models/ctwa_ad_request_body_spec.rb +6 -0
- data/zernio-sdk-0.0.696.gem +0 -0
- metadata +2 -2
- data/zernio-sdk-0.0.694.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: 12ba987b2654ea623ca4cbfcc0eab14e0201ec04357fd5d4dfab34494912ea3c
|
|
4
|
+
data.tar.gz: 6fe49bc03278cee3e5ce303431a1621c015cb28c6f0b9d0e6952af3ce42525cb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2a8d597e626f40cdc2fc4ac8371eeea96535e404b42a514d5b1019b01548cea87229c83c4fb7b81b5735a89f1b35c1784237596057c02b29391a01f1e76f68d0
|
|
7
|
+
data.tar.gz: 4886d30a0bac6358218b310bdfe1ec18ff0e39ee8bf7510ee4926df9b39736b66884466a096f1aaa84f2f16dd67197d7f79f96d2b46f6b43e6027429122fdee3
|
data/docs/AdCampaignsApi.md
CHANGED
|
@@ -34,7 +34,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
34
34
|
|
|
35
35
|
Boost post as ad
|
|
36
36
|
|
|
37
|
-
Creates a paid ad
|
|
37
|
+
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` and `adSetId` are Meta-only and return 400 on other platforms.
|
|
38
38
|
|
|
39
39
|
### Examples
|
|
40
40
|
|
|
@@ -48,7 +48,7 @@ Zernio.configure do |config|
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
api_instance = Zernio::AdCampaignsApi.new
|
|
51
|
-
boost_post_request = Zernio::BoostPostRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', goal: 'engagement'
|
|
51
|
+
boost_post_request = Zernio::BoostPostRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', goal: 'engagement'}) # BoostPostRequest |
|
|
52
52
|
|
|
53
53
|
begin
|
|
54
54
|
# Boost post as ad
|
data/docs/BoostPostRequest.md
CHANGED
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
| **ad_account_id** | **String** | Platform ad account ID | |
|
|
11
11
|
| **name** | **String** | | |
|
|
12
12
|
| **goal** | **String** | Available goals vary by platform. Meta (Facebook/Instagram) and TikTok support all 7. LinkedIn supports all except app_promotion. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views. | |
|
|
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
|
+
| **budget** | [**BoostPostRequestBudget**](BoostPostRequestBudget.md) | | [optional] |
|
|
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. Lead ads force ON_AD and ignore this. | [optional] |
|
|
14
17
|
| **currency** | **String** | | [optional] |
|
|
15
18
|
| **schedule** | [**BoostPostRequestSchedule**](BoostPostRequestSchedule.md) | | [optional] |
|
|
16
19
|
| **targeting** | [**BoostPostRequestTargeting**](BoostPostRequestTargeting.md) | | [optional] |
|
|
@@ -22,8 +25,8 @@
|
|
|
22
25
|
| **tracking** | [**BoostPostRequestTracking**](BoostPostRequestTracking.md) | | [optional] |
|
|
23
26
|
| **special_ad_categories** | **Array<String>** | Meta only. Required for housing, employment, credit, or political ads. | [optional] |
|
|
24
27
|
| **special_ad_category_country** | **Array<String>** | Meta (metaads) only. 2-letter ISO country codes the special ad category applies to. Requires specialAdCategories to be set (400 otherwise). | [optional] |
|
|
25
|
-
| **link_url** | **String** |
|
|
26
|
-
| **call_to_action** | **String** |
|
|
28
|
+
| **link_url** | **String** | Destination URL for the CTA button. Send it together with `callToAction`. **Meta**: adds a top-level `call_to_action` to the post-reference creative. This is what gives a `traffic` boost a clickable destination without replacing the creative and losing the post's social proof. Ignored when `leadGenFormId` is set, which supplies its own destination. Live-verified against a Page-post creative. **TikTok**: maps to `landing_page_url` on the Spark Ad creative (`AdcreateCreatives.landing_page_url`); Spark Ads have no clickable destination without it. Ignored on LinkedIn / Pinterest / X / Google, which infer the destination from the boosted post. | [optional] |
|
|
29
|
+
| **call_to_action** | **String** | CTA button label. Send it together with `linkUrl` — a CTA without a destination produces a button that goes nowhere, so sending one alone is a 400. **Meta**: validated against the Meta CTA enum (same values as POST /v1/ads/create), e.g. `LEARN_MORE`, `SHOP_NOW`, `SIGN_UP`. **TikTok**: pass-through to `call_to_action` on the Spark Ad creative; the platform validates the value. See TikTok's \"Enumeration - Call-to-Action\". | [optional] |
|
|
27
30
|
| **spark_auth_code** | **String** | TikTok-only. Spark Code (creator's `auth_code`) authorizing cross-creator Spark Ads — the advertiser can boost a video owned by a DIFFERENT TikTok account. Without this, boosts are limited to videos owned by the same account running the ads (same-BC creators only). The creator generates the code in their TikTok app's Promote settings and shares it with the advertiser. Maps to `auth_code` on the creative entry of /v2/ad/create/. | [optional] |
|
|
28
31
|
| **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] |
|
|
29
32
|
| **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] |
|
|
@@ -41,7 +44,10 @@ instance = Zernio::BoostPostRequest.new(
|
|
|
41
44
|
ad_account_id: null,
|
|
42
45
|
name: null,
|
|
43
46
|
goal: null,
|
|
47
|
+
ad_set_id: null,
|
|
44
48
|
budget: null,
|
|
49
|
+
instagram_account_id: null,
|
|
50
|
+
destination_type: null,
|
|
45
51
|
currency: USD,
|
|
46
52
|
schedule: null,
|
|
47
53
|
targeting: null,
|
data/docs/CreateCallAdRequest.md
CHANGED
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
| **image_url** | **String** | Image asset for single-creative shape. Mutually exclusive with `video` and with `creatives[]`. Required on the single-creative shape if `video` is not supplied. | [optional] |
|
|
13
13
|
| **video** | [**CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md) | | [optional] |
|
|
14
14
|
| **creatives** | [**Array<CtwaAdRequestBodyCreativesInner>**](CtwaAdRequestBodyCreativesInner.md) | Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`. | [optional] |
|
|
15
|
-
| **
|
|
16
|
-
| **
|
|
15
|
+
| **ad_set_id** | **String** | Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
|
|
16
|
+
| **budget_amount** | **Float** | Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it. | [optional] |
|
|
17
|
+
| **budget_type** | **String** | Required unless `adSetId` is set. | [optional] |
|
|
17
18
|
| **currency** | **String** | ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Optional; Meta infers from the ad account when omitted. | [optional] |
|
|
18
19
|
| **end_date** | **Time** | ISO 8601 datetime. Required when `budgetType` is `lifetime`. | [optional] |
|
|
19
20
|
| **countries** | **Array<String>** | ISO 3166-1 alpha-2 country codes. Defaults to `[\"US\"]` only when no other geo (`cities`, `regions`, `zips`, `metros`, `customLocations`) is supplied. | [optional] |
|
|
@@ -51,6 +52,7 @@ instance = Zernio::CreateCallAdRequest.new(
|
|
|
51
52
|
image_url: null,
|
|
52
53
|
video: null,
|
|
53
54
|
creatives: null,
|
|
55
|
+
ad_set_id: null,
|
|
54
56
|
budget_amount: null,
|
|
55
57
|
budget_type: null,
|
|
56
58
|
currency: null,
|
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
| **image_url** | **String** | Image asset for single-creative shape. Mutually exclusive with `video` and with `creatives[]`. Required on the single-creative shape if `video` is not supplied. | [optional] |
|
|
13
13
|
| **video** | [**CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md) | | [optional] |
|
|
14
14
|
| **creatives** | [**Array<CtwaAdRequestBodyCreativesInner>**](CtwaAdRequestBodyCreativesInner.md) | Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`. | [optional] |
|
|
15
|
-
| **
|
|
16
|
-
| **
|
|
15
|
+
| **ad_set_id** | **String** | Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
|
|
16
|
+
| **budget_amount** | **Float** | Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it. | [optional] |
|
|
17
|
+
| **budget_type** | **String** | Required unless `adSetId` is set. | [optional] |
|
|
17
18
|
| **currency** | **String** | ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Optional; Meta infers from the ad account when omitted. | [optional] |
|
|
18
19
|
| **end_date** | **Time** | ISO 8601 datetime. Required when `budgetType` is `lifetime`. | [optional] |
|
|
19
20
|
| **countries** | **Array<String>** | ISO 3166-1 alpha-2 country codes. Defaults to `[\"US\"]` only when no other geo (`cities`, `regions`, `zips`, `metros`, `customLocations`) is supplied. | [optional] |
|
|
@@ -50,6 +51,7 @@ instance = Zernio::CreateMessagingAdRequest.new(
|
|
|
50
51
|
image_url: null,
|
|
51
52
|
video: null,
|
|
52
53
|
creatives: null,
|
|
54
|
+
ad_set_id: null,
|
|
53
55
|
budget_amount: null,
|
|
54
56
|
budget_type: null,
|
|
55
57
|
currency: null,
|
data/docs/CtwaAdRequestBody.md
CHANGED
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
| **image_url** | **String** | Image asset for single-creative shape. Mutually exclusive with `video` and with `creatives[]`. Required on the single-creative shape if `video` is not supplied. | [optional] |
|
|
13
13
|
| **video** | [**CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md) | | [optional] |
|
|
14
14
|
| **creatives** | [**Array<CtwaAdRequestBodyCreativesInner>**](CtwaAdRequestBodyCreativesInner.md) | Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`. | [optional] |
|
|
15
|
-
| **
|
|
16
|
-
| **
|
|
15
|
+
| **ad_set_id** | **String** | Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
|
|
16
|
+
| **budget_amount** | **Float** | Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it. | [optional] |
|
|
17
|
+
| **budget_type** | **String** | Required unless `adSetId` is set. | [optional] |
|
|
17
18
|
| **currency** | **String** | ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Optional; Meta infers from the ad account when omitted. | [optional] |
|
|
18
19
|
| **end_date** | **Time** | ISO 8601 datetime. Required when `budgetType` is `lifetime`. | [optional] |
|
|
19
20
|
| **countries** | **Array<String>** | ISO 3166-1 alpha-2 country codes. Defaults to `[\"US\"]` only when no other geo (`cities`, `regions`, `zips`, `metros`, `customLocations`) is supplied. | [optional] |
|
|
@@ -49,6 +50,7 @@ instance = Zernio::CtwaAdRequestBody.new(
|
|
|
49
50
|
image_url: null,
|
|
50
51
|
video: null,
|
|
51
52
|
creatives: null,
|
|
53
|
+
ad_set_id: null,
|
|
52
54
|
budget_amount: null,
|
|
53
55
|
budget_type: null,
|
|
54
56
|
currency: null,
|
data/docs/MessagingAdsApi.md
CHANGED
|
@@ -29,7 +29,7 @@ Zernio.configure do |config|
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
api_instance = Zernio::MessagingAdsApi.new
|
|
32
|
-
create_call_ad_request = Zernio::CreateCallAdRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example',
|
|
32
|
+
create_call_ad_request = Zernio::CreateCallAdRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', phone_number: 'phone_number_example', link_url: 'link_url_example'}) # CreateCallAdRequest |
|
|
33
33
|
|
|
34
34
|
begin
|
|
35
35
|
# Create Click-to-Call ad
|
|
@@ -83,7 +83,7 @@ nil (empty response body)
|
|
|
83
83
|
|
|
84
84
|
Create Click-to-WhatsApp ad (deprecated)
|
|
85
85
|
|
|
86
|
-
Deprecated: use POST /v1/ads/messaging with `destination: whatsapp`. This endpoint stays available for back-compat; no removal planned. Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
86
|
+
Deprecated: use POST /v1/ads/messaging with `destination: whatsapp`. This endpoint stays available for back-compat; no removal planned. Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. **Attach shape.** Send `adSetId` (with either creative shape) to add the ads to an EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase — the way to refresh a CTWA creative without resetting delivery. The ad set then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it rather than silently dropped. The target ad set's `destination_type` must match the ad's destination (a WhatsApp ad needs a `WHATSAPP` ad set), otherwise Meta would accept an ad that never delivers. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
87
87
|
|
|
88
88
|
### Examples
|
|
89
89
|
|
|
@@ -97,7 +97,7 @@ Zernio.configure do |config|
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
api_instance = Zernio::MessagingAdsApi.new
|
|
100
|
-
ctwa_ad_request_body = Zernio::CtwaAdRequestBody.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example'
|
|
100
|
+
ctwa_ad_request_body = Zernio::CtwaAdRequestBody.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example'}) # CtwaAdRequestBody |
|
|
101
101
|
|
|
102
102
|
begin
|
|
103
103
|
# Create Click-to-WhatsApp ad (deprecated)
|
|
@@ -166,7 +166,7 @@ Zernio.configure do |config|
|
|
|
166
166
|
end
|
|
167
167
|
|
|
168
168
|
api_instance = Zernio::MessagingAdsApi.new
|
|
169
|
-
create_messaging_ad_request = Zernio::CreateMessagingAdRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example',
|
|
169
|
+
create_messaging_ad_request = Zernio::CreateMessagingAdRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', destination: 'whatsapp'}) # CreateMessagingAdRequest |
|
|
170
170
|
|
|
171
171
|
begin
|
|
172
172
|
# Create click-to-message ad (WhatsApp / Messenger / Instagram Direct)
|
|
@@ -20,7 +20,7 @@ module Zernio
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Boost post as ad
|
|
23
|
-
# Creates a paid ad
|
|
23
|
+
# 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` and `adSetId` are Meta-only and return 400 on other platforms.
|
|
24
24
|
# @param boost_post_request [BoostPostRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @return [UpdateAd200Response]
|
|
@@ -30,7 +30,7 @@ module Zernio
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
# Boost post as ad
|
|
33
|
-
# Creates a paid ad
|
|
33
|
+
# 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` and `adSetId` are Meta-only and return 400 on other platforms.
|
|
34
34
|
# @param boost_post_request [BoostPostRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
36
36
|
# @return [Array<(UpdateAd200Response, Integer, Hash)>] UpdateAd200Response data, response status code and response headers
|
|
@@ -88,7 +88,7 @@ module Zernio
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Create Click-to-WhatsApp ad (deprecated)
|
|
91
|
-
# Deprecated: use POST /v1/ads/messaging with `destination: whatsapp`. This endpoint stays available for back-compat; no removal planned. Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
91
|
+
# Deprecated: use POST /v1/ads/messaging with `destination: whatsapp`. This endpoint stays available for back-compat; no removal planned. Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. **Attach shape.** Send `adSetId` (with either creative shape) to add the ads to an EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase — the way to refresh a CTWA creative without resetting delivery. The ad set then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it rather than silently dropped. The target ad set's `destination_type` must match the ad's destination (a WhatsApp ad needs a `WHATSAPP` ad set), otherwise Meta would accept an ad that never delivers. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
92
92
|
# @param ctwa_ad_request_body [CtwaAdRequestBody]
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
94
94
|
# @return [CreateCtwaAd201Response]
|
|
@@ -98,7 +98,7 @@ module Zernio
|
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
# Create Click-to-WhatsApp ad (deprecated)
|
|
101
|
-
# Deprecated: use POST /v1/ads/messaging with `destination: whatsapp`. This endpoint stays available for back-compat; no removal planned. Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
101
|
+
# Deprecated: use POST /v1/ads/messaging with `destination: whatsapp`. This endpoint stays available for back-compat; no removal planned. Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. **Attach shape.** Send `adSetId` (with either creative shape) to add the ads to an EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase — the way to refresh a CTWA creative without resetting delivery. The ad set then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it rather than silently dropped. The target ad set's `destination_type` must match the ad's destination (a WhatsApp ad needs a `WHATSAPP` ad set), otherwise Meta would accept an ad that never delivers. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
102
102
|
# @param ctwa_ad_request_body [CtwaAdRequestBody]
|
|
103
103
|
# @param [Hash] opts the optional parameters
|
|
104
104
|
# @return [Array<(CreateCtwaAd201Response, Integer, Hash)>] CreateCtwaAd201Response data, response status code and response headers
|
|
@@ -32,8 +32,17 @@ module Zernio
|
|
|
32
32
|
# Available goals vary by platform. Meta (Facebook/Instagram) and TikTok support all 7. LinkedIn supports all except app_promotion. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views.
|
|
33
33
|
attr_accessor :goal
|
|
34
34
|
|
|
35
|
+
# 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.
|
|
36
|
+
attr_accessor :ad_set_id
|
|
37
|
+
|
|
35
38
|
attr_accessor :budget
|
|
36
39
|
|
|
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
|
+
attr_accessor :instagram_account_id
|
|
42
|
+
|
|
43
|
+
# Meta only. Ad-set destination_type — where the click LANDS, as opposed to instagramAccountId which is who the ad runs as. Lead ads force ON_AD and ignore this.
|
|
44
|
+
attr_accessor :destination_type
|
|
45
|
+
|
|
37
46
|
attr_accessor :currency
|
|
38
47
|
|
|
39
48
|
attr_accessor :schedule
|
|
@@ -62,10 +71,10 @@ module Zernio
|
|
|
62
71
|
# Meta (metaads) only. 2-letter ISO country codes the special ad category applies to. Requires specialAdCategories to be set (400 otherwise).
|
|
63
72
|
attr_accessor :special_ad_category_country
|
|
64
73
|
|
|
65
|
-
#
|
|
74
|
+
# Destination URL for the CTA button. Send it together with `callToAction`. **Meta**: adds a top-level `call_to_action` to the post-reference creative. This is what gives a `traffic` boost a clickable destination without replacing the creative and losing the post's social proof. Ignored when `leadGenFormId` is set, which supplies its own destination. Live-verified against a Page-post creative. **TikTok**: maps to `landing_page_url` on the Spark Ad creative (`AdcreateCreatives.landing_page_url`); Spark Ads have no clickable destination without it. Ignored on LinkedIn / Pinterest / X / Google, which infer the destination from the boosted post.
|
|
66
75
|
attr_accessor :link_url
|
|
67
76
|
|
|
68
|
-
#
|
|
77
|
+
# CTA button label. Send it together with `linkUrl` — a CTA without a destination produces a button that goes nowhere, so sending one alone is a 400. **Meta**: validated against the Meta CTA enum (same values as POST /v1/ads/create), e.g. `LEARN_MORE`, `SHOP_NOW`, `SIGN_UP`. **TikTok**: pass-through to `call_to_action` on the Spark Ad creative; the platform validates the value. See TikTok's \"Enumeration - Call-to-Action\".
|
|
69
78
|
attr_accessor :call_to_action
|
|
70
79
|
|
|
71
80
|
# TikTok-only. Spark Code (creator's `auth_code`) authorizing cross-creator Spark Ads — the advertiser can boost a video owned by a DIFFERENT TikTok account. Without this, boosts are limited to videos owned by the same account running the ads (same-BC creators only). The creator generates the code in their TikTok app's Promote settings and shares it with the advertiser. Maps to `auth_code` on the creative entry of /v2/ad/create/.
|
|
@@ -111,7 +120,10 @@ module Zernio
|
|
|
111
120
|
:'ad_account_id' => :'adAccountId',
|
|
112
121
|
:'name' => :'name',
|
|
113
122
|
:'goal' => :'goal',
|
|
123
|
+
:'ad_set_id' => :'adSetId',
|
|
114
124
|
:'budget' => :'budget',
|
|
125
|
+
:'instagram_account_id' => :'instagramAccountId',
|
|
126
|
+
:'destination_type' => :'destinationType',
|
|
115
127
|
:'currency' => :'currency',
|
|
116
128
|
:'schedule' => :'schedule',
|
|
117
129
|
:'targeting' => :'targeting',
|
|
@@ -151,7 +163,10 @@ module Zernio
|
|
|
151
163
|
:'ad_account_id' => :'String',
|
|
152
164
|
:'name' => :'String',
|
|
153
165
|
:'goal' => :'String',
|
|
166
|
+
:'ad_set_id' => :'String',
|
|
154
167
|
:'budget' => :'BoostPostRequestBudget',
|
|
168
|
+
:'instagram_account_id' => :'String',
|
|
169
|
+
:'destination_type' => :'String',
|
|
155
170
|
:'currency' => :'String',
|
|
156
171
|
:'schedule' => :'BoostPostRequestSchedule',
|
|
157
172
|
:'targeting' => :'BoostPostRequestTargeting',
|
|
@@ -226,10 +241,20 @@ module Zernio
|
|
|
226
241
|
self.goal = nil
|
|
227
242
|
end
|
|
228
243
|
|
|
244
|
+
if attributes.key?(:'ad_set_id')
|
|
245
|
+
self.ad_set_id = attributes[:'ad_set_id']
|
|
246
|
+
end
|
|
247
|
+
|
|
229
248
|
if attributes.key?(:'budget')
|
|
230
249
|
self.budget = attributes[:'budget']
|
|
231
|
-
|
|
232
|
-
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if attributes.key?(:'instagram_account_id')
|
|
253
|
+
self.instagram_account_id = attributes[:'instagram_account_id']
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
if attributes.key?(:'destination_type')
|
|
257
|
+
self.destination_type = attributes[:'destination_type']
|
|
233
258
|
end
|
|
234
259
|
|
|
235
260
|
if attributes.key?(:'currency')
|
|
@@ -332,10 +357,6 @@ module Zernio
|
|
|
332
357
|
invalid_properties.push('invalid value for "goal", goal cannot be nil.')
|
|
333
358
|
end
|
|
334
359
|
|
|
335
|
-
if @budget.nil?
|
|
336
|
-
invalid_properties.push('invalid value for "budget", budget cannot be nil.')
|
|
337
|
-
end
|
|
338
|
-
|
|
339
360
|
if !@dsa_beneficiary.nil? && @dsa_beneficiary.to_s.length > 100
|
|
340
361
|
invalid_properties.push('invalid value for "dsa_beneficiary", the character length must be smaller than or equal to 100.')
|
|
341
362
|
end
|
|
@@ -358,7 +379,8 @@ module Zernio
|
|
|
358
379
|
return false if @goal.nil?
|
|
359
380
|
goal_validator = EnumAttributeValidator.new('String', ["engagement", "traffic", "awareness", "video_views", "lead_generation", "conversions", "app_promotion"])
|
|
360
381
|
return false unless goal_validator.valid?(@goal)
|
|
361
|
-
|
|
382
|
+
destination_type_validator = EnumAttributeValidator.new('String', ["INSTAGRAM_PROFILE", "WEBSITE", "ON_AD", "MESSENGER", "WHATSAPP"])
|
|
383
|
+
return false unless destination_type_validator.valid?(@destination_type)
|
|
362
384
|
return false if !@dsa_beneficiary.nil? && @dsa_beneficiary.to_s.length > 100
|
|
363
385
|
return false if !@dsa_payor.nil? && @dsa_payor.to_s.length > 100
|
|
364
386
|
true
|
|
@@ -408,14 +430,14 @@ module Zernio
|
|
|
408
430
|
@goal = goal
|
|
409
431
|
end
|
|
410
432
|
|
|
411
|
-
# Custom attribute writer method
|
|
412
|
-
# @param [Object]
|
|
413
|
-
def
|
|
414
|
-
|
|
415
|
-
|
|
433
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
434
|
+
# @param [Object] destination_type Object to be assigned
|
|
435
|
+
def destination_type=(destination_type)
|
|
436
|
+
validator = EnumAttributeValidator.new('String', ["INSTAGRAM_PROFILE", "WEBSITE", "ON_AD", "MESSENGER", "WHATSAPP"])
|
|
437
|
+
unless validator.valid?(destination_type)
|
|
438
|
+
fail ArgumentError, "invalid value for \"destination_type\", must be one of #{validator.allowable_values}."
|
|
416
439
|
end
|
|
417
|
-
|
|
418
|
-
@budget = budget
|
|
440
|
+
@destination_type = destination_type
|
|
419
441
|
end
|
|
420
442
|
|
|
421
443
|
# Custom attribute writer method with validation
|
|
@@ -457,7 +479,10 @@ module Zernio
|
|
|
457
479
|
ad_account_id == o.ad_account_id &&
|
|
458
480
|
name == o.name &&
|
|
459
481
|
goal == o.goal &&
|
|
482
|
+
ad_set_id == o.ad_set_id &&
|
|
460
483
|
budget == o.budget &&
|
|
484
|
+
instagram_account_id == o.instagram_account_id &&
|
|
485
|
+
destination_type == o.destination_type &&
|
|
461
486
|
currency == o.currency &&
|
|
462
487
|
schedule == o.schedule &&
|
|
463
488
|
targeting == o.targeting &&
|
|
@@ -486,7 +511,7 @@ module Zernio
|
|
|
486
511
|
# Calculates hash code according to all attributes.
|
|
487
512
|
# @return [Integer] Hash code
|
|
488
513
|
def hash
|
|
489
|
-
[post_id, platform_post_id, account_id, ad_account_id, name, goal, budget, currency, schedule, targeting, raw_targeting, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, tracking, special_ad_categories, special_ad_category_country, link_url, call_to_action, spark_auth_code, dsa_beneficiary, dsa_payor, optimization_goal].hash
|
|
514
|
+
[post_id, platform_post_id, account_id, ad_account_id, name, goal, ad_set_id, budget, instagram_account_id, destination_type, currency, schedule, targeting, raw_targeting, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, tracking, special_ad_categories, special_ad_category_country, link_url, call_to_action, spark_auth_code, dsa_beneficiary, dsa_payor, optimization_goal].hash
|
|
490
515
|
end
|
|
491
516
|
|
|
492
517
|
# Builds the object from hash
|
|
@@ -38,9 +38,13 @@ module Zernio
|
|
|
38
38
|
# Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
|
|
39
39
|
attr_accessor :creatives
|
|
40
40
|
|
|
41
|
-
#
|
|
41
|
+
# Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
|
|
42
|
+
attr_accessor :ad_set_id
|
|
43
|
+
|
|
44
|
+
# Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it.
|
|
42
45
|
attr_accessor :budget_amount
|
|
43
46
|
|
|
47
|
+
# Required unless `adSetId` is set.
|
|
44
48
|
attr_accessor :budget_type
|
|
45
49
|
|
|
46
50
|
# ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Optional; Meta infers from the ad account when omitted.
|
|
@@ -138,6 +142,7 @@ module Zernio
|
|
|
138
142
|
:'image_url' => :'imageUrl',
|
|
139
143
|
:'video' => :'video',
|
|
140
144
|
:'creatives' => :'creatives',
|
|
145
|
+
:'ad_set_id' => :'adSetId',
|
|
141
146
|
:'budget_amount' => :'budgetAmount',
|
|
142
147
|
:'budget_type' => :'budgetType',
|
|
143
148
|
:'currency' => :'currency',
|
|
@@ -186,6 +191,7 @@ module Zernio
|
|
|
186
191
|
:'image_url' => :'String',
|
|
187
192
|
:'video' => :'CtwaAdRequestBodyVideo',
|
|
188
193
|
:'creatives' => :'Array<CtwaAdRequestBodyCreativesInner>',
|
|
194
|
+
:'ad_set_id' => :'String',
|
|
189
195
|
:'budget_amount' => :'Float',
|
|
190
196
|
:'budget_type' => :'String',
|
|
191
197
|
:'currency' => :'String',
|
|
@@ -282,16 +288,16 @@ module Zernio
|
|
|
282
288
|
end
|
|
283
289
|
end
|
|
284
290
|
|
|
291
|
+
if attributes.key?(:'ad_set_id')
|
|
292
|
+
self.ad_set_id = attributes[:'ad_set_id']
|
|
293
|
+
end
|
|
294
|
+
|
|
285
295
|
if attributes.key?(:'budget_amount')
|
|
286
296
|
self.budget_amount = attributes[:'budget_amount']
|
|
287
|
-
else
|
|
288
|
-
self.budget_amount = nil
|
|
289
297
|
end
|
|
290
298
|
|
|
291
299
|
if attributes.key?(:'budget_type')
|
|
292
300
|
self.budget_type = attributes[:'budget_type']
|
|
293
|
-
else
|
|
294
|
-
self.budget_type = nil
|
|
295
301
|
end
|
|
296
302
|
|
|
297
303
|
if attributes.key?(:'currency')
|
|
@@ -446,14 +452,6 @@ module Zernio
|
|
|
446
452
|
invalid_properties.push('invalid value for "creatives", number of items must be greater than or equal to 1.')
|
|
447
453
|
end
|
|
448
454
|
|
|
449
|
-
if @budget_amount.nil?
|
|
450
|
-
invalid_properties.push('invalid value for "budget_amount", budget_amount cannot be nil.')
|
|
451
|
-
end
|
|
452
|
-
|
|
453
|
-
if @budget_type.nil?
|
|
454
|
-
invalid_properties.push('invalid value for "budget_type", budget_type cannot be nil.')
|
|
455
|
-
end
|
|
456
|
-
|
|
457
455
|
if !@currency.nil? && @currency.to_s.length > 3
|
|
458
456
|
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
|
|
459
457
|
end
|
|
@@ -511,8 +509,6 @@ module Zernio
|
|
|
511
509
|
return false if !@headline.nil? && @headline.to_s.length < 1
|
|
512
510
|
return false if !@body.nil? && @body.to_s.length < 1
|
|
513
511
|
return false if !@creatives.nil? && @creatives.length < 1
|
|
514
|
-
return false if @budget_amount.nil?
|
|
515
|
-
return false if @budget_type.nil?
|
|
516
512
|
budget_type_validator = EnumAttributeValidator.new('String', ["daily", "lifetime"])
|
|
517
513
|
return false unless budget_type_validator.valid?(@budget_type)
|
|
518
514
|
return false if !@currency.nil? && @currency.to_s.length > 3
|
|
@@ -622,16 +618,6 @@ module Zernio
|
|
|
622
618
|
@creatives = creatives
|
|
623
619
|
end
|
|
624
620
|
|
|
625
|
-
# Custom attribute writer method with validation
|
|
626
|
-
# @param [Object] budget_amount Value to be assigned
|
|
627
|
-
def budget_amount=(budget_amount)
|
|
628
|
-
if budget_amount.nil?
|
|
629
|
-
fail ArgumentError, 'budget_amount cannot be nil'
|
|
630
|
-
end
|
|
631
|
-
|
|
632
|
-
@budget_amount = budget_amount
|
|
633
|
-
end
|
|
634
|
-
|
|
635
621
|
# Custom attribute writer method checking allowed values (enum).
|
|
636
622
|
# @param [Object] budget_type Object to be assigned
|
|
637
623
|
def budget_type=(budget_type)
|
|
@@ -787,6 +773,7 @@ module Zernio
|
|
|
787
773
|
image_url == o.image_url &&
|
|
788
774
|
video == o.video &&
|
|
789
775
|
creatives == o.creatives &&
|
|
776
|
+
ad_set_id == o.ad_set_id &&
|
|
790
777
|
budget_amount == o.budget_amount &&
|
|
791
778
|
budget_type == o.budget_type &&
|
|
792
779
|
currency == o.currency &&
|
|
@@ -822,7 +809,7 @@ module Zernio
|
|
|
822
809
|
# Calculates hash code according to all attributes.
|
|
823
810
|
# @return [Integer] Hash code
|
|
824
811
|
def hash
|
|
825
|
-
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, phone_number, link_url].hash
|
|
812
|
+
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, phone_number, link_url].hash
|
|
826
813
|
end
|
|
827
814
|
|
|
828
815
|
# Builds the object from hash
|
|
@@ -38,9 +38,13 @@ module Zernio
|
|
|
38
38
|
# Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
|
|
39
39
|
attr_accessor :creatives
|
|
40
40
|
|
|
41
|
-
#
|
|
41
|
+
# Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
|
|
42
|
+
attr_accessor :ad_set_id
|
|
43
|
+
|
|
44
|
+
# Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it.
|
|
42
45
|
attr_accessor :budget_amount
|
|
43
46
|
|
|
47
|
+
# Required unless `adSetId` is set.
|
|
44
48
|
attr_accessor :budget_type
|
|
45
49
|
|
|
46
50
|
# ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Optional; Meta infers from the ad account when omitted.
|
|
@@ -135,6 +139,7 @@ module Zernio
|
|
|
135
139
|
:'image_url' => :'imageUrl',
|
|
136
140
|
:'video' => :'video',
|
|
137
141
|
:'creatives' => :'creatives',
|
|
142
|
+
:'ad_set_id' => :'adSetId',
|
|
138
143
|
:'budget_amount' => :'budgetAmount',
|
|
139
144
|
:'budget_type' => :'budgetType',
|
|
140
145
|
:'currency' => :'currency',
|
|
@@ -182,6 +187,7 @@ module Zernio
|
|
|
182
187
|
:'image_url' => :'String',
|
|
183
188
|
:'video' => :'CtwaAdRequestBodyVideo',
|
|
184
189
|
:'creatives' => :'Array<CtwaAdRequestBodyCreativesInner>',
|
|
190
|
+
:'ad_set_id' => :'String',
|
|
185
191
|
:'budget_amount' => :'Float',
|
|
186
192
|
:'budget_type' => :'String',
|
|
187
193
|
:'currency' => :'String',
|
|
@@ -277,16 +283,16 @@ module Zernio
|
|
|
277
283
|
end
|
|
278
284
|
end
|
|
279
285
|
|
|
286
|
+
if attributes.key?(:'ad_set_id')
|
|
287
|
+
self.ad_set_id = attributes[:'ad_set_id']
|
|
288
|
+
end
|
|
289
|
+
|
|
280
290
|
if attributes.key?(:'budget_amount')
|
|
281
291
|
self.budget_amount = attributes[:'budget_amount']
|
|
282
|
-
else
|
|
283
|
-
self.budget_amount = nil
|
|
284
292
|
end
|
|
285
293
|
|
|
286
294
|
if attributes.key?(:'budget_type')
|
|
287
295
|
self.budget_type = attributes[:'budget_type']
|
|
288
|
-
else
|
|
289
|
-
self.budget_type = nil
|
|
290
296
|
end
|
|
291
297
|
|
|
292
298
|
if attributes.key?(:'currency')
|
|
@@ -435,14 +441,6 @@ module Zernio
|
|
|
435
441
|
invalid_properties.push('invalid value for "creatives", number of items must be greater than or equal to 1.')
|
|
436
442
|
end
|
|
437
443
|
|
|
438
|
-
if @budget_amount.nil?
|
|
439
|
-
invalid_properties.push('invalid value for "budget_amount", budget_amount cannot be nil.')
|
|
440
|
-
end
|
|
441
|
-
|
|
442
|
-
if @budget_type.nil?
|
|
443
|
-
invalid_properties.push('invalid value for "budget_type", budget_type cannot be nil.')
|
|
444
|
-
end
|
|
445
|
-
|
|
446
444
|
if !@currency.nil? && @currency.to_s.length > 3
|
|
447
445
|
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
|
|
448
446
|
end
|
|
@@ -496,8 +494,6 @@ module Zernio
|
|
|
496
494
|
return false if !@headline.nil? && @headline.to_s.length < 1
|
|
497
495
|
return false if !@body.nil? && @body.to_s.length < 1
|
|
498
496
|
return false if !@creatives.nil? && @creatives.length < 1
|
|
499
|
-
return false if @budget_amount.nil?
|
|
500
|
-
return false if @budget_type.nil?
|
|
501
497
|
budget_type_validator = EnumAttributeValidator.new('String', ["daily", "lifetime"])
|
|
502
498
|
return false unless budget_type_validator.valid?(@budget_type)
|
|
503
499
|
return false if !@currency.nil? && @currency.to_s.length > 3
|
|
@@ -608,16 +604,6 @@ module Zernio
|
|
|
608
604
|
@creatives = creatives
|
|
609
605
|
end
|
|
610
606
|
|
|
611
|
-
# Custom attribute writer method with validation
|
|
612
|
-
# @param [Object] budget_amount Value to be assigned
|
|
613
|
-
def budget_amount=(budget_amount)
|
|
614
|
-
if budget_amount.nil?
|
|
615
|
-
fail ArgumentError, 'budget_amount cannot be nil'
|
|
616
|
-
end
|
|
617
|
-
|
|
618
|
-
@budget_amount = budget_amount
|
|
619
|
-
end
|
|
620
|
-
|
|
621
607
|
# Custom attribute writer method checking allowed values (enum).
|
|
622
608
|
# @param [Object] budget_type Object to be assigned
|
|
623
609
|
def budget_type=(budget_type)
|
|
@@ -763,6 +749,7 @@ module Zernio
|
|
|
763
749
|
image_url == o.image_url &&
|
|
764
750
|
video == o.video &&
|
|
765
751
|
creatives == o.creatives &&
|
|
752
|
+
ad_set_id == o.ad_set_id &&
|
|
766
753
|
budget_amount == o.budget_amount &&
|
|
767
754
|
budget_type == o.budget_type &&
|
|
768
755
|
currency == o.currency &&
|
|
@@ -797,7 +784,7 @@ module Zernio
|
|
|
797
784
|
# Calculates hash code according to all attributes.
|
|
798
785
|
# @return [Integer] Hash code
|
|
799
786
|
def hash
|
|
800
|
-
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, destination].hash
|
|
787
|
+
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, destination].hash
|
|
801
788
|
end
|
|
802
789
|
|
|
803
790
|
# Builds the object from hash
|
|
@@ -39,9 +39,13 @@ module Zernio
|
|
|
39
39
|
# Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
|
|
40
40
|
attr_accessor :creatives
|
|
41
41
|
|
|
42
|
-
#
|
|
42
|
+
# Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
|
|
43
|
+
attr_accessor :ad_set_id
|
|
44
|
+
|
|
45
|
+
# Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it.
|
|
43
46
|
attr_accessor :budget_amount
|
|
44
47
|
|
|
48
|
+
# Required unless `adSetId` is set.
|
|
45
49
|
attr_accessor :budget_type
|
|
46
50
|
|
|
47
51
|
# ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Optional; Meta infers from the ad account when omitted.
|
|
@@ -133,6 +137,7 @@ module Zernio
|
|
|
133
137
|
:'image_url' => :'imageUrl',
|
|
134
138
|
:'video' => :'video',
|
|
135
139
|
:'creatives' => :'creatives',
|
|
140
|
+
:'ad_set_id' => :'adSetId',
|
|
136
141
|
:'budget_amount' => :'budgetAmount',
|
|
137
142
|
:'budget_type' => :'budgetType',
|
|
138
143
|
:'currency' => :'currency',
|
|
@@ -179,6 +184,7 @@ module Zernio
|
|
|
179
184
|
:'image_url' => :'String',
|
|
180
185
|
:'video' => :'CtwaAdRequestBodyVideo',
|
|
181
186
|
:'creatives' => :'Array<CtwaAdRequestBodyCreativesInner>',
|
|
187
|
+
:'ad_set_id' => :'String',
|
|
182
188
|
:'budget_amount' => :'Float',
|
|
183
189
|
:'budget_type' => :'String',
|
|
184
190
|
:'currency' => :'String',
|
|
@@ -266,16 +272,16 @@ module Zernio
|
|
|
266
272
|
end
|
|
267
273
|
end
|
|
268
274
|
|
|
275
|
+
if attributes.key?(:'ad_set_id')
|
|
276
|
+
self.ad_set_id = attributes[:'ad_set_id']
|
|
277
|
+
end
|
|
278
|
+
|
|
269
279
|
if attributes.key?(:'budget_amount')
|
|
270
280
|
self.budget_amount = attributes[:'budget_amount']
|
|
271
|
-
else
|
|
272
|
-
self.budget_amount = nil
|
|
273
281
|
end
|
|
274
282
|
|
|
275
283
|
if attributes.key?(:'budget_type')
|
|
276
284
|
self.budget_type = attributes[:'budget_type']
|
|
277
|
-
else
|
|
278
|
-
self.budget_type = nil
|
|
279
285
|
end
|
|
280
286
|
|
|
281
287
|
if attributes.key?(:'currency')
|
|
@@ -418,14 +424,6 @@ module Zernio
|
|
|
418
424
|
invalid_properties.push('invalid value for "creatives", number of items must be greater than or equal to 1.')
|
|
419
425
|
end
|
|
420
426
|
|
|
421
|
-
if @budget_amount.nil?
|
|
422
|
-
invalid_properties.push('invalid value for "budget_amount", budget_amount cannot be nil.')
|
|
423
|
-
end
|
|
424
|
-
|
|
425
|
-
if @budget_type.nil?
|
|
426
|
-
invalid_properties.push('invalid value for "budget_type", budget_type cannot be nil.')
|
|
427
|
-
end
|
|
428
|
-
|
|
429
427
|
if !@currency.nil? && @currency.to_s.length > 3
|
|
430
428
|
invalid_properties.push('invalid value for "currency", the character length must be smaller than or equal to 3.')
|
|
431
429
|
end
|
|
@@ -475,8 +473,6 @@ module Zernio
|
|
|
475
473
|
return false if !@headline.nil? && @headline.to_s.length < 1
|
|
476
474
|
return false if !@body.nil? && @body.to_s.length < 1
|
|
477
475
|
return false if !@creatives.nil? && @creatives.length < 1
|
|
478
|
-
return false if @budget_amount.nil?
|
|
479
|
-
return false if @budget_type.nil?
|
|
480
476
|
budget_type_validator = EnumAttributeValidator.new('String', ["daily", "lifetime"])
|
|
481
477
|
return false unless budget_type_validator.valid?(@budget_type)
|
|
482
478
|
return false if !@currency.nil? && @currency.to_s.length > 3
|
|
@@ -584,16 +580,6 @@ module Zernio
|
|
|
584
580
|
@creatives = creatives
|
|
585
581
|
end
|
|
586
582
|
|
|
587
|
-
# Custom attribute writer method with validation
|
|
588
|
-
# @param [Object] budget_amount Value to be assigned
|
|
589
|
-
def budget_amount=(budget_amount)
|
|
590
|
-
if budget_amount.nil?
|
|
591
|
-
fail ArgumentError, 'budget_amount cannot be nil'
|
|
592
|
-
end
|
|
593
|
-
|
|
594
|
-
@budget_amount = budget_amount
|
|
595
|
-
end
|
|
596
|
-
|
|
597
583
|
# Custom attribute writer method checking allowed values (enum).
|
|
598
584
|
# @param [Object] budget_type Object to be assigned
|
|
599
585
|
def budget_type=(budget_type)
|
|
@@ -729,6 +715,7 @@ module Zernio
|
|
|
729
715
|
image_url == o.image_url &&
|
|
730
716
|
video == o.video &&
|
|
731
717
|
creatives == o.creatives &&
|
|
718
|
+
ad_set_id == o.ad_set_id &&
|
|
732
719
|
budget_amount == o.budget_amount &&
|
|
733
720
|
budget_type == o.budget_type &&
|
|
734
721
|
currency == o.currency &&
|
|
@@ -762,7 +749,7 @@ module Zernio
|
|
|
762
749
|
# Calculates hash code according to all attributes.
|
|
763
750
|
# @return [Integer] Hash code
|
|
764
751
|
def hash
|
|
765
|
-
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor].hash
|
|
752
|
+
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor].hash
|
|
766
753
|
end
|
|
767
754
|
|
|
768
755
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -752,7 +752,7 @@ components:
|
|
|
752
752
|
expiresAt: { type: [string, "null"], description: "When the reservation's locked price expires (set after reserving)." }
|
|
753
753
|
CtwaAdRequestBody:
|
|
754
754
|
type: object
|
|
755
|
-
required: [accountId, adAccountId, name
|
|
755
|
+
required: [accountId, adAccountId, name]
|
|
756
756
|
description: |
|
|
757
757
|
In addition to the `required` list, the request must use
|
|
758
758
|
EXACTLY ONE of the two shapes:
|
|
@@ -862,15 +862,26 @@ components:
|
|
|
862
862
|
description: |
|
|
863
863
|
Video creative. Mutually exclusive with this entry's
|
|
864
864
|
`imageUrl`. Required if `imageUrl` is not supplied.
|
|
865
|
+
adSetId:
|
|
866
|
+
type: string
|
|
867
|
+
description: |
|
|
868
|
+
Attach the creatives to this EXISTING messaging ad set instead of
|
|
869
|
+
building a campaign, so the ad set keeps its learning phase. It then
|
|
870
|
+
owns budget, targeting and schedule, so `budgetAmount`, `budgetType`,
|
|
871
|
+
`endDate`, `objective`, `countries`, `interests` and `audienceId` are
|
|
872
|
+
rejected with a 400 alongside it. Its `destination_type` must match
|
|
873
|
+
the ad's destination.
|
|
865
874
|
budgetAmount:
|
|
866
875
|
type: number
|
|
867
876
|
exclusiveMinimum: 0
|
|
868
877
|
description: |
|
|
869
878
|
Budget amount in the ad account's currency major units
|
|
870
879
|
(e.g. dollars for USD, not cents). Must be > 0.
|
|
880
|
+
Required unless `adSetId` is set, where the ad set owns it.
|
|
871
881
|
budgetType:
|
|
872
882
|
type: string
|
|
873
883
|
enum: [daily, lifetime]
|
|
884
|
+
description: Required unless `adSetId` is set.
|
|
874
885
|
currency:
|
|
875
886
|
type: string
|
|
876
887
|
minLength: 3
|
|
@@ -16304,7 +16315,7 @@ paths:
|
|
|
16304
16315
|
selectedLocationName: "My Coffee Shop"
|
|
16305
16316
|
selectedLocationId: "9281089117903930794"
|
|
16306
16317
|
'400':
|
|
16307
|
-
description:
|
|
16318
|
+
description: 'Missing required fields (profileId, locationId, or tempToken), or the provided accountId is not one of the accounts this connection manages'
|
|
16308
16319
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
16309
16320
|
'403':
|
|
16310
16321
|
description: User does not have access to the specified profile
|
|
@@ -20829,7 +20840,7 @@ paths:
|
|
|
20829
20840
|
selectedLocation:
|
|
20830
20841
|
id: "12345678901234567890"
|
|
20831
20842
|
name: "My Business Location"
|
|
20832
|
-
'400': { description: Location not in available locations }
|
|
20843
|
+
'400': { description: 'Location not in available locations, or the provided googleAccountId is not one of the accounts this connection manages' }
|
|
20833
20844
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
20834
20845
|
'404': { description: Account not found }
|
|
20835
20846
|
|
|
@@ -20909,7 +20920,7 @@ paths:
|
|
|
20909
20920
|
isActive: true
|
|
20910
20921
|
selectedLocationName: "Snap Fitness Dianella"
|
|
20911
20922
|
selectedLocationId: "12345678901234567890"
|
|
20912
|
-
'400': { description: 'Invalid body,
|
|
20923
|
+
'400': { description: 'Invalid body, selected location not found under the Google account, or the provided googleAccountId is not one of the accounts this connection manages' }
|
|
20913
20924
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
20914
20925
|
'403': { description: 'Payment required, or target profile exceeds plan limit' }
|
|
20915
20926
|
'404': { description: Source Google Business account not found }
|
|
@@ -39424,7 +39435,19 @@ paths:
|
|
|
39424
39435
|
tags: ["Ad Campaigns"]
|
|
39425
39436
|
x-platforms: ["meta"]
|
|
39426
39437
|
summary: Boost post as ad
|
|
39427
|
-
description:
|
|
39438
|
+
description: |
|
|
39439
|
+
Creates a paid ad from an existing published post, keeping the post's
|
|
39440
|
+
engagement. By default it provisions the whole hierarchy (campaign, ad
|
|
39441
|
+
set, ad).
|
|
39442
|
+
|
|
39443
|
+
**Attach shape (Meta).** Send `adSetId` to put the ad under an EXISTING
|
|
39444
|
+
ad set instead, so that ad set keeps its learning phase. It then owns
|
|
39445
|
+
`budget`, `schedule` and `targeting`, and sending any of those alongside
|
|
39446
|
+
`adSetId` is a 400 rather than a silent drop. `budget` is required only
|
|
39447
|
+
without `adSetId`.
|
|
39448
|
+
|
|
39449
|
+
`instagramAccountId`, `destinationType` and `adSetId` are Meta-only and
|
|
39450
|
+
return 400 on other platforms.
|
|
39428
39451
|
security:
|
|
39429
39452
|
- bearerAuth: []
|
|
39430
39453
|
requestBody:
|
|
@@ -39433,7 +39456,7 @@ paths:
|
|
|
39433
39456
|
application/json:
|
|
39434
39457
|
schema:
|
|
39435
39458
|
type: object
|
|
39436
|
-
required: [accountId, adAccountId, name, goal
|
|
39459
|
+
required: [accountId, adAccountId, name, goal]
|
|
39437
39460
|
properties:
|
|
39438
39461
|
postId: { type: string, description: Zernio post ID (provide this or platformPostId) }
|
|
39439
39462
|
platformPostId: { type: string, description: Platform post ID (alternative to postId) }
|
|
@@ -39441,12 +39464,16 @@ paths:
|
|
|
39441
39464
|
adAccountId: { type: string, description: Platform ad account ID }
|
|
39442
39465
|
name: { type: string, maxLength: 255 }
|
|
39443
39466
|
goal: { type: string, enum: [engagement, traffic, awareness, video_views, lead_generation, conversions, app_promotion], description: "Available goals vary by platform. Meta (Facebook/Instagram) and TikTok support all 7. LinkedIn supports all except app_promotion. Twitter/X supports engagement, traffic, awareness, video_views, app_promotion. Pinterest and Google Ads support only engagement, traffic, awareness, video_views." }
|
|
39467
|
+
adSetId: { type: string, description: "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." }
|
|
39444
39468
|
budget:
|
|
39445
39469
|
type: object
|
|
39470
|
+
description: "Required unless adSetId is set."
|
|
39446
39471
|
required: [amount, type]
|
|
39447
39472
|
properties:
|
|
39448
39473
|
amount: { type: number, description: "Minimum varies: TikTok=$20, Pinterest=$5, others=$1" }
|
|
39449
39474
|
type: { type: string, enum: [daily, lifetime] }
|
|
39475
|
+
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." }
|
|
39476
|
+
destinationType: { type: string, enum: [INSTAGRAM_PROFILE, WEBSITE, ON_AD, MESSENGER, WHATSAPP], description: "Meta only. Ad-set destination_type — where the click LANDS, as opposed to instagramAccountId which is who the ad runs as. Lead ads force ON_AD and ignore this." }
|
|
39450
39477
|
currency: { type: string, example: USD }
|
|
39451
39478
|
schedule:
|
|
39452
39479
|
type: object
|
|
@@ -39601,19 +39628,31 @@ paths:
|
|
|
39601
39628
|
type: string
|
|
39602
39629
|
format: uri
|
|
39603
39630
|
description: |
|
|
39604
|
-
|
|
39605
|
-
|
|
39606
|
-
|
|
39607
|
-
|
|
39608
|
-
|
|
39631
|
+
Destination URL for the CTA button. Send it together with `callToAction`.
|
|
39632
|
+
|
|
39633
|
+
**Meta**: adds a top-level `call_to_action` to the post-reference creative.
|
|
39634
|
+
This is what gives a `traffic` boost a clickable destination without
|
|
39635
|
+
replacing the creative and losing the post's social proof. Ignored when
|
|
39636
|
+
`leadGenFormId` is set, which supplies its own destination. Live-verified
|
|
39637
|
+
against a Page-post creative.
|
|
39638
|
+
|
|
39639
|
+
**TikTok**: maps to `landing_page_url` on the Spark Ad creative
|
|
39640
|
+
(`AdcreateCreatives.landing_page_url`); Spark Ads have no clickable
|
|
39641
|
+
destination without it.
|
|
39642
|
+
|
|
39643
|
+
Ignored on LinkedIn / Pinterest / X / Google, which infer the destination
|
|
39644
|
+
from the boosted post.
|
|
39609
39645
|
callToAction:
|
|
39610
39646
|
type: string
|
|
39611
39647
|
description: |
|
|
39612
|
-
|
|
39613
|
-
|
|
39614
|
-
|
|
39615
|
-
|
|
39616
|
-
|
|
39648
|
+
CTA button label. Send it together with `linkUrl` — a CTA without a
|
|
39649
|
+
destination produces a button that goes nowhere, so sending one alone is a 400.
|
|
39650
|
+
|
|
39651
|
+
**Meta**: validated against the Meta CTA enum (same values as
|
|
39652
|
+
POST /v1/ads/create), e.g. `LEARN_MORE`, `SHOP_NOW`, `SIGN_UP`.
|
|
39653
|
+
|
|
39654
|
+
**TikTok**: pass-through to `call_to_action` on the Spark Ad creative; the
|
|
39655
|
+
platform validates the value. See TikTok's "Enumeration - Call-to-Action".
|
|
39617
39656
|
sparkAuthCode:
|
|
39618
39657
|
type: string
|
|
39619
39658
|
description: |
|
|
@@ -43018,6 +43057,8 @@ paths:
|
|
|
43018
43057
|
|
|
43019
43058
|
- **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign.
|
|
43020
43059
|
|
|
43060
|
+
**Attach shape.** Send `adSetId` (with either creative shape) to add the ads to an EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase — the way to refresh a CTWA creative without resetting delivery. The ad set then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it rather than silently dropped. The target ad set's `destination_type` must match the ad's destination (a WhatsApp ad needs a `WHATSAPP` ad set), otherwise Meta would accept an ad that never delivers.
|
|
43061
|
+
|
|
43021
43062
|
Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
43022
43063
|
security:
|
|
43023
43064
|
- bearerAuth: []
|
|
@@ -34,7 +34,7 @@ describe 'AdCampaignsApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for boost_post
|
|
36
36
|
# Boost post as ad
|
|
37
|
-
# Creates a paid ad
|
|
37
|
+
# 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` and `adSetId` are Meta-only and return 400 on other platforms.
|
|
38
38
|
# @param boost_post_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [UpdateAd200Response]
|
|
@@ -46,7 +46,7 @@ describe 'MessagingAdsApi' do
|
|
|
46
46
|
|
|
47
47
|
# unit tests for create_ctwa_ad
|
|
48
48
|
# Create Click-to-WhatsApp ad (deprecated)
|
|
49
|
-
# Deprecated: use POST /v1/ads/messaging with `destination: whatsapp`. This endpoint stays available for back-compat; no removal planned. Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
49
|
+
# Deprecated: use POST /v1/ads/messaging with `destination: whatsapp`. This endpoint stays available for back-compat; no removal planned. Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. **Attach shape.** Send `adSetId` (with either creative shape) to add the ads to an EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase — the way to refresh a CTWA creative without resetting delivery. The ad set then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `audienceId` are rejected with a 400 alongside it rather than silently dropped. The target ad set's `destination_type` must match the ad's destination (a WhatsApp ad needs a `WHATSAPP` ad set), otherwise Meta would accept an ad that never delivers. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
50
50
|
# @param ctwa_ad_request_body
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
|
52
52
|
# @return [CreateCtwaAd201Response]
|
|
@@ -67,12 +67,34 @@ describe Zernio::BoostPostRequest do
|
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
+
describe 'test attribute "ad_set_id"' do
|
|
71
|
+
it 'should work' do
|
|
72
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
70
76
|
describe 'test attribute "budget"' do
|
|
71
77
|
it 'should work' do
|
|
72
78
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
73
79
|
end
|
|
74
80
|
end
|
|
75
81
|
|
|
82
|
+
describe 'test attribute "instagram_account_id"' do
|
|
83
|
+
it 'should work' do
|
|
84
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
describe 'test attribute "destination_type"' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
91
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["INSTAGRAM_PROFILE", "WEBSITE", "ON_AD", "MESSENGER", "WHATSAPP"])
|
|
92
|
+
# validator.allowable_values.each do |value|
|
|
93
|
+
# expect { instance.destination_type = value }.not_to raise_error
|
|
94
|
+
# end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
76
98
|
describe 'test attribute "currency"' do
|
|
77
99
|
it 'should work' do
|
|
78
100
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -75,6 +75,12 @@ describe Zernio::CreateCallAdRequest do
|
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
+
describe 'test attribute "ad_set_id"' do
|
|
79
|
+
it 'should work' do
|
|
80
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
78
84
|
describe 'test attribute "budget_amount"' do
|
|
79
85
|
it 'should work' do
|
|
80
86
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -75,6 +75,12 @@ describe Zernio::CreateMessagingAdRequest do
|
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
+
describe 'test attribute "ad_set_id"' do
|
|
79
|
+
it 'should work' do
|
|
80
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
78
84
|
describe 'test attribute "budget_amount"' do
|
|
79
85
|
it 'should work' do
|
|
80
86
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -75,6 +75,12 @@ describe Zernio::CtwaAdRequestBody do
|
|
|
75
75
|
end
|
|
76
76
|
end
|
|
77
77
|
|
|
78
|
+
describe 'test attribute "ad_set_id"' do
|
|
79
|
+
it 'should work' do
|
|
80
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
78
84
|
describe 'test attribute "budget_amount"' do
|
|
79
85
|
it 'should work' do
|
|
80
86
|
# 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.696
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -5024,7 +5024,7 @@ files:
|
|
|
5024
5024
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
5025
5025
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
5026
5026
|
- spec/spec_helper.rb
|
|
5027
|
-
- zernio-sdk-0.0.
|
|
5027
|
+
- zernio-sdk-0.0.696.gem
|
|
5028
5028
|
- zernio-sdk.gemspec
|
|
5029
5029
|
homepage: https://openapi-generator.tech
|
|
5030
5030
|
licenses:
|
data/zernio-sdk-0.0.694.gem
DELETED
|
Binary file
|