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 +4 -4
- data/docs/CreateCallAdRequest.md +5 -1
- data/docs/CreateMessagingAdRequest.md +5 -1
- data/docs/CreateStandaloneAdRequest.md +6 -2
- data/docs/CtwaAdRequestBody.md +5 -1
- 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/create_standalone_ad_request.rb +47 -3
- data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +46 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +1 -1
- 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/create_standalone_ad_request_spec.rb +20 -0
- data/spec/models/ctwa_ad_request_body_spec.rb +20 -0
- data/zernio-sdk-0.0.1285.gem +0 -0
- metadata +2 -2
- data/zernio-sdk-0.0.1283.gem +0 -0
|
@@ -70,7 +70,7 @@ module Zernio
|
|
|
70
70
|
# 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.
|
|
71
71
|
attr_accessor :creatives
|
|
72
72
|
|
|
73
|
-
# 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.
|
|
73
|
+
# 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.
|
|
74
74
|
attr_accessor :ad_set_id
|
|
75
75
|
|
|
76
76
|
# 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`.
|
|
@@ -192,6 +192,12 @@ module Zernio
|
|
|
192
192
|
# 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).
|
|
193
193
|
attr_accessor :campaign_status
|
|
194
194
|
|
|
195
|
+
# 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).
|
|
196
|
+
attr_accessor :ad_set_status
|
|
197
|
+
|
|
198
|
+
# 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.
|
|
199
|
+
attr_accessor :ad_status
|
|
200
|
+
|
|
195
201
|
# 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.
|
|
196
202
|
attr_accessor :bid_strategy
|
|
197
203
|
|
|
@@ -300,6 +306,8 @@ module Zernio
|
|
|
300
306
|
:'objective' => :'objective',
|
|
301
307
|
:'status' => :'status',
|
|
302
308
|
:'campaign_status' => :'campaignStatus',
|
|
309
|
+
:'ad_set_status' => :'adSetStatus',
|
|
310
|
+
:'ad_status' => :'adStatus',
|
|
303
311
|
:'bid_strategy' => :'bidStrategy',
|
|
304
312
|
:'bid_amount' => :'bidAmount',
|
|
305
313
|
:'roas_average_floor' => :'roasAverageFloor',
|
|
@@ -385,6 +393,8 @@ module Zernio
|
|
|
385
393
|
:'objective' => :'String',
|
|
386
394
|
:'status' => :'String',
|
|
387
395
|
:'campaign_status' => :'String',
|
|
396
|
+
:'ad_set_status' => :'String',
|
|
397
|
+
:'ad_status' => :'String',
|
|
388
398
|
:'bid_strategy' => :'String',
|
|
389
399
|
:'bid_amount' => :'Float',
|
|
390
400
|
:'roas_average_floor' => :'Float',
|
|
@@ -721,6 +731,14 @@ module Zernio
|
|
|
721
731
|
self.campaign_status = attributes[:'campaign_status']
|
|
722
732
|
end
|
|
723
733
|
|
|
734
|
+
if attributes.key?(:'ad_set_status')
|
|
735
|
+
self.ad_set_status = attributes[:'ad_set_status']
|
|
736
|
+
end
|
|
737
|
+
|
|
738
|
+
if attributes.key?(:'ad_status')
|
|
739
|
+
self.ad_status = attributes[:'ad_status']
|
|
740
|
+
end
|
|
741
|
+
|
|
724
742
|
if attributes.key?(:'bid_strategy')
|
|
725
743
|
self.bid_strategy = attributes[:'bid_strategy']
|
|
726
744
|
end
|
|
@@ -938,6 +956,10 @@ module Zernio
|
|
|
938
956
|
return false unless status_validator.valid?(@status)
|
|
939
957
|
campaign_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
940
958
|
return false unless campaign_status_validator.valid?(@campaign_status)
|
|
959
|
+
ad_set_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
960
|
+
return false unless ad_set_status_validator.valid?(@ad_set_status)
|
|
961
|
+
ad_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
962
|
+
return false unless ad_status_validator.valid?(@ad_status)
|
|
941
963
|
bid_strategy_validator = EnumAttributeValidator.new('String', ["LOWEST_COST_WITHOUT_CAP", "LOWEST_COST_WITH_BID_CAP", "COST_CAP", "LOWEST_COST_WITH_MIN_ROAS"])
|
|
942
964
|
return false unless bid_strategy_validator.valid?(@bid_strategy)
|
|
943
965
|
return false if !@dsa_beneficiary.nil? && @dsa_beneficiary.to_s.length > 100
|
|
@@ -1342,6 +1364,26 @@ module Zernio
|
|
|
1342
1364
|
@campaign_status = campaign_status
|
|
1343
1365
|
end
|
|
1344
1366
|
|
|
1367
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
1368
|
+
# @param [Object] ad_set_status Object to be assigned
|
|
1369
|
+
def ad_set_status=(ad_set_status)
|
|
1370
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
1371
|
+
unless validator.valid?(ad_set_status)
|
|
1372
|
+
fail ArgumentError, "invalid value for \"ad_set_status\", must be one of #{validator.allowable_values}."
|
|
1373
|
+
end
|
|
1374
|
+
@ad_set_status = ad_set_status
|
|
1375
|
+
end
|
|
1376
|
+
|
|
1377
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
1378
|
+
# @param [Object] ad_status Object to be assigned
|
|
1379
|
+
def ad_status=(ad_status)
|
|
1380
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
1381
|
+
unless validator.valid?(ad_status)
|
|
1382
|
+
fail ArgumentError, "invalid value for \"ad_status\", must be one of #{validator.allowable_values}."
|
|
1383
|
+
end
|
|
1384
|
+
@ad_status = ad_status
|
|
1385
|
+
end
|
|
1386
|
+
|
|
1345
1387
|
# Custom attribute writer method checking allowed values (enum).
|
|
1346
1388
|
# @param [Object] bid_strategy Object to be assigned
|
|
1347
1389
|
def bid_strategy=(bid_strategy)
|
|
@@ -1447,6 +1489,8 @@ module Zernio
|
|
|
1447
1489
|
objective == o.objective &&
|
|
1448
1490
|
status == o.status &&
|
|
1449
1491
|
campaign_status == o.campaign_status &&
|
|
1492
|
+
ad_set_status == o.ad_set_status &&
|
|
1493
|
+
ad_status == o.ad_status &&
|
|
1450
1494
|
bid_strategy == o.bid_strategy &&
|
|
1451
1495
|
bid_amount == o.bid_amount &&
|
|
1452
1496
|
roas_average_floor == o.roas_average_floor &&
|
|
@@ -1465,7 +1509,7 @@ module Zernio
|
|
|
1465
1509
|
# Calculates hash code according to all attributes.
|
|
1466
1510
|
# @return [Integer] Hash code
|
|
1467
1511
|
def hash
|
|
1468
|
-
[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].hash
|
|
1512
|
+
[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].hash
|
|
1469
1513
|
end
|
|
1470
1514
|
|
|
1471
1515
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED