late-sdk 0.0.905 → 0.0.906
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/README.md +6 -0
- data/docs/AdCampaignsApi.md +71 -1
- data/docs/AdCreative.md +4 -0
- data/docs/CreateStandaloneAdRequest.md +8 -6
- data/docs/GooglePmaxAssetGroup.md +28 -0
- data/docs/GooglePmaxAssetGroupAssetsInner.md +28 -0
- data/docs/GooglePmaxAssetGroupInput.md +32 -0
- data/docs/GooglePmaxAssetGroupInputImages.md +22 -0
- data/docs/ListGoogleAssetGroups200Response.md +22 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +70 -2
- data/lib/zernio-sdk/models/ad_creative.rb +21 -1
- data/lib/zernio-sdk/models/create_standalone_ad200_response_results_inner.rb +2 -2
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +18 -9
- data/lib/zernio-sdk/models/google_pmax_asset_group.rb +299 -0
- data/lib/zernio-sdk/models/google_pmax_asset_group_assets_inner.rb +244 -0
- data/lib/zernio-sdk/models/google_pmax_asset_group_input.rb +453 -0
- data/lib/zernio-sdk/models/google_pmax_asset_group_input_images.rb +280 -0
- data/lib/zernio-sdk/models/list_google_asset_groups200_response.rb +204 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +5 -0
- data/openapi.yaml +184 -8
- data/spec/api/ad_campaigns_api_spec.rb +13 -1
- data/spec/models/ad_creative_spec.rb +12 -0
- data/spec/models/create_standalone_ad200_response_results_inner_spec.rb +1 -1
- data/spec/models/create_standalone_ad_request_spec.rb +7 -1
- data/spec/models/google_pmax_asset_group_assets_inner_spec.rb +66 -0
- data/spec/models/google_pmax_asset_group_input_images_spec.rb +48 -0
- data/spec/models/google_pmax_asset_group_input_spec.rb +78 -0
- data/spec/models/google_pmax_asset_group_spec.rb +66 -0
- data/spec/models/list_google_asset_groups200_response_spec.rb +48 -0
- data/zernio-sdk-0.0.906.gem +0 -0
- metadata +22 -2
- data/zernio-sdk-0.0.905.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: 6d6a8219b3c04170a2b4f353086f97e5c19b3f5ab7fbd48d62365254235531be
|
|
4
|
+
data.tar.gz: b18167b9166459bb248994f185c69f6b36a9c2ac2e07543e387df699fc62b6a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0678f78666bd78fba698c1c4bd4679681fa2c865bfef361c2c8974c310225ce0258d3a7f2952ac3804218cd5c196809e0f7cc8eb2a0cd1a81723fbec7fa06ab9'
|
|
7
|
+
data.tar.gz: 7ea2543666142257cfbc1c476e1a8d69ee3de417771cfe548ebf4a037aa24c384438bfb3ffca4b2df66809b6f89031b748372f5710b0a55ffc38c13059891f0c
|
data/README.md
CHANGED
|
@@ -188,6 +188,7 @@ Class | Method | HTTP request | Description
|
|
|
188
188
|
*Zernio::AdCampaignsApi* | [**list_campaign_assets**](docs/AdCampaignsApi.md#list_campaign_assets) | **GET** /v1/ads/campaigns/{campaignId}/assets | List campaign assets
|
|
189
189
|
*Zernio::AdCampaignsApi* | [**list_campaign_negative_keyword_lists**](docs/AdCampaignsApi.md#list_campaign_negative_keyword_lists) | **GET** /v1/ads/campaigns/{campaignId}/negative-keyword-lists | List campaign negative lists
|
|
190
190
|
*Zernio::AdCampaignsApi* | [**list_campaign_negative_keywords**](docs/AdCampaignsApi.md#list_campaign_negative_keywords) | **GET** /v1/ads/campaigns/{campaignId}/negative-keywords | List campaign-level negative keywords
|
|
191
|
+
*Zernio::AdCampaignsApi* | [**list_google_asset_groups**](docs/AdCampaignsApi.md#list_google_asset_groups) | **GET** /v1/ads/campaigns/{campaignId}/asset-groups | List Performance Max asset groups
|
|
191
192
|
*Zernio::AdCampaignsApi* | [**remove_ad_group_assets**](docs/AdCampaignsApi.md#remove_ad_group_assets) | **DELETE** /v1/ads/ad-sets/{adSetId}/assets | Remove ad-group assets
|
|
192
193
|
*Zernio::AdCampaignsApi* | [**remove_ad_keyword**](docs/AdCampaignsApi.md#remove_ad_keyword) | **DELETE** /v1/ads/keywords/{keywordId} | Remove a Search keyword
|
|
193
194
|
*Zernio::AdCampaignsApi* | [**remove_campaign_assets**](docs/AdCampaignsApi.md#remove_campaign_assets) | **DELETE** /v1/ads/campaigns/{campaignId}/assets | Remove campaign assets
|
|
@@ -1699,6 +1700,10 @@ Class | Method | HTTP request | Description
|
|
|
1699
1700
|
- [Zernio::GoogleBusinessReview](docs/GoogleBusinessReview.md)
|
|
1700
1701
|
- [Zernio::GoogleBusinessReviewReviewReply](docs/GoogleBusinessReviewReviewReply.md)
|
|
1701
1702
|
- [Zernio::GoogleBusinessReviewReviewer](docs/GoogleBusinessReviewReviewer.md)
|
|
1703
|
+
- [Zernio::GooglePmaxAssetGroup](docs/GooglePmaxAssetGroup.md)
|
|
1704
|
+
- [Zernio::GooglePmaxAssetGroupAssetsInner](docs/GooglePmaxAssetGroupAssetsInner.md)
|
|
1705
|
+
- [Zernio::GooglePmaxAssetGroupInput](docs/GooglePmaxAssetGroupInput.md)
|
|
1706
|
+
- [Zernio::GooglePmaxAssetGroupInputImages](docs/GooglePmaxAssetGroupInputImages.md)
|
|
1702
1707
|
- [Zernio::GoogleRsaDescription](docs/GoogleRsaDescription.md)
|
|
1703
1708
|
- [Zernio::GoogleRsaHeadline](docs/GoogleRsaHeadline.md)
|
|
1704
1709
|
- [Zernio::GoogleSitelink](docs/GoogleSitelink.md)
|
|
@@ -1871,6 +1876,7 @@ Class | Method | HTTP request | Description
|
|
|
1871
1876
|
- [Zernio::ListFacebookPages200ResponsePagesInner](docs/ListFacebookPages200ResponsePagesInner.md)
|
|
1872
1877
|
- [Zernio::ListFormLeads200Response](docs/ListFormLeads200Response.md)
|
|
1873
1878
|
- [Zernio::ListFormLeads200ResponseLeadsInner](docs/ListFormLeads200ResponseLeadsInner.md)
|
|
1879
|
+
- [Zernio::ListGoogleAssetGroups200Response](docs/ListGoogleAssetGroups200Response.md)
|
|
1874
1880
|
- [Zernio::ListGoogleBusinessLocations200Response](docs/ListGoogleBusinessLocations200Response.md)
|
|
1875
1881
|
- [Zernio::ListGoogleBusinessLocations200ResponseLocationsInner](docs/ListGoogleBusinessLocations200ResponseLocationsInner.md)
|
|
1876
1882
|
- [Zernio::ListGoogleBusinessMedia200Response](docs/ListGoogleBusinessMedia200Response.md)
|
data/docs/AdCampaignsApi.md
CHANGED
|
@@ -34,6 +34,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
34
34
|
| [**list_campaign_assets**](AdCampaignsApi.md#list_campaign_assets) | **GET** /v1/ads/campaigns/{campaignId}/assets | List campaign assets |
|
|
35
35
|
| [**list_campaign_negative_keyword_lists**](AdCampaignsApi.md#list_campaign_negative_keyword_lists) | **GET** /v1/ads/campaigns/{campaignId}/negative-keyword-lists | List campaign negative lists |
|
|
36
36
|
| [**list_campaign_negative_keywords**](AdCampaignsApi.md#list_campaign_negative_keywords) | **GET** /v1/ads/campaigns/{campaignId}/negative-keywords | List campaign-level negative keywords |
|
|
37
|
+
| [**list_google_asset_groups**](AdCampaignsApi.md#list_google_asset_groups) | **GET** /v1/ads/campaigns/{campaignId}/asset-groups | List Performance Max asset groups |
|
|
37
38
|
| [**remove_ad_group_assets**](AdCampaignsApi.md#remove_ad_group_assets) | **DELETE** /v1/ads/ad-sets/{adSetId}/assets | Remove ad-group assets |
|
|
38
39
|
| [**remove_ad_keyword**](AdCampaignsApi.md#remove_ad_keyword) | **DELETE** /v1/ads/keywords/{keywordId} | Remove a Search keyword |
|
|
39
40
|
| [**remove_campaign_assets**](AdCampaignsApi.md#remove_campaign_assets) | **DELETE** /v1/ads/campaigns/{campaignId}/assets | Remove campaign assets |
|
|
@@ -626,7 +627,7 @@ end
|
|
|
626
627
|
|
|
627
628
|
Create standalone ad
|
|
628
629
|
|
|
629
|
-
Create a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X, LinkedIn, and OpenAI Ads (ChatGPT Ads).
|
|
630
|
+
Create a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X, LinkedIn, and OpenAI Ads (ChatGPT Ads). Google Performance Max: set `campaignType: \"pmax\"` and supply `assetGroup` with text, images by role, business name and finalUrl. Creates a daily budget, PAUSED campaign and asset group atomically. `validateOnly: true` validates the complete request with Google without creating or persisting resources. Read assets with `GET /v1/ads/campaigns/{campaignId}/asset-groups`. The logo is required; video is optional via `assetGroup.youtubeVideoId`. Brand guidelines are disabled at creation. PMax rejects ACTIVE creation, portfolio bidding, bid caps, legacy creative fields and attach shapes. Geo and language targeting are supported; omitted geo targets all locations. PMax does not require top-level goal, headline, body or linkUrl. Supported bidding: omitted or LOWEST_COST_WITHOUT_CAP for Maximize Conversions, COST_CAP plus bidAmount for target CPA, LOWEST_COST_WITH_MIN_ROAS plus roasAverageFloor for Maximize Conversion Value with target ROAS. Other mutually-exclusive request shapes are selected by the body: - Legacy single-creative shape (all platforms, the default). - Meta-only multi-creative shape via the creatives array: one ad set with N ads sharing budget and targeting. - Attach shape via adSetId: adds one new ad to an existing ad set, inheriting its budget, targeting, and schedule (Meta, Google Ads, TikTok, and LinkedIn). On LinkedIn adSetId is the existing Campaign id, and the budget, schedule, targeting and bidding fields must be omitted. Meta accepts `promotion` and `creativeFeatures` on the single and attach shapes and as defaults for `creatives[]`. An item replaces the whole feature map; its `promotion` replaces the default offer, and `promotion: null` disables that default for the item. Reusing `existingCreativeId` uses the existing creative settings instead of new settings. Requested settings are persisted for lists, exports, and default ad-detail reads. Only ads supplied a `promotion` receive live readback; multi-create batches those reads in groups of up to 50 IDs without per-ad fallback. Inspect `ad.creative.promotionStatus` (or `ads[].creative.promotionStatus`). `not_returned` means Meta omitted the metadata; successful creation does not by itself prove the offer was applied or will display. Per-platform required fields, budget minimums, and video-ad rules are documented on each property below. LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content \"dark post\" authored by a Company Page (see `organizationId`). Supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`. **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
|
|
630
631
|
|
|
631
632
|
### Examples
|
|
632
633
|
|
|
@@ -2344,6 +2345,75 @@ end
|
|
|
2344
2345
|
- **Accept**: application/json
|
|
2345
2346
|
|
|
2346
2347
|
|
|
2348
|
+
## list_google_asset_groups
|
|
2349
|
+
|
|
2350
|
+
> <ListGoogleAssetGroups200Response> list_google_asset_groups(campaign_id)
|
|
2351
|
+
|
|
2352
|
+
List Performance Max asset groups
|
|
2353
|
+
|
|
2354
|
+
Read Performance Max asset groups and their linked text, image and YouTube assets. campaignId is the platform campaign id returned by creation or the campaign list. The campaign must be visible to the caller. Uses a 10-minute cache, with the last successful response served as stale when Google quota is exhausted. Removed groups and asset links are excluded. Campaign-level brand assets on campaigns with brand guidelines enabled are not included.
|
|
2355
|
+
|
|
2356
|
+
### Examples
|
|
2357
|
+
|
|
2358
|
+
```ruby
|
|
2359
|
+
require 'time'
|
|
2360
|
+
require 'zernio-sdk'
|
|
2361
|
+
# setup authorization
|
|
2362
|
+
Zernio.configure do |config|
|
|
2363
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
2364
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
2365
|
+
end
|
|
2366
|
+
|
|
2367
|
+
api_instance = Zernio::AdCampaignsApi.new
|
|
2368
|
+
campaign_id = 'campaign_id_example' # String | Google Ads campaign id.
|
|
2369
|
+
|
|
2370
|
+
begin
|
|
2371
|
+
# List Performance Max asset groups
|
|
2372
|
+
result = api_instance.list_google_asset_groups(campaign_id)
|
|
2373
|
+
p result
|
|
2374
|
+
rescue Zernio::ApiError => e
|
|
2375
|
+
puts "Error when calling AdCampaignsApi->list_google_asset_groups: #{e}"
|
|
2376
|
+
end
|
|
2377
|
+
```
|
|
2378
|
+
|
|
2379
|
+
#### Using the list_google_asset_groups_with_http_info variant
|
|
2380
|
+
|
|
2381
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2382
|
+
|
|
2383
|
+
> <Array(<ListGoogleAssetGroups200Response>, Integer, Hash)> list_google_asset_groups_with_http_info(campaign_id)
|
|
2384
|
+
|
|
2385
|
+
```ruby
|
|
2386
|
+
begin
|
|
2387
|
+
# List Performance Max asset groups
|
|
2388
|
+
data, status_code, headers = api_instance.list_google_asset_groups_with_http_info(campaign_id)
|
|
2389
|
+
p status_code # => 2xx
|
|
2390
|
+
p headers # => { ... }
|
|
2391
|
+
p data # => <ListGoogleAssetGroups200Response>
|
|
2392
|
+
rescue Zernio::ApiError => e
|
|
2393
|
+
puts "Error when calling AdCampaignsApi->list_google_asset_groups_with_http_info: #{e}"
|
|
2394
|
+
end
|
|
2395
|
+
```
|
|
2396
|
+
|
|
2397
|
+
### Parameters
|
|
2398
|
+
|
|
2399
|
+
| Name | Type | Description | Notes |
|
|
2400
|
+
| ---- | ---- | ----------- | ----- |
|
|
2401
|
+
| **campaign_id** | **String** | Google Ads campaign id. | |
|
|
2402
|
+
|
|
2403
|
+
### Return type
|
|
2404
|
+
|
|
2405
|
+
[**ListGoogleAssetGroups200Response**](ListGoogleAssetGroups200Response.md)
|
|
2406
|
+
|
|
2407
|
+
### Authorization
|
|
2408
|
+
|
|
2409
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
2410
|
+
|
|
2411
|
+
### HTTP request headers
|
|
2412
|
+
|
|
2413
|
+
- **Content-Type**: Not defined
|
|
2414
|
+
- **Accept**: application/json
|
|
2415
|
+
|
|
2416
|
+
|
|
2347
2417
|
## remove_ad_group_assets
|
|
2348
2418
|
|
|
2349
2419
|
> <RemoveCampaignAssets200Response> remove_ad_group_assets(ad_set_id, remove_ad_group_assets_request)
|
data/docs/AdCreative.md
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **asset_group** | [**GooglePmaxAssetGroupInput**](GooglePmaxAssetGroupInput.md) | Initial Performance Max asset group input. Use the asset-groups endpoint for current Google assets. | [optional] |
|
|
8
|
+
| **asset_group_resource_name** | **String** | Google resource name of the created Performance Max asset group. | [optional] |
|
|
7
9
|
| **headlines** | [**Array<GoogleRsaHeadline>**](GoogleRsaHeadline.md) | Google RSA only. Replaces the complete headline list. No padding or truncation on update. | [optional] |
|
|
8
10
|
| **descriptions** | [**Array<GoogleRsaDescription>**](GoogleRsaDescription.md) | Google RSA only. Replaces the complete description list. No padding or truncation on update. | [optional] |
|
|
9
11
|
| **final_urls** | **Array<String>** | Google RSA only. Replaces final URLs. Omitted lists stay unchanged. | [optional] |
|
|
@@ -39,6 +41,8 @@
|
|
|
39
41
|
require 'zernio-sdk'
|
|
40
42
|
|
|
41
43
|
instance = Zernio::AdCreative.new(
|
|
44
|
+
asset_group: null,
|
|
45
|
+
asset_group_resource_name: customers/9122445560/assetGroups/123456789,
|
|
42
46
|
headlines: null,
|
|
43
47
|
descriptions: null,
|
|
44
48
|
final_urls: null,
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
| **promotion** | [**MetaPromotion**](MetaPromotion.md) | | [optional] |
|
|
20
20
|
| **creative_features** | **Hash<String, String>** | Meta only. Applied to each new creative, including standalone and attach shapes. With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. auto_promotion_tag is an enhancement; an explicit offer uses promotion. | [optional] |
|
|
21
21
|
| **multi_advertiser** | **String** | Meta only. Multi-advertiser ads: whether Meta may show this ad alongside other advertisers' in one unit. Meta auto-enrols since Aug 2024, so send OPT_OUT to leave. It is a top-level creative field, NOT a `creativeFeatures` key, and Meta rejects it there. | [optional] |
|
|
22
|
-
| **validate_only** | **Boolean** |
|
|
23
|
-
| **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
|
|
24
|
-
| **budget_type** | **String** | Required on legacy
|
|
25
|
-
| **status** | **String** | Meta, TikTok, and LinkedIn
|
|
22
|
+
| **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, existing video.id or existingCreativeId; media pools, new video uploads, creatives[], adSetId and RESERVED buying return 400. Existing campaign or creative nodes are marked skipped. Success returns 200 with per-node results; Meta rejection returns an error. | [optional] |
|
|
23
|
+
| **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 requires a $1 minimum (its budget is lifetime-only, see budgetType). | [optional] |
|
|
24
|
+
| **budget_type** | **String** | Required on legacy, multi-creative and Performance Max shapes. Inherited on attach. OpenAI Ads accepts lifetime only (no daily-budget concept on the platform); sending daily returns 422. OpenAI Ads lifetime budgets require `endDate` to give the lifetime cap a spend window. | [optional] |
|
|
25
|
+
| **status** | **String** | Google Performance Max accepts PAUSED only and always creates a paused campaign. Meta, TikTok, and LinkedIn: publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused so you can review before they spend. On Meta the pause is held on the campaign this call creates, leaving the ad set and ad switched on, so a single PUT /v1/ads/campaigns/{campaignId}/status with `active` brings the whole thing live. It is held at every level instead when the pause cannot rely on the campaign: `existingCampaignId` (that campaign may be running and is never touched) or `campaignStatus: ACTIVE`. On TikTok the whole campaign > ad group > ad hierarchy stays paused. On LinkedIn the whole campaign group, campaign, and creative hierarchy stays PAUSED (intendedStatus PAUSED on each). | [optional] |
|
|
26
26
|
| **campaign_status** | **String** | Meta only. Overrides `status` for the campaign level alone, so you can create a live campaign whose ad set and ad stay paused, or the reverse. Omitted, it follows `status`. | [optional] |
|
|
27
27
|
| **budget_level** | **String** | Meta only. Where the budget lives, which selects the Meta budget model: - `adset` (default): ABO (Ad-set Budget Optimization). The budget is set on the ad set. This is the back-compatible behaviour; omit this field to keep it. - `campaign`: CBO (Campaign Budget Optimization / Advantage Campaign Budget). The budget AND `bidStrategy` are set on the CAMPAIGN, and Meta distributes spend across ad sets automatically. Meta requires the budget at exactly one level, never both. Non-Meta platforms ignore this field. Ignored on the attach shape (`adSetId`), which inherits the existing budget. | [optional][default to 'adset'] |
|
|
28
28
|
| **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] |
|
|
@@ -78,7 +78,8 @@
|
|
|
78
78
|
| **translations** | [**Array<CreateStandaloneAdRequestTranslationsInner>**](CreateStandaloneAdRequestTranslationsInner.md) | Meta only. Multi-language ads (Dynamic Language Optimization): ONE ad carrying per-locale copy and, optionally, per-locale media: the \"Languages\" toggle in Ads Manager. Keeps social proof (likes/comments/shares) on a SINGLE post instead of splitting it across one ad per language. The ad's top-level copy is the DEFAULT shown to every locale you do NOT list, and it counts as one of the language variants. IMPORTANT, and the opposite of what you might expect: text does NOT inherit. Every entry must carry its own `headline`, `body` AND `description`, and all of them must be DISTINCT from each other and from the ad's top-level copy. Meta deduplicates identical strings inside the asset feed, so two locales sharing a string collapse into one asset and the create fails with a misleading \"Too few ... texts provided in asset creation\" (subcode 1885817) that names a field which is actually present. We validate this before calling Meta and return a 400 naming the offending locale and field. `description` is therefore effectively required on the ad whenever `translations` is present, even though it is optional otherwise. Do NOT list `defaultLocale` inside `translations`: Meta rejects the duplicate with \"The language asset feed includes an unsupported targeting field\" (subcode 1885985). Media DOES inherit and is uploaded once when shared, and `linkUrl` inherits too: each locale may name its own landing page and unlisted locales fall back to the ad's top-level `linkUrl`. Meta enforces Dynamic Creative image dimensions on language feeds, so an `imageUrl` that works on a normal ad may be rejected with \"The following images have invalid dimensions for Dynamic Creative\" (subcode 1885558). Video is not affected. Mutually exclusive with `dynamicCreative`, `placementAssets`, `carouselCards`, `existingCreativeId` and `creatives[]`. Meta allows one `asset_feed_spec` shape per creative. | [optional] |
|
|
79
79
|
| **placement_assets** | [**CreateStandaloneAdRequestPlacementAssets**](CreateStandaloneAdRequestPlacementAssets.md) | | [optional] |
|
|
80
80
|
| **audience_id** | **String** | Custom audience ID for targeting | [optional] |
|
|
81
|
-
| **campaign_type** | **String** | Google only | [optional][default to 'display'] |
|
|
81
|
+
| **campaign_type** | **String** | Google only. Performance Max requires assetGroup and is always created PAUSED. | [optional][default to 'display'] |
|
|
82
|
+
| **asset_group** | [**GooglePmaxAssetGroupInput**](GooglePmaxAssetGroupInput.md) | | [optional] |
|
|
82
83
|
| **keywords** | [**Array<KeywordEntry>**](KeywordEntry.md) | Google Search only. Keywords on the new ad group; entries are strings (BROAD) or { text, matchType }. Editable later via PUT /v1/ads/{adId} targeting.keywords. | [optional] |
|
|
83
84
|
| **negative_keywords** | [**Array<KeywordEntry>**](KeywordEntry.md) | Google Search only; other platforms return 400. Ad-group-level negative keywords on the new ad group. Editable later via PUT /v1/ads/{adId} targeting.negativeKeywords. | [optional] |
|
|
84
85
|
| **campaign_negative_keywords** | [**Array<KeywordEntry>**](KeywordEntry.md) | Google Search only; other platforms return 400. Campaign-level negative keywords (campaign_criterion.negative), created alongside the ad group. Editable later via PUT /v1/ads/campaigns/{campaignId}/negative-keywords. | [optional] |
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
| **bid_strategy** | [**BidStrategy**](BidStrategy.md) | Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Meta bid strategy applied to the ad set. OpenAI Ads: required on every ad group via this flat field, the only channel it supports (`platformSpecificData` is Meta/LinkedIn-only and returns 400 for OpenAI). No auto-bid option exists; send `LOWEST_COST_WITH_BID_CAP` or `COST_CAP` together with `bidAmount`, omitting it returns 400. Google (not deprecated there, this shared flat field is Google's only shape): applied to the campaign this call creates. On Google: LOWEST_COST_WITHOUT_CAP = Maximize Conversions, COST_CAP + bidAmount = Target CPA, LOWEST_COST_WITH_MIN_ROAS + roasAverageFloor = Target ROAS, LOWEST_COST_WITH_BID_CAP + bidAmount = Maximize Clicks with a CPC ceiling; portfolioBidStrategyId attaches a portfolio strategy instead. Omitted, the campaign falls back to a goal-based default. | [optional] |
|
|
94
95
|
| **bid_amount** | **Float** | Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`. Meta only: sending `bidAmount` WITHOUT `bidStrategy` requires `existingCampaignId` (400 otherwise), and sets the new ad set's cap under the joined campaign's COST_CAP / LOWEST_COST_WITH_BID_CAP parent. The strategy itself is inherited from the campaign. Restating bidStrategy here is accepted but has no effect on the ad set. Rejected with 400 in `adSetId` attach mode: that shape inherits its cap from the platform. Use `PUT /v1/ads/ad-sets/{adSetId}` there instead. | [optional] |
|
|
95
96
|
| **roas_average_floor** | **Float** | Deprecated: send it inside `platformSpecificData` instead (Meta today; TikTok's nested shape is planned). The flat field keeps working during the deprecation window; sending both shapes returns a 400. Minimum ROAS as a decimal multiplier (e.g. 2.0 = 2.0x ROAS). Required when `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`. Sending it without `bidStrategy` is a 400. Sent to Meta as `bid_constraints.roas_average_floor` × 10000. Known gap: a CBO campaign's ROAS floor lives on the campaign only (set via `POST /v1/ads/campaigns`); there is no supported way to set it while joining a CBO campaign here. | [optional] |
|
|
96
|
-
| **portfolio_bid_strategy_id** | **String** | Google only. Attach an existing portfolio bid strategy (numeric id from GET /v1/ads/bid-strategies) to the new campaign instead of a standard one. Exclusive with bidStrategy. | [optional] |
|
|
97
|
+
| **portfolio_bid_strategy_id** | **String** | Google Search and Display only. Performance Max rejects portfolio bidding. Attach an existing portfolio bid strategy (numeric id from GET /v1/ads/bid-strategies) to the new campaign instead of a standard one. Exclusive with bidStrategy. | [optional] |
|
|
97
98
|
| **value_rule_set_id** | **String** | Meta only (facebook, instagram; other platforms return 400). Value rule set to attach to the new ad set, from `/v1/ads/value-rule-sets`. Attachment is driven by this id, so `valueRulesApplied` is optional alongside it. Rejected with 400 in `adSetId` attach mode: that shape inherits the existing ad set's attachment, so the field would be silently ignored. Use `PUT /v1/ads/ad-sets/{adSetId}` there instead. Ignored (stripped before the ad-set create) when `buyingType` is `RESERVED`: value rules only apply to auction ad sets on `LOWEST_COST_WITHOUT_CAP` or `COST_CAP`, and a Reach & Frequency reservation has no auction bid strategy. Read back with `GET /v1/ads/ad-sets/{adSetId}?fields=value_rule_set_id`; the attachment is not mirrored onto Zernio's ad documents. | [optional] |
|
|
98
99
|
| **value_rules_applied** | **Boolean** | Meta only (facebook, instagram; other platforms return 400). Optional when attaching, and requires `valueRuleSetId`. `false` is REJECTED here with 400: a newly created ad set has nothing to detach, so detaching lives on `PUT /v1/ads/ad-sets/{adSetId}`. | [optional] |
|
|
99
100
|
| **platform_specific_data** | [**CreateStandaloneAdRequestPlatformSpecificData**](CreateStandaloneAdRequestPlatformSpecificData.md) | | [optional] |
|
|
@@ -189,6 +190,7 @@ instance = Zernio::CreateStandaloneAdRequest.new(
|
|
|
189
190
|
placement_assets: null,
|
|
190
191
|
audience_id: null,
|
|
191
192
|
campaign_type: null,
|
|
193
|
+
asset_group: null,
|
|
192
194
|
keywords: null,
|
|
193
195
|
negative_keywords: null,
|
|
194
196
|
campaign_negative_keywords: null,
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Zernio::GooglePmaxAssetGroup
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **resource_name** | **String** | | |
|
|
9
|
+
| **name** | **String** | | |
|
|
10
|
+
| **status** | **String** | Asset-group status on Google. Campaign status independently controls delivery. | |
|
|
11
|
+
| **final_urls** | **Array<String>** | | |
|
|
12
|
+
| **assets** | [**Array<GooglePmaxAssetGroupAssetsInner>**](GooglePmaxAssetGroupAssetsInner.md) | | |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'zernio-sdk'
|
|
18
|
+
|
|
19
|
+
instance = Zernio::GooglePmaxAssetGroup.new(
|
|
20
|
+
id: null,
|
|
21
|
+
resource_name: null,
|
|
22
|
+
name: null,
|
|
23
|
+
status: null,
|
|
24
|
+
final_urls: null,
|
|
25
|
+
assets: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Zernio::GooglePmaxAssetGroupAssetsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **resource_name** | **String** | | |
|
|
8
|
+
| **field_type** | **String** | Google asset role, such as HEADLINE or LOGO. | |
|
|
9
|
+
| **status** | **String** | | |
|
|
10
|
+
| **text** | **String** | | [optional] |
|
|
11
|
+
| **image_url** | **String** | | [optional] |
|
|
12
|
+
| **youtube_video_id** | **String** | | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'zernio-sdk'
|
|
18
|
+
|
|
19
|
+
instance = Zernio::GooglePmaxAssetGroupAssetsInner.new(
|
|
20
|
+
resource_name: null,
|
|
21
|
+
field_type: null,
|
|
22
|
+
status: null,
|
|
23
|
+
text: null,
|
|
24
|
+
image_url: null,
|
|
25
|
+
youtube_video_id: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Zernio::GooglePmaxAssetGroupInput
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | Defaults to the request name. | [optional] |
|
|
8
|
+
| **final_url** | **String** | Required destination URL. | |
|
|
9
|
+
| **headlines** | **Array<String>** | | |
|
|
10
|
+
| **long_headline** | **String** | | |
|
|
11
|
+
| **descriptions** | **Array<String>** | At least one description must be 60 characters or fewer. | |
|
|
12
|
+
| **business_name** | **String** | | |
|
|
13
|
+
| **images** | [**GooglePmaxAssetGroupInputImages**](GooglePmaxAssetGroupInputImages.md) | | |
|
|
14
|
+
| **youtube_video_id** | **String** | Optional existing YouTube video id. Google can generate video when omitted. Video uploads and arbitrary video URLs are not supported. | [optional] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'zernio-sdk'
|
|
20
|
+
|
|
21
|
+
instance = Zernio::GooglePmaxAssetGroupInput.new(
|
|
22
|
+
name: null,
|
|
23
|
+
final_url: null,
|
|
24
|
+
headlines: null,
|
|
25
|
+
long_headline: null,
|
|
26
|
+
descriptions: null,
|
|
27
|
+
business_name: null,
|
|
28
|
+
images: null,
|
|
29
|
+
youtube_video_id: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::GooglePmaxAssetGroupInputImages
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **landscape** | **Array<String>** | Landscape marketing images. Aspect ratio 1.91:1, minimum 600 x 314 pixels. | |
|
|
8
|
+
| **square** | **Array<String>** | Square marketing images. Aspect ratio 1:1, minimum 300 x 300 pixels. | |
|
|
9
|
+
| **logo** | **Array<String>** | Required square logos. Aspect ratio 1:1, minimum 128 x 128 pixels. | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::GooglePmaxAssetGroupInputImages.new(
|
|
17
|
+
landscape: null,
|
|
18
|
+
square: null,
|
|
19
|
+
logo: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::ListGoogleAssetGroups200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **asset_groups** | [**Array<GooglePmaxAssetGroup>**](GooglePmaxAssetGroup.md) | | |
|
|
8
|
+
| **cached_at** | **Time** | | |
|
|
9
|
+
| **stale** | **Boolean** | | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::ListGoogleAssetGroups200Response.new(
|
|
17
|
+
asset_groups: null,
|
|
18
|
+
cached_at: null,
|
|
19
|
+
stale: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -607,7 +607,7 @@ module Zernio
|
|
|
607
607
|
end
|
|
608
608
|
|
|
609
609
|
# Create standalone ad
|
|
610
|
-
# Create a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X, LinkedIn, and OpenAI Ads (ChatGPT Ads).
|
|
610
|
+
# Create a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X, LinkedIn, and OpenAI Ads (ChatGPT Ads). Google Performance Max: set `campaignType: \"pmax\"` and supply `assetGroup` with text, images by role, business name and finalUrl. Creates a daily budget, PAUSED campaign and asset group atomically. `validateOnly: true` validates the complete request with Google without creating or persisting resources. Read assets with `GET /v1/ads/campaigns/{campaignId}/asset-groups`. The logo is required; video is optional via `assetGroup.youtubeVideoId`. Brand guidelines are disabled at creation. PMax rejects ACTIVE creation, portfolio bidding, bid caps, legacy creative fields and attach shapes. Geo and language targeting are supported; omitted geo targets all locations. PMax does not require top-level goal, headline, body or linkUrl. Supported bidding: omitted or LOWEST_COST_WITHOUT_CAP for Maximize Conversions, COST_CAP plus bidAmount for target CPA, LOWEST_COST_WITH_MIN_ROAS plus roasAverageFloor for Maximize Conversion Value with target ROAS. Other mutually-exclusive request shapes are selected by the body: - Legacy single-creative shape (all platforms, the default). - Meta-only multi-creative shape via the creatives array: one ad set with N ads sharing budget and targeting. - Attach shape via adSetId: adds one new ad to an existing ad set, inheriting its budget, targeting, and schedule (Meta, Google Ads, TikTok, and LinkedIn). On LinkedIn adSetId is the existing Campaign id, and the budget, schedule, targeting and bidding fields must be omitted. Meta accepts `promotion` and `creativeFeatures` on the single and attach shapes and as defaults for `creatives[]`. An item replaces the whole feature map; its `promotion` replaces the default offer, and `promotion: null` disables that default for the item. Reusing `existingCreativeId` uses the existing creative settings instead of new settings. Requested settings are persisted for lists, exports, and default ad-detail reads. Only ads supplied a `promotion` receive live readback; multi-create batches those reads in groups of up to 50 IDs without per-ad fallback. Inspect `ad.creative.promotionStatus` (or `ads[].creative.promotionStatus`). `not_returned` means Meta omitted the metadata; successful creation does not by itself prove the offer was applied or will display. Per-platform required fields, budget minimums, and video-ad rules are documented on each property below. LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content \"dark post\" authored by a Company Page (see `organizationId`). Supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`. **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
|
|
611
611
|
# @param create_standalone_ad_request [CreateStandaloneAdRequest]
|
|
612
612
|
# @param [Hash] opts the optional parameters
|
|
613
613
|
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
@@ -618,7 +618,7 @@ module Zernio
|
|
|
618
618
|
end
|
|
619
619
|
|
|
620
620
|
# Create standalone ad
|
|
621
|
-
# Create a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X, LinkedIn, and OpenAI Ads (ChatGPT Ads).
|
|
621
|
+
# Create a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X, LinkedIn, and OpenAI Ads (ChatGPT Ads). Google Performance Max: set `campaignType: \"pmax\"` and supply `assetGroup` with text, images by role, business name and finalUrl. Creates a daily budget, PAUSED campaign and asset group atomically. `validateOnly: true` validates the complete request with Google without creating or persisting resources. Read assets with `GET /v1/ads/campaigns/{campaignId}/asset-groups`. The logo is required; video is optional via `assetGroup.youtubeVideoId`. Brand guidelines are disabled at creation. PMax rejects ACTIVE creation, portfolio bidding, bid caps, legacy creative fields and attach shapes. Geo and language targeting are supported; omitted geo targets all locations. PMax does not require top-level goal, headline, body or linkUrl. Supported bidding: omitted or LOWEST_COST_WITHOUT_CAP for Maximize Conversions, COST_CAP plus bidAmount for target CPA, LOWEST_COST_WITH_MIN_ROAS plus roasAverageFloor for Maximize Conversion Value with target ROAS. Other mutually-exclusive request shapes are selected by the body: - Legacy single-creative shape (all platforms, the default). - Meta-only multi-creative shape via the creatives array: one ad set with N ads sharing budget and targeting. - Attach shape via adSetId: adds one new ad to an existing ad set, inheriting its budget, targeting, and schedule (Meta, Google Ads, TikTok, and LinkedIn). On LinkedIn adSetId is the existing Campaign id, and the budget, schedule, targeting and bidding fields must be omitted. Meta accepts `promotion` and `creativeFeatures` on the single and attach shapes and as defaults for `creatives[]`. An item replaces the whole feature map; its `promotion` replaces the default offer, and `promotion: null` disables that default for the item. Reusing `existingCreativeId` uses the existing creative settings instead of new settings. Requested settings are persisted for lists, exports, and default ad-detail reads. Only ads supplied a `promotion` receive live readback; multi-create batches those reads in groups of up to 50 IDs without per-ad fallback. Inspect `ad.creative.promotionStatus` (or `ads[].creative.promotionStatus`). `not_returned` means Meta omitted the metadata; successful creation does not by itself prove the offer was applied or will display. Per-platform required fields, budget minimums, and video-ad rules are documented on each property below. LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content \"dark post\" authored by a Company Page (see `organizationId`). Supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`. **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
|
|
622
622
|
# @param create_standalone_ad_request [CreateStandaloneAdRequest]
|
|
623
623
|
# @param [Hash] opts the optional parameters
|
|
624
624
|
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
@@ -2464,6 +2464,74 @@ module Zernio
|
|
|
2464
2464
|
return data, status_code, headers
|
|
2465
2465
|
end
|
|
2466
2466
|
|
|
2467
|
+
# List Performance Max asset groups
|
|
2468
|
+
# Read Performance Max asset groups and their linked text, image and YouTube assets. campaignId is the platform campaign id returned by creation or the campaign list. The campaign must be visible to the caller. Uses a 10-minute cache, with the last successful response served as stale when Google quota is exhausted. Removed groups and asset links are excluded. Campaign-level brand assets on campaigns with brand guidelines enabled are not included.
|
|
2469
|
+
# @param campaign_id [String] Google Ads campaign id.
|
|
2470
|
+
# @param [Hash] opts the optional parameters
|
|
2471
|
+
# @return [ListGoogleAssetGroups200Response]
|
|
2472
|
+
def list_google_asset_groups(campaign_id, opts = {})
|
|
2473
|
+
data, _status_code, _headers = list_google_asset_groups_with_http_info(campaign_id, opts)
|
|
2474
|
+
data
|
|
2475
|
+
end
|
|
2476
|
+
|
|
2477
|
+
# List Performance Max asset groups
|
|
2478
|
+
# Read Performance Max asset groups and their linked text, image and YouTube assets. campaignId is the platform campaign id returned by creation or the campaign list. The campaign must be visible to the caller. Uses a 10-minute cache, with the last successful response served as stale when Google quota is exhausted. Removed groups and asset links are excluded. Campaign-level brand assets on campaigns with brand guidelines enabled are not included.
|
|
2479
|
+
# @param campaign_id [String] Google Ads campaign id.
|
|
2480
|
+
# @param [Hash] opts the optional parameters
|
|
2481
|
+
# @return [Array<(ListGoogleAssetGroups200Response, Integer, Hash)>] ListGoogleAssetGroups200Response data, response status code and response headers
|
|
2482
|
+
def list_google_asset_groups_with_http_info(campaign_id, opts = {})
|
|
2483
|
+
if @api_client.config.debugging
|
|
2484
|
+
@api_client.config.logger.debug 'Calling API: AdCampaignsApi.list_google_asset_groups ...'
|
|
2485
|
+
end
|
|
2486
|
+
# verify the required parameter 'campaign_id' is set
|
|
2487
|
+
if @api_client.config.client_side_validation && campaign_id.nil?
|
|
2488
|
+
fail ArgumentError, "Missing the required parameter 'campaign_id' when calling AdCampaignsApi.list_google_asset_groups"
|
|
2489
|
+
end
|
|
2490
|
+
pattern = Regexp.new(/^\d+$/)
|
|
2491
|
+
if @api_client.config.client_side_validation && campaign_id !~ pattern
|
|
2492
|
+
fail ArgumentError, "invalid value for 'campaign_id' when calling AdCampaignsApi.list_google_asset_groups, must conform to the pattern #{pattern}."
|
|
2493
|
+
end
|
|
2494
|
+
|
|
2495
|
+
# resource path
|
|
2496
|
+
local_var_path = '/v1/ads/campaigns/{campaignId}/asset-groups'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
|
|
2497
|
+
|
|
2498
|
+
# query parameters
|
|
2499
|
+
query_params = opts[:query_params] || {}
|
|
2500
|
+
|
|
2501
|
+
# header parameters
|
|
2502
|
+
header_params = opts[:header_params] || {}
|
|
2503
|
+
# HTTP header 'Accept' (if needed)
|
|
2504
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
2505
|
+
|
|
2506
|
+
# form parameters
|
|
2507
|
+
form_params = opts[:form_params] || {}
|
|
2508
|
+
|
|
2509
|
+
# http body (model)
|
|
2510
|
+
post_body = opts[:debug_body]
|
|
2511
|
+
|
|
2512
|
+
# return_type
|
|
2513
|
+
return_type = opts[:debug_return_type] || 'ListGoogleAssetGroups200Response'
|
|
2514
|
+
|
|
2515
|
+
# auth_names
|
|
2516
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
2517
|
+
|
|
2518
|
+
new_options = opts.merge(
|
|
2519
|
+
:operation => :"AdCampaignsApi.list_google_asset_groups",
|
|
2520
|
+
:header_params => header_params,
|
|
2521
|
+
:query_params => query_params,
|
|
2522
|
+
:form_params => form_params,
|
|
2523
|
+
:body => post_body,
|
|
2524
|
+
:auth_names => auth_names,
|
|
2525
|
+
:return_type => return_type
|
|
2526
|
+
)
|
|
2527
|
+
|
|
2528
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
2529
|
+
if @api_client.config.debugging
|
|
2530
|
+
@api_client.config.logger.debug "API called: AdCampaignsApi#list_google_asset_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
2531
|
+
end
|
|
2532
|
+
return data, status_code, headers
|
|
2533
|
+
end
|
|
2534
|
+
|
|
2467
2535
|
# Remove ad-group assets
|
|
2468
2536
|
# Removes the specified attachments only. Google assets cannot be deleted. Other attachments remain. assetResourceNames is retained for compatibility.
|
|
2469
2537
|
# @param ad_set_id [String] Numeric Google platform id.
|
|
@@ -16,6 +16,12 @@ require 'time'
|
|
|
16
16
|
module Zernio
|
|
17
17
|
# Platform-specific creative data. Fields vary by platform.
|
|
18
18
|
class AdCreative < ApiModelBase
|
|
19
|
+
# Initial Performance Max asset group input. Use the asset-groups endpoint for current Google assets.
|
|
20
|
+
attr_accessor :asset_group
|
|
21
|
+
|
|
22
|
+
# Google resource name of the created Performance Max asset group.
|
|
23
|
+
attr_accessor :asset_group_resource_name
|
|
24
|
+
|
|
19
25
|
# Google RSA only. Replaces the complete headline list. No padding or truncation on update.
|
|
20
26
|
attr_accessor :headlines
|
|
21
27
|
|
|
@@ -121,6 +127,8 @@ module Zernio
|
|
|
121
127
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
122
128
|
def self.attribute_map
|
|
123
129
|
{
|
|
130
|
+
:'asset_group' => :'assetGroup',
|
|
131
|
+
:'asset_group_resource_name' => :'assetGroupResourceName',
|
|
124
132
|
:'headlines' => :'headlines',
|
|
125
133
|
:'descriptions' => :'descriptions',
|
|
126
134
|
:'final_urls' => :'finalUrls',
|
|
@@ -165,6 +173,8 @@ module Zernio
|
|
|
165
173
|
# Attribute type mapping.
|
|
166
174
|
def self.openapi_types
|
|
167
175
|
{
|
|
176
|
+
:'asset_group' => :'GooglePmaxAssetGroupInput',
|
|
177
|
+
:'asset_group_resource_name' => :'String',
|
|
168
178
|
:'headlines' => :'Array<GoogleRsaHeadline>',
|
|
169
179
|
:'descriptions' => :'Array<GoogleRsaDescription>',
|
|
170
180
|
:'final_urls' => :'Array<String>',
|
|
@@ -229,6 +239,14 @@ module Zernio
|
|
|
229
239
|
h[k.to_sym] = v
|
|
230
240
|
}
|
|
231
241
|
|
|
242
|
+
if attributes.key?(:'asset_group')
|
|
243
|
+
self.asset_group = attributes[:'asset_group']
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
if attributes.key?(:'asset_group_resource_name')
|
|
247
|
+
self.asset_group_resource_name = attributes[:'asset_group_resource_name']
|
|
248
|
+
end
|
|
249
|
+
|
|
232
250
|
if attributes.key?(:'headlines')
|
|
233
251
|
if (value = attributes[:'headlines']).is_a?(Array)
|
|
234
252
|
self.headlines = value
|
|
@@ -447,6 +465,8 @@ module Zernio
|
|
|
447
465
|
def ==(o)
|
|
448
466
|
return true if self.equal?(o)
|
|
449
467
|
self.class == o.class &&
|
|
468
|
+
asset_group == o.asset_group &&
|
|
469
|
+
asset_group_resource_name == o.asset_group_resource_name &&
|
|
450
470
|
headlines == o.headlines &&
|
|
451
471
|
descriptions == o.descriptions &&
|
|
452
472
|
final_urls == o.final_urls &&
|
|
@@ -486,7 +506,7 @@ module Zernio
|
|
|
486
506
|
# Calculates hash code according to all attributes.
|
|
487
507
|
# @return [Integer] Hash code
|
|
488
508
|
def hash
|
|
489
|
-
[headlines, descriptions, final_urls, thumbnail_url, image_url, video_id, video_url, promotion, promotion_status, creative_id, object_type, object_story_id, effective_object_story_id, page_id, effective_instagram_media_id, instagram_user_id, instagram_permalink_url, media_urls, is_serving, serving_hold_reasons, body, google_headline, google_description, link_url, whatsapp_phone_number, pinterest_image_url, pinterest_title, pinterest_description].hash
|
|
509
|
+
[asset_group, asset_group_resource_name, headlines, descriptions, final_urls, thumbnail_url, image_url, video_id, video_url, promotion, promotion_status, creative_id, object_type, object_story_id, effective_object_story_id, page_id, effective_instagram_media_id, instagram_user_id, instagram_permalink_url, media_urls, is_serving, serving_hold_reasons, body, google_headline, google_description, link_url, whatsapp_phone_number, pinterest_image_url, pinterest_title, pinterest_description].hash
|
|
490
510
|
end
|
|
491
511
|
|
|
492
512
|
# Builds the object from hash
|
|
@@ -119,7 +119,7 @@ module Zernio
|
|
|
119
119
|
# @return true if the model is valid
|
|
120
120
|
def valid?
|
|
121
121
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
122
|
-
node_validator = EnumAttributeValidator.new('String', ["campaign", "adSet", "creative", "ad"])
|
|
122
|
+
node_validator = EnumAttributeValidator.new('String', ["campaign", "adSet", "creative", "ad", "performanceMaxCampaign"])
|
|
123
123
|
return false unless node_validator.valid?(@node)
|
|
124
124
|
status_validator = EnumAttributeValidator.new('String', ["validated", "skipped"])
|
|
125
125
|
return false unless status_validator.valid?(@status)
|
|
@@ -129,7 +129,7 @@ module Zernio
|
|
|
129
129
|
# Custom attribute writer method checking allowed values (enum).
|
|
130
130
|
# @param [Object] node Object to be assigned
|
|
131
131
|
def node=(node)
|
|
132
|
-
validator = EnumAttributeValidator.new('String', ["campaign", "adSet", "creative", "ad"])
|
|
132
|
+
validator = EnumAttributeValidator.new('String', ["campaign", "adSet", "creative", "ad", "performanceMaxCampaign"])
|
|
133
133
|
unless validator.valid?(node)
|
|
134
134
|
fail ArgumentError, "invalid value for \"node\", must be one of #{validator.allowable_values}."
|
|
135
135
|
end
|