late-sdk 0.0.1283 → 0.0.1285

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39b14622af03ee4eeb244156f67762949992b46d36b358826931372d9bafdeb5
4
- data.tar.gz: e336a4a6b2fd24434b3fac0d45994fa914f37b3c9407dcaf90654d42954bca19
3
+ metadata.gz: 5c3637115d1c551cd979c24d0cb8defa841fb2d83d12e480b91223fed307c2a7
4
+ data.tar.gz: 989643e8d1e533de31a3b5d3eda791751076c503ffb83278f1aa963380a4680a
5
5
  SHA512:
6
- metadata.gz: 3536d38b25916151468dc511ac84d17059a5d03262742d20c2a129159cf92e57b659a7c48fcb18fa09850be44b0254e302a352d13bb96edfdb40d2ff533428f1
7
- data.tar.gz: 4cec9c588f5e36b0b227766354e7b1d3cb151fdc956e0307337c13ee39ab15048e2d2bca65d35a1462687669a47c31fea805ff30f06002d450dfc8794276a945
6
+ metadata.gz: a30eced2fe2b15932897b2e870619f79cf366b929994c1a651e5242a51a6fe1e13f943f33d222159d44c85613448195f8bb41fd21e4601d60200d9552e224898
7
+ data.tar.gz: 1770da9f2dfceac69f56e81f43a78add6e249db5c3e14daca198f123670c32e638cd2932d6037939493d80f463dc7f1a2fd070387cd3018bd71570c3df04e84c
@@ -23,7 +23,7 @@
23
23
  | **video** | [**CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md) | | [optional] |
24
24
  | **welcome_message** | [**CtwaAdRequestBodyWelcomeMessage**](CtwaAdRequestBodyWelcomeMessage.md) | | [optional] |
25
25
  | **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`): setting both is a 400, unlike `POST /v1/ads/create` where the top-level fields are silently ignored in multi-creative mode. Each entry supplies headline, body, and image/video, or a platformPostId or objectStoryId reference. Fresh and existing creatives can be mixed. | [optional] |
26
- | **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`, `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`, `existingCampaignId`, the special ad category fields and every targeting field except `ageMin`, `ageMax`, `placements` and `advantageAudience` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
26
+ | **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`, `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`, `adSetStatus`, `existingCampaignId`, the special ad category fields and every targeting field except `ageMin`, `ageMax`, `placements` and `advantageAudience` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
27
27
  | **existing_campaign_id** | **String** | Create the new messaging ad set (and its ads) under this EXISTING Meta campaign instead of a new one, e.g. several audience ad sets under one campaign. The campaign's objective must be OUTCOME_ENGAGEMENT, OUTCOME_SALES or OUTCOME_LEADS (400 otherwise). If the campaign has a campaign budget, omit `budgetAmount` and `budgetType` (400 if sent); otherwise they are required and land on the new ad set. `objective`, `campaignName`, `campaignStatus`, `budgetLevel`, `specialAdCategories`, `specialAdCategoryCountry` and `adSetId` are rejected alongside it. To add ads to an existing ad set instead, use `adSetId`. | [optional] |
28
28
  | **budget_level** | **String** | Where the budget lives. `adset` (default) puts it on the new ad set. `campaign` creates an Advantage campaign budget (CBO): the budget and bid strategy sit on the campaign and the ad set inherits them, same as POST /v1/ads/create. Not allowed with `adSetId` or `existingCampaignId`. | [optional] |
29
29
  | **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 (the ad set owns it) or `existingCampaignId` names a campaign with a campaign budget. | [optional] |
@@ -66,6 +66,8 @@
66
66
  | **objective** | **String** | Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require additional account configuration (Dataset linked to the WABA for sales) and may be rejected by Meta if missing. | [optional] |
67
67
  | **status** | **String** | Defaults to `ACTIVE`. `PAUSED` pauses only the top-most object this call creates: the new campaign (ad set and ads switched on), or, with `adSetId`, the new ads themselves. | [optional] |
68
68
  | **campaign_status** | **String** | Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `status`. `PAUSED` holds the new campaign off while the ad set and ads switch on (one resume call brings the whole hierarchy live); `ACTIVE` with `status: PAUSED` switches the campaign on and pauses the new ad set instead. Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign). | [optional] |
69
+ | **ad_set_status** | **String** | Ad-set-level status, same semantics as `POST /v1/ads/create`. Sets the new ad set's switch alone and overrides `status` for it. A level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level, and `status: PAUSED` adds a hold of its own only when none of them is PAUSED. Rejected with a 400 alongside `adSetId` (that ad set already exists). | [optional] |
70
+ | **ad_status** | **String** | Ad-level status, same semantics as `POST /v1/ads/create`. Sets the new ads' switch and overrides `status` for them, also with `adSetId`. Send `campaignStatus`, `adSetStatus` and `adStatus` all PAUSED to create every object paused. | [optional] |
69
71
  | **bid_strategy** | **String** | Meta bid strategy applied to the shared ad set. Defaults to `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted. `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires `roasAverageFloor`. CTWA's `optimization_goal` is fixed to `CONVERSATIONS`, but the bid strategy is independent. | [optional] |
70
72
  | **bid_amount** | **Float** | Whole currency units (e.g. `5` = $5.00 on a USD account). Required when `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`; rejected otherwise. | [optional] |
71
73
  | **roas_average_floor** | **Float** | Decimal ROAS multiplier (e.g. `2.0` = 2.0× ROAS floor). Required when `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`; rejected otherwise. Meta enforces its own upper bound server-side. | [optional] |
@@ -144,6 +146,8 @@ instance = Zernio::CreateCallAdRequest.new(
144
146
  objective: null,
145
147
  status: null,
146
148
  campaign_status: null,
149
+ ad_set_status: null,
150
+ ad_status: null,
147
151
  bid_strategy: null,
148
152
  bid_amount: null,
149
153
  roas_average_floor: null,
@@ -23,7 +23,7 @@
23
23
  | **video** | [**CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md) | | [optional] |
24
24
  | **welcome_message** | [**CtwaAdRequestBodyWelcomeMessage**](CtwaAdRequestBodyWelcomeMessage.md) | | [optional] |
25
25
  | **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`): setting both is a 400, unlike `POST /v1/ads/create` where the top-level fields are silently ignored in multi-creative mode. Each entry supplies headline, body, and image/video, or a platformPostId or objectStoryId reference. Fresh and existing creatives can be mixed. | [optional] |
26
- | **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`, `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`, `existingCampaignId`, the special ad category fields and every targeting field except `ageMin`, `ageMax`, `placements` and `advantageAudience` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
26
+ | **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`, `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`, `adSetStatus`, `existingCampaignId`, the special ad category fields and every targeting field except `ageMin`, `ageMax`, `placements` and `advantageAudience` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
27
27
  | **existing_campaign_id** | **String** | Create the new messaging ad set (and its ads) under this EXISTING Meta campaign instead of a new one, e.g. several audience ad sets under one campaign. The campaign's objective must be OUTCOME_ENGAGEMENT, OUTCOME_SALES or OUTCOME_LEADS (400 otherwise). If the campaign has a campaign budget, omit `budgetAmount` and `budgetType` (400 if sent); otherwise they are required and land on the new ad set. `objective`, `campaignName`, `campaignStatus`, `budgetLevel`, `specialAdCategories`, `specialAdCategoryCountry` and `adSetId` are rejected alongside it. To add ads to an existing ad set instead, use `adSetId`. | [optional] |
28
28
  | **budget_level** | **String** | Where the budget lives. `adset` (default) puts it on the new ad set. `campaign` creates an Advantage campaign budget (CBO): the budget and bid strategy sit on the campaign and the ad set inherits them, same as POST /v1/ads/create. Not allowed with `adSetId` or `existingCampaignId`. | [optional] |
29
29
  | **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 (the ad set owns it) or `existingCampaignId` names a campaign with a campaign budget. | [optional] |
@@ -66,6 +66,8 @@
66
66
  | **objective** | **String** | Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require additional account configuration (Dataset linked to the WABA for sales) and may be rejected by Meta if missing. | [optional] |
67
67
  | **status** | **String** | Defaults to `ACTIVE`. `PAUSED` pauses only the top-most object this call creates: the new campaign (ad set and ads switched on), or, with `adSetId`, the new ads themselves. | [optional] |
68
68
  | **campaign_status** | **String** | Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `status`. `PAUSED` holds the new campaign off while the ad set and ads switch on (one resume call brings the whole hierarchy live); `ACTIVE` with `status: PAUSED` switches the campaign on and pauses the new ad set instead. Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign). | [optional] |
69
+ | **ad_set_status** | **String** | Ad-set-level status, same semantics as `POST /v1/ads/create`. Sets the new ad set's switch alone and overrides `status` for it. A level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level, and `status: PAUSED` adds a hold of its own only when none of them is PAUSED. Rejected with a 400 alongside `adSetId` (that ad set already exists). | [optional] |
70
+ | **ad_status** | **String** | Ad-level status, same semantics as `POST /v1/ads/create`. Sets the new ads' switch and overrides `status` for them, also with `adSetId`. Send `campaignStatus`, `adSetStatus` and `adStatus` all PAUSED to create every object paused. | [optional] |
69
71
  | **bid_strategy** | **String** | Meta bid strategy applied to the shared ad set. Defaults to `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted. `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires `roasAverageFloor`. CTWA's `optimization_goal` is fixed to `CONVERSATIONS`, but the bid strategy is independent. | [optional] |
70
72
  | **bid_amount** | **Float** | Whole currency units (e.g. `5` = $5.00 on a USD account). Required when `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`; rejected otherwise. | [optional] |
71
73
  | **roas_average_floor** | **Float** | Decimal ROAS multiplier (e.g. `2.0` = 2.0× ROAS floor). Required when `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`; rejected otherwise. Meta enforces its own upper bound server-side. | [optional] |
