zernio-sdk 0.0.736 → 0.0.737
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/CreateCallAdRequest.md +5 -1
- data/docs/CreateMessagingAdRequest.md +5 -1
- data/docs/CtwaAdRequestBody.md +5 -1
- data/docs/CtwaAdRequestBodyCreativesInnerVideo.md +4 -2
- data/docs/CtwaAdRequestBodyVideo.md +4 -2
- data/lib/zernio-sdk/models/create_call_ad_request.rb +46 -2
- data/lib/zernio-sdk/models/create_messaging_ad_request.rb +46 -2
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +46 -2
- data/lib/zernio-sdk/models/ctwa_ad_request_body_creatives_inner_video.rb +13 -36
- data/lib/zernio-sdk/models/ctwa_ad_request_body_video.rb +13 -36
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +32 -11
- data/spec/models/create_call_ad_request_spec.rb +20 -0
- data/spec/models/create_messaging_ad_request_spec.rb +20 -0
- data/spec/models/ctwa_ad_request_body_creatives_inner_video_spec.rb +6 -0
- data/spec/models/ctwa_ad_request_body_spec.rb +20 -0
- data/spec/models/ctwa_ad_request_body_video_spec.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 819d897dc076c719e4b1797ef83d1398d882c4b16471432c2df6ee07bdfd689c
|
|
4
|
+
data.tar.gz: 8a17453dbd051e363180df70e571f2b08df2157e253bd18f3231f32cd1267ea2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18acc2df387b5373b5b33f22ebdbff93f65123a34cc9dc8927983adcba13c20dd2f9ef5998a1409c2f6973d305109ae02de7b4d9b9a07356c9b45748222843e5
|
|
7
|
+
data.tar.gz: ea17cd724391033e4e61d11ca97a12d338eb457d40c034931281c66314687a2ef99d7182f100d8a5c874677b4215cb8db1eab0ef1699e1f513126273234e62e7
|
data/docs/CreateCallAdRequest.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| **image_url** | **String** | Image asset for single-creative shape. Mutually exclusive with `video` and with `creatives[]`. Required on the single-creative shape if `video` is not supplied. | [optional] |
|
|
13
13
|
| **video** | [**CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md) | | [optional] |
|
|
14
14
|
| **creatives** | [**Array<CtwaAdRequestBodyCreativesInner>**](CtwaAdRequestBodyCreativesInner.md) | Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`. | [optional] |
|
|
15
|
-
| **ad_set_id** | **String** | Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `
|
|
15
|
+
| **ad_set_id** | **String** | Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests`, `audienceId` and `campaignStatus` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
|
|
16
16
|
| **budget_amount** | **Float** | Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it. | [optional] |
|
|
17
17
|
| **budget_type** | **String** | Required unless `adSetId` is set. | [optional] |
|
|
18
18
|
| **currency** | **String** | ISO 4217 currency code matching the ad account's currency (e.g. `USD`). 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] |
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
| **placements** | [**CtwaAdRequestBodyPlacements**](CtwaAdRequestBodyPlacements.md) | | [optional] |
|
|
31
31
|
| **advantage_audience** | **Integer** | Meta's Advantage+ audience expansion. `0` (default) keeps targeting strict; `1` lets Meta expand beyond the supplied targeting when its delivery system finds better matches. Always sent on CREATE (Meta requires it). | [optional] |
|
|
32
32
|
| **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] |
|
|
33
|
+
| **status** | **String** | Ad-level status. Defaults to `ACTIVE`. `PAUSED` skips activating the newly created ad(s) after Meta accepts them. | [optional] |
|
|
34
|
+
| **campaign_status** | **String** | Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `ACTIVE`. `PAUSED` holds activation at the campaign so it never spends before the advertiser reviews it, while the ad set and ad still switch on (one resume call brings the whole hierarchy live). Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign). | [optional] |
|
|
33
35
|
| **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] |
|
|
34
36
|
| **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] |
|
|
35
37
|
| **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] |
|
|
@@ -70,6 +72,8 @@ instance = Zernio::CreateCallAdRequest.new(
|
|
|
70
72
|
placements: null,
|
|
71
73
|
advantage_audience: null,
|
|
72
74
|
objective: null,
|
|
75
|
+
status: null,
|
|
76
|
+
campaign_status: null,
|
|
73
77
|
bid_strategy: null,
|
|
74
78
|
bid_amount: null,
|
|
75
79
|
roas_average_floor: null,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| **image_url** | **String** | Image asset for single-creative shape. Mutually exclusive with `video` and with `creatives[]`. Required on the single-creative shape if `video` is not supplied. | [optional] |
|
|
13
13
|
| **video** | [**CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md) | | [optional] |
|
|
14
14
|
| **creatives** | [**Array<CtwaAdRequestBodyCreativesInner>**](CtwaAdRequestBodyCreativesInner.md) | Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`. | [optional] |
|
|
15
|
-
| **ad_set_id** | **String** | Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `
|
|
15
|
+
| **ad_set_id** | **String** | Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests`, `audienceId` and `campaignStatus` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
|
|
16
16
|
| **budget_amount** | **Float** | Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it. | [optional] |
|
|
17
17
|
| **budget_type** | **String** | Required unless `adSetId` is set. | [optional] |
|
|
18
18
|
| **currency** | **String** | ISO 4217 currency code matching the ad account's currency (e.g. `USD`). 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] |
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
| **placements** | [**CtwaAdRequestBodyPlacements**](CtwaAdRequestBodyPlacements.md) | | [optional] |
|
|
31
31
|
| **advantage_audience** | **Integer** | Meta's Advantage+ audience expansion. `0` (default) keeps targeting strict; `1` lets Meta expand beyond the supplied targeting when its delivery system finds better matches. Always sent on CREATE (Meta requires it). | [optional] |
|
|
32
32
|
| **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] |
|
|
33
|
+
| **status** | **String** | Ad-level status. Defaults to `ACTIVE`. `PAUSED` skips activating the newly created ad(s) after Meta accepts them. | [optional] |
|
|
34
|
+
| **campaign_status** | **String** | Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `ACTIVE`. `PAUSED` holds activation at the campaign so it never spends before the advertiser reviews it, while the ad set and ad still switch on (one resume call brings the whole hierarchy live). Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign). | [optional] |
|
|
33
35
|
| **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] |
|
|
34
36
|
| **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] |
|
|
35
37
|
| **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] |
|
|
@@ -69,6 +71,8 @@ instance = Zernio::CreateMessagingAdRequest.new(
|
|
|
69
71
|
placements: null,
|
|
70
72
|
advantage_audience: null,
|
|
71
73
|
objective: null,
|
|
74
|
+
status: null,
|
|
75
|
+
campaign_status: null,
|
|
72
76
|
bid_strategy: null,
|
|
73
77
|
bid_amount: null,
|
|
74
78
|
roas_average_floor: null,
|
data/docs/CtwaAdRequestBody.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| **image_url** | **String** | Image asset for single-creative shape. Mutually exclusive with `video` and with `creatives[]`. Required on the single-creative shape if `video` is not supplied. | [optional] |
|
|
13
13
|
| **video** | [**CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md) | | [optional] |
|
|
14
14
|
| **creatives** | [**Array<CtwaAdRequestBodyCreativesInner>**](CtwaAdRequestBodyCreativesInner.md) | Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`. | [optional] |
|
|
15
|
-
| **ad_set_id** | **String** | Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `
|
|
15
|
+
| **ad_set_id** | **String** | Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests`, `audienceId` and `campaignStatus` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination. | [optional] |
|
|
16
16
|
| **budget_amount** | **Float** | Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it. | [optional] |
|
|
17
17
|
| **budget_type** | **String** | Required unless `adSetId` is set. | [optional] |
|
|
18
18
|
| **currency** | **String** | ISO 4217 currency code matching the ad account's currency (e.g. `USD`). 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] |
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
| **placements** | [**CtwaAdRequestBodyPlacements**](CtwaAdRequestBodyPlacements.md) | | [optional] |
|
|
31
31
|
| **advantage_audience** | **Integer** | Meta's Advantage+ audience expansion. `0` (default) keeps targeting strict; `1` lets Meta expand beyond the supplied targeting when its delivery system finds better matches. Always sent on CREATE (Meta requires it). | [optional] |
|
|
32
32
|
| **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] |
|
|
33
|
+
| **status** | **String** | Ad-level status. Defaults to `ACTIVE`. `PAUSED` skips activating the newly created ad(s) after Meta accepts them. | [optional] |
|
|
34
|
+
| **campaign_status** | **String** | Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `ACTIVE`. `PAUSED` holds activation at the campaign so it never spends before the advertiser reviews it, while the ad set and ad still switch on (one resume call brings the whole hierarchy live). Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign). | [optional] |
|
|
33
35
|
| **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] |
|
|
34
36
|
| **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] |
|
|
35
37
|
| **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] |
|
|
@@ -68,6 +70,8 @@ instance = Zernio::CtwaAdRequestBody.new(
|
|
|
68
70
|
placements: null,
|
|
69
71
|
advantage_audience: null,
|
|
70
72
|
objective: null,
|
|
73
|
+
status: null,
|
|
74
|
+
campaign_status: null,
|
|
71
75
|
bid_strategy: null,
|
|
72
76
|
bid_amount: null,
|
|
73
77
|
roas_average_floor: null,
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **url** | **String** |
|
|
8
|
-
| **
|
|
7
|
+
| **url** | **String** | Public URL of the video to upload. Provide either `url` or `id`. | [optional] |
|
|
8
|
+
| **id** | **String** | Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`. | [optional] |
|
|
9
|
+
| **thumbnail_url** | **String** | OPTIONAL: when omitted, the poster is auto-generated from Meta's own preferred video thumbnail. When Meta produces no candidate the request fails with a 502 platform_error (reason: video_thumbnail_unavailable). | [optional] |
|
|
9
10
|
|
|
10
11
|
## Example
|
|
11
12
|
|
|
@@ -14,6 +15,7 @@ require 'zernio-sdk'
|
|
|
14
15
|
|
|
15
16
|
instance = Zernio::CtwaAdRequestBodyCreativesInnerVideo.new(
|
|
16
17
|
url: null,
|
|
18
|
+
id: null,
|
|
17
19
|
thumbnail_url: null
|
|
18
20
|
)
|
|
19
21
|
```
|
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **url** | **String** |
|
|
8
|
-
| **
|
|
7
|
+
| **url** | **String** | Public URL of the video to upload. Provide either `url` or `id`. | [optional] |
|
|
8
|
+
| **id** | **String** | Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`. | [optional] |
|
|
9
|
+
| **thumbnail_url** | **String** | OPTIONAL: when omitted, the poster is auto-generated from Meta's own preferred video thumbnail. When Meta produces no candidate the request fails with a 502 platform_error (reason: video_thumbnail_unavailable) — retry, or supply this field to control the poster frame exactly. | [optional] |
|
|
9
10
|
|
|
10
11
|
## Example
|
|
11
12
|
|
|
@@ -14,6 +15,7 @@ require 'zernio-sdk'
|
|
|
14
15
|
|
|
15
16
|
instance = Zernio::CtwaAdRequestBodyVideo.new(
|
|
16
17
|
url: null,
|
|
18
|
+
id: null,
|
|
17
19
|
thumbnail_url: null
|
|
18
20
|
)
|
|
19
21
|
```
|
|
@@ -38,7 +38,7 @@ module Zernio
|
|
|
38
38
|
# Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
|
|
39
39
|
attr_accessor :creatives
|
|
40
40
|
|
|
41
|
-
# Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `
|
|
41
|
+
# Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests`, `audienceId` and `campaignStatus` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
|
|
42
42
|
attr_accessor :ad_set_id
|
|
43
43
|
|
|
44
44
|
# Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it.
|
|
@@ -88,6 +88,12 @@ module Zernio
|
|
|
88
88
|
# 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.
|
|
89
89
|
attr_accessor :objective
|
|
90
90
|
|
|
91
|
+
# Ad-level status. Defaults to `ACTIVE`. `PAUSED` skips activating the newly created ad(s) after Meta accepts them.
|
|
92
|
+
attr_accessor :status
|
|
93
|
+
|
|
94
|
+
# Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `ACTIVE`. `PAUSED` holds activation at the campaign so it never spends before the advertiser reviews it, while the ad set and ad still switch on (one resume call brings the whole hierarchy live). Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign).
|
|
95
|
+
attr_accessor :campaign_status
|
|
96
|
+
|
|
91
97
|
# 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.
|
|
92
98
|
attr_accessor :bid_strategy
|
|
93
99
|
|
|
@@ -160,6 +166,8 @@ module Zernio
|
|
|
160
166
|
:'placements' => :'placements',
|
|
161
167
|
:'advantage_audience' => :'advantageAudience',
|
|
162
168
|
:'objective' => :'objective',
|
|
169
|
+
:'status' => :'status',
|
|
170
|
+
:'campaign_status' => :'campaignStatus',
|
|
163
171
|
:'bid_strategy' => :'bidStrategy',
|
|
164
172
|
:'bid_amount' => :'bidAmount',
|
|
165
173
|
:'roas_average_floor' => :'roasAverageFloor',
|
|
@@ -209,6 +217,8 @@ module Zernio
|
|
|
209
217
|
:'placements' => :'CtwaAdRequestBodyPlacements',
|
|
210
218
|
:'advantage_audience' => :'Integer',
|
|
211
219
|
:'objective' => :'String',
|
|
220
|
+
:'status' => :'String',
|
|
221
|
+
:'campaign_status' => :'String',
|
|
212
222
|
:'bid_strategy' => :'String',
|
|
213
223
|
:'bid_amount' => :'Float',
|
|
214
224
|
:'roas_average_floor' => :'Float',
|
|
@@ -374,6 +384,14 @@ module Zernio
|
|
|
374
384
|
self.objective = attributes[:'objective']
|
|
375
385
|
end
|
|
376
386
|
|
|
387
|
+
if attributes.key?(:'status')
|
|
388
|
+
self.status = attributes[:'status']
|
|
389
|
+
end
|
|
390
|
+
|
|
391
|
+
if attributes.key?(:'campaign_status')
|
|
392
|
+
self.campaign_status = attributes[:'campaign_status']
|
|
393
|
+
end
|
|
394
|
+
|
|
377
395
|
if attributes.key?(:'bid_strategy')
|
|
378
396
|
self.bid_strategy = attributes[:'bid_strategy']
|
|
379
397
|
end
|
|
@@ -521,6 +539,10 @@ module Zernio
|
|
|
521
539
|
return false unless advantage_audience_validator.valid?(@advantage_audience)
|
|
522
540
|
objective_validator = EnumAttributeValidator.new('String', ["OUTCOME_ENGAGEMENT", "OUTCOME_SALES", "OUTCOME_LEADS"])
|
|
523
541
|
return false unless objective_validator.valid?(@objective)
|
|
542
|
+
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
543
|
+
return false unless status_validator.valid?(@status)
|
|
544
|
+
campaign_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
545
|
+
return false unless campaign_status_validator.valid?(@campaign_status)
|
|
524
546
|
bid_strategy_validator = EnumAttributeValidator.new('String', ["LOWEST_COST_WITHOUT_CAP", "LOWEST_COST_WITH_BID_CAP", "COST_CAP", "LOWEST_COST_WITH_MIN_ROAS"])
|
|
525
547
|
return false unless bid_strategy_validator.valid?(@bid_strategy)
|
|
526
548
|
return false if !@dsa_beneficiary.nil? && @dsa_beneficiary.to_s.length > 100
|
|
@@ -702,6 +724,26 @@ module Zernio
|
|
|
702
724
|
@objective = objective
|
|
703
725
|
end
|
|
704
726
|
|
|
727
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
728
|
+
# @param [Object] status Object to be assigned
|
|
729
|
+
def status=(status)
|
|
730
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
731
|
+
unless validator.valid?(status)
|
|
732
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
733
|
+
end
|
|
734
|
+
@status = status
|
|
735
|
+
end
|
|
736
|
+
|
|
737
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
738
|
+
# @param [Object] campaign_status Object to be assigned
|
|
739
|
+
def campaign_status=(campaign_status)
|
|
740
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
741
|
+
unless validator.valid?(campaign_status)
|
|
742
|
+
fail ArgumentError, "invalid value for \"campaign_status\", must be one of #{validator.allowable_values}."
|
|
743
|
+
end
|
|
744
|
+
@campaign_status = campaign_status
|
|
745
|
+
end
|
|
746
|
+
|
|
705
747
|
# Custom attribute writer method checking allowed values (enum).
|
|
706
748
|
# @param [Object] bid_strategy Object to be assigned
|
|
707
749
|
def bid_strategy=(bid_strategy)
|
|
@@ -791,6 +833,8 @@ module Zernio
|
|
|
791
833
|
placements == o.placements &&
|
|
792
834
|
advantage_audience == o.advantage_audience &&
|
|
793
835
|
objective == o.objective &&
|
|
836
|
+
status == o.status &&
|
|
837
|
+
campaign_status == o.campaign_status &&
|
|
794
838
|
bid_strategy == o.bid_strategy &&
|
|
795
839
|
bid_amount == o.bid_amount &&
|
|
796
840
|
roas_average_floor == o.roas_average_floor &&
|
|
@@ -809,7 +853,7 @@ module Zernio
|
|
|
809
853
|
# Calculates hash code according to all attributes.
|
|
810
854
|
# @return [Integer] Hash code
|
|
811
855
|
def hash
|
|
812
|
-
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, phone_number, link_url].hash
|
|
856
|
+
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, phone_number, link_url].hash
|
|
813
857
|
end
|
|
814
858
|
|
|
815
859
|
# Builds the object from hash
|
|
@@ -38,7 +38,7 @@ module Zernio
|
|
|
38
38
|
# Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
|
|
39
39
|
attr_accessor :creatives
|
|
40
40
|
|
|
41
|
-
# Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `
|
|
41
|
+
# Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests`, `audienceId` and `campaignStatus` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
|
|
42
42
|
attr_accessor :ad_set_id
|
|
43
43
|
|
|
44
44
|
# Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it.
|
|
@@ -88,6 +88,12 @@ module Zernio
|
|
|
88
88
|
# 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.
|
|
89
89
|
attr_accessor :objective
|
|
90
90
|
|
|
91
|
+
# Ad-level status. Defaults to `ACTIVE`. `PAUSED` skips activating the newly created ad(s) after Meta accepts them.
|
|
92
|
+
attr_accessor :status
|
|
93
|
+
|
|
94
|
+
# Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `ACTIVE`. `PAUSED` holds activation at the campaign so it never spends before the advertiser reviews it, while the ad set and ad still switch on (one resume call brings the whole hierarchy live). Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign).
|
|
95
|
+
attr_accessor :campaign_status
|
|
96
|
+
|
|
91
97
|
# 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.
|
|
92
98
|
attr_accessor :bid_strategy
|
|
93
99
|
|
|
@@ -157,6 +163,8 @@ module Zernio
|
|
|
157
163
|
:'placements' => :'placements',
|
|
158
164
|
:'advantage_audience' => :'advantageAudience',
|
|
159
165
|
:'objective' => :'objective',
|
|
166
|
+
:'status' => :'status',
|
|
167
|
+
:'campaign_status' => :'campaignStatus',
|
|
160
168
|
:'bid_strategy' => :'bidStrategy',
|
|
161
169
|
:'bid_amount' => :'bidAmount',
|
|
162
170
|
:'roas_average_floor' => :'roasAverageFloor',
|
|
@@ -205,6 +213,8 @@ module Zernio
|
|
|
205
213
|
:'placements' => :'CtwaAdRequestBodyPlacements',
|
|
206
214
|
:'advantage_audience' => :'Integer',
|
|
207
215
|
:'objective' => :'String',
|
|
216
|
+
:'status' => :'String',
|
|
217
|
+
:'campaign_status' => :'String',
|
|
208
218
|
:'bid_strategy' => :'String',
|
|
209
219
|
:'bid_amount' => :'Float',
|
|
210
220
|
:'roas_average_floor' => :'Float',
|
|
@@ -369,6 +379,14 @@ module Zernio
|
|
|
369
379
|
self.objective = attributes[:'objective']
|
|
370
380
|
end
|
|
371
381
|
|
|
382
|
+
if attributes.key?(:'status')
|
|
383
|
+
self.status = attributes[:'status']
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
if attributes.key?(:'campaign_status')
|
|
387
|
+
self.campaign_status = attributes[:'campaign_status']
|
|
388
|
+
end
|
|
389
|
+
|
|
372
390
|
if attributes.key?(:'bid_strategy')
|
|
373
391
|
self.bid_strategy = attributes[:'bid_strategy']
|
|
374
392
|
end
|
|
@@ -506,6 +524,10 @@ module Zernio
|
|
|
506
524
|
return false unless advantage_audience_validator.valid?(@advantage_audience)
|
|
507
525
|
objective_validator = EnumAttributeValidator.new('String', ["OUTCOME_ENGAGEMENT", "OUTCOME_SALES", "OUTCOME_LEADS"])
|
|
508
526
|
return false unless objective_validator.valid?(@objective)
|
|
527
|
+
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
528
|
+
return false unless status_validator.valid?(@status)
|
|
529
|
+
campaign_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
530
|
+
return false unless campaign_status_validator.valid?(@campaign_status)
|
|
509
531
|
bid_strategy_validator = EnumAttributeValidator.new('String', ["LOWEST_COST_WITHOUT_CAP", "LOWEST_COST_WITH_BID_CAP", "COST_CAP", "LOWEST_COST_WITH_MIN_ROAS"])
|
|
510
532
|
return false unless bid_strategy_validator.valid?(@bid_strategy)
|
|
511
533
|
return false if !@dsa_beneficiary.nil? && @dsa_beneficiary.to_s.length > 100
|
|
@@ -688,6 +710,26 @@ module Zernio
|
|
|
688
710
|
@objective = objective
|
|
689
711
|
end
|
|
690
712
|
|
|
713
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
714
|
+
# @param [Object] status Object to be assigned
|
|
715
|
+
def status=(status)
|
|
716
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
717
|
+
unless validator.valid?(status)
|
|
718
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
719
|
+
end
|
|
720
|
+
@status = status
|
|
721
|
+
end
|
|
722
|
+
|
|
723
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
724
|
+
# @param [Object] campaign_status Object to be assigned
|
|
725
|
+
def campaign_status=(campaign_status)
|
|
726
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
727
|
+
unless validator.valid?(campaign_status)
|
|
728
|
+
fail ArgumentError, "invalid value for \"campaign_status\", must be one of #{validator.allowable_values}."
|
|
729
|
+
end
|
|
730
|
+
@campaign_status = campaign_status
|
|
731
|
+
end
|
|
732
|
+
|
|
691
733
|
# Custom attribute writer method checking allowed values (enum).
|
|
692
734
|
# @param [Object] bid_strategy Object to be assigned
|
|
693
735
|
def bid_strategy=(bid_strategy)
|
|
@@ -767,6 +809,8 @@ module Zernio
|
|
|
767
809
|
placements == o.placements &&
|
|
768
810
|
advantage_audience == o.advantage_audience &&
|
|
769
811
|
objective == o.objective &&
|
|
812
|
+
status == o.status &&
|
|
813
|
+
campaign_status == o.campaign_status &&
|
|
770
814
|
bid_strategy == o.bid_strategy &&
|
|
771
815
|
bid_amount == o.bid_amount &&
|
|
772
816
|
roas_average_floor == o.roas_average_floor &&
|
|
@@ -784,7 +828,7 @@ module Zernio
|
|
|
784
828
|
# Calculates hash code according to all attributes.
|
|
785
829
|
# @return [Integer] Hash code
|
|
786
830
|
def hash
|
|
787
|
-
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, destination].hash
|
|
831
|
+
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor, destination].hash
|
|
788
832
|
end
|
|
789
833
|
|
|
790
834
|
# Builds the object from hash
|
|
@@ -39,7 +39,7 @@ module Zernio
|
|
|
39
39
|
# Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (`headline` / `body` / `imageUrl` / `video`). Each entry must supply its own headline, body, and exactly one of `imageUrl` / `video`.
|
|
40
40
|
attr_accessor :creatives
|
|
41
41
|
|
|
42
|
-
# Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests` and `
|
|
42
|
+
# Attach the creatives to this EXISTING messaging ad set instead of building a campaign, so the ad set keeps its learning phase. It then owns budget, targeting and schedule, so `budgetAmount`, `budgetType`, `endDate`, `objective`, `countries`, `interests`, `audienceId` and `campaignStatus` are rejected with a 400 alongside it. Its `destination_type` must match the ad's destination.
|
|
43
43
|
attr_accessor :ad_set_id
|
|
44
44
|
|
|
45
45
|
# Budget amount in the ad account's currency major units (e.g. dollars for USD, not cents). Must be > 0. Required unless `adSetId` is set, where the ad set owns it.
|
|
@@ -89,6 +89,12 @@ module Zernio
|
|
|
89
89
|
# 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.
|
|
90
90
|
attr_accessor :objective
|
|
91
91
|
|
|
92
|
+
# Ad-level status. Defaults to `ACTIVE`. `PAUSED` skips activating the newly created ad(s) after Meta accepts them.
|
|
93
|
+
attr_accessor :status
|
|
94
|
+
|
|
95
|
+
# Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults to `ACTIVE`. `PAUSED` holds activation at the campaign so it never spends before the advertiser reviews it, while the ad set and ad still switch on (one resume call brings the whole hierarchy live). Only meaningful when a new campaign is being created; rejected with a 400 alongside `adSetId` (the attach shape reuses an existing campaign).
|
|
96
|
+
attr_accessor :campaign_status
|
|
97
|
+
|
|
92
98
|
# 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.
|
|
93
99
|
attr_accessor :bid_strategy
|
|
94
100
|
|
|
@@ -155,6 +161,8 @@ module Zernio
|
|
|
155
161
|
:'placements' => :'placements',
|
|
156
162
|
:'advantage_audience' => :'advantageAudience',
|
|
157
163
|
:'objective' => :'objective',
|
|
164
|
+
:'status' => :'status',
|
|
165
|
+
:'campaign_status' => :'campaignStatus',
|
|
158
166
|
:'bid_strategy' => :'bidStrategy',
|
|
159
167
|
:'bid_amount' => :'bidAmount',
|
|
160
168
|
:'roas_average_floor' => :'roasAverageFloor',
|
|
@@ -202,6 +210,8 @@ module Zernio
|
|
|
202
210
|
:'placements' => :'CtwaAdRequestBodyPlacements',
|
|
203
211
|
:'advantage_audience' => :'Integer',
|
|
204
212
|
:'objective' => :'String',
|
|
213
|
+
:'status' => :'String',
|
|
214
|
+
:'campaign_status' => :'String',
|
|
205
215
|
:'bid_strategy' => :'String',
|
|
206
216
|
:'bid_amount' => :'Float',
|
|
207
217
|
:'roas_average_floor' => :'Float',
|
|
@@ -358,6 +368,14 @@ module Zernio
|
|
|
358
368
|
self.objective = attributes[:'objective']
|
|
359
369
|
end
|
|
360
370
|
|
|
371
|
+
if attributes.key?(:'status')
|
|
372
|
+
self.status = attributes[:'status']
|
|
373
|
+
end
|
|
374
|
+
|
|
375
|
+
if attributes.key?(:'campaign_status')
|
|
376
|
+
self.campaign_status = attributes[:'campaign_status']
|
|
377
|
+
end
|
|
378
|
+
|
|
361
379
|
if attributes.key?(:'bid_strategy')
|
|
362
380
|
self.bid_strategy = attributes[:'bid_strategy']
|
|
363
381
|
end
|
|
@@ -485,6 +503,10 @@ module Zernio
|
|
|
485
503
|
return false unless advantage_audience_validator.valid?(@advantage_audience)
|
|
486
504
|
objective_validator = EnumAttributeValidator.new('String', ["OUTCOME_ENGAGEMENT", "OUTCOME_SALES", "OUTCOME_LEADS"])
|
|
487
505
|
return false unless objective_validator.valid?(@objective)
|
|
506
|
+
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
507
|
+
return false unless status_validator.valid?(@status)
|
|
508
|
+
campaign_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
509
|
+
return false unless campaign_status_validator.valid?(@campaign_status)
|
|
488
510
|
bid_strategy_validator = EnumAttributeValidator.new('String', ["LOWEST_COST_WITHOUT_CAP", "LOWEST_COST_WITH_BID_CAP", "COST_CAP", "LOWEST_COST_WITH_MIN_ROAS"])
|
|
489
511
|
return false unless bid_strategy_validator.valid?(@bid_strategy)
|
|
490
512
|
return false if !@dsa_beneficiary.nil? && @dsa_beneficiary.to_s.length > 100
|
|
@@ -664,6 +686,26 @@ module Zernio
|
|
|
664
686
|
@objective = objective
|
|
665
687
|
end
|
|
666
688
|
|
|
689
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
690
|
+
# @param [Object] status Object to be assigned
|
|
691
|
+
def status=(status)
|
|
692
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
693
|
+
unless validator.valid?(status)
|
|
694
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
|
695
|
+
end
|
|
696
|
+
@status = status
|
|
697
|
+
end
|
|
698
|
+
|
|
699
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
700
|
+
# @param [Object] campaign_status Object to be assigned
|
|
701
|
+
def campaign_status=(campaign_status)
|
|
702
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
703
|
+
unless validator.valid?(campaign_status)
|
|
704
|
+
fail ArgumentError, "invalid value for \"campaign_status\", must be one of #{validator.allowable_values}."
|
|
705
|
+
end
|
|
706
|
+
@campaign_status = campaign_status
|
|
707
|
+
end
|
|
708
|
+
|
|
667
709
|
# Custom attribute writer method checking allowed values (enum).
|
|
668
710
|
# @param [Object] bid_strategy Object to be assigned
|
|
669
711
|
def bid_strategy=(bid_strategy)
|
|
@@ -733,6 +775,8 @@ module Zernio
|
|
|
733
775
|
placements == o.placements &&
|
|
734
776
|
advantage_audience == o.advantage_audience &&
|
|
735
777
|
objective == o.objective &&
|
|
778
|
+
status == o.status &&
|
|
779
|
+
campaign_status == o.campaign_status &&
|
|
736
780
|
bid_strategy == o.bid_strategy &&
|
|
737
781
|
bid_amount == o.bid_amount &&
|
|
738
782
|
roas_average_floor == o.roas_average_floor &&
|
|
@@ -749,7 +793,7 @@ module Zernio
|
|
|
749
793
|
# Calculates hash code according to all attributes.
|
|
750
794
|
# @return [Integer] Hash code
|
|
751
795
|
def hash
|
|
752
|
-
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor].hash
|
|
796
|
+
[account_id, ad_account_id, name, headline, body, image_url, video, creatives, ad_set_id, budget_amount, budget_type, currency, end_date, countries, cities, regions, zips, metros, custom_locations, age_min, age_max, interests, audience_id, placements, advantage_audience, objective, status, campaign_status, bid_strategy, bid_amount, roas_average_floor, dsa_beneficiary, dsa_payor].hash
|
|
753
797
|
end
|
|
754
798
|
|
|
755
799
|
# Builds the object from hash
|
|
@@ -16,15 +16,20 @@ require 'time'
|
|
|
16
16
|
module Zernio
|
|
17
17
|
# Video creative. Mutually exclusive with this entry's `imageUrl`. Required if `imageUrl` is not supplied.
|
|
18
18
|
class CtwaAdRequestBodyCreativesInnerVideo < ApiModelBase
|
|
19
|
+
# Public URL of the video to upload. Provide either `url` or `id`.
|
|
19
20
|
attr_accessor :url
|
|
20
21
|
|
|
21
|
-
#
|
|
22
|
+
# Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`.
|
|
23
|
+
attr_accessor :id
|
|
24
|
+
|
|
25
|
+
# OPTIONAL: when omitted, the poster is auto-generated from Meta's own preferred video thumbnail. When Meta produces no candidate the request fails with a 502 platform_error (reason: video_thumbnail_unavailable).
|
|
22
26
|
attr_accessor :thumbnail_url
|
|
23
27
|
|
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
29
|
def self.attribute_map
|
|
26
30
|
{
|
|
27
31
|
:'url' => :'url',
|
|
32
|
+
:'id' => :'id',
|
|
28
33
|
:'thumbnail_url' => :'thumbnailUrl'
|
|
29
34
|
}
|
|
30
35
|
end
|
|
@@ -43,6 +48,7 @@ module Zernio
|
|
|
43
48
|
def self.openapi_types
|
|
44
49
|
{
|
|
45
50
|
:'url' => :'String',
|
|
51
|
+
:'id' => :'String',
|
|
46
52
|
:'thumbnail_url' => :'String'
|
|
47
53
|
}
|
|
48
54
|
end
|
|
@@ -71,14 +77,14 @@ module Zernio
|
|
|
71
77
|
|
|
72
78
|
if attributes.key?(:'url')
|
|
73
79
|
self.url = attributes[:'url']
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'id')
|
|
83
|
+
self.id = attributes[:'id']
|
|
76
84
|
end
|
|
77
85
|
|
|
78
86
|
if attributes.key?(:'thumbnail_url')
|
|
79
87
|
self.thumbnail_url = attributes[:'thumbnail_url']
|
|
80
|
-
else
|
|
81
|
-
self.thumbnail_url = nil
|
|
82
88
|
end
|
|
83
89
|
end
|
|
84
90
|
|
|
@@ -87,14 +93,6 @@ module Zernio
|
|
|
87
93
|
def list_invalid_properties
|
|
88
94
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
95
|
invalid_properties = Array.new
|
|
90
|
-
if @url.nil?
|
|
91
|
-
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
if @thumbnail_url.nil?
|
|
95
|
-
invalid_properties.push('invalid value for "thumbnail_url", thumbnail_url cannot be nil.')
|
|
96
|
-
end
|
|
97
|
-
|
|
98
96
|
invalid_properties
|
|
99
97
|
end
|
|
100
98
|
|
|
@@ -102,37 +100,16 @@ module Zernio
|
|
|
102
100
|
# @return true if the model is valid
|
|
103
101
|
def valid?
|
|
104
102
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
-
return false if @url.nil?
|
|
106
|
-
return false if @thumbnail_url.nil?
|
|
107
103
|
true
|
|
108
104
|
end
|
|
109
105
|
|
|
110
|
-
# Custom attribute writer method with validation
|
|
111
|
-
# @param [Object] url Value to be assigned
|
|
112
|
-
def url=(url)
|
|
113
|
-
if url.nil?
|
|
114
|
-
fail ArgumentError, 'url cannot be nil'
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
@url = url
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
# Custom attribute writer method with validation
|
|
121
|
-
# @param [Object] thumbnail_url Value to be assigned
|
|
122
|
-
def thumbnail_url=(thumbnail_url)
|
|
123
|
-
if thumbnail_url.nil?
|
|
124
|
-
fail ArgumentError, 'thumbnail_url cannot be nil'
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
@thumbnail_url = thumbnail_url
|
|
128
|
-
end
|
|
129
|
-
|
|
130
106
|
# Checks equality by comparing each attribute.
|
|
131
107
|
# @param [Object] Object to be compared
|
|
132
108
|
def ==(o)
|
|
133
109
|
return true if self.equal?(o)
|
|
134
110
|
self.class == o.class &&
|
|
135
111
|
url == o.url &&
|
|
112
|
+
id == o.id &&
|
|
136
113
|
thumbnail_url == o.thumbnail_url
|
|
137
114
|
end
|
|
138
115
|
|
|
@@ -145,7 +122,7 @@ module Zernio
|
|
|
145
122
|
# Calculates hash code according to all attributes.
|
|
146
123
|
# @return [Integer] Hash code
|
|
147
124
|
def hash
|
|
148
|
-
[url, thumbnail_url].hash
|
|
125
|
+
[url, id, thumbnail_url].hash
|
|
149
126
|
end
|
|
150
127
|
|
|
151
128
|
# Builds the object from hash
|
|
@@ -16,15 +16,20 @@ require 'time'
|
|
|
16
16
|
module Zernio
|
|
17
17
|
# Video creative for single-creative shape. Mutually exclusive with `imageUrl` and with `creatives[]`. Required on the single-creative shape if `imageUrl` is not supplied.
|
|
18
18
|
class CtwaAdRequestBodyVideo < ApiModelBase
|
|
19
|
+
# Public URL of the video to upload. Provide either `url` or `id`.
|
|
19
20
|
attr_accessor :url
|
|
20
21
|
|
|
21
|
-
#
|
|
22
|
+
# Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`.
|
|
23
|
+
attr_accessor :id
|
|
24
|
+
|
|
25
|
+
# OPTIONAL: when omitted, the poster is auto-generated from Meta's own preferred video thumbnail. When Meta produces no candidate the request fails with a 502 platform_error (reason: video_thumbnail_unavailable) — retry, or supply this field to control the poster frame exactly.
|
|
22
26
|
attr_accessor :thumbnail_url
|
|
23
27
|
|
|
24
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
29
|
def self.attribute_map
|
|
26
30
|
{
|
|
27
31
|
:'url' => :'url',
|
|
32
|
+
:'id' => :'id',
|
|
28
33
|
:'thumbnail_url' => :'thumbnailUrl'
|
|
29
34
|
}
|
|
30
35
|
end
|
|
@@ -43,6 +48,7 @@ module Zernio
|
|
|
43
48
|
def self.openapi_types
|
|
44
49
|
{
|
|
45
50
|
:'url' => :'String',
|
|
51
|
+
:'id' => :'String',
|
|
46
52
|
:'thumbnail_url' => :'String'
|
|
47
53
|
}
|
|
48
54
|
end
|
|
@@ -71,14 +77,14 @@ module Zernio
|
|
|
71
77
|
|
|
72
78
|
if attributes.key?(:'url')
|
|
73
79
|
self.url = attributes[:'url']
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'id')
|
|
83
|
+
self.id = attributes[:'id']
|
|
76
84
|
end
|
|
77
85
|
|
|
78
86
|
if attributes.key?(:'thumbnail_url')
|
|
79
87
|
self.thumbnail_url = attributes[:'thumbnail_url']
|
|
80
|
-
else
|
|
81
|
-
self.thumbnail_url = nil
|
|
82
88
|
end
|
|
83
89
|
end
|
|
84
90
|
|
|
@@ -87,14 +93,6 @@ module Zernio
|
|
|
87
93
|
def list_invalid_properties
|
|
88
94
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
95
|
invalid_properties = Array.new
|
|
90
|
-
if @url.nil?
|
|
91
|
-
invalid_properties.push('invalid value for "url", url cannot be nil.')
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
if @thumbnail_url.nil?
|
|
95
|
-
invalid_properties.push('invalid value for "thumbnail_url", thumbnail_url cannot be nil.')
|
|
96
|
-
end
|
|
97
|
-
|
|
98
96
|
invalid_properties
|
|
99
97
|
end
|
|
100
98
|
|
|
@@ -102,37 +100,16 @@ module Zernio
|
|
|
102
100
|
# @return true if the model is valid
|
|
103
101
|
def valid?
|
|
104
102
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
-
return false if @url.nil?
|
|
106
|
-
return false if @thumbnail_url.nil?
|
|
107
103
|
true
|
|
108
104
|
end
|
|
109
105
|
|
|
110
|
-
# Custom attribute writer method with validation
|
|
111
|
-
# @param [Object] url Value to be assigned
|
|
112
|
-
def url=(url)
|
|
113
|
-
if url.nil?
|
|
114
|
-
fail ArgumentError, 'url cannot be nil'
|
|
115
|
-
end
|
|
116
|
-
|
|
117
|
-
@url = url
|
|
118
|
-
end
|
|
119
|
-
|
|
120
|
-
# Custom attribute writer method with validation
|
|
121
|
-
# @param [Object] thumbnail_url Value to be assigned
|
|
122
|
-
def thumbnail_url=(thumbnail_url)
|
|
123
|
-
if thumbnail_url.nil?
|
|
124
|
-
fail ArgumentError, 'thumbnail_url cannot be nil'
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
@thumbnail_url = thumbnail_url
|
|
128
|
-
end
|
|
129
|
-
|
|
130
106
|
# Checks equality by comparing each attribute.
|
|
131
107
|
# @param [Object] Object to be compared
|
|
132
108
|
def ==(o)
|
|
133
109
|
return true if self.equal?(o)
|
|
134
110
|
self.class == o.class &&
|
|
135
111
|
url == o.url &&
|
|
112
|
+
id == o.id &&
|
|
136
113
|
thumbnail_url == o.thumbnail_url
|
|
137
114
|
end
|
|
138
115
|
|
|
@@ -145,7 +122,7 @@ module Zernio
|
|
|
145
122
|
# Calculates hash code according to all attributes.
|
|
146
123
|
# @return [Integer] Hash code
|
|
147
124
|
def hash
|
|
148
|
-
[url, thumbnail_url].hash
|
|
125
|
+
[url, id, thumbnail_url].hash
|
|
149
126
|
end
|
|
150
127
|
|
|
151
128
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -825,15 +825,18 @@ components:
|
|
|
825
825
|
single-creative shape if `video` is not supplied.
|
|
826
826
|
video:
|
|
827
827
|
type: object
|
|
828
|
-
required: [url, thumbnailUrl]
|
|
829
828
|
properties:
|
|
830
|
-
url: { type: string, format: uri }
|
|
829
|
+
url: { type: string, format: uri, description: "Public URL of the video to upload. Provide either `url` or `id`." }
|
|
830
|
+
id: { type: string, description: "Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`." }
|
|
831
831
|
thumbnailUrl:
|
|
832
832
|
type: string
|
|
833
833
|
format: uri
|
|
834
834
|
description: |
|
|
835
|
-
|
|
836
|
-
|
|
835
|
+
OPTIONAL: when omitted, the poster is auto-generated from
|
|
836
|
+
Meta's own preferred video thumbnail. When Meta produces no
|
|
837
|
+
candidate the request fails with a 502 platform_error
|
|
838
|
+
(reason: video_thumbnail_unavailable) — retry, or supply
|
|
839
|
+
this field to control the poster frame exactly.
|
|
837
840
|
description: |
|
|
838
841
|
Video creative for single-creative shape. Mutually
|
|
839
842
|
exclusive with `imageUrl` and with `creatives[]`. Required
|
|
@@ -871,15 +874,17 @@ components:
|
|
|
871
874
|
`video`. Required if `video` is not supplied.
|
|
872
875
|
video:
|
|
873
876
|
type: object
|
|
874
|
-
required: [url, thumbnailUrl]
|
|
875
877
|
properties:
|
|
876
|
-
url: { type: string, format: uri }
|
|
878
|
+
url: { type: string, format: uri, description: "Public URL of the video to upload. Provide either `url` or `id`." }
|
|
879
|
+
id: { type: string, description: "Reuse a video already uploaded to this ad account (list them with GET /v1/ads/videos) instead of re-uploading. Wins over `url`. Provide either `url` or `id`." }
|
|
877
880
|
thumbnailUrl:
|
|
878
881
|
type: string
|
|
879
882
|
format: uri
|
|
880
883
|
description: |
|
|
881
|
-
|
|
882
|
-
|
|
884
|
+
OPTIONAL: when omitted, the poster is auto-generated
|
|
885
|
+
from Meta's own preferred video thumbnail. When Meta
|
|
886
|
+
produces no candidate the request fails with a 502
|
|
887
|
+
platform_error (reason: video_thumbnail_unavailable).
|
|
883
888
|
description: |
|
|
884
889
|
Video creative. Mutually exclusive with this entry's
|
|
885
890
|
`imageUrl`. Required if `imageUrl` is not supplied.
|
|
@@ -889,9 +894,9 @@ components:
|
|
|
889
894
|
Attach the creatives to this EXISTING messaging ad set instead of
|
|
890
895
|
building a campaign, so the ad set keeps its learning phase. It then
|
|
891
896
|
owns budget, targeting and schedule, so `budgetAmount`, `budgetType`,
|
|
892
|
-
`endDate`, `objective`, `countries`, `interests
|
|
893
|
-
rejected with a 400 alongside it. Its
|
|
894
|
-
the ad's destination.
|
|
897
|
+
`endDate`, `objective`, `countries`, `interests`, `audienceId` and
|
|
898
|
+
`campaignStatus` are rejected with a 400 alongside it. Its
|
|
899
|
+
`destination_type` must match the ad's destination.
|
|
895
900
|
budgetAmount:
|
|
896
901
|
type: number
|
|
897
902
|
exclusiveMinimum: 0
|
|
@@ -1057,6 +1062,22 @@ components:
|
|
|
1057
1062
|
Defaults to `OUTCOME_ENGAGEMENT`. `OUTCOME_SALES` and `OUTCOME_LEADS` require
|
|
1058
1063
|
additional account configuration (Dataset linked to the WABA
|
|
1059
1064
|
for sales) and may be rejected by Meta if missing.
|
|
1065
|
+
status:
|
|
1066
|
+
type: string
|
|
1067
|
+
enum: [ACTIVE, PAUSED]
|
|
1068
|
+
description: |
|
|
1069
|
+
Ad-level status. Defaults to `ACTIVE`. `PAUSED` skips activating the
|
|
1070
|
+
newly created ad(s) after Meta accepts them.
|
|
1071
|
+
campaignStatus:
|
|
1072
|
+
type: string
|
|
1073
|
+
enum: [ACTIVE, PAUSED]
|
|
1074
|
+
description: |
|
|
1075
|
+
Campaign-level status, same semantics as `POST /v1/ads/create`. Defaults
|
|
1076
|
+
to `ACTIVE`. `PAUSED` holds activation at the campaign so it never
|
|
1077
|
+
spends before the advertiser reviews it, while the ad set and ad still
|
|
1078
|
+
switch on (one resume call brings the whole hierarchy live). Only
|
|
1079
|
+
meaningful when a new campaign is being created; rejected with a 400
|
|
1080
|
+
alongside `adSetId` (the attach shape reuses an existing campaign).
|
|
1060
1081
|
bidStrategy:
|
|
1061
1082
|
type: string
|
|
1062
1083
|
enum:
|
|
@@ -195,6 +195,26 @@ describe Zernio::CreateCallAdRequest do
|
|
|
195
195
|
end
|
|
196
196
|
end
|
|
197
197
|
|
|
198
|
+
describe 'test attribute "status"' do
|
|
199
|
+
it 'should work' do
|
|
200
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
201
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
202
|
+
# validator.allowable_values.each do |value|
|
|
203
|
+
# expect { instance.status = value }.not_to raise_error
|
|
204
|
+
# end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
describe 'test attribute "campaign_status"' do
|
|
209
|
+
it 'should work' do
|
|
210
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
211
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
212
|
+
# validator.allowable_values.each do |value|
|
|
213
|
+
# expect { instance.campaign_status = value }.not_to raise_error
|
|
214
|
+
# end
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
198
218
|
describe 'test attribute "bid_strategy"' do
|
|
199
219
|
it 'should work' do
|
|
200
220
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -195,6 +195,26 @@ describe Zernio::CreateMessagingAdRequest do
|
|
|
195
195
|
end
|
|
196
196
|
end
|
|
197
197
|
|
|
198
|
+
describe 'test attribute "status"' do
|
|
199
|
+
it 'should work' do
|
|
200
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
201
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
202
|
+
# validator.allowable_values.each do |value|
|
|
203
|
+
# expect { instance.status = value }.not_to raise_error
|
|
204
|
+
# end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
describe 'test attribute "campaign_status"' do
|
|
209
|
+
it 'should work' do
|
|
210
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
211
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
212
|
+
# validator.allowable_values.each do |value|
|
|
213
|
+
# expect { instance.campaign_status = value }.not_to raise_error
|
|
214
|
+
# end
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
198
218
|
describe 'test attribute "bid_strategy"' do
|
|
199
219
|
it 'should work' do
|
|
200
220
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -33,6 +33,12 @@ describe Zernio::CtwaAdRequestBodyCreativesInnerVideo do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "id"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
describe 'test attribute "thumbnail_url"' do
|
|
37
43
|
it 'should work' do
|
|
38
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -195,6 +195,26 @@ describe Zernio::CtwaAdRequestBody do
|
|
|
195
195
|
end
|
|
196
196
|
end
|
|
197
197
|
|
|
198
|
+
describe 'test attribute "status"' do
|
|
199
|
+
it 'should work' do
|
|
200
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
201
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
202
|
+
# validator.allowable_values.each do |value|
|
|
203
|
+
# expect { instance.status = value }.not_to raise_error
|
|
204
|
+
# end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
describe 'test attribute "campaign_status"' do
|
|
209
|
+
it 'should work' do
|
|
210
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
211
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
212
|
+
# validator.allowable_values.each do |value|
|
|
213
|
+
# expect { instance.campaign_status = value }.not_to raise_error
|
|
214
|
+
# end
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
198
218
|
describe 'test attribute "bid_strategy"' do
|
|
199
219
|
it 'should work' do
|
|
200
220
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -33,6 +33,12 @@ describe Zernio::CtwaAdRequestBodyVideo do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "id"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
describe 'test attribute "thumbnail_url"' do
|
|
37
43
|
it 'should work' do
|
|
38
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|