late-sdk 0.0.632 → 0.0.633
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/CreateAdCampaignRequest.md +2 -2
- data/docs/CreateStandaloneAdRequest.md +3 -3
- data/docs/CreateStandaloneAdRequestTranslationsInner.md +3 -3
- data/docs/DeleteAdCampaignRequest.md +3 -1
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +2 -2
- data/lib/zernio-sdk/models/create_ad_campaign_request.rb +2 -2
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +3 -3
- data/lib/zernio-sdk/models/create_standalone_ad_request_translations_inner.rb +38 -7
- data/lib/zernio-sdk/models/delete_ad_campaign_request.rb +14 -4
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +39 -11
- data/spec/api/ad_campaigns_api_spec.rb +1 -1
- data/spec/models/delete_ad_campaign_request_spec.rb +6 -0
- data/zernio-sdk-0.0.633.gem +0 -0
- metadata +2 -2
- data/zernio-sdk-0.0.632.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: 6924835bf4e631e7f11a480af2929a627cb01930a5884c90faa3925e60289b6c
|
|
4
|
+
data.tar.gz: d330a5ff5587826b7d40878ff9184a8bc638f947128aeb13b7906368859a31fd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c377a97a879692a7fec7d902ca62152da09bd646050c7ff05036b8d466da3b94f02ee179ccca184577109b692d7fbf5c387d8874628b7312507a1cb1306f208
|
|
7
|
+
data.tar.gz: c53a0a1a0ff5998f52a4be0447c6955d12acc3b95121da38016a8366915184a67ccf3f8523bc448526c8ab2bebdfa43b04d78d8a524a86e837568f7f009c136d
|
data/docs/AdCampaignsApi.md
CHANGED
|
@@ -387,7 +387,7 @@ end
|
|
|
387
387
|
|
|
388
388
|
Delete a campaign
|
|
389
389
|
|
|
390
|
-
Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime.
|
|
390
|
+
Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would 404. That state is produced by the two-step create flow (campaign, then ads via `existingCampaignId`) whenever Meta rejects the ad step. To delete such a shell, send `accountId` in the body: we skip the local lookup entirely and forward the delete to Meta. `accountId` is ignored when the campaign does have ads.
|
|
391
391
|
|
|
392
392
|
### Examples
|
|
393
393
|
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
| **name** | **String** | | |
|
|
10
10
|
| **goal** | **String** | Mapped to the ODAX objective (same mapping as POST /v1/ads/create). | |
|
|
11
11
|
| **special_ad_categories** | **Array<String>** | | [optional] |
|
|
12
|
-
| **budget_amount** | **Float** | Campaign-level (CBO) budget in
|
|
12
|
+
| **budget_amount** | **Float** | Campaign-level (CBO) budget in WHOLE currency units (USD: 50 = $50.00), NOT cents — Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Requires budgetType. | [optional] |
|
|
13
13
|
| **budget_type** | **String** | | [optional] |
|
|
14
14
|
| **status** | **String** | | [optional][default to 'PAUSED'] |
|
|
15
|
-
| **bid_strategy** | **String** | Campaign bid strategy. Meta
|
|
15
|
+
| **bid_strategy** | **String** | Campaign bid strategy. Meta stores `bid_strategy` alongside the budget, so this REQUIRES `budgetAmount` + `budgetType` on the same request; sending it without a campaign budget is a 400. A campaign carrying a strategy without its `bid_amount` makes every ad set created under it fail with an error that names the ad set (code 100, subcode 1815857), so the bad state is rejected up front rather than accepted. To bid at ad-set level, set the strategy there instead. | [optional] |
|
|
16
16
|
| **bid_amount** | **Float** | Whole currency units (USD: 5 = $5.00). Required for LOWEST_COST_WITH_BID_CAP and COST_CAP; ignored otherwise. | [optional] |
|
|
17
17
|
| **roas_average_floor** | **Float** | Decimal ROAS multiplier (2.0 = 2.0x). Required for LOWEST_COST_WITH_MIN_ROAS. | [optional] |
|
|
18
18
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
| **rf_prediction_id** | **String** | Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id — pass that one). Requires buyingType RESERVED. | [optional] |
|
|
19
19
|
| **creative_features** | **Hash<String, String>** | Meta only. Advantage+ creative enhancements: a partial map of Meta creative feature keys (snake_case, e.g. enhance_cta, image_brightness_and_contrast, text_optimizations) to enroll status, forwarded as degrees_of_freedom_spec.creative_features_spec. Meta validates the keys; unspecified features default to OPT_OUT. The legacy standard_enhancements bundle is deprecated by Meta and rejected. | [optional] |
|
|
20
20
|
| **validate_only** | **Boolean** | Meta only, single standalone shape only (no creatives[], adSetId, or RESERVED). Dry-run: each node runs Meta's execution_options validate_only and NOTHING is created or persisted. Children need real parents, so a fresh tree validates the campaign + creative (the ad set needs its campaign to exist — pass existingCampaignId to validate it too; the ad itself is never validatable pre-create). A Meta validation failure returns the 400 verbatim; success returns 200 with per-node results instead of an ad. | [optional] |
|
|
21
|
-
| **budget_amount** | **Float** | Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType). | [optional] |
|
|
21
|
+
| **budget_amount** | **Float** | Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents — Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType). | [optional] |
|
|
22
22
|
| **budget_type** | **String** | Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads accepts lifetime only (no daily-budget concept on the platform); sending daily returns 422. OpenAI Ads lifetime budgets require `endDate` to give the lifetime cap a spend window. | [optional] |
|
|
23
23
|
| **status** | **String** | Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused and skips activation, so you can review before they spend. On TikTok the whole campaign > ad group > ad hierarchy stays paused. | [optional] |
|
|
24
24
|
| **budget_level** | **String** | Meta only. Where the budget lives, which selects the Meta budget model: - `adset` (default): ABO (Ad-set Budget Optimization). The budget is set on the ad set. This is the back-compatible behaviour — omit this field to keep it. - `campaign`: CBO (Campaign Budget Optimization / Advantage Campaign Budget). The budget AND `bidStrategy` are set on the CAMPAIGN, and Meta distributes spend across ad sets automatically. Meta requires the budget at exactly one level, never both. Non-Meta platforms ignore this field. Ignored on the attach shape (`adSetId`), which inherits the existing budget. | [optional][default to 'adset'] |
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
| **instagram_account_id** | **String** | Meta only. Override the Instagram account the ad is delivered as — pass an Instagram Business Account ID (e.g. 17841...), mapped to the creative's `instagram_user_id`. When omitted we auto-resolve the IG account linked to the connected Facebook Page (the existing default). Useful when a Page has more than one eligible IG account. | [optional] |
|
|
64
64
|
| **dynamic_creative** | [**CreateStandaloneAdRequestDynamicCreative**](CreateStandaloneAdRequestDynamicCreative.md) | | [optional] |
|
|
65
65
|
| **carousel_cards** | [**Array<CreateStandaloneAdRequestCarouselCardsInner>**](CreateStandaloneAdRequestCarouselCardsInner.md) | Meta only. Hand-built carousel: 2-10 authored cards in DETERMINISTIC order, mapped to the creative's `link_data.child_attachments`. Unlike `dynamicCreative`, you control the card order and per-card copy/link. Requires top-level `body`, `linkUrl` and `callToAction`. Mutually exclusive with `imageUrl`/`video`, `creatives[]`, `dynamicCreative`, `placementAssets`, `existingCreativeId`, `adSetId`, `leadGenFormId` and goal `catalog_sales`. | [optional] |
|
|
66
|
-
| **default_locale** | **String** | Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. | [optional] |
|
|
67
|
-
| **translations** | [**Array<CreateStandaloneAdRequestTranslationsInner>**](CreateStandaloneAdRequestTranslationsInner.md) | Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying per-locale copy and, optionally, per-locale media — the \"Languages\" toggle in Ads Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of splitting it across one ad per language. The ad's top-level copy and
|
|
66
|
+
| **default_locale** | **String** | Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in `translations`. | [optional] |
|
|
67
|
+
| **translations** | [**Array<CreateStandaloneAdRequestTranslationsInner>**](CreateStandaloneAdRequestTranslationsInner.md) | Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying per-locale copy and, optionally, per-locale media — the \"Languages\" toggle in Ads Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of splitting it across one ad per language. The ad's top-level copy is the DEFAULT shown to every locale you do NOT list, and it counts as one of the language variants. IMPORTANT, and the opposite of what you might expect: text does NOT inherit. Every entry must carry its own `headline`, `body` AND `description`, and all of them must be DISTINCT from each other and from the ad's top-level copy. Meta deduplicates identical strings inside the asset feed, so two locales sharing a string collapse into one asset and the create fails with a misleading \"Too few ... texts provided in asset creation\" (subcode 1885817) that names a field which is actually present. We validate this before calling Meta and return a 400 naming the offending locale and field. `description` is therefore effectively required on the ad whenever `translations` is present, even though it is optional otherwise. Do NOT list `defaultLocale` inside `translations`: Meta rejects the duplicate with \"The language asset feed includes an unsupported targeting field\" (subcode 1885985). Media DOES inherit and is uploaded once when shared. Note that Meta enforces Dynamic Creative image dimensions on language feeds, so an `imageUrl` that works on a normal ad may be rejected with \"The following images have invalid dimensions for Dynamic Creative\" (subcode 1885558). Video is not affected. Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and `existingCreativeId` — Meta allows one `asset_feed_spec` shape per creative. | [optional] |
|
|
68
68
|
| **placement_assets** | [**CreateStandaloneAdRequestPlacementAssets**](CreateStandaloneAdRequestPlacementAssets.md) | | [optional] |
|
|
69
69
|
| **audience_id** | **String** | Custom audience ID for targeting | [optional] |
|
|
70
70
|
| **campaign_type** | **String** | Google only | [optional][default to 'display'] |
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **locale** | **String** | Language code, resolved to Meta's numeric locale id. Bare codes target the '(All)' umbrella (`es` = every Spanish variant); region-qualified codes target the variant (`pt_BR`, `en_GB`). | |
|
|
8
|
-
| **headline** | **String** | Headline for this language.
|
|
9
|
-
| **body** | **String** | Primary text for this language.
|
|
10
|
-
| **description** | **String** | Link description for this language.
|
|
8
|
+
| **headline** | **String** | Headline for this language. REQUIRED, and must differ from every other locale and from the ad's top-level headline. | |
|
|
9
|
+
| **body** | **String** | Primary text for this language. REQUIRED, and must differ from every other locale and from the ad's top-level body. | |
|
|
10
|
+
| **description** | **String** | Link description for this language. REQUIRED, and must differ from every other locale and from the ad's top-level description. | |
|
|
11
11
|
| **image_url** | **String** | Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video. | [optional] |
|
|
12
12
|
| **video_url** | **String** | Video for this language. Inherits the ad's `video.url` when omitted. The feed is all-image OR all-video. | [optional] |
|
|
13
13
|
| **thumbnail_url** | **String** | Poster frame for this language's video. | [optional] |
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **platform** | **String** | | |
|
|
8
|
+
| **account_id** | **String** | Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from. | [optional] |
|
|
8
9
|
|
|
9
10
|
## Example
|
|
10
11
|
|
|
@@ -12,7 +13,8 @@
|
|
|
12
13
|
require 'zernio-sdk'
|
|
13
14
|
|
|
14
15
|
instance = Zernio::DeleteAdCampaignRequest.new(
|
|
15
|
-
platform: null
|
|
16
|
+
platform: null,
|
|
17
|
+
account_id: null
|
|
16
18
|
)
|
|
17
19
|
```
|
|
18
20
|
|
|
@@ -369,7 +369,7 @@ module Zernio
|
|
|
369
369
|
end
|
|
370
370
|
|
|
371
371
|
# Delete a campaign
|
|
372
|
-
# Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime.
|
|
372
|
+
# Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would 404. That state is produced by the two-step create flow (campaign, then ads via `existingCampaignId`) whenever Meta rejects the ad step. To delete such a shell, send `accountId` in the body: we skip the local lookup entirely and forward the delete to Meta. `accountId` is ignored when the campaign does have ads.
|
|
373
373
|
# @param campaign_id [String] Platform campaign ID
|
|
374
374
|
# @param delete_ad_campaign_request [DeleteAdCampaignRequest]
|
|
375
375
|
# @param [Hash] opts the optional parameters
|
|
@@ -380,7 +380,7 @@ module Zernio
|
|
|
380
380
|
end
|
|
381
381
|
|
|
382
382
|
# Delete a campaign
|
|
383
|
-
# Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime.
|
|
383
|
+
# Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would 404. That state is produced by the two-step create flow (campaign, then ads via `existingCampaignId`) whenever Meta rejects the ad step. To delete such a shell, send `accountId` in the body: we skip the local lookup entirely and forward the delete to Meta. `accountId` is ignored when the campaign does have ads.
|
|
384
384
|
# @param campaign_id [String] Platform campaign ID
|
|
385
385
|
# @param delete_ad_campaign_request [DeleteAdCampaignRequest]
|
|
386
386
|
# @param [Hash] opts the optional parameters
|
|
@@ -28,14 +28,14 @@ module Zernio
|
|
|
28
28
|
|
|
29
29
|
attr_accessor :special_ad_categories
|
|
30
30
|
|
|
31
|
-
# Campaign-level (CBO) budget in
|
|
31
|
+
# Campaign-level (CBO) budget in WHOLE currency units (USD: 50 = $50.00), NOT cents — Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Requires budgetType.
|
|
32
32
|
attr_accessor :budget_amount
|
|
33
33
|
|
|
34
34
|
attr_accessor :budget_type
|
|
35
35
|
|
|
36
36
|
attr_accessor :status
|
|
37
37
|
|
|
38
|
-
# Campaign bid strategy. Meta
|
|
38
|
+
# Campaign bid strategy. Meta stores `bid_strategy` alongside the budget, so this REQUIRES `budgetAmount` + `budgetType` on the same request; sending it without a campaign budget is a 400. A campaign carrying a strategy without its `bid_amount` makes every ad set created under it fail with an error that names the ad set (code 100, subcode 1815857), so the bad state is rejected up front rather than accepted. To bid at ad-set level, set the strategy there instead.
|
|
39
39
|
attr_accessor :bid_strategy
|
|
40
40
|
|
|
41
41
|
# Whole currency units (USD: 5 = $5.00). Required for LOWEST_COST_WITH_BID_CAP and COST_CAP; ignored otherwise.
|
|
@@ -53,7 +53,7 @@ module Zernio
|
|
|
53
53
|
# Meta only, single standalone shape only (no creatives[], adSetId, or RESERVED). Dry-run: each node runs Meta's execution_options validate_only and NOTHING is created or persisted. Children need real parents, so a fresh tree validates the campaign + creative (the ad set needs its campaign to exist — pass existingCampaignId to validate it too; the ad itself is never validatable pre-create). A Meta validation failure returns the 400 verbatim; success returns 200 with per-node results instead of an ad.
|
|
54
54
|
attr_accessor :validate_only
|
|
55
55
|
|
|
56
|
-
# Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
|
|
56
|
+
# Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents — Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType).
|
|
57
57
|
attr_accessor :budget_amount
|
|
58
58
|
|
|
59
59
|
# Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads accepts lifetime only (no daily-budget concept on the platform); sending daily returns 422. OpenAI Ads lifetime budgets require `endDate` to give the lifetime cap a spend window.
|
|
@@ -181,10 +181,10 @@ module Zernio
|
|
|
181
181
|
# Meta only. Hand-built carousel: 2-10 authored cards in DETERMINISTIC order, mapped to the creative's `link_data.child_attachments`. Unlike `dynamicCreative`, you control the card order and per-card copy/link. Requires top-level `body`, `linkUrl` and `callToAction`. Mutually exclusive with `imageUrl`/`video`, `creatives[]`, `dynamicCreative`, `placementAssets`, `existingCreativeId`, `adSetId`, `leadGenFormId` and goal `catalog_sales`.
|
|
182
182
|
attr_accessor :carousel_cards
|
|
183
183
|
|
|
184
|
-
# Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own.
|
|
184
|
+
# Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in `translations`.
|
|
185
185
|
attr_accessor :default_locale
|
|
186
186
|
|
|
187
|
-
# Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying per-locale copy and, optionally, per-locale media — the \"Languages\" toggle in Ads Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of splitting it across one ad per language. The ad's top-level copy and
|
|
187
|
+
# Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying per-locale copy and, optionally, per-locale media — the \"Languages\" toggle in Ads Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of splitting it across one ad per language. The ad's top-level copy is the DEFAULT shown to every locale you do NOT list, and it counts as one of the language variants. IMPORTANT, and the opposite of what you might expect: text does NOT inherit. Every entry must carry its own `headline`, `body` AND `description`, and all of them must be DISTINCT from each other and from the ad's top-level copy. Meta deduplicates identical strings inside the asset feed, so two locales sharing a string collapse into one asset and the create fails with a misleading \"Too few ... texts provided in asset creation\" (subcode 1885817) that names a field which is actually present. We validate this before calling Meta and return a 400 naming the offending locale and field. `description` is therefore effectively required on the ad whenever `translations` is present, even though it is optional otherwise. Do NOT list `defaultLocale` inside `translations`: Meta rejects the duplicate with \"The language asset feed includes an unsupported targeting field\" (subcode 1885985). Media DOES inherit and is uploaded once when shared. Note that Meta enforces Dynamic Creative image dimensions on language feeds, so an `imageUrl` that works on a normal ad may be rejected with \"The following images have invalid dimensions for Dynamic Creative\" (subcode 1885558). Video is not affected. Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and `existingCreativeId` — Meta allows one `asset_feed_spec` shape per creative.
|
|
188
188
|
attr_accessor :translations
|
|
189
189
|
|
|
190
190
|
attr_accessor :placement_assets
|
|
@@ -18,13 +18,13 @@ module Zernio
|
|
|
18
18
|
# Language code, resolved to Meta's numeric locale id. Bare codes target the '(All)' umbrella (`es` = every Spanish variant); region-qualified codes target the variant (`pt_BR`, `en_GB`).
|
|
19
19
|
attr_accessor :locale
|
|
20
20
|
|
|
21
|
-
# Headline for this language.
|
|
21
|
+
# Headline for this language. REQUIRED, and must differ from every other locale and from the ad's top-level headline.
|
|
22
22
|
attr_accessor :headline
|
|
23
23
|
|
|
24
|
-
# Primary text for this language.
|
|
24
|
+
# Primary text for this language. REQUIRED, and must differ from every other locale and from the ad's top-level body.
|
|
25
25
|
attr_accessor :body
|
|
26
26
|
|
|
27
|
-
# Link description for this language.
|
|
27
|
+
# Link description for this language. REQUIRED, and must differ from every other locale and from the ad's top-level description.
|
|
28
28
|
attr_accessor :description
|
|
29
29
|
|
|
30
30
|
# Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video.
|
|
@@ -102,14 +102,20 @@ module Zernio
|
|
|
102
102
|
|
|
103
103
|
if attributes.key?(:'headline')
|
|
104
104
|
self.headline = attributes[:'headline']
|
|
105
|
+
else
|
|
106
|
+
self.headline = nil
|
|
105
107
|
end
|
|
106
108
|
|
|
107
109
|
if attributes.key?(:'body')
|
|
108
110
|
self.body = attributes[:'body']
|
|
111
|
+
else
|
|
112
|
+
self.body = nil
|
|
109
113
|
end
|
|
110
114
|
|
|
111
115
|
if attributes.key?(:'description')
|
|
112
116
|
self.description = attributes[:'description']
|
|
117
|
+
else
|
|
118
|
+
self.description = nil
|
|
113
119
|
end
|
|
114
120
|
|
|
115
121
|
if attributes.key?(:'image_url')
|
|
@@ -134,11 +140,23 @@ module Zernio
|
|
|
134
140
|
invalid_properties.push('invalid value for "locale", locale cannot be nil.')
|
|
135
141
|
end
|
|
136
142
|
|
|
137
|
-
if
|
|
143
|
+
if @headline.nil?
|
|
144
|
+
invalid_properties.push('invalid value for "headline", headline cannot be nil.')
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
if @headline.to_s.length > 255
|
|
138
148
|
invalid_properties.push('invalid value for "headline", the character length must be smaller than or equal to 255.')
|
|
139
149
|
end
|
|
140
150
|
|
|
141
|
-
if
|
|
151
|
+
if @body.nil?
|
|
152
|
+
invalid_properties.push('invalid value for "body", body cannot be nil.')
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
if @description.nil?
|
|
156
|
+
invalid_properties.push('invalid value for "description", description cannot be nil.')
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
if @description.to_s.length > 255
|
|
142
160
|
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 255.')
|
|
143
161
|
end
|
|
144
162
|
|
|
@@ -150,8 +168,11 @@ module Zernio
|
|
|
150
168
|
def valid?
|
|
151
169
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
152
170
|
return false if @locale.nil?
|
|
153
|
-
return false if
|
|
154
|
-
return false if
|
|
171
|
+
return false if @headline.nil?
|
|
172
|
+
return false if @headline.to_s.length > 255
|
|
173
|
+
return false if @body.nil?
|
|
174
|
+
return false if @description.nil?
|
|
175
|
+
return false if @description.to_s.length > 255
|
|
155
176
|
true
|
|
156
177
|
end
|
|
157
178
|
|
|
@@ -179,6 +200,16 @@ module Zernio
|
|
|
179
200
|
@headline = headline
|
|
180
201
|
end
|
|
181
202
|
|
|
203
|
+
# Custom attribute writer method with validation
|
|
204
|
+
# @param [Object] body Value to be assigned
|
|
205
|
+
def body=(body)
|
|
206
|
+
if body.nil?
|
|
207
|
+
fail ArgumentError, 'body cannot be nil'
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
@body = body
|
|
211
|
+
end
|
|
212
|
+
|
|
182
213
|
# Custom attribute writer method with validation
|
|
183
214
|
# @param [Object] description Value to be assigned
|
|
184
215
|
def description=(description)
|
|
@@ -17,6 +17,9 @@ module Zernio
|
|
|
17
17
|
class DeleteAdCampaignRequest < ApiModelBase
|
|
18
18
|
attr_accessor :platform
|
|
19
19
|
|
|
20
|
+
# Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from.
|
|
21
|
+
attr_accessor :account_id
|
|
22
|
+
|
|
20
23
|
class EnumAttributeValidator
|
|
21
24
|
attr_reader :datatype
|
|
22
25
|
attr_reader :allowable_values
|
|
@@ -42,7 +45,8 @@ module Zernio
|
|
|
42
45
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
46
|
def self.attribute_map
|
|
44
47
|
{
|
|
45
|
-
:'platform' => :'platform'
|
|
48
|
+
:'platform' => :'platform',
|
|
49
|
+
:'account_id' => :'accountId'
|
|
46
50
|
}
|
|
47
51
|
end
|
|
48
52
|
|
|
@@ -59,7 +63,8 @@ module Zernio
|
|
|
59
63
|
# Attribute type mapping.
|
|
60
64
|
def self.openapi_types
|
|
61
65
|
{
|
|
62
|
-
:'platform' => :'String'
|
|
66
|
+
:'platform' => :'String',
|
|
67
|
+
:'account_id' => :'String'
|
|
63
68
|
}
|
|
64
69
|
end
|
|
65
70
|
|
|
@@ -90,6 +95,10 @@ module Zernio
|
|
|
90
95
|
else
|
|
91
96
|
self.platform = nil
|
|
92
97
|
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'account_id')
|
|
100
|
+
self.account_id = attributes[:'account_id']
|
|
101
|
+
end
|
|
93
102
|
end
|
|
94
103
|
|
|
95
104
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -129,7 +138,8 @@ module Zernio
|
|
|
129
138
|
def ==(o)
|
|
130
139
|
return true if self.equal?(o)
|
|
131
140
|
self.class == o.class &&
|
|
132
|
-
platform == o.platform
|
|
141
|
+
platform == o.platform &&
|
|
142
|
+
account_id == o.account_id
|
|
133
143
|
end
|
|
134
144
|
|
|
135
145
|
# @see the `==` method
|
|
@@ -141,7 +151,7 @@ module Zernio
|
|
|
141
151
|
# Calculates hash code according to all attributes.
|
|
142
152
|
# @return [Integer] Hash code
|
|
143
153
|
def hash
|
|
144
|
-
[platform].hash
|
|
154
|
+
[platform, account_id].hash
|
|
145
155
|
end
|
|
146
156
|
|
|
147
157
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -34982,13 +34982,13 @@ paths:
|
|
|
34982
34982
|
specialAdCategories:
|
|
34983
34983
|
type: array
|
|
34984
34984
|
items: { type: string, enum: [HOUSING, EMPLOYMENT, CREDIT, ISSUES_ELECTIONS_POLITICS, FINANCIAL_PRODUCTS_SERVICES, ONLINE_GAMBLING_AND_GAMING] }
|
|
34985
|
-
budgetAmount: { type: number, description: "Campaign-level (CBO) budget in
|
|
34985
|
+
budgetAmount: { type: number, description: "Campaign-level (CBO) budget in WHOLE currency units (USD: 50 = $50.00), NOT cents — Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Requires budgetType." }
|
|
34986
34986
|
budgetType: { type: string, enum: [daily, lifetime] }
|
|
34987
34987
|
status: { type: string, enum: [ACTIVE, PAUSED], default: PAUSED }
|
|
34988
34988
|
bidStrategy:
|
|
34989
34989
|
type: string
|
|
34990
34990
|
enum: [LOWEST_COST_WITHOUT_CAP, LOWEST_COST_WITH_BID_CAP, COST_CAP, LOWEST_COST_WITH_MIN_ROAS]
|
|
34991
|
-
description: "Campaign bid strategy. Meta
|
|
34991
|
+
description: "Campaign bid strategy. Meta stores `bid_strategy` alongside the budget, so this REQUIRES `budgetAmount` + `budgetType` on the same request; sending it without a campaign budget is a 400. A campaign carrying a strategy without its `bid_amount` makes every ad set created under it fail with an error that names the ad set (code 100, subcode 1815857), so the bad state is rejected up front rather than accepted. To bid at ad-set level, set the strategy there instead."
|
|
34992
34992
|
bidAmount: { type: number, description: "Whole currency units (USD: 5 = $5.00). Required for LOWEST_COST_WITH_BID_CAP and COST_CAP; ignored otherwise." }
|
|
34993
34993
|
roasAverageFloor: { type: number, description: "Decimal ROAS multiplier (2.0 = 2.0x). Required for LOWEST_COST_WITH_MIN_ROAS." }
|
|
34994
34994
|
responses:
|
|
@@ -35128,6 +35128,14 @@ paths:
|
|
|
35128
35128
|
|
|
35129
35129
|
Meta-only for now. Other platforms return 501 Not Implemented — fall
|
|
35130
35130
|
back to DELETE /v1/ads/{adId} per ad in the meantime.
|
|
35131
|
+
|
|
35132
|
+
**Empty campaigns.** A campaign with zero ads has no local Ad documents
|
|
35133
|
+
to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would
|
|
35134
|
+
404. That state is produced by the two-step create flow (campaign, then
|
|
35135
|
+
ads via `existingCampaignId`) whenever Meta rejects the ad step. To
|
|
35136
|
+
delete such a shell, send `accountId` in the body: we skip the local
|
|
35137
|
+
lookup entirely and forward the delete to Meta. `accountId` is ignored
|
|
35138
|
+
when the campaign does have ads.
|
|
35131
35139
|
security:
|
|
35132
35140
|
- bearerAuth: []
|
|
35133
35141
|
parameters:
|
|
@@ -35141,6 +35149,7 @@ paths:
|
|
|
35141
35149
|
required: [platform]
|
|
35142
35150
|
properties:
|
|
35143
35151
|
platform: { type: string, enum: [facebook, instagram] }
|
|
35152
|
+
accountId: { type: string, description: "Zernio SocialAccount id owning the ad account. Required only to delete an EMPTY campaign (zero ads), which has no local Ad documents to resolve a token from." }
|
|
35144
35153
|
responses:
|
|
35145
35154
|
'200':
|
|
35146
35155
|
description: Campaign deleted
|
|
@@ -37751,7 +37760,7 @@ paths:
|
|
|
37751
37760
|
validateOnly:
|
|
37752
37761
|
type: boolean
|
|
37753
37762
|
description: 'Meta only, single standalone shape only (no creatives[], adSetId, or RESERVED). Dry-run: each node runs Meta''s execution_options validate_only and NOTHING is created or persisted. Children need real parents, so a fresh tree validates the campaign + creative (the ad set needs its campaign to exist — pass existingCampaignId to validate it too; the ad itself is never validatable pre-create). A Meta validation failure returns the 400 verbatim; success returns 200 with per-node results instead of an ad.'
|
|
37754
|
-
budgetAmount: { type: number, description: "Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType)." }
|
|
37763
|
+
budgetAmount: { type: number, description: "Budget in WHOLE currency units (USD: 50 = $50.00), NOT cents — Meta's own Marketing API takes this same number in minor units, so it is an easy and expensive mix-up. Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads requires a $1 minimum (its budget is lifetime-only, see budgetType)." }
|
|
37755
37764
|
budgetType: { type: string, enum: [daily, lifetime], description: "Required on legacy + multi-creative shapes. Inherited on attach. OpenAI Ads accepts lifetime only (no daily-budget concept on the platform); sending daily returns 422. OpenAI Ads lifetime budgets require `endDate` to give the lifetime cap a spend window." }
|
|
37756
37765
|
status:
|
|
37757
37766
|
type: string
|
|
@@ -38123,7 +38132,7 @@ paths:
|
|
|
38123
38132
|
callToAction: { type: string, description: "Card CTA override. Defaults to the top-level callToAction; same enum." }
|
|
38124
38133
|
defaultLocale:
|
|
38125
38134
|
type: string
|
|
38126
|
-
description: "Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own."
|
|
38135
|
+
description: "Meta only. Language the top-level copy is written in (e.g. `en`, `pt_BR`), used by the `translations` default rule. Defaults to `en`. Meta rejects a language asset feed whose default rule carries no locales of its own. Must NOT also appear as an entry in `translations`."
|
|
38127
38136
|
translations:
|
|
38128
38137
|
type: array
|
|
38129
38138
|
minItems: 1
|
|
@@ -38134,20 +38143,39 @@ paths:
|
|
|
38134
38143
|
Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of
|
|
38135
38144
|
splitting it across one ad per language.
|
|
38136
38145
|
|
|
38137
|
-
The ad's top-level copy
|
|
38138
|
-
|
|
38139
|
-
|
|
38146
|
+
The ad's top-level copy is the DEFAULT shown to every locale you do NOT list,
|
|
38147
|
+
and it counts as one of the language variants.
|
|
38148
|
+
|
|
38149
|
+
IMPORTANT, and the opposite of what you might expect: text does NOT inherit.
|
|
38150
|
+
Every entry must carry its own `headline`, `body` AND `description`, and all of
|
|
38151
|
+
them must be DISTINCT from each other and from the ad's top-level copy. Meta
|
|
38152
|
+
deduplicates identical strings inside the asset feed, so two locales sharing a
|
|
38153
|
+
string collapse into one asset and the create fails with a misleading "Too few
|
|
38154
|
+
... texts provided in asset creation" (subcode 1885817) that names a field which
|
|
38155
|
+
is actually present. We validate this before calling Meta and return a 400
|
|
38156
|
+
naming the offending locale and field. `description` is therefore effectively
|
|
38157
|
+
required on the ad whenever `translations` is present, even though it is
|
|
38158
|
+
optional otherwise.
|
|
38159
|
+
|
|
38160
|
+
Do NOT list `defaultLocale` inside `translations`: Meta rejects the duplicate
|
|
38161
|
+
with "The language asset feed includes an unsupported targeting field"
|
|
38162
|
+
(subcode 1885985).
|
|
38163
|
+
|
|
38164
|
+
Media DOES inherit and is uploaded once when shared. Note that Meta enforces
|
|
38165
|
+
Dynamic Creative image dimensions on language feeds, so an `imageUrl` that
|
|
38166
|
+
works on a normal ad may be rejected with "The following images have invalid
|
|
38167
|
+
dimensions for Dynamic Creative" (subcode 1885558). Video is not affected.
|
|
38140
38168
|
|
|
38141
38169
|
Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards` and
|
|
38142
38170
|
`existingCreativeId` — Meta allows one `asset_feed_spec` shape per creative.
|
|
38143
38171
|
items:
|
|
38144
38172
|
type: object
|
|
38145
|
-
required: [locale]
|
|
38173
|
+
required: [locale, headline, body, description]
|
|
38146
38174
|
properties:
|
|
38147
38175
|
locale: { type: string, description: "Language code, resolved to Meta's numeric locale id. Bare codes target the '(All)' umbrella (`es` = every Spanish variant); region-qualified codes target the variant (`pt_BR`, `en_GB`)." }
|
|
38148
|
-
headline: { type: string, maxLength: 255, description: "Headline for this language.
|
|
38149
|
-
body: { type: string, description: "Primary text for this language.
|
|
38150
|
-
description: { type: string, maxLength: 255, description: "Link description for this language.
|
|
38176
|
+
headline: { type: string, maxLength: 255, description: "Headline for this language. REQUIRED, and must differ from every other locale and from the ad's top-level headline." }
|
|
38177
|
+
body: { type: string, description: "Primary text for this language. REQUIRED, and must differ from every other locale and from the ad's top-level body." }
|
|
38178
|
+
description: { type: string, maxLength: 255, description: "Link description for this language. REQUIRED, and must differ from every other locale and from the ad's top-level description." }
|
|
38151
38179
|
imageUrl: { type: string, format: uri, description: "Image for this language. Inherits the ad's `imageUrl` when omitted. The feed is all-image OR all-video." }
|
|
38152
38180
|
videoUrl: { type: string, format: uri, description: "Video for this language. Inherits the ad's `video.url` when omitted. The feed is all-image OR all-video." }
|
|
38153
38181
|
thumbnailUrl: { type: string, format: uri, description: "Poster frame for this language's video." }
|
|
@@ -96,7 +96,7 @@ describe 'AdCampaignsApi' do
|
|
|
96
96
|
|
|
97
97
|
# unit tests for delete_ad_campaign
|
|
98
98
|
# Delete a campaign
|
|
99
|
-
# Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime.
|
|
99
|
+
# Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would 404. That state is produced by the two-step create flow (campaign, then ads via `existingCampaignId`) whenever Meta rejects the ad step. To delete such a shell, send `accountId` in the body: we skip the local lookup entirely and forward the delete to Meta. `accountId` is ignored when the campaign does have ads.
|
|
100
100
|
# @param campaign_id Platform campaign ID
|
|
101
101
|
# @param delete_ad_campaign_request
|
|
102
102
|
# @param [Hash] opts the optional parameters
|
|
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.633
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -4919,7 +4919,7 @@ files:
|
|
|
4919
4919
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
4920
4920
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
4921
4921
|
- spec/spec_helper.rb
|
|
4922
|
-
- zernio-sdk-0.0.
|
|
4922
|
+
- zernio-sdk-0.0.633.gem
|
|
4923
4923
|
- zernio-sdk.gemspec
|
|
4924
4924
|
homepage: https://openapi-generator.tech
|
|
4925
4925
|
licenses:
|
data/zernio-sdk-0.0.632.gem
DELETED
|
Binary file
|