@@ -146,6 +148,8 @@ instance = Zernio::CreateMessagingAdRequest.new(
146
148
  objective: null,
147
149
  status: null,
148
150
  campaign_status: null,
151
+ ad_set_status: null,
152
+ ad_status: null,
149
153
  bid_strategy: null,
150
154
  bid_amount: null,
151
155
  roas_average_floor: null,
@@ -24,8 +24,10 @@
24
24
  | **validate_only** | **Boolean** | Google Performance Max validates the complete atomic campaign and asset group with no resource creation or local persistence. Google validation still downloads image URLs and consumes quota. On Meta, validates the complete inline campaign, ad set, creative and ad with execution_options validate_only. Nothing is uploaded or created, and validation bypasses Idempotency-Key storage. Supports a single image, all-image placementAssets with per-rule copy, existing video.id or existingCreativeId; other media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Placement validation uses existing Instagram identities only. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error. ChatGPT (OpenAI) has no platform dry-run: Zernio runs every check it knows (creative lengths, budget, bid strategy, targeting) plus live lookups of the conversion event and target countries, and uploads or creates nothing. OpenAI's own write-time checks (image fetch, currency-specific minimums, ad review) still run only on a real create. Any other platform, or a Google campaignType other than pmax or demand_gen, returns 501 `feature_not_available`. | [optional] |
25
25
  | **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 and Performance Max shapes. Inherited on attach. OpenAI Ads: in the ad account currency, minimum 1; OpenAI can require a higher daily minimum for some currencies and names it in the error. | [optional] |
26
26
  | **budget_type** | **String** | Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads accepts both as the campaign's single spend cap. A lifetime cap can later switch to daily with PUT /v1/ads/campaigns/{campaignId}, but OpenAI never switches a daily cap back to lifetime (422). Automatic bidding (Maximize Results) needs a daily budget. | [optional] |
27
- | **status** | **String** | Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default, back-compat); PAUSED pauses only the TOP-MOST object this call creates and switches everything below it on, so one resume of that object brings the new tree live and nothing that already existed is touched: a new campaign is held paused with its ad set and ad on; with `existingCampaignId` the new ad set is held paused with its ad on; with `adSetId` the new ad itself is paused. `campaignStatus: ACTIVE` with `status: PAUSED` moves the pause down to the new ad set. LinkedIn: a held campaign group is PAUSED with its campaign and creative ACTIVE; a new campaign in an existing group stays DRAFT. X has no per-ad switch, so its lowest level is the line item. Google Performance Max and Demand Gen accept PAUSED only (the campaign is created paused). | [optional] |
28
- | **campaign_status** | **String** | Meta, Google, and ChatGPT (OpenAI). Overrides `status` for the new campaign alone. `PAUSED` holds the campaign off with its ad set and ad on; `ACTIVE` with `status: PAUSED` switches the campaign on and holds the new ad set paused (its ad on). Omitted, it follows `status`. | [optional] |
27
+ | **status** | **String** | Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default, back-compat); PAUSED pauses only the TOP-MOST object this call creates and switches everything below it on, so one resume of that object brings the new tree live and nothing that already existed is touched: a new campaign is held paused with its ad set and ad on; with `existingCampaignId` the new ad set is held paused with its ad on; with `adSetId` the new ad itself is paused. `campaignStatus: ACTIVE` with `status: PAUSED` moves the pause down to the new ad set. `campaignStatus`, `adSetStatus` and `adStatus` set one level each and always win for that level; `status: PAUSED` adds a hold of its own only when none of them is PAUSED. To create every object paused, send all three as PAUSED. LinkedIn: a held campaign group is PAUSED with its campaign and creative ACTIVE; a new campaign in an existing group stays DRAFT. X has no per-ad switch, so its lowest level is the line item. Google Performance Max and Demand Gen accept PAUSED only (the campaign is created paused). | [optional] |
28
+ | **campaign_status** | **String** | Every platform. Sets the switch of the new campaign alone (LinkedIn: the campaign group) and overrides `status` for it. `PAUSED` holds the campaign off with its ad set and ad on unless `adSetStatus` or `adStatus` say otherwise; `ACTIVE` with `status: PAUSED` switches the campaign on and holds the new ad set paused (its ad on). Omitted, it follows `status`. Ignored when the request creates no campaign (`existingCampaignId` or `adSetId`). | [optional] |
29
+ | **ad_set_status** | **String** | Every platform. Sets the switch of the new ad set alone (Google, TikTok, Pinterest and ChatGPT: the ad group; LinkedIn: the campaign, which stays DRAFT when held; X: the line item) and overrides `status` for it. Omitted, it follows `status`. Precedence: a level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level. `status: PAUSED` then holds the top-most new object that has no level status, and only when no level status is PAUSED; every other new object is switched on. So `campaignStatus: ACTIVE` + `adSetStatus: PAUSED` + `adStatus: PAUSED` keeps the campaign on with the new ad set and ad off, and all three PAUSED creates the whole tree paused. Rejected with a 400 alongside `adSetId` (that ad set already exists; change it with PUT /v1/ads/ad-sets/{adSetId}/status). Performance Max and Demand Gen accept PAUSED only. | [optional] |
30
+ | **ad_status** | **String** | Sets the switch of the new ad alone, also when attaching to an existing ad set with `adSetId`, and overrides `status` for it. Same precedence as `adSetStatus`. Omitted, it follows `status`. X returns a 400: a promoted post has no switch of its own, so hold the line item with `adSetStatus`. `PAUSED` with `buyingType: RESERVED` returns a 400 (Meta creates the first Reach and Frequency ad ACTIVE). Performance Max and Demand Gen accept PAUSED only. | [optional] |
29
31
  | **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. The returned ad stores the applied `budgetLevel` and budget in `campaignBudget` for CBO or `adSetBudget` for ABO. Edit CBO budgets with `PUT /v1/ads/campaigns/{campaignId}` and ABO budgets with `PUT /v1/ads/ad-sets/{adSetId}`. 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'] |
30
32
  | **currency** | **String** | ISO 4217 currency code matching the ad account's currency (e.g. `USD`). Meta only. Optional: Zernio resolves it from the ad account when omitted. The value selects the minor-unit exponent Zernio converts budget/bid amounts by before calling Meta (most currencies are cents; zero-decimal currencies like JPY/KRW are sent as-is). | [optional] |
31
33
  | **headline** | **String** | Required for Meta, Google, Pinterest, LinkedIn, and OpenAI Ads on legacy + attach shapes (skip for multi-creative; use `creatives[].headline`). Ignored for TikTok. On X, the website card title (needs imageUrl and linkUrl, max 70). Max: Meta=255, Google=30, Pinterest=100, LinkedIn=400, OpenAI=50 (min 3). On LinkedIn this is the ad's headline (the bold text on the creative); for traffic ads it's the link card title. On OpenAI Ads this is the chat card's title. | [optional] |
@@ -145,6 +147,8 @@ instance = Zernio::CreateStandaloneAdRequest.new(
145
147
  budget_type: null,
146
148
  status: null,
147
149
  campaign_status: null,
150
+ ad_set_status: null,
151
+ ad_status: null,
148
152
  budget_level: null,
149
153
  currency: null,
150
154
  headline: null,
@@ -23,7 +23,7 @@
23
23
  | **video** | [**CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md) | | [optional] |
24
24
  | **welcome_message** | [**CtwaAdRequestBodyWelcomeMessage**](CtwaAdRequestBodyWelcomeMessage.md) | | [optional] |
25
25
  | **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`): setting both is a 400, unlike `POST /v1/ads/create` where the top-level fields are silently ignored in multi-creative mode. Each entry supplies headline, body, and image/video, or a platformPostId or objectStoryId reference. Fresh and existing creatives can be mixed. | [optional] |
26
- | **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`, `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`, `existingCampaignId`, the special ad category fields and every targeting field except `ageMin`, `ageMax`, `placements` and `advantageAudience` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
26
+ | **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`, `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`, `adSetStatus`, `existingCampaignId`, the special ad category fields and every targeting field except `ageMin`, `ageMax`, `placements` and `advantageAudience` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
27
27
  | **existing_campaign_id** | **String** | Create the new messaging ad set (and its ads) under this EXISTING Meta campaign instead of a new one, e.g. several audience ad sets under one campaign. The campaign's objective must be OUTCOME_ENGAGEMENT, OUTCOME_SALES or OUTCOME_LEADS (400 otherwise). If the campaign has a campaign budget, omit `budgetAmount` and `budgetType` (400 if sent); otherwise they are required and land on the new ad set. `objective`, `campaignName`, `campaignStatus`, `budgetLevel`, `specialAdCategories`, `specialAdCategoryCountry` and `adSetId` are rejected alongside it. To add ads to an existing ad set instead, use `adSetId`. | [optional] |
28
28
  | **budget_level** | **String** | Where the budget lives. `adset` (default) puts it on the new ad set. `campaign` creates an Advantage campaign budget (CBO): the budget and bid strategy sit on the campaign and the ad set inherits them, same as POST /v1/ads/create. Not allowed with `adSetId` or `existingCampaignId`. | [optional] |
29
29
  | **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 (the ad set owns it) or `existingCampaignId` names a campaign with a campaign budget. | [optional] |
@@ -66,6 +66,8 @@
66
66
  | **objective** | **String** | Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require additional account configuration (Dataset linked to the WABA for sales) and may be rejected by Meta if missing. | [optional] |
67
67
  | **status** | **String** | Defaults to `ACTIVE`. `PAUSED` pauses only the top-most object this call creates: the new campaign (ad set and ads switched on), or, with `adSetId`, the new ads themselves. | [optional] |
68
68
  | **campaign_status** | **String** | Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `status`. `PAUSED` holds the new campaign off while the ad set and ads switch on (one resume call brings the whole hierarchy live); `ACTIVE` with `status: PAUSED` switches the campaign on and pauses the new ad set instead. Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign). | [optional] |
69
+ | **ad_set_status** | **String** | Ad-set-level status, same semantics as `POST /v1/ads/create`. Sets the new ad set's switch alone and overrides `status` for it. A level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level, and `status: PAUSED` adds a hold of its own only when none of them is PAUSED. Rejected with a 400 alongside `adSetId` (that ad set already exists). | [optional] |
70
+ | **ad_status** | **String** | Ad-level status, same semantics as `POST /v1/ads/create`. Sets the new ads' switch and overrides `status` for them, also with `adSetId`. Send `campaignStatus`, `adSetStatus` and `adStatus` all PAUSED to create every object paused. | [optional] |
69
71
  | **bid_strategy** | **String** | Meta bid strategy applied to the shared ad set. Defaults to `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted. `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires `roasAverageFloor`. CTWA's `optimization_goal` is fixed to `CONVERSATIONS`, but the bid strategy is independent. | [optional] |
70
72
  | **bid_amount** | **Float** | Whole currency units (e.g. `5` = $5.00 on a USD account). Required when `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`; rejected otherwise. | [optional] |
71
73
  | **roas_average_floor** | **Float** | Decimal ROAS multiplier (e.g. `2.0` = 2.0× ROAS floor). Required when `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`; rejected otherwise. Meta enforces its own upper bound server-side. | [optional] |
@@ -142,6 +144,8 @@ instance = Zernio::CtwaAdRequestBody.new(
142
144
  objective: null,
143
145
  status: null,
144
146
  campaign_status: null,
147
+ ad_set_status: null,
148
+ ad_status: null,
145
149
  bid_strategy: null,
146
150
  bid_amount: null,
147
151
  roas_average_floor: null,
@@ -69,7 +69,7 @@ module Zernio
69
69
  # 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`): setting both is a 400, unlike `POST /v1/ads/create` where the top-level fields are silently ignored in multi-creative mode. Each entry supplies headline, body, and image/video, or a platformPostId or objectStoryId reference. Fresh and existing creatives can be mixed.
70
70
  attr_accessor :creatives
71
71
 
72
- # 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`, `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`, `existingCampaignId`, the special ad category fields and every targeting field except `ageMin`, `ageMax`, `placements` and `advantageAudience` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
72
+ # 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`, `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`, `adSetStatus`, `existingCampaignId`, the special ad category fields and every targeting field except `ageMin`, `ageMax`, `placements` and `advantageAudience` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
73
73
  attr_accessor :ad_set_id
74
74
 
75
75
  # Create the new messaging ad set (and its ads) under this EXISTING Meta campaign instead of a new one, e.g. several audience ad sets under one campaign. The campaign's objective must be OUTCOME_ENGAGEMENT, OUTCOME_SALES or OUTCOME_LEADS (400 otherwise). If the campaign has a campaign budget, omit `budgetAmount` and `budgetType` (400 if sent); otherwise they are required and land on the new ad set. `objective`, `campaignName`, `campaignStatus`, `budgetLevel`, `specialAdCategories`, `specialAdCategoryCountry` and `adSetId` are rejected alongside it. To add ads to an existing ad set instead, use `adSetId`.
@@ -191,6 +191,12 @@ module Zernio
191
191
  # Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `status`. `PAUSED` holds the new campaign off while the ad set and ads switch on (one resume call brings the whole hierarchy live); `ACTIVE` with `status: PAUSED` switches the campaign on and pauses the new ad set instead. Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign).
192
192
  attr_accessor :campaign_status
193
193
 
194
+ # Ad-set-level status, same semantics as `POST /v1/ads/create`. Sets the new ad set's switch alone and overrides `status` for it. A level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level, and `status: PAUSED` adds a hold of its own only when none of them is PAUSED. Rejected with a 400 alongside `adSetId` (that ad set already exists).
195
+ attr_accessor :ad_set_status
196
+
197
+ # Ad-level status, same semantics as `POST /v1/ads/create`. Sets the new ads' switch and overrides `status` for them, also with `adSetId`. Send `campaignStatus`, `adSetStatus` and `adStatus` all PAUSED to create every object paused.
198
+ attr_accessor :ad_status
199
+
194
200
  # Meta bid strategy applied to the shared ad set. Defaults to `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted. `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires `roasAverageFloor`. CTWA's `optimization_goal` is fixed to `CONVERSATIONS`, but the bid strategy is independent.
195
201
  attr_accessor :bid_strategy
196
202
 
@@ -305,6 +311,8 @@ module Zernio
305
311
  :'objective' => :'objective',
306
312
  :'status' => :'status',
307
313
  :'campaign_status' => :'campaignStatus',
314
+ :'ad_set_status' => :'adSetStatus',
315
+ :'ad_status' => :'adStatus',
308
316
  :'bid_strategy' => :'bidStrategy',
309
317
  :'bid_amount' => :'bidAmount',
310
318
  :'roas_average_floor' => :'roasAverageFloor',
@@ -392,6 +400,8 @@ module Zernio
392
400
  :'objective' => :'String',
393
401
  :'status' => :'String',
394
402
  :'campaign_status' => :'String',
403
+ :'ad_set_status' => :'String',
404
+ :'ad_status' => :'String',
395
405
  :'bid_strategy' => :'String',
396
406
  :'bid_amount' => :'Float',
397
407
  :'roas_average_floor' => :'Float',
@@ -737,6 +747,14 @@ module Zernio
737
747
  self.campaign_status = attributes[:'campaign_status']
738
748
  end
739
749
 
750
+ if attributes.key?(:'ad_set_status')
751
+ self.ad_set_status = attributes[:'ad_set_status']
752
+ end
753
+
754
+ if attributes.key?(:'ad_status')
755
+ self.ad_status = attributes[:'ad_status']
756
+ end
757
+
740
758
  if attributes.key?(:'bid_strategy')
741
759
  self.bid_strategy = attributes[:'bid_strategy']
742
760
  end
@@ -974,6 +992,10 @@ module Zernio
974
992
  return false unless status_validator.valid?(@status)
975
993
  campaign_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
976
994
  return false unless campaign_status_validator.valid?(@campaign_status)
995
+ ad_set_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
996
+ return false unless ad_set_status_validator.valid?(@ad_set_status)
997
+ ad_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
998
+ return false unless ad_status_validator.valid?(@ad_status)
977
999
  bid_strategy_validator = EnumAttributeValidator.new('String', ["LOWEST_COST_WITHOUT_CAP", "LOWEST_COST_WITH_BID_CAP", "COST_CAP", "LOWEST_COST_WITH_MIN_ROAS"])
978
1000
  return false unless bid_strategy_validator.valid?(@bid_strategy)
979
1001
  return false if !@dsa_beneficiary.nil? && @dsa_beneficiary.to_s.length > 100
@@ -1380,6 +1402,26 @@ module Zernio
1380
1402
  @campaign_status = campaign_status
1381
1403
  end
1382
1404
 
1405
+ # Custom attribute writer method checking allowed values (enum).
1406
+ # @param [Object] ad_set_status Object to be assigned
1407
+ def ad_set_status=(ad_set_status)
1408
+ validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
1409
+ unless validator.valid?(ad_set_status)
1410
+ fail ArgumentError, "invalid value for \"ad_set_status\", must be one of #{validator.allowable_values}."
1411
+ end
1412
+ @ad_set_status = ad_set_status
1413
+ end
1414
+
1415
+ # Custom attribute writer method checking allowed values (enum).
1416
+ # @param [Object] ad_status Object to be assigned
1417
+ def ad_status=(ad_status)
1418
+ validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
1419
+ unless validator.valid?(ad_status)
1420
+ fail ArgumentError, "invalid value for \"ad_status\", must be one of #{validator.allowable_values}."
1421
+ end
1422
+ @ad_status = ad_status
1423
+ end
1424
+
1383
1425
  # Custom attribute writer method checking allowed values (enum).
1384
1426
  # @param [Object] bid_strategy Object to be assigned
1385
1427
  def bid_strategy=(bid_strategy)
@@ -1505,6 +1547,8 @@ module Zernio
1505
1547
  objective == o.objective &&
1506
1548
  status == o.status &&
1507
1549
  campaign_status == o.campaign_status &&
1550
+ ad_set_status == o.ad_set_status &&
1551
+ ad_status == o.ad_status &&
1508
1552
  bid_strategy == o.bid_strategy &&
1509
1553
  bid_amount == o.bid_amount &&
1510
1554
  roas_average_floor == o.roas_average_floor &&
@@ -1525,7 +1569,7 @@ module Zernio
1525
1569
  # Calculates hash code according to all attributes.
1526
1570
  # @return [Integer] Hash code
1527
1571
  def hash
1528
- [creative_features, tracking, account_id, ad_account_id, name, campaign_name, ad_set_name, platform_post_id, existing_post_id, object_story_id, page_id, whatsapp_phone_number, headline, body, description, image_url, video, welcome_message, creatives, ad_set_id, existing_campaign_id, budget_level, budget_amount, budget_type, currency, start_date, end_date, countries, cities, regions, zips, metros, country_groups, custom_locations, age_min, age_max, interests, audience_id, placements, gender, languages, places, neighborhoods, excluded_locations, behaviors, work_positions, work_employers, work_industries, income_tier, user_os, user_device, audience_include, audience_exclude, saved_targeting_id, targeting, raw_targeting, special_ad_categories, special_ad_category_country, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories, regional_regulation_identities, phone_number, link_url].hash
1572
+ [creative_features, tracking, account_id, ad_account_id, name, campaign_name, ad_set_name, platform_post_id, existing_post_id, object_story_id, page_id, whatsapp_phone_number, headline, body, description, image_url, video, welcome_message, creatives, ad_set_id, existing_campaign_id, budget_level, budget_amount, budget_type, currency, start_date, end_date, countries, cities, regions, zips, metros, country_groups, custom_locations, age_min, age_max, interests, audience_id, placements, gender, languages, places, neighborhoods, excluded_locations, behaviors, work_positions, work_employers, work_industries, income_tier, user_os, user_device, audience_include, audience_exclude, saved_targeting_id, targeting, raw_targeting, special_ad_categories, special_ad_category_country, advantage_audience, objective, status, campaign_status, ad_set_status, ad_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories, regional_regulation_identities, phone_number, link_url].hash
1529
1573
  end
1530
1574
 
1531
1575
  # Builds the object from hash
@@ -69,7 +69,7 @@ module Zernio
69
69
  # 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`): setting both is a 400, unlike `POST /v1/ads/create` where the top-level fields are silently ignored in multi-creative mode. Each entry supplies headline, body, and image/video, or a platformPostId or objectStoryId reference. Fresh and existing creatives can be mixed.
70
70
  attr_accessor :creatives
71
71
 
72
- # 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`, `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`, `existingCampaignId`, the special ad category fields and every targeting field except `ageMin`, `ageMax`, `placements` and `advantageAudience` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
72
+ # 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`, `budgetLevel`, `startDate`, `endDate`, `objective`, `campaignStatus`, `adSetStatus`, `existingCampaignId`, the special ad category fields and every targeting field except `ageMin`, `ageMax`, `placements` and `advantageAudience` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
73
73
  attr_accessor :ad_set_id
74
74
 
75
75
  # Create the new messaging ad set (and its ads) under this EXISTING Meta campaign instead of a new one, e.g. several audience ad sets under one campaign. The campaign's objective must be OUTCOME_ENGAGEMENT, OUTCOME_SALES or OUTCOME_LEADS (400 otherwise). If the campaign has a campaign budget, omit `budgetAmount` and `budgetType` (400 if sent); otherwise they are required and land on the new ad set. `objective`, `campaignName`, `campaignStatus`, `budgetLevel`, `specialAdCategories`, `specialAdCategoryCountry` and `adSetId` are rejected alongside it. To add ads to an existing ad set instead, use `adSetId`.
