late-sdk 0.0.1297 → 0.0.1298
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/AdCampaignsApi.md +1 -1
- data/docs/BoostPostRequest.md +7 -1
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +2 -2
- data/lib/zernio-sdk/models/boost_post_request.rb +56 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +1 -1
- data/spec/api/ad_campaigns_api_spec.rb +1 -1
- data/spec/models/boost_post_request_spec.rb +26 -0
- data/zernio-sdk-0.0.1298.gem +0 -0
- metadata +2 -2
- data/zernio-sdk-0.0.1297.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 79b56ca6f156497a411e12daf1ca18f7c556e6d60e35e991e30c833b61b38bb6
|
|
4
|
+
data.tar.gz: 183f263153603fcf9f4c42f0e542df893d044f635d89ca0c597f144a7cf5a70c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d8097bfb3d1d34dc27fea615e9a9f91cde1a6521ecdebda7c773f7084ec401997a11705892a744757c5cde745240e0801a4e7b830ed3396693ad5f595e651ff4
|
|
7
|
+
data.tar.gz: b1806f1fdb8f9bef61bebcfd0bfbe54add5463096a1e1b2f6fa16c63cc0e8b139f27ab9455fb9406313001a768756d76157a36ccef8783f02c70576715a8b10b
|
data/docs/AdCampaignsApi.md
CHANGED
|
@@ -855,7 +855,7 @@ end
|
|
|
855
855
|
|
|
856
856
|
Cancel an ad
|
|
857
857
|
|
|
858
|
-
|
|
858
|
+
Deletes the ad on the platform and marks it as cancelled in the database. The ad is preserved for history. OpenAI Ads has no delete API; the ad is archived instead (a terminal state, the closest equivalent). Only the ad is deleted; a campaign or ad set is never deleted while it still holds another ad. On Meta, when the ad set and campaign were created by Zernio (by `POST /v1/ads/create` or `POST /v1/ads/boost`) and Meta lists no other ad in the ad set (archived ads count), the emptied ad set is deleted too, then the campaign once it holds no other ad set. Parents created outside Zernio, and the parents of an ad imported from the platform, are always kept. To delete a whole campaign on purpose use `DELETE /v1/ads/campaigns/{campaignId}`.
|
|
859
859
|
|
|
860
860
|
### Examples
|
|
861
861
|
|
data/docs/BoostPostRequest.md
CHANGED
|
@@ -49,7 +49,10 @@
|
|
|
49
49
|
| **dsa_beneficiary** | **String** | Legal entity that benefits from the ad. Required when targeting EU users (EU DSA, Article 26). Optional if the ad account has a default beneficiary: set it once via `PATCH /v1/ads/accounts` or in Meta Ads Manager, and Meta fills it in whenever the field is omitted. | [optional] |
|
|
50
50
|
| **dsa_payor** | **String** | Legal entity that pays for the ad. Can differ from `dsaBeneficiary` (for example, an agency paying for a client's ads). Same rules as `dsaBeneficiary`: required for EU targeting unless the ad account has a default payor. | [optional] |
|
|
51
51
|
| **lead_gen_form_id** | **String** | Lead Gen form ID to attach to the boosted ad's creative. REQUIRED when `goal` is `lead_generation`. On Meta this is the leadgen_forms ID (create one via POST /v1/ads/lead-forms). On LinkedIn this is the adForm ID (create one via POST /v1/ads/lead-forms with a LinkedIn account); the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}`. Ignored for other goals. | [optional] |
|
|
52
|
-
| **status** | **String** | Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default); PAUSED pauses only the top-most object this boost creates and switches everything below it on: a new campaign is held paused with its ad set and ad on (one PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live); into an existing campaign (TikTok `existingCampaignId`) the new ad set is held paused; attached to an existing ad set (`adSetId`) the new ad itself is paused. On LinkedIn the held campaign group is PAUSED, its campaign and creative ACTIVE. X has no per-ad switch, so its lowest level is the line item. | [optional] |
|
|
52
|
+
| **status** | **String** | Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default); PAUSED pauses only the top-most object this boost creates and switches everything below it on: a new campaign is held paused with its ad set and ad on (one PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live); into an existing campaign (TikTok `existingCampaignId`) the new ad set is held paused; attached to an existing ad set (`adSetId`) the new ad itself is paused. On LinkedIn the held campaign group is PAUSED, its campaign and creative ACTIVE. X has no per-ad switch, so its lowest level is the line item. `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. | [optional] |
|
|
53
|
+
| **campaign_status** | **String** | Every platform, same semantics as POST /v1/ads/create. Sets the switch of the new campaign alone (LinkedIn: the campaign group) and overrides `status` for it. `ACTIVE` with `status: PAUSED` switches the campaign on and holds the new ad set paused (its ad on). Omitted, it follows `status`. Rejected with a 400 alongside `adSetId` or `existingCampaignId`, where no campaign is created (change an existing one with PUT /v1/ads/campaigns/{campaignId}/status). | [optional] |
|
|
54
|
+
| **ad_set_status** | **String** | Every platform, same semantics as POST /v1/ads/create. Sets the switch of the new ad set alone (Google, TikTok and Pinterest: 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 create 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). | [optional] |
|
|
55
|
+
| **ad_status** | [**AdActivationStatus**](AdActivationStatus.md) | Sets the switch of the new ad alone, also when attaching to an existing ad set with `adSetId` (Meta, TikTok Smart+), 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`. | [optional] |
|
|
53
56
|
| **budget_level** | **String** | Meta only, same semantics as POST /v1/ads/create: campaign = Advantage campaign budget (CBO), the budget and bid strategy sit on the campaign and the ad set inherits them. Default adset. Not allowed with adSetId. | [optional] |
|
|
54
57
|
| **attribution_spec** | [**Array<BoostPostRequestAttributionSpecInner>**](BoostPostRequestAttributionSpecInner.md) | Meta only. Ad-set attribution windows, same shape as POST /v1/ads/create. Applied on OUTCOME_SALES, OUTCOME_LEADS and OUTCOME_APP_PROMOTION campaigns (conversions, lead_conversion, lead_generation, app_promotion); other objectives keep Meta's default. Not allowed with adSetId. | [optional] |
|
|
55
58
|
| **bodies** | **Array<String>** | Meta only. Extra primary-text options Meta rotates on the boosted post (asset_feed_spec.bodies with DEGREES_OF_FREEDOM); the post keeps its own text as one of the options. Works for Facebook posts and Instagram media. Under a conversions or traffic goal Meta also wants a website URL on the options, taken from `linkUrl` (send it with a `callToAction`); engagement boosts need none. | [optional] |
|
|
@@ -108,6 +111,9 @@ instance = Zernio::BoostPostRequest.new(
|
|
|
108
111
|
dsa_payor: null,
|
|
109
112
|
lead_gen_form_id: null,
|
|
110
113
|
status: null,
|
|
114
|
+
campaign_status: null,
|
|
115
|
+
ad_set_status: null,
|
|
116
|
+
ad_status: null,
|
|
111
117
|
budget_level: null,
|
|
112
118
|
attribution_spec: null,
|
|
113
119
|
bodies: null,
|
|
@@ -829,7 +829,7 @@ module Zernio
|
|
|
829
829
|
end
|
|
830
830
|
|
|
831
831
|
# Cancel an ad
|
|
832
|
-
#
|
|
832
|
+
# Deletes the ad on the platform and marks it as cancelled in the database. The ad is preserved for history. OpenAI Ads has no delete API; the ad is archived instead (a terminal state, the closest equivalent). Only the ad is deleted; a campaign or ad set is never deleted while it still holds another ad. On Meta, when the ad set and campaign were created by Zernio (by `POST /v1/ads/create` or `POST /v1/ads/boost`) and Meta lists no other ad in the ad set (archived ads count), the emptied ad set is deleted too, then the campaign once it holds no other ad set. Parents created outside Zernio, and the parents of an ad imported from the platform, are always kept. To delete a whole campaign on purpose use `DELETE /v1/ads/campaigns/{campaignId}`.
|
|
833
833
|
# @param ad_id [String]
|
|
834
834
|
# @param [Hash] opts the optional parameters
|
|
835
835
|
# @return [DeleteAccountGroup200Response]
|
|
@@ -839,7 +839,7 @@ module Zernio
|
|
|
839
839
|
end
|
|
840
840
|
|
|
841
841
|
# Cancel an ad
|
|
842
|
-
#
|
|
842
|
+
# Deletes the ad on the platform and marks it as cancelled in the database. The ad is preserved for history. OpenAI Ads has no delete API; the ad is archived instead (a terminal state, the closest equivalent). Only the ad is deleted; a campaign or ad set is never deleted while it still holds another ad. On Meta, when the ad set and campaign were created by Zernio (by `POST /v1/ads/create` or `POST /v1/ads/boost`) and Meta lists no other ad in the ad set (archived ads count), the emptied ad set is deleted too, then the campaign once it holds no other ad set. Parents created outside Zernio, and the parents of an ad imported from the platform, are always kept. To delete a whole campaign on purpose use `DELETE /v1/ads/campaigns/{campaignId}`.
|
|
843
843
|
# @param ad_id [String]
|
|
844
844
|
# @param [Hash] opts the optional parameters
|
|
845
845
|
# @return [Array<(DeleteAccountGroup200Response, Integer, Hash)>] DeleteAccountGroup200Response data, response status code and response headers
|
|
@@ -143,9 +143,18 @@ module Zernio
|
|
|
143
143
|
# Lead Gen form ID to attach to the boosted ad's creative. REQUIRED when `goal` is `lead_generation`. On Meta this is the leadgen_forms ID (create one via POST /v1/ads/lead-forms). On LinkedIn this is the adForm ID (create one via POST /v1/ads/lead-forms with a LinkedIn account); the creative's `leadgenCallToAction.destination` is set to `urn:li:adForm:{id}`. Ignored for other goals.
|
|
144
144
|
attr_accessor :lead_gen_form_id
|
|
145
145
|
|
|
146
|
-
# Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default); PAUSED pauses only the top-most object this boost creates and switches everything below it on: a new campaign is held paused with its ad set and ad on (one PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live); into an existing campaign (TikTok `existingCampaignId`) the new ad set is held paused; attached to an existing ad set (`adSetId`) the new ad itself is paused. On LinkedIn the held campaign group is PAUSED, its campaign and creative ACTIVE. X has no per-ad switch, so its lowest level is the line item.
|
|
146
|
+
# Publish state of the created entities, on every platform. Omitted or ACTIVE publishes live (default); PAUSED pauses only the top-most object this boost creates and switches everything below it on: a new campaign is held paused with its ad set and ad on (one PUT /v1/ads/campaigns/{campaignId}/status with `active` brings it live); into an existing campaign (TikTok `existingCampaignId`) the new ad set is held paused; attached to an existing ad set (`adSetId`) the new ad itself is paused. On LinkedIn the held campaign group is PAUSED, its campaign and creative ACTIVE. X has no per-ad switch, so its lowest level is the line item. `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.
|
|
147
147
|
attr_accessor :status
|
|
148
148
|
|
|
149
|
+
# Every platform, same semantics as POST /v1/ads/create. Sets the switch of the new campaign alone (LinkedIn: the campaign group) and overrides `status` for it. `ACTIVE` with `status: PAUSED` switches the campaign on and holds the new ad set paused (its ad on). Omitted, it follows `status`. Rejected with a 400 alongside `adSetId` or `existingCampaignId`, where no campaign is created (change an existing one with PUT /v1/ads/campaigns/{campaignId}/status).
|
|
150
|
+
attr_accessor :campaign_status
|
|
151
|
+
|
|
152
|
+
# Every platform, same semantics as POST /v1/ads/create. Sets the switch of the new ad set alone (Google, TikTok and Pinterest: 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 create 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).
|
|
153
|
+
attr_accessor :ad_set_status
|
|
154
|
+
|
|
155
|
+
# Sets the switch of the new ad alone, also when attaching to an existing ad set with `adSetId` (Meta, TikTok Smart+), 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`.
|
|
156
|
+
attr_accessor :ad_status
|
|
157
|
+
|
|
149
158
|
# Meta only, same semantics as POST /v1/ads/create: campaign = Advantage campaign budget (CBO), the budget and bid strategy sit on the campaign and the ad set inherits them. Default adset. Not allowed with adSetId.
|
|
150
159
|
attr_accessor :budget_level
|
|
151
160
|
|
|
@@ -231,6 +240,9 @@ module Zernio
|
|
|
231
240
|
:'dsa_payor' => :'dsaPayor',
|
|
232
241
|
:'lead_gen_form_id' => :'leadGenFormId',
|
|
233
242
|
:'status' => :'status',
|
|
243
|
+
:'campaign_status' => :'campaignStatus',
|
|
244
|
+
:'ad_set_status' => :'adSetStatus',
|
|
245
|
+
:'ad_status' => :'adStatus',
|
|
234
246
|
:'budget_level' => :'budgetLevel',
|
|
235
247
|
:'attribution_spec' => :'attributionSpec',
|
|
236
248
|
:'bodies' => :'bodies',
|
|
@@ -298,6 +310,9 @@ module Zernio
|
|
|
298
310
|
:'dsa_payor' => :'String',
|
|
299
311
|
:'lead_gen_form_id' => :'String',
|
|
300
312
|
:'status' => :'String',
|
|
313
|
+
:'campaign_status' => :'String',
|
|
314
|
+
:'ad_set_status' => :'String',
|
|
315
|
+
:'ad_status' => :'AdActivationStatus',
|
|
301
316
|
:'budget_level' => :'String',
|
|
302
317
|
:'attribution_spec' => :'Array<BoostPostRequestAttributionSpecInner>',
|
|
303
318
|
:'bodies' => :'Array<String>',
|
|
@@ -536,6 +551,18 @@ module Zernio
|
|
|
536
551
|
self.status = attributes[:'status']
|
|
537
552
|
end
|
|
538
553
|
|
|
554
|
+
if attributes.key?(:'campaign_status')
|
|
555
|
+
self.campaign_status = attributes[:'campaign_status']
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
if attributes.key?(:'ad_set_status')
|
|
559
|
+
self.ad_set_status = attributes[:'ad_set_status']
|
|
560
|
+
end
|
|
561
|
+
|
|
562
|
+
if attributes.key?(:'ad_status')
|
|
563
|
+
self.ad_status = attributes[:'ad_status']
|
|
564
|
+
end
|
|
565
|
+
|
|
539
566
|
if attributes.key?(:'budget_level')
|
|
540
567
|
self.budget_level = attributes[:'budget_level']
|
|
541
568
|
end
|
|
@@ -680,6 +707,10 @@ module Zernio
|
|
|
680
707
|
return false if !@dsa_payor.nil? && @dsa_payor.to_s.length > 100
|
|
681
708
|
status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
682
709
|
return false unless status_validator.valid?(@status)
|
|
710
|
+
campaign_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
711
|
+
return false unless campaign_status_validator.valid?(@campaign_status)
|
|
712
|
+
ad_set_status_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
713
|
+
return false unless ad_set_status_validator.valid?(@ad_set_status)
|
|
683
714
|
budget_level_validator = EnumAttributeValidator.new('String', ["adset", "campaign"])
|
|
684
715
|
return false unless budget_level_validator.valid?(@budget_level)
|
|
685
716
|
return false if !@attribution_spec.nil? && @attribution_spec.length > 3
|
|
@@ -898,6 +929,26 @@ module Zernio
|
|
|
898
929
|
@status = status
|
|
899
930
|
end
|
|
900
931
|
|
|
932
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
933
|
+
# @param [Object] campaign_status Object to be assigned
|
|
934
|
+
def campaign_status=(campaign_status)
|
|
935
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
936
|
+
unless validator.valid?(campaign_status)
|
|
937
|
+
fail ArgumentError, "invalid value for \"campaign_status\", must be one of #{validator.allowable_values}."
|
|
938
|
+
end
|
|
939
|
+
@campaign_status = campaign_status
|
|
940
|
+
end
|
|
941
|
+
|
|
942
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
943
|
+
# @param [Object] ad_set_status Object to be assigned
|
|
944
|
+
def ad_set_status=(ad_set_status)
|
|
945
|
+
validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED"])
|
|
946
|
+
unless validator.valid?(ad_set_status)
|
|
947
|
+
fail ArgumentError, "invalid value for \"ad_set_status\", must be one of #{validator.allowable_values}."
|
|
948
|
+
end
|
|
949
|
+
@ad_set_status = ad_set_status
|
|
950
|
+
end
|
|
951
|
+
|
|
901
952
|
# Custom attribute writer method checking allowed values (enum).
|
|
902
953
|
# @param [Object] budget_level Object to be assigned
|
|
903
954
|
def budget_level=(budget_level)
|
|
@@ -995,6 +1046,9 @@ module Zernio
|
|
|
995
1046
|
dsa_payor == o.dsa_payor &&
|
|
996
1047
|
lead_gen_form_id == o.lead_gen_form_id &&
|
|
997
1048
|
status == o.status &&
|
|
1049
|
+
campaign_status == o.campaign_status &&
|
|
1050
|
+
ad_set_status == o.ad_set_status &&
|
|
1051
|
+
ad_status == o.ad_status &&
|
|
998
1052
|
budget_level == o.budget_level &&
|
|
999
1053
|
attribution_spec == o.attribution_spec &&
|
|
1000
1054
|
bodies == o.bodies &&
|
|
@@ -1011,7 +1065,7 @@ module Zernio
|
|
|
1011
1065
|
# Calculates hash code according to all attributes.
|
|
1012
1066
|
# @return [Integer] Hash code
|
|
1013
1067
|
def hash
|
|
1014
|
-
[creative_features, post_id, platform_post_id, account_id, ad_account_id, name, campaign_name, ad_set_name, goal, ad_set_id, existing_campaign_id, identity_id, identity_type, budget_amount, budget_type, budget, instagram_account_id, destination_type, whatsapp_phone_number, currency, start_date, end_date, schedule, targeting, location_targeting_type, raw_targeting, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, tracking, special_ad_categories, special_ad_category_country, regional_regulated_categories, regional_regulation_identities, link_url, call_to_action, spark_auth_code, smart_plus, spark_posts, promo_codes, promoted_object, dsa_beneficiary, dsa_payor, lead_gen_form_id, status, budget_level, attribution_spec, bodies, smart_targeting, optimization_goal].hash
|
|
1068
|
+
[creative_features, post_id, platform_post_id, account_id, ad_account_id, name, campaign_name, ad_set_name, goal, ad_set_id, existing_campaign_id, identity_id, identity_type, budget_amount, budget_type, budget, instagram_account_id, destination_type, whatsapp_phone_number, currency, start_date, end_date, schedule, targeting, location_targeting_type, raw_targeting, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, tracking, special_ad_categories, special_ad_category_country, regional_regulated_categories, regional_regulation_identities, link_url, call_to_action, spark_auth_code, smart_plus, spark_posts, promo_codes, promoted_object, dsa_beneficiary, dsa_payor, lead_gen_form_id, status, campaign_status, ad_set_status, ad_status, budget_level, attribution_spec, bodies, smart_targeting, optimization_goal].hash
|
|
1015
1069
|
end
|
|
1016
1070
|
|
|
1017
1071
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED