late-sdk 0.0.904 → 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 +9 -0
- data/docs/AdAccountsApi.md +70 -0
- data/docs/AdCampaignsApi.md +71 -1
- data/docs/AdCreative.md +4 -0
- data/docs/CreateAdAccount201Response.md +30 -0
- data/docs/CreateAdAccountRequest.md +46 -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_accounts_api.rb +68 -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_ad_account201_response.rb +340 -0
- data/lib/zernio-sdk/models/create_ad_account_request.rb +611 -0
- 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 +7 -0
- data/openapi.yaml +305 -8
- data/spec/api/ad_accounts_api_spec.rb +12 -0
- data/spec/api/ad_campaigns_api_spec.rb +13 -1
- data/spec/models/ad_creative_spec.rb +12 -0
- data/spec/models/create_ad_account201_response_spec.rb +72 -0
- data/spec/models/create_ad_account_request_spec.rb +120 -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 +30 -2
- data/zernio-sdk-0.0.904.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
|
@@ -109,6 +109,7 @@ Class | Method | HTTP request | Description
|
|
|
109
109
|
*Zernio::AdAccountsApi* | [**add_account_callouts**](docs/AdAccountsApi.md#add_account_callouts) | **POST** /v1/ads/accounts/callouts | Add account callouts
|
|
110
110
|
*Zernio::AdAccountsApi* | [**add_account_sitelinks**](docs/AdAccountsApi.md#add_account_sitelinks) | **POST** /v1/ads/accounts/sitelinks | Add account sitelinks
|
|
111
111
|
*Zernio::AdAccountsApi* | [**add_account_structured_snippets**](docs/AdAccountsApi.md#add_account_structured_snippets) | **POST** /v1/ads/accounts/structured-snippets | Add account snippets
|
|
112
|
+
*Zernio::AdAccountsApi* | [**create_ad_account**](docs/AdAccountsApi.md#create_ad_account) | **POST** /v1/ads/accounts | Create Meta ad account
|
|
112
113
|
*Zernio::AdAccountsApi* | [**create_ad_negative_keyword_list**](docs/AdAccountsApi.md#create_ad_negative_keyword_list) | **POST** /v1/ads/accounts/negative-keyword-lists | Create a negative keyword list
|
|
113
114
|
*Zernio::AdAccountsApi* | [**create_custom_conversion**](docs/AdAccountsApi.md#create_custom_conversion) | **POST** /v1/accounts/{accountId}/custom-conversions | Create or reuse a custom conversion
|
|
114
115
|
*Zernio::AdAccountsApi* | [**create_high_demand_period**](docs/AdAccountsApi.md#create_high_demand_period) | **POST** /v1/ads/high-demand-periods | Schedule a budget increase
|
|
@@ -187,6 +188,7 @@ Class | Method | HTTP request | Description
|
|
|
187
188
|
*Zernio::AdCampaignsApi* | [**list_campaign_assets**](docs/AdCampaignsApi.md#list_campaign_assets) | **GET** /v1/ads/campaigns/{campaignId}/assets | List campaign assets
|
|
188
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
|
|
189
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
|
|
190
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
|
|
191
193
|
*Zernio::AdCampaignsApi* | [**remove_ad_keyword**](docs/AdCampaignsApi.md#remove_ad_keyword) | **DELETE** /v1/ads/keywords/{keywordId} | Remove a Search keyword
|
|
192
194
|
*Zernio::AdCampaignsApi* | [**remove_campaign_assets**](docs/AdCampaignsApi.md#remove_campaign_assets) | **DELETE** /v1/ads/campaigns/{campaignId}/assets | Remove campaign assets
|
|
@@ -1029,6 +1031,8 @@ Class | Method | HTTP request | Description
|
|
|
1029
1031
|
- [Zernio::CreateAccountGroup201Response](docs/CreateAccountGroup201Response.md)
|
|
1030
1032
|
- [Zernio::CreateAccountGroup201ResponseGroup](docs/CreateAccountGroup201ResponseGroup.md)
|
|
1031
1033
|
- [Zernio::CreateAccountGroupRequest](docs/CreateAccountGroupRequest.md)
|
|
1034
|
+
- [Zernio::CreateAdAccount201Response](docs/CreateAdAccount201Response.md)
|
|
1035
|
+
- [Zernio::CreateAdAccountRequest](docs/CreateAdAccountRequest.md)
|
|
1032
1036
|
- [Zernio::CreateAdAudience201Response](docs/CreateAdAudience201Response.md)
|
|
1033
1037
|
- [Zernio::CreateAdAudienceRequest](docs/CreateAdAudienceRequest.md)
|
|
1034
1038
|
- [Zernio::CreateAdCampaign200Response](docs/CreateAdCampaign200Response.md)
|
|
@@ -1696,6 +1700,10 @@ Class | Method | HTTP request | Description
|
|
|
1696
1700
|
- [Zernio::GoogleBusinessReview](docs/GoogleBusinessReview.md)
|
|
1697
1701
|
- [Zernio::GoogleBusinessReviewReviewReply](docs/GoogleBusinessReviewReviewReply.md)
|
|
1698
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)
|
|
1699
1707
|
- [Zernio::GoogleRsaDescription](docs/GoogleRsaDescription.md)
|
|
1700
1708
|
- [Zernio::GoogleRsaHeadline](docs/GoogleRsaHeadline.md)
|
|
1701
1709
|
- [Zernio::GoogleSitelink](docs/GoogleSitelink.md)
|
|
@@ -1868,6 +1876,7 @@ Class | Method | HTTP request | Description
|
|
|
1868
1876
|
- [Zernio::ListFacebookPages200ResponsePagesInner](docs/ListFacebookPages200ResponsePagesInner.md)
|
|
1869
1877
|
- [Zernio::ListFormLeads200Response](docs/ListFormLeads200Response.md)
|
|
1870
1878
|
- [Zernio::ListFormLeads200ResponseLeadsInner](docs/ListFormLeads200ResponseLeadsInner.md)
|
|
1879
|
+
- [Zernio::ListGoogleAssetGroups200Response](docs/ListGoogleAssetGroups200Response.md)
|
|
1871
1880
|
- [Zernio::ListGoogleBusinessLocations200Response](docs/ListGoogleBusinessLocations200Response.md)
|
|
1872
1881
|
- [Zernio::ListGoogleBusinessLocations200ResponseLocationsInner](docs/ListGoogleBusinessLocations200ResponseLocationsInner.md)
|
|
1873
1882
|
- [Zernio::ListGoogleBusinessMedia200Response](docs/ListGoogleBusinessMedia200Response.md)
|
data/docs/AdAccountsApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
7
7
|
| [**add_account_callouts**](AdAccountsApi.md#add_account_callouts) | **POST** /v1/ads/accounts/callouts | Add account callouts |
|
|
8
8
|
| [**add_account_sitelinks**](AdAccountsApi.md#add_account_sitelinks) | **POST** /v1/ads/accounts/sitelinks | Add account sitelinks |
|
|
9
9
|
| [**add_account_structured_snippets**](AdAccountsApi.md#add_account_structured_snippets) | **POST** /v1/ads/accounts/structured-snippets | Add account snippets |
|
|
10
|
+
| [**create_ad_account**](AdAccountsApi.md#create_ad_account) | **POST** /v1/ads/accounts | Create Meta ad account |
|
|
10
11
|
| [**create_ad_negative_keyword_list**](AdAccountsApi.md#create_ad_negative_keyword_list) | **POST** /v1/ads/accounts/negative-keyword-lists | Create a negative keyword list |
|
|
11
12
|
| [**create_custom_conversion**](AdAccountsApi.md#create_custom_conversion) | **POST** /v1/accounts/{accountId}/custom-conversions | Create or reuse a custom conversion |
|
|
12
13
|
| [**create_high_demand_period**](AdAccountsApi.md#create_high_demand_period) | **POST** /v1/ads/high-demand-periods | Schedule a budget increase |
|
|
@@ -257,6 +258,75 @@ end
|
|
|
257
258
|
- **Accept**: application/json
|
|
258
259
|
|
|
259
260
|
|
|
261
|
+
## create_ad_account
|
|
262
|
+
|
|
263
|
+
> <CreateAdAccount201Response> create_ad_account(create_ad_account_request)
|
|
264
|
+
|
|
265
|
+
Create Meta ad account
|
|
266
|
+
|
|
267
|
+
Creates a durable Meta ad account in the end user's own business portfolio using their connected Meta Ads token. Requires an active metaads accountId, Ads access, business_management permission and business admin access. Discover portfolios with GET /v1/ads/businesses. System-user tokens may return an empty businesses list; supply the known business ID in that case. The self-serve account starts without a payment method. The user must add a payment method in Ads Manager before ads can deliver. Zernio cannot add payment methods. Meta may require business verification and limits how many accounts a business can create. Closing an account does not guarantee more capacity. An ad account cannot truly be deleted, even after closing it and removing it from a business. timezoneId is Meta's numeric ID, not an IANA timezone name. Select it from https://developers.facebook.com/docs/marketing-api/reference/ad-account/timezone-ids/. For example, 1 is America/Los_Angeles. Meta validates supported currencies and IDs. endAdvertiser, mediaAgency and partner default to NONE for the self-serve flow. The new account is added atomically to an existing scoped ad-account allowlist. Unrestricted connections stay unrestricted. Reconnecting the same Meta identity preserves this scope unless a caller explicitly replaces it. Discovery is nudged immediately. Use the returned adAccountId with the existing ads endpoints. This operation is not idempotent and Zernio never automatically retries it. Unknown body fields are rejected. No validateOnly or dry-run option is supported. After a timeout or a 502 with details.creationStatus=unknown, check the business in Ads Manager before attempting another creation. A 201 with connectionUpdated=false means the account exists but needs reconnecting with adAccountIds containing the returned ID and the previous scoped IDs via GET /v1/connect/facebook/ads. Do not repeat the create call.
|
|
268
|
+
|
|
269
|
+
### Examples
|
|
270
|
+
|
|
271
|
+
```ruby
|
|
272
|
+
require 'time'
|
|
273
|
+
require 'zernio-sdk'
|
|
274
|
+
# setup authorization
|
|
275
|
+
Zernio.configure do |config|
|
|
276
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
277
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
api_instance = Zernio::AdAccountsApi.new
|
|
281
|
+
create_ad_account_request = Zernio::CreateAdAccountRequest.new({account_id: 'account_id_example', business_id: 'business_id_example', name: 'name_example', currency: 'currency_example', timezone_id: 37}) # CreateAdAccountRequest |
|
|
282
|
+
|
|
283
|
+
begin
|
|
284
|
+
# Create Meta ad account
|
|
285
|
+
result = api_instance.create_ad_account(create_ad_account_request)
|
|
286
|
+
p result
|
|
287
|
+
rescue Zernio::ApiError => e
|
|
288
|
+
puts "Error when calling AdAccountsApi->create_ad_account: #{e}"
|
|
289
|
+
end
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
#### Using the create_ad_account_with_http_info variant
|
|
293
|
+
|
|
294
|
+
This returns an Array which contains the response data, status code and headers.
|
|
295
|
+
|
|
296
|
+
> <Array(<CreateAdAccount201Response>, Integer, Hash)> create_ad_account_with_http_info(create_ad_account_request)
|
|
297
|
+
|
|
298
|
+
```ruby
|
|
299
|
+
begin
|
|
300
|
+
# Create Meta ad account
|
|
301
|
+
data, status_code, headers = api_instance.create_ad_account_with_http_info(create_ad_account_request)
|
|
302
|
+
p status_code # => 2xx
|
|
303
|
+
p headers # => { ... }
|
|
304
|
+
p data # => <CreateAdAccount201Response>
|
|
305
|
+
rescue Zernio::ApiError => e
|
|
306
|
+
puts "Error when calling AdAccountsApi->create_ad_account_with_http_info: #{e}"
|
|
307
|
+
end
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Parameters
|
|
311
|
+
|
|
312
|
+
| Name | Type | Description | Notes |
|
|
313
|
+
| ---- | ---- | ----------- | ----- |
|
|
314
|
+
| **create_ad_account_request** | [**CreateAdAccountRequest**](CreateAdAccountRequest.md) | | |
|
|
315
|
+
|
|
316
|
+
### Return type
|
|
317
|
+
|
|
318
|
+
[**CreateAdAccount201Response**](CreateAdAccount201Response.md)
|
|
319
|
+
|
|
320
|
+
### Authorization
|
|
321
|
+
|
|
322
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
323
|
+
|
|
324
|
+
### HTTP request headers
|
|
325
|
+
|
|
326
|
+
- **Content-Type**: application/json
|
|
327
|
+
- **Accept**: application/json
|
|
328
|
+
|
|
329
|
+
|
|
260
330
|
## create_ad_negative_keyword_list
|
|
261
331
|
|
|
262
332
|
> <CreateAdNegativeKeywordList201Response> create_ad_negative_keyword_list(create_ad_negative_keyword_list_request)
|
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,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Zernio::CreateAdAccount201Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | New Meta ad account ID for subsequent ads calls. | |
|
|
8
|
+
| **business_id** | **String** | Owning business portfolio ID. | |
|
|
9
|
+
| **connection_updated** | **Boolean** | Whether the connection scope and discovery schedule were updated. | |
|
|
10
|
+
| **payment_method_required** | **Boolean** | Always true as a delivery prerequisite. This is not a live funding-source check. Confirm payment or invoicing in Ads Manager. | |
|
|
11
|
+
| **ads_manager_url** | **String** | Open the created account in Ads Manager. | |
|
|
12
|
+
| **next_steps** | **String** | Payment setup instructions for the user. | |
|
|
13
|
+
| **warnings** | **Array<String>** | Recovery instructions if the account could not be attached to the connection. | |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'zernio-sdk'
|
|
19
|
+
|
|
20
|
+
instance = Zernio::CreateAdAccount201Response.new(
|
|
21
|
+
ad_account_id: null,
|
|
22
|
+
business_id: null,
|
|
23
|
+
connection_updated: null,
|
|
24
|
+
payment_method_required: null,
|
|
25
|
+
ads_manager_url: null,
|
|
26
|
+
next_steps: null,
|
|
27
|
+
warnings: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Zernio::CreateAdAccountRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **account_id** | **String** | Zernio metaads SocialAccount ID. | |
|
|
8
|
+
| **business_id** | **String** | Business portfolio that will own the account. | |
|
|
9
|
+
| **name** | **String** | Ad account name. Whitespace is trimmed. | |
|
|
10
|
+
| **currency** | **String** | Uppercase ISO 4217 currency supported by Meta. | |
|
|
11
|
+
| **timezone_id** | **Integer** | Numeric Meta timezone ID from the linked timezone list. For example 1 is America/Los_Angeles. | |
|
|
12
|
+
| **end_advertiser** | **String** | End advertiser business or page ID. NONE uses the owning business. | [optional][default to 'NONE'] |
|
|
13
|
+
| **media_agency** | **String** | Media agency business or page ID. NONE for self-serve customers. | [optional][default to 'NONE'] |
|
|
14
|
+
| **partner** | **String** | Partner business or page ID. NONE for self-serve customers. | [optional][default to 'NONE'] |
|
|
15
|
+
| **invoice** | **Boolean** | Request Meta invoicing. Eligibility is determined by Meta. | [optional] |
|
|
16
|
+
| **invoice_group_id** | **String** | Existing Meta invoice group ID. | [optional] |
|
|
17
|
+
| **invoicing_emails** | **Array<String>** | Addresses for Meta invoices. | [optional] |
|
|
18
|
+
| **io** | **Boolean** | Meta insertion-order invoicing option. | [optional] |
|
|
19
|
+
| **po_number** | **String** | Purchase order number. | [optional] |
|
|
20
|
+
| **funding_id** | **String** | Existing Meta funding reference. Does not add a payment method. | [optional] |
|
|
21
|
+
| **ad_account_created_from_bm_flag** | **Boolean** | Meta Business Manager creation flag. | [optional] |
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```ruby
|
|
26
|
+
require 'zernio-sdk'
|
|
27
|
+
|
|
28
|
+
instance = Zernio::CreateAdAccountRequest.new(
|
|
29
|
+
account_id: null,
|
|
30
|
+
business_id: null,
|
|
31
|
+
name: null,
|
|
32
|
+
currency: null,
|
|
33
|
+
timezone_id: null,
|
|
34
|
+
end_advertiser: null,
|
|
35
|
+
media_agency: null,
|
|
36
|
+
partner: null,
|
|
37
|
+
invoice: null,
|
|
38
|
+
invoice_group_id: null,
|
|
39
|
+
invoicing_emails: null,
|
|
40
|
+
io: null,
|
|
41
|
+
po_number: null,
|
|
42
|
+
funding_id: null,
|
|
43
|
+
ad_account_created_from_bm_flag: null
|
|
44
|
+
)
|
|
45
|
+
```
|
|
46
|
+
|
|
@@ -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
|
+
|
|
@@ -223,6 +223,74 @@ module Zernio
|
|
|
223
223
|
return data, status_code, headers
|
|
224
224
|
end
|
|
225
225
|
|
|
226
|
+
# Create Meta ad account
|
|
227
|
+
# Creates a durable Meta ad account in the end user's own business portfolio using their connected Meta Ads token. Requires an active metaads accountId, Ads access, business_management permission and business admin access. Discover portfolios with GET /v1/ads/businesses. System-user tokens may return an empty businesses list; supply the known business ID in that case. The self-serve account starts without a payment method. The user must add a payment method in Ads Manager before ads can deliver. Zernio cannot add payment methods. Meta may require business verification and limits how many accounts a business can create. Closing an account does not guarantee more capacity. An ad account cannot truly be deleted, even after closing it and removing it from a business. timezoneId is Meta's numeric ID, not an IANA timezone name. Select it from https://developers.facebook.com/docs/marketing-api/reference/ad-account/timezone-ids/. For example, 1 is America/Los_Angeles. Meta validates supported currencies and IDs. endAdvertiser, mediaAgency and partner default to NONE for the self-serve flow. The new account is added atomically to an existing scoped ad-account allowlist. Unrestricted connections stay unrestricted. Reconnecting the same Meta identity preserves this scope unless a caller explicitly replaces it. Discovery is nudged immediately. Use the returned adAccountId with the existing ads endpoints. This operation is not idempotent and Zernio never automatically retries it. Unknown body fields are rejected. No validateOnly or dry-run option is supported. After a timeout or a 502 with details.creationStatus=unknown, check the business in Ads Manager before attempting another creation. A 201 with connectionUpdated=false means the account exists but needs reconnecting with adAccountIds containing the returned ID and the previous scoped IDs via GET /v1/connect/facebook/ads. Do not repeat the create call.
|
|
228
|
+
# @param create_ad_account_request [CreateAdAccountRequest]
|
|
229
|
+
# @param [Hash] opts the optional parameters
|
|
230
|
+
# @return [CreateAdAccount201Response]
|
|
231
|
+
def create_ad_account(create_ad_account_request, opts = {})
|
|
232
|
+
data, _status_code, _headers = create_ad_account_with_http_info(create_ad_account_request, opts)
|
|
233
|
+
data
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Create Meta ad account
|
|
237
|
+
# Creates a durable Meta ad account in the end user's own business portfolio using their connected Meta Ads token. Requires an active metaads accountId, Ads access, business_management permission and business admin access. Discover portfolios with GET /v1/ads/businesses. System-user tokens may return an empty businesses list; supply the known business ID in that case. The self-serve account starts without a payment method. The user must add a payment method in Ads Manager before ads can deliver. Zernio cannot add payment methods. Meta may require business verification and limits how many accounts a business can create. Closing an account does not guarantee more capacity. An ad account cannot truly be deleted, even after closing it and removing it from a business. timezoneId is Meta's numeric ID, not an IANA timezone name. Select it from https://developers.facebook.com/docs/marketing-api/reference/ad-account/timezone-ids/. For example, 1 is America/Los_Angeles. Meta validates supported currencies and IDs. endAdvertiser, mediaAgency and partner default to NONE for the self-serve flow. The new account is added atomically to an existing scoped ad-account allowlist. Unrestricted connections stay unrestricted. Reconnecting the same Meta identity preserves this scope unless a caller explicitly replaces it. Discovery is nudged immediately. Use the returned adAccountId with the existing ads endpoints. This operation is not idempotent and Zernio never automatically retries it. Unknown body fields are rejected. No validateOnly or dry-run option is supported. After a timeout or a 502 with details.creationStatus=unknown, check the business in Ads Manager before attempting another creation. A 201 with connectionUpdated=false means the account exists but needs reconnecting with adAccountIds containing the returned ID and the previous scoped IDs via GET /v1/connect/facebook/ads. Do not repeat the create call.
|
|
238
|
+
# @param create_ad_account_request [CreateAdAccountRequest]
|
|
239
|
+
# @param [Hash] opts the optional parameters
|
|
240
|
+
# @return [Array<(CreateAdAccount201Response, Integer, Hash)>] CreateAdAccount201Response data, response status code and response headers
|
|
241
|
+
def create_ad_account_with_http_info(create_ad_account_request, opts = {})
|
|
242
|
+
if @api_client.config.debugging
|
|
243
|
+
@api_client.config.logger.debug 'Calling API: AdAccountsApi.create_ad_account ...'
|
|
244
|
+
end
|
|
245
|
+
# verify the required parameter 'create_ad_account_request' is set
|
|
246
|
+
if @api_client.config.client_side_validation && create_ad_account_request.nil?
|
|
247
|
+
fail ArgumentError, "Missing the required parameter 'create_ad_account_request' when calling AdAccountsApi.create_ad_account"
|
|
248
|
+
end
|
|
249
|
+
# resource path
|
|
250
|
+
local_var_path = '/v1/ads/accounts'
|
|
251
|
+
|
|
252
|
+
# query parameters
|
|
253
|
+
query_params = opts[:query_params] || {}
|
|
254
|
+
|
|
255
|
+
# header parameters
|
|
256
|
+
header_params = opts[:header_params] || {}
|
|
257
|
+
# HTTP header 'Accept' (if needed)
|
|
258
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
259
|
+
# HTTP header 'Content-Type'
|
|
260
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
261
|
+
if !content_type.nil?
|
|
262
|
+
header_params['Content-Type'] = content_type
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# form parameters
|
|
266
|
+
form_params = opts[:form_params] || {}
|
|
267
|
+
|
|
268
|
+
# http body (model)
|
|
269
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ad_account_request)
|
|
270
|
+
|
|
271
|
+
# return_type
|
|
272
|
+
return_type = opts[:debug_return_type] || 'CreateAdAccount201Response'
|
|
273
|
+
|
|
274
|
+
# auth_names
|
|
275
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
276
|
+
|
|
277
|
+
new_options = opts.merge(
|
|
278
|
+
:operation => :"AdAccountsApi.create_ad_account",
|
|
279
|
+
:header_params => header_params,
|
|
280
|
+
:query_params => query_params,
|
|
281
|
+
:form_params => form_params,
|
|
282
|
+
:body => post_body,
|
|
283
|
+
:auth_names => auth_names,
|
|
284
|
+
:return_type => return_type
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
288
|
+
if @api_client.config.debugging
|
|
289
|
+
@api_client.config.logger.debug "API called: AdAccountsApi#create_ad_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
290
|
+
end
|
|
291
|
+
return data, status_code, headers
|
|
292
|
+
end
|
|
293
|
+
|
|
226
294
|
# Create a negative keyword list
|
|
227
295
|
# Creates one Google Ads shared negative keyword list with optional initial keywords in a single atomic mutation. Daily quota is reserved for every mutate item, so large batches may return 429 before any change. This operation is not idempotent. The list is not attached to any campaign.
|
|
228
296
|
# @param create_ad_negative_keyword_list_request [CreateAdNegativeKeywordListRequest]
|