@@ -191,6 +191,12 @@ module Zernio
191
191
  # Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `status`. `PAUSED` holds the new campaign off while the ad set and ads switch on (one resume call brings the whole hierarchy live); `ACTIVE` with `status: PAUSED` switches the campaign on and pauses the new ad set instead. Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign).
192
192
  attr_accessor :campaign_status
193
193
 
194
+ # Ad-set-level status, same semantics as `POST /v1/ads/create`. Sets the new ad set's switch alone and overrides `status` for it. A level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level, and `status: PAUSED` adds a hold of its own only when none of them is PAUSED. Rejected with a 400 alongside `adSetId` (that ad set already exists).
195
+ attr_accessor :ad_set_status
196
+
197
+ # Ad-level status, same semantics as `POST /v1/ads/create`. Sets the new ads' switch and overrides `status` for them, also with `adSetId`. Send `campaignStatus`, `adSetStatus` and `adStatus` all PAUSED to create every object paused.
198
+ attr_accessor :ad_status
199
+
194
200
  # Meta bid strategy applied to the shared ad set. Defaults to `LOWEST_COST_WITHOUT_CAP` (auto-bid) when omitted. `LOWEST_COST_WITH_BID_CAP` and `COST_CAP` require `bidAmount`. `LOWEST_COST_WITH_MIN_ROAS` requires `roasAverageFloor`. CTWA's `optimization_goal` is fixed to `CONVERSATIONS`, but the bid strategy is independent.
195
201
  attr_accessor :bid_strategy
196
202
 
@@ -311,6 +317,8 @@ module Zernio
311
317
  :'objective' => :'objective',
312
318
  :'status' => :'status',
313
319
  :'campaign_status' => :'campaignStatus',
320
+ :'ad_set_status' => :'adSetStatus',
321
+ :'ad_status' => :'adStatus',
314
322
  :'bid_strategy' => :'bidStrategy',
315
323
  :'bid_amount' => :'bidAmount',
316
324
  :'roas_average_floor' => :'roasAverageFloor',
@@ -400,6 +408,8 @@ module Zernio
400
408
  :'objective' => :'String',
401
409
  :'status' => :'String',
402
410
  :'campaign_status' => :'String',
411
+ :'ad_set_status' => :'String',
412
+ :'ad_status' => :'String',
403
413
  :'bid_strategy' => :'String',
404
414
  :'bid_amount' => :'Float',
405
415
  :'roas_average_floor' => :'Float',
@@ -747,6 +757,14 @@ module Zernio
747
757
  self.campaign_status = attributes[:'campaign_status']
748
758
  end
749
759
 
760
+ if attributes.key?(:'ad_set_status')
761
+ self.ad_set_status = attributes[:'ad_set_status']
762
+ end
763
+
764
+ if attributes.key?(:'ad_status')
765
+ self.ad_status = attributes[:'ad_status']
766
+ end
767
+
750
768
  if attributes.key?(:'bid_strategy')
751
769
  self.bid_strategy = attributes[:'bid_strategy']
752
770
  end
@@ -990,6 +1008,10 @@ module Zernio
990
1008
  return false unless status_validator.valid?(@status)
991
1009
  campaign_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
992
1010
  return false unless campaign_status_validator.valid?(@campaign_status)
1011
+ ad_set_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
1012
+ return false unless ad_set_status_validator.valid?(@ad_set_status)
1013
+ ad_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
1014
+ return false unless ad_status_validator.valid?(@ad_status)
993
1015
  bid_strategy_validator = EnumAttributeValidator.new('String', ["LOWEST_COST_WITHOUT_CAP", "LOWEST_COST_WITH_BID_CAP", "COST_CAP", "LOWEST_COST_WITH_MIN_ROAS"])
994
1016
  return false unless bid_strategy_validator.valid?(@bid_strategy)
995
1017
  return false if !@dsa_beneficiary.nil? && @dsa_beneficiary.to_s.length > 100
@@ -1398,6 +1420,26 @@ module Zernio
1398
1420
  @campaign_status = campaign_status
1399
1421
  end
1400
1422
 
1423
+ # Custom attribute writer method checking allowed values (enum).
1424
+ # @param [Object] ad_set_status Object to be assigned
1425
+ def ad_set_status=(ad_set_status)
1426
+ validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
1427
+ unless validator.valid?(ad_set_status)
1428
+ fail ArgumentError, "invalid value for \"ad_set_status\", must be one of #{validator.allowable_values}."
1429
+ end
1430
+ @ad_set_status = ad_set_status
1431
+ end
1432
+
1433
+ # Custom attribute writer method checking allowed values (enum).
1434
+ # @param [Object] ad_status Object to be assigned
1435
+ def ad_status=(ad_status)
1436
+ validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
1437
+ unless validator.valid?(ad_status)
1438
+ fail ArgumentError, "invalid value for \"ad_status\", must be one of #{validator.allowable_values}."
1439
+ end
1440
+ @ad_status = ad_status
1441
+ end
1442
+
1401
1443
  # Custom attribute writer method checking allowed values (enum).
1402
1444
  # @param [Object] bid_strategy Object to be assigned
1403
1445
  def bid_strategy=(bid_strategy)
@@ -1513,6 +1555,8 @@ module Zernio
1513
1555
  objective == o.objective &&
1514
1556
  status == o.status &&
1515
1557
  campaign_status == o.campaign_status &&
1558
+ ad_set_status == o.ad_set_status &&
1559
+ ad_status == o.ad_status &&
1516
1560
  bid_strategy == o.bid_strategy &&
1517
1561
  bid_amount == o.bid_amount &&
1518
1562
  roas_average_floor == o.roas_average_floor &&
@@ -1535,7 +1579,7 @@ module Zernio
1535
1579
  # Calculates hash code according to all attributes.
1536
1580
  # @return [Integer] Hash code
1537
1581
  def hash
1538
- [creative_features, tracking, account_id, ad_account_id, name, campaign_name, ad_set_name, platform_post_id, existing_post_id, object_story_id, page_id, whatsapp_phone_number, headline, body, description, image_url, video, welcome_message, creatives, ad_set_id, existing_campaign_id, budget_level, budget_amount, budget_type, currency, start_date, end_date, countries, cities, regions, zips, metros, country_groups, custom_locations, age_min, age_max, interests, audience_id, placements, gender, languages, places, neighborhoods, excluded_locations, behaviors, work_positions, work_employers, work_industries, income_tier, user_os, user_device, audience_include, audience_exclude, saved_targeting_id, targeting, raw_targeting, special_ad_categories, special_ad_category_country, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories, regional_regulation_identities, destination, destinations, placement_assets, validate_only].hash
1582
+ [creative_features, tracking, account_id, ad_account_id, name, campaign_name, ad_set_name, platform_post_id, existing_post_id, object_story_id, page_id, whatsapp_phone_number, headline, body, description, image_url, video, welcome_message, creatives, ad_set_id, existing_campaign_id, budget_level, budget_amount, budget_type, currency, start_date, end_date, countries, cities, regions, zips, metros, country_groups, custom_locations, age_min, age_max, interests, audience_id, placements, gender, languages, places, neighborhoods, excluded_locations, behaviors, work_positions, work_employers, work_industries, income_tier, user_os, user_device, audience_include, audience_exclude, saved_targeting_id, targeting, raw_targeting, special_ad_categories, special_ad_category_country, advantage_audience, objective, status, campaign_status, ad_set_status, ad_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, regional_regulated_categories, regional_regulation_identities, destination, destinations, placement_assets, validate_only].hash
1539
1583
  end
1540
1584
 
1541
1585
  # Builds the object from hash
@@ -70,12 +70,18 @@ module Zernio
70
70
  # Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads accepts both as the campaign's single spend cap. A lifetime cap can later switch to daily with PUT /v1/ads/campaigns/{campaignId}, but OpenAI never switches a daily cap back to lifetime (422). Automatic bidding (Maximize Results) needs a daily budget.
71
71
  attr_accessor :budget_type
72
72
 
73
- # Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default, back-compat); PAUSED pauses only the TOP-MOST object this call creates and switches everything below it on, so one resume of that object brings the new tree live and nothing that already existed is touched: a new campaign is held paused with its ad set and ad on; with `existingCampaignId` the new ad set is held paused with its ad on; with `adSetId` the new ad itself is paused. `campaignStatus: ACTIVE` with `status: PAUSED` moves the pause down to the new ad set. LinkedIn: a held campaign group is PAUSED with its campaign and creative ACTIVE; a new campaign in an existing group stays DRAFT. X has no per-ad switch, so its lowest level is the line item. Google Performance Max and Demand Gen accept PAUSED only (the campaign is created paused).
73
+ # Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default, back-compat); PAUSED pauses only the TOP-MOST object this call creates and switches everything below it on, so one resume of that object brings the new tree live and nothing that already existed is touched: a new campaign is held paused with its ad set and ad on; with `existingCampaignId` the new ad set is held paused with its ad on; with `adSetId` the new ad itself is paused. `campaignStatus: ACTIVE` with `status: PAUSED` moves the pause down to the new ad set. `campaignStatus`, `adSetStatus` and `adStatus` set one level each and always win for that level; `status: PAUSED` adds a hold of its own only when none of them is PAUSED. To create every object paused, send all three as PAUSED. LinkedIn: a held campaign group is PAUSED with its campaign and creative ACTIVE; a new campaign in an existing group stays DRAFT. X has no per-ad switch, so its lowest level is the line item. Google Performance Max and Demand Gen accept PAUSED only (the campaign is created paused).
74
74
  attr_accessor :status
75
75
 
76
- # Meta, Google, and ChatGPT (OpenAI). Overrides `status` for the new campaign alone. `PAUSED` holds the campaign off with its ad set and ad on; `ACTIVE` with `status: PAUSED` switches the campaign on and holds the new ad set paused (its ad on). Omitted, it follows `status`.
76
+ # Every platform. Sets the switch of the new campaign alone (LinkedIn: the campaign group) and overrides `status` for it. `PAUSED` holds the campaign off with its ad set and ad on unless `adSetStatus` or `adStatus` say otherwise; `ACTIVE` with `status: PAUSED` switches the campaign on and holds the new ad set paused (its ad on). Omitted, it follows `status`. Ignored when the request creates no campaign (`existingCampaignId` or `adSetId`).
77
77
  attr_accessor :campaign_status
78
78
 
79
+ # Every platform. Sets the switch of the new ad set alone (Google, TikTok, Pinterest and ChatGPT: the ad group; LinkedIn: the campaign, which stays DRAFT when held; X: the line item) and overrides `status` for it. Omitted, it follows `status`. Precedence: a level status (`campaignStatus`, `adSetStatus`, `adStatus`) always wins for its level. `status: PAUSED` then holds the top-most new object that has no level status, and only when no level status is PAUSED; every other new object is switched on. So `campaignStatus: ACTIVE` + `adSetStatus: PAUSED` + `adStatus: PAUSED` keeps the campaign on with the new ad set and ad off, and all three PAUSED creates the whole tree paused. Rejected with a 400 alongside `adSetId` (that ad set already exists; change it with PUT /v1/ads/ad-sets/{adSetId}/status). Performance Max and Demand Gen accept PAUSED only.
80
+ attr_accessor :ad_set_status
81
+
82
+ # Sets the switch of the new ad alone, also when attaching to an existing ad set with `adSetId`, and overrides `status` for it. Same precedence as `adSetStatus`. Omitted, it follows `status`. X returns a 400: a promoted post has no switch of its own, so hold the line item with `adSetStatus`. `PAUSED` with `buyingType: RESERVED` returns a 400 (Meta creates the first Reach and Frequency ad ACTIVE). Performance Max and Demand Gen accept PAUSED only.
83
+ attr_accessor :ad_status
84
+
79
85
  # 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. The returned ad stores the applied `budgetLevel` and budget in `campaignBudget` for CBO or `adSetBudget` for ABO. Edit CBO budgets with `PUT /v1/ads/campaigns/{campaignId}` and ABO budgets with `PUT /v1/ads/ad-sets/{adSetId}`. 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.
80
86
  attr_accessor :budget_level
81
87
 
@@ -382,6 +388,8 @@ module Zernio
382
388
  :'budget_type' => :'budgetType',
383
389
  :'status' => :'status',
384
390
  :'campaign_status' => :'campaignStatus',
391
+ :'ad_set_status' => :'adSetStatus',
392
+ :'ad_status' => :'adStatus',
385
393
  :'budget_level' => :'budgetLevel',
386
394
  :'currency' => :'currency',
387
395
  :'headline' => :'headline',
@@ -510,6 +518,8 @@ module Zernio
510
518
  :'budget_type' => :'String',
511
519
  :'status' => :'String',
512
520
  :'campaign_status' => :'String',
521
+ :'ad_set_status' => :'String',
522
+ :'ad_status' => :'String',
513
523
  :'budget_level' => :'String',
514
524
  :'currency' => :'String',
515
525
  :'headline' => :'String',
@@ -724,6 +734,14 @@ module Zernio
724
734
  self.campaign_status = attributes[:'campaign_status']
725
735
  end
726
736
 
737
+ if attributes.key?(:'ad_set_status')
738
+ self.ad_set_status = attributes[:'ad_set_status']
739
+ end
740
+
741
+ if attributes.key?(:'ad_status')
742
+ self.ad_status = attributes[:'ad_status']
743
+ end
744
+
727
745
  if attributes.key?(:'budget_level')
728
746
  self.budget_level = attributes[:'budget_level']
729
747
  else
@@ -1377,6 +1395,10 @@ module Zernio
1377
1395
  return false unless status_validator.valid?(@status)
1378
1396
  campaign_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
1379
1397
  return false unless campaign_status_validator.valid?(@campaign_status)
1398
+ ad_set_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
1399
+ return false unless ad_set_status_validator.valid?(@ad_set_status)
1400
+ ad_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
1401
+ return false unless ad_status_validator.valid?(@ad_status)
1380
1402
  budget_level_validator = EnumAttributeValidator.new('String', ["adset", "campaign"])
1381
1403
  return false unless budget_level_validator.valid?(@budget_level)
1382
1404
  return false if !@currency.nil? && @currency.to_s.length > 3
@@ -1580,6 +1602,26 @@ module Zernio
1580
1602
  @campaign_status = campaign_status
1581
1603
  end
1582
1604
 
1605
+ # Custom attribute writer method checking allowed values (enum).
1606
+ # @param [Object] ad_set_status Object to be assigned
1607
+ def ad_set_status=(ad_set_status)
1608
+ validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
1609
+ unless validator.valid?(ad_set_status)
1610
+ fail ArgumentError, "invalid value for \"ad_set_status\", must be one of #{validator.allowable_values}."
1611
+ end
1612
+ @ad_set_status = ad_set_status
1613
+ end
1614
+
1615
+ # Custom attribute writer method checking allowed values (enum).
1616
+ # @param [Object] ad_status Object to be assigned
1617
+ def ad_status=(ad_status)
1618
+ validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
1619
+ unless validator.valid?(ad_status)
1620
+ fail ArgumentError, "invalid value for \"ad_status\", must be one of #{validator.allowable_values}."
1621
+ end
1622
+ @ad_status = ad_status
1623
+ end
1624
+
1583
1625
  # Custom attribute writer method checking allowed values (enum).
1584
1626
  # @param [Object] budget_level Object to be assigned
1585
1627
  def budget_level=(budget_level)
@@ -2102,6 +2144,8 @@ module Zernio
2102
2144
  budget_type == o.budget_type &&
2103
2145
  status == o.status &&
2104
2146
  campaign_status == o.campaign_status &&
2147
+ ad_set_status == o.ad_set_status &&
2148
+ ad_status == o.ad_status &&
2105
2149
  budget_level == o.budget_level &&
2106
2150
  currency == o.currency &&
2107
2151
  headline == o.headline &&
@@ -2203,7 +2247,7 @@ module Zernio
2203
2247
  # Calculates hash code according to all attributes.
2204
2248
  # @return [Integer] Hash code
2205
2249
  def hash
2206
- [account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, smart_targeting, optimization_goal, billing_event, buying_type, rf_prediction_id, promotion, creative_features, multi_advertiser, ai_disclosure, validate_only, budget_amount, budget_type, status, campaign_status, budget_level, currency, headline, long_headline, body, description, bodies, headlines, descriptions, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, phone_number, existing_creative_id, business_name, board_id, organization_id, targeting, countries, country_groups, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, work_positions, work_employers, work_industries, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, regional_regulated_categories, regional_regulation_identities, end_date, start_date, page_id, instagram_account_id, dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, location_targeting_type, asset_group, demand_gen, keywords, negative_keywords, campaign_negative_keywords, additional_headlines, additional_descriptions, sitelinks, callouts, structured_snippets, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, portfolio_bid_strategy_id, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_id, identity_type, smart_plus, user_os, user_device, is_skadnetwork_attribution, campaign_attribution, promoted_object].hash
2250
+ [account_id, ad_account_id, name, campaign_name, ad_set_name, ad_name, tracking, goal, smart_targeting, optimization_goal, billing_event, buying_type, rf_prediction_id, promotion, creative_features, multi_advertiser, ai_disclosure, validate_only, budget_amount, budget_type, status, campaign_status, ad_set_status, ad_status, budget_level, currency, headline, long_headline, body, description, bodies, headlines, descriptions, call_to_action, link_url, lead_gen_form_id, image_url, images, video, creatives, ad_set_id, existing_campaign_id, phone_number, existing_creative_id, business_name, board_id, organization_id, targeting, countries, country_groups, cities, regions, age_min, age_max, interests, zips, metros, custom_locations, behaviors, work_positions, work_employers, work_industries, income_tier, languages, placements, saved_targeting_id, raw_targeting, special_ad_categories, special_ad_category_country, regional_regulated_categories, regional_regulation_identities, end_date, start_date, page_id, instagram_account_id, dynamic_creative, carousel_cards, default_locale, translations, placement_assets, audience_id, campaign_type, location_targeting_type, asset_group, demand_gen, keywords, negative_keywords, campaign_negative_keywords, additional_headlines, additional_descriptions, sitelinks, callouts, structured_snippets, advantage_audience, attribution_spec, gender, bid_strategy, bid_amount, roas_average_floor, portfolio_bid_strategy_id, value_rule_set_id, value_rules_applied, platform_specific_data, dsa_beneficiary, dsa_payor, brand_identity, identity_id, identity_type, smart_plus, user_os, user_device, is_skadnetwork_attribution, campaign_attribution, promoted_object].hash
2207
2251
  end
2208
2252
 
2209
2253
  # Builds the object from hash