late-sdk 0.0.926 → 0.0.928
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 +3 -0
- data/docs/AdCampaignsApi.md +2 -2
- data/docs/GooglePmaxAssetGroupUpdate.md +30 -0
- data/docs/GooglePmaxAssetGroupUpdateImages.md +22 -0
- data/docs/UpdateAdRequest.md +5 -3
- data/docs/UpdateAdRequestCreative.md +6 -0
- data/docs/UpdateAdRequestTargeting.md +5 -1
- data/docs/UpdateAdRequestTargetingLocations.md +49 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +4 -4
- data/lib/zernio-sdk/models/google_pmax_asset_group_update.rb +375 -0
- data/lib/zernio-sdk/models/google_pmax_asset_group_update_images.rb +259 -0
- data/lib/zernio-sdk/models/update_ad_request.rb +29 -19
- data/lib/zernio-sdk/models/update_ad_request_creative.rb +87 -1
- data/lib/zernio-sdk/models/update_ad_request_targeting.rb +23 -1
- data/lib/zernio-sdk/models/update_ad_request_targeting_locations.rb +105 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +158 -16
- data/spec/api/ad_campaigns_api_spec.rb +2 -2
- data/spec/models/google_pmax_asset_group_update_images_spec.rb +48 -0
- data/spec/models/google_pmax_asset_group_update_spec.rb +72 -0
- data/spec/models/update_ad_request_creative_spec.rb +18 -0
- data/spec/models/update_ad_request_spec.rb +6 -0
- data/spec/models/update_ad_request_targeting_locations_spec.rb +32 -0
- data/spec/models/update_ad_request_targeting_spec.rb +12 -0
- data/zernio-sdk-0.0.928.gem +0 -0
- metadata +14 -2
- data/zernio-sdk-0.0.926.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: 53ab0fac247a957ef6103e9d276f05e0eb5d452a0497940d29ce9d7d7be9f8a6
|
|
4
|
+
data.tar.gz: a16380b5ddfdae855972e4d9948f43bbdd2f527bb19d2ff6e034c86dbf2ccda7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70f7af7d25c30b35fe3ccc84770ee4f848078ef7658955ab573f63aac5b7b31ad04efc7fabc2c4b0108ff4f935fc0deb582b455143799b68e93c5dd34de1e347
|
|
7
|
+
data.tar.gz: 5dcc078e16a7d9d62a5cda5be6d21a1d6df662f1c110b3a02312594b59142975a1c16e9f04d9d1863154b04dabf0d2de050aab6b902d9e6fbe41942f2a38abd2
|
data/README.md
CHANGED
|
@@ -1717,6 +1717,8 @@ Class | Method | HTTP request | Description
|
|
|
1717
1717
|
- [Zernio::GooglePmaxAssetGroupAssetsInner](docs/GooglePmaxAssetGroupAssetsInner.md)
|
|
1718
1718
|
- [Zernio::GooglePmaxAssetGroupInput](docs/GooglePmaxAssetGroupInput.md)
|
|
1719
1719
|
- [Zernio::GooglePmaxAssetGroupInputImages](docs/GooglePmaxAssetGroupInputImages.md)
|
|
1720
|
+
- [Zernio::GooglePmaxAssetGroupUpdate](docs/GooglePmaxAssetGroupUpdate.md)
|
|
1721
|
+
- [Zernio::GooglePmaxAssetGroupUpdateImages](docs/GooglePmaxAssetGroupUpdateImages.md)
|
|
1720
1722
|
- [Zernio::GoogleRsaDescription](docs/GoogleRsaDescription.md)
|
|
1721
1723
|
- [Zernio::GoogleRsaHeadline](docs/GoogleRsaHeadline.md)
|
|
1722
1724
|
- [Zernio::GoogleSitelink](docs/GoogleSitelink.md)
|
|
@@ -2452,6 +2454,7 @@ Class | Method | HTTP request | Description
|
|
|
2452
2454
|
- [Zernio::UpdateAdRequestTargetingInterestsInner](docs/UpdateAdRequestTargetingInterestsInner.md)
|
|
2453
2455
|
- [Zernio::UpdateAdRequestTargetingKeywordsInner](docs/UpdateAdRequestTargetingKeywordsInner.md)
|
|
2454
2456
|
- [Zernio::UpdateAdRequestTargetingKeywordsInnerOneOf](docs/UpdateAdRequestTargetingKeywordsInnerOneOf.md)
|
|
2457
|
+
- [Zernio::UpdateAdRequestTargetingLocations](docs/UpdateAdRequestTargetingLocations.md)
|
|
2455
2458
|
- [Zernio::UpdateAdSet200Response](docs/UpdateAdSet200Response.md)
|
|
2456
2459
|
- [Zernio::UpdateAdSetRequest](docs/UpdateAdSetRequest.md)
|
|
2457
2460
|
- [Zernio::UpdateAdSetRequestBudget](docs/UpdateAdSetRequestBudget.md)
|
data/docs/AdCampaignsApi.md
CHANGED
|
@@ -2773,7 +2773,7 @@ end
|
|
|
2773
2773
|
|
|
2774
2774
|
Update ad
|
|
2775
2775
|
|
|
2776
|
-
Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`,
|
|
2776
|
+
Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`, DEVICE bid adjustments via `targeting.devices`, LOCATION edits via `targeting.locations` (or the equivalent top-level `targeting.countries` / `regions` / `cities` / `zips` / `metros`), and LANGUAGE edits via `targeting.languages`. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate it post-create without recreating the campaign. Creative edits are dispatched on the ad's `advertisingChannelType`, and every supported field replaces a whole set; a field you omit is preserved. - **Search**: top-level `headlines`, `descriptions` and `finalUrls`. Use 3-15 headlines (1-30 characters) and 2-4 descriptions (1-90 characters). Omit an asset to remove it; omit pinnedField on an included asset to unpin it. Updates do not pad or truncate text. The legacy creative fields remain unsupported. - **Display**: top-level `headlines` (1-5, no pinnedField, display ads have no pinned positions), `descriptions` (1-5) and `finalUrls`, plus `creative.longHeadline`, `creative.businessName`, `creative.imageUrl` (the landscape marketing image) and `creative.squareImageUrl`. Each image URL is uploaded as a new Google asset and the ad is pointed at it; Google assets are immutable, so the previous asset stays in the account's asset library. - **Performance Max**: top-level `assetGroup`, which swaps asset roles on the ad's asset group. The other creative fields return 422 for this channel, and `assetGroup` returns 422 on any other channel. - **LinkedIn**: status, budget, targeting (countries or regions, excludedLocations (countries), the B2B facets, and audience segments; applied to the LinkedIn Campaign via PARTIAL_UPDATE, and REPLACES the campaign's entire targetingCriteria, not a merge), and creative (uploads new media, creates a replacement inline creative on the same campaign, pauses the old one). - **Pinterest / X / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`. OpenAI Ads budget is lifetime-only (see `budget.type` below). **Google location and language replacement:** locations, languages and devices are campaign-level criteria on Google, so these edits apply to every ad group and ad in the ad's campaign. Send the complete list you want to keep. Zernio diffs it against the campaign's live criteria and sends the removes and the creates in ONE `googleAds:mutate`, so the campaign is never left with a half-applied set; criteria already in the list keep their criterion ID and history. Excluded (negative) locations are left untouched. Two cases are refused rather than applied: an empty location list returns 400 (a Google campaign with no location criteria targets every country, which is never what \"remove my locations\" means, so omit the field instead), and radius targeting (`customLocations`) returns 422 because it is a separate Google criterion type that this replacement neither creates nor removes. Send either `targeting.locations` or the top-level geo fields, not both: mixing them returns 400. **Google keyword replacement:** These edits affect the ad's entire ad group, including sibling ads. Positive (`targeting.keywords`) and negative (`targeting.negativeKeywords`) sets are independent: omit a field to leave that set unchanged, or send `[]` to remove every keyword of that kind. Zernio compares each supplied set with Google's live criteria by case-insensitive keyword text and match type. A matching criterion is left untouched, retaining its criterion ID, enabled/paused status, keyword-level bid overrides, labels, and criterion-associated history/statistics. Zernio does not reset its quality score; Google continues to calculate scores and statistics normally. Text comparison does not trim whitespace. A bare string or an object without `matchType` means `broad`, not the existing criterion's match type. For example, resending an existing `{ \"text\": \"plumber\", \"matchType\": \"exact\" }` preserves it; sending `\"plumber\"` instead removes that EXACT criterion and requests a BROAD one. Changing text or match type removes criteria no longer requested and creates any missing criteria. New criteria get new IDs and do not inherit removed criteria's bid overrides, labels, or history. Historical reporting for a removed criterion is not transferred to its replacement. To add keywords without replacing a set, use [POST /v1/ads/keywords](https://docs.zernio.com/ad-campaigns/add-ad-keywords). Use `PATCH /v1/ads/keywords/{keywordId}` to pause/enable one keyword, or `DELETE /v1/ads/keywords/{keywordId}` to remove it.
|
|
2777
2777
|
|
|
2778
2778
|
### Examples
|
|
2779
2779
|
|
|
@@ -3483,7 +3483,7 @@ end
|
|
|
3483
3483
|
|
|
3484
3484
|
Edit a Google campaign's device, location, or language targeting
|
|
3485
3485
|
|
|
3486
|
-
Google Ads compliance row M.10: geo and language targeting set at creation must stay editable afterwards. Send at least one of `devices`, `locations`, `languages`; each provided field REPLACES that field's existing criteria on the campaign (a full set, not a delta). Fields left out of the body are untouched. Google only; every other platform returns 501. `locations` accepts the same shapes as campaign creation: a bare array of ISO country codes, or an object with `countries`/`regions`/`cities`/`zips`/`metros` key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Negative (excluded) locations are left untouched by this endpoint. `languages` is an array of Google's language codes (ISO 639-1, plus variants such as `zh_CN`); an unknown code returns 400. The response includes the refreshed `devices`/`locations`/`languages` state read back from Google after the edit, and invalidates the cached copy `GET` on this campaign would otherwise keep serving.
|
|
3486
|
+
Google Ads compliance row M.10: geo and language targeting set at creation must stay editable afterwards. Send at least one of `devices`, `locations`, `languages`; each provided field REPLACES that field's existing criteria on the campaign (a full set, not a delta). Fields left out of the body are untouched. Google only; every other platform returns 501. `locations` accepts the same shapes as campaign creation: a bare array of ISO country codes, or an object with `countries`/`regions`/`cities`/`zips`/`metros` key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Negative (excluded) locations are left untouched by this endpoint. An empty location list returns 400 instead of removing every criterion: a Google campaign with no location criteria targets every country, so omit `locations` to leave targeting alone. The removes and the creates go out in ONE Google `googleAds:mutate`, so a failed edit leaves the campaign's previous set intact rather than a half-applied one. `languages` is an array of Google's language codes (ISO 639-1, plus variants such as `zh_CN`); an unknown code returns 400. The response includes the refreshed `devices`/`locations`/`languages` state read back from Google after the edit, and invalidates the cached copy `GET` on this campaign would otherwise keep serving.
|
|
3487
3487
|
|
|
3488
3488
|
### Examples
|
|
3489
3489
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Zernio::GooglePmaxAssetGroupUpdate
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **final_url** | **String** | Replaces the asset group's final URL. | [optional] |
|
|
8
|
+
| **headlines** | **Array<String>** | Replaces every HEADLINE asset on the group. | [optional] |
|
|
9
|
+
| **long_headline** | **String** | Replaces the LONG_HEADLINE asset. | [optional] |
|
|
10
|
+
| **descriptions** | **Array<String>** | Replaces every DESCRIPTION asset. At least one must be 60 characters or fewer. | [optional] |
|
|
11
|
+
| **business_name** | **String** | Replaces the BUSINESS_NAME asset. | [optional] |
|
|
12
|
+
| **images** | [**GooglePmaxAssetGroupUpdateImages**](GooglePmaxAssetGroupUpdateImages.md) | | [optional] |
|
|
13
|
+
| **youtube_video_ids** | **Array<String>** | Replaces YOUTUBE_VIDEO assets with existing YouTube video ids. Video uploads and arbitrary video URLs are not supported. | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'zernio-sdk'
|
|
19
|
+
|
|
20
|
+
instance = Zernio::GooglePmaxAssetGroupUpdate.new(
|
|
21
|
+
final_url: null,
|
|
22
|
+
headlines: null,
|
|
23
|
+
long_headline: null,
|
|
24
|
+
descriptions: null,
|
|
25
|
+
business_name: null,
|
|
26
|
+
images: null,
|
|
27
|
+
youtube_video_ids: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::GooglePmaxAssetGroupUpdateImages
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **landscape** | **Array<String>** | Replaces MARKETING_IMAGE assets. Aspect ratio 1.91:1, minimum 600 x 314 pixels. | [optional] |
|
|
8
|
+
| **square** | **Array<String>** | Replaces SQUARE_MARKETING_IMAGE assets. Aspect ratio 1:1, minimum 300 x 300 pixels. | [optional] |
|
|
9
|
+
| **logo** | **Array<String>** | Replaces LOGO assets. Aspect ratio 1:1, minimum 128 x 128 pixels. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::GooglePmaxAssetGroupUpdateImages.new(
|
|
17
|
+
landscape: null,
|
|
18
|
+
square: null,
|
|
19
|
+
logo: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/UpdateAdRequest.md
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **headlines** | [**Array<GoogleRsaHeadline>**](GoogleRsaHeadline.md) | Google
|
|
8
|
-
| **descriptions** | [**Array<GoogleRsaDescription>**](GoogleRsaDescription.md) | Google
|
|
9
|
-
| **final_urls** | **Array<String>** | Google
|
|
7
|
+
| **headlines** | [**Array<GoogleRsaHeadline>**](GoogleRsaHeadline.md) | Google Search and Display only. Replaces the complete headline list. Search takes 3-15, Display 1-5 and rejects pinnedField; the count is checked once the ad's channel is known. No padding or truncation on update. | [optional] |
|
|
8
|
+
| **descriptions** | [**Array<GoogleRsaDescription>**](GoogleRsaDescription.md) | Google Search and Display only. Replaces the complete description list. Search takes 2-4, Display 1-5 and rejects pinnedField. No padding or truncation on update. | [optional] |
|
|
9
|
+
| **final_urls** | **Array<String>** | Google Search and Display only. Replaces final URLs. Omitted lists stay unchanged. For Performance Max use assetGroup.finalUrl. | [optional] |
|
|
10
|
+
| **asset_group** | [**GooglePmaxAssetGroupUpdate**](GooglePmaxAssetGroupUpdate.md) | Google Performance Max only. Replaces whole asset roles on the ad's asset group. Returns 422 on any other platform or channel. | [optional] |
|
|
10
11
|
| **status** | **String** | | [optional] |
|
|
11
12
|
| **budget** | [**UpdateAdRequestBudget**](UpdateAdRequestBudget.md) | | [optional] |
|
|
12
13
|
| **targeting** | [**UpdateAdRequestTargeting**](UpdateAdRequestTargeting.md) | | [optional] |
|
|
@@ -22,6 +23,7 @@ instance = Zernio::UpdateAdRequest.new(
|
|
|
22
23
|
headlines: null,
|
|
23
24
|
descriptions: null,
|
|
24
25
|
final_urls: null,
|
|
26
|
+
asset_group: null,
|
|
25
27
|
status: null,
|
|
26
28
|
budget: null,
|
|
27
29
|
targeting: null,
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
| **promotion** | [**MetaPromotion**](MetaPromotion.md) | | [optional] |
|
|
8
8
|
| **creative_features** | **Hash<String, String>** | Meta Advantage+ creative enhancements. Map snake_case feature names to OPT_IN or OPT_OUT; Meta validates supported keys and unspecified features default to OPT_OUT. auto_promotion_tag is an enhancement; use the separate promotion field for an explicit offer. The deprecated standard_enhancements bundle is rejected by Meta. | [optional] |
|
|
9
9
|
| **headline** | **String** | Meta and LinkedIn (TikTok has no headline slot) | [optional] |
|
|
10
|
+
| **long_headline** | **String** | Google Display only. Replaces the responsive display ad's long headline. | [optional] |
|
|
11
|
+
| **business_name** | **String** | Google Display only. Replaces the responsive display ad's business name. | [optional] |
|
|
12
|
+
| **square_image_url** | **String** | Google Display only. Uploaded as a new square (1:1) marketing image asset that replaces the current one. | [optional] |
|
|
10
13
|
| **body** | **String** | | [optional] |
|
|
11
14
|
| **description** | **String** | Link description slot (Meta `link_data.description` / `video_data.link_description`, LinkedIn creative description). | [optional] |
|
|
12
15
|
| **call_to_action** | **String** | | [optional] |
|
|
@@ -25,6 +28,9 @@ instance = Zernio::UpdateAdRequestCreative.new(
|
|
|
25
28
|
promotion: null,
|
|
26
29
|
creative_features: {auto_promotion_tag=OPT_IN},
|
|
27
30
|
headline: null,
|
|
31
|
+
long_headline: null,
|
|
32
|
+
business_name: null,
|
|
33
|
+
square_image_url: null,
|
|
28
34
|
body: null,
|
|
29
35
|
description: null,
|
|
30
36
|
call_to_action: null,
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
| **devices** | [**Array<UpdateAdRequestTargetingDevicesInner>**](UpdateAdRequestTargetingDevicesInner.md) | Google only. The FULL new set of device criteria for the campaign; devices not listed are excluded. Entries are a device name alone (included, no bid adjustment) or { device, bidModifier }. | [optional] |
|
|
10
10
|
| **age_min** | **Integer** | | [optional] |
|
|
11
11
|
| **age_max** | **Integer** | | [optional] |
|
|
12
|
-
| **countries** | **Array<String>** |
|
|
12
|
+
| **countries** | **Array<String>** | ISO 3166-1 alpha-2 codes. On Google this is the FULL new country set for the campaign (same contract as `locations`); on LinkedIn it replaces the campaign's geo criteria. | [optional] |
|
|
13
|
+
| **locations** | [**UpdateAdRequestTargetingLocations**](UpdateAdRequestTargetingLocations.md) | | [optional] |
|
|
14
|
+
| **languages** | **Array<String>** | Google only. The FULL new language set for the campaign, as Google language codes (ISO 639-1, plus variants such as `zh_CN`). An unknown code returns 400. | [optional] |
|
|
13
15
|
| **interests** | [**Array<UpdateAdRequestTargetingInterestsInner>**](UpdateAdRequestTargetingInterestsInner.md) | Interest objects from /v1/ads/interests. Each must include id and name. | [optional] |
|
|
14
16
|
| **advantage_audience** | **Integer** | Meta only. Omit to preserve the existing setting on update. 0 = disabled, 1 = enabled. | [optional] |
|
|
15
17
|
|
|
@@ -25,6 +27,8 @@ instance = Zernio::UpdateAdRequestTargeting.new(
|
|
|
25
27
|
age_min: null,
|
|
26
28
|
age_max: null,
|
|
27
29
|
countries: null,
|
|
30
|
+
locations: null,
|
|
31
|
+
languages: null,
|
|
28
32
|
interests: null,
|
|
29
33
|
advantage_audience: null
|
|
30
34
|
)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Zernio::UpdateAdRequestTargetingLocations
|
|
2
|
+
|
|
3
|
+
## Class instance methods
|
|
4
|
+
|
|
5
|
+
### `openapi_one_of`
|
|
6
|
+
|
|
7
|
+
Returns the list of classes defined in oneOf.
|
|
8
|
+
|
|
9
|
+
#### Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
Zernio::UpdateAdRequestTargetingLocations.openapi_one_of
|
|
15
|
+
# =>
|
|
16
|
+
# [
|
|
17
|
+
# :'Array<String>',
|
|
18
|
+
# :'UpdateCampaignTargetingRequestTargetingLocationsOneOf'
|
|
19
|
+
# ]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### build
|
|
23
|
+
|
|
24
|
+
Find the appropriate object from the `openapi_one_of` list and casts the data into it.
|
|
25
|
+
|
|
26
|
+
#### Example
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
require 'zernio-sdk'
|
|
30
|
+
|
|
31
|
+
Zernio::UpdateAdRequestTargetingLocations.build(data)
|
|
32
|
+
# => #<Array<String>:0x00007fdd4aab02a0>
|
|
33
|
+
|
|
34
|
+
Zernio::UpdateAdRequestTargetingLocations.build(data_that_doesnt_match)
|
|
35
|
+
# => nil
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Parameters
|
|
39
|
+
|
|
40
|
+
| Name | Type | Description |
|
|
41
|
+
| ---- | ---- | ----------- |
|
|
42
|
+
| **data** | **Mixed** | data to be matched against the list of oneOf items |
|
|
43
|
+
|
|
44
|
+
#### Return type
|
|
45
|
+
|
|
46
|
+
- `Array<String>`
|
|
47
|
+
- `UpdateCampaignTargetingRequestTargetingLocationsOneOf`
|
|
48
|
+
- `nil` (if no type matches)
|
|
49
|
+
|
|
@@ -2907,7 +2907,7 @@ module Zernio
|
|
|
2907
2907
|
end
|
|
2908
2908
|
|
|
2909
2909
|
# Update ad
|
|
2910
|
-
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`,
|
|
2910
|
+
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`, DEVICE bid adjustments via `targeting.devices`, LOCATION edits via `targeting.locations` (or the equivalent top-level `targeting.countries` / `regions` / `cities` / `zips` / `metros`), and LANGUAGE edits via `targeting.languages`. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate it post-create without recreating the campaign. Creative edits are dispatched on the ad's `advertisingChannelType`, and every supported field replaces a whole set; a field you omit is preserved. - **Search**: top-level `headlines`, `descriptions` and `finalUrls`. Use 3-15 headlines (1-30 characters) and 2-4 descriptions (1-90 characters). Omit an asset to remove it; omit pinnedField on an included asset to unpin it. Updates do not pad or truncate text. The legacy creative fields remain unsupported. - **Display**: top-level `headlines` (1-5, no pinnedField, display ads have no pinned positions), `descriptions` (1-5) and `finalUrls`, plus `creative.longHeadline`, `creative.businessName`, `creative.imageUrl` (the landscape marketing image) and `creative.squareImageUrl`. Each image URL is uploaded as a new Google asset and the ad is pointed at it; Google assets are immutable, so the previous asset stays in the account's asset library. - **Performance Max**: top-level `assetGroup`, which swaps asset roles on the ad's asset group. The other creative fields return 422 for this channel, and `assetGroup` returns 422 on any other channel. - **LinkedIn**: status, budget, targeting (countries or regions, excludedLocations (countries), the B2B facets, and audience segments; applied to the LinkedIn Campaign via PARTIAL_UPDATE, and REPLACES the campaign's entire targetingCriteria, not a merge), and creative (uploads new media, creates a replacement inline creative on the same campaign, pauses the old one). - **Pinterest / X / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`. OpenAI Ads budget is lifetime-only (see `budget.type` below). **Google location and language replacement:** locations, languages and devices are campaign-level criteria on Google, so these edits apply to every ad group and ad in the ad's campaign. Send the complete list you want to keep. Zernio diffs it against the campaign's live criteria and sends the removes and the creates in ONE `googleAds:mutate`, so the campaign is never left with a half-applied set; criteria already in the list keep their criterion ID and history. Excluded (negative) locations are left untouched. Two cases are refused rather than applied: an empty location list returns 400 (a Google campaign with no location criteria targets every country, which is never what \"remove my locations\" means, so omit the field instead), and radius targeting (`customLocations`) returns 422 because it is a separate Google criterion type that this replacement neither creates nor removes. Send either `targeting.locations` or the top-level geo fields, not both: mixing them returns 400. **Google keyword replacement:** These edits affect the ad's entire ad group, including sibling ads. Positive (`targeting.keywords`) and negative (`targeting.negativeKeywords`) sets are independent: omit a field to leave that set unchanged, or send `[]` to remove every keyword of that kind. Zernio compares each supplied set with Google's live criteria by case-insensitive keyword text and match type. A matching criterion is left untouched, retaining its criterion ID, enabled/paused status, keyword-level bid overrides, labels, and criterion-associated history/statistics. Zernio does not reset its quality score; Google continues to calculate scores and statistics normally. Text comparison does not trim whitespace. A bare string or an object without `matchType` means `broad`, not the existing criterion's match type. For example, resending an existing `{ \"text\": \"plumber\", \"matchType\": \"exact\" }` preserves it; sending `\"plumber\"` instead removes that EXACT criterion and requests a BROAD one. Changing text or match type removes criteria no longer requested and creates any missing criteria. New criteria get new IDs and do not inherit removed criteria's bid overrides, labels, or history. Historical reporting for a removed criterion is not transferred to its replacement. To add keywords without replacing a set, use [POST /v1/ads/keywords](https://docs.zernio.com/ad-campaigns/add-ad-keywords). Use `PATCH /v1/ads/keywords/{keywordId}` to pause/enable one keyword, or `DELETE /v1/ads/keywords/{keywordId}` to remove it.
|
|
2911
2911
|
# @param ad_id [String]
|
|
2912
2912
|
# @param update_ad_request [UpdateAdRequest]
|
|
2913
2913
|
# @param [Hash] opts the optional parameters
|
|
@@ -2918,7 +2918,7 @@ module Zernio
|
|
|
2918
2918
|
end
|
|
2919
2919
|
|
|
2920
2920
|
# Update ad
|
|
2921
|
-
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`,
|
|
2921
|
+
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style: `headline` is ignored, `body` becomes `ad_text`). - **Google**: status, budget, KEYWORD edits via `targeting.keywords` / `targeting.negativeKeywords`, DEVICE bid adjustments via `targeting.devices`, LOCATION edits via `targeting.locations` (or the equivalent top-level `targeting.countries` / `regions` / `cities` / `zips` / `metros`), and LANGUAGE edits via `targeting.languages`. Each list you send becomes the FULL new set of its kind (criteria not in the list are removed); a kind left out is untouched. Any other `targeting` field returns 400: Google cannot mutate it post-create without recreating the campaign. Creative edits are dispatched on the ad's `advertisingChannelType`, and every supported field replaces a whole set; a field you omit is preserved. - **Search**: top-level `headlines`, `descriptions` and `finalUrls`. Use 3-15 headlines (1-30 characters) and 2-4 descriptions (1-90 characters). Omit an asset to remove it; omit pinnedField on an included asset to unpin it. Updates do not pad or truncate text. The legacy creative fields remain unsupported. - **Display**: top-level `headlines` (1-5, no pinnedField, display ads have no pinned positions), `descriptions` (1-5) and `finalUrls`, plus `creative.longHeadline`, `creative.businessName`, `creative.imageUrl` (the landscape marketing image) and `creative.squareImageUrl`. Each image URL is uploaded as a new Google asset and the ad is pointed at it; Google assets are immutable, so the previous asset stays in the account's asset library. - **Performance Max**: top-level `assetGroup`, which swaps asset roles on the ad's asset group. The other creative fields return 422 for this channel, and `assetGroup` returns 422 on any other channel. - **LinkedIn**: status, budget, targeting (countries or regions, excludedLocations (countries), the B2B facets, and audience segments; applied to the LinkedIn Campaign via PARTIAL_UPDATE, and REPLACES the campaign's entire targetingCriteria, not a merge), and creative (uploads new media, creates a replacement inline creative on the same campaign, pauses the old one). - **Pinterest / X / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`. OpenAI Ads budget is lifetime-only (see `budget.type` below). **Google location and language replacement:** locations, languages and devices are campaign-level criteria on Google, so these edits apply to every ad group and ad in the ad's campaign. Send the complete list you want to keep. Zernio diffs it against the campaign's live criteria and sends the removes and the creates in ONE `googleAds:mutate`, so the campaign is never left with a half-applied set; criteria already in the list keep their criterion ID and history. Excluded (negative) locations are left untouched. Two cases are refused rather than applied: an empty location list returns 400 (a Google campaign with no location criteria targets every country, which is never what \"remove my locations\" means, so omit the field instead), and radius targeting (`customLocations`) returns 422 because it is a separate Google criterion type that this replacement neither creates nor removes. Send either `targeting.locations` or the top-level geo fields, not both: mixing them returns 400. **Google keyword replacement:** These edits affect the ad's entire ad group, including sibling ads. Positive (`targeting.keywords`) and negative (`targeting.negativeKeywords`) sets are independent: omit a field to leave that set unchanged, or send `[]` to remove every keyword of that kind. Zernio compares each supplied set with Google's live criteria by case-insensitive keyword text and match type. A matching criterion is left untouched, retaining its criterion ID, enabled/paused status, keyword-level bid overrides, labels, and criterion-associated history/statistics. Zernio does not reset its quality score; Google continues to calculate scores and statistics normally. Text comparison does not trim whitespace. A bare string or an object without `matchType` means `broad`, not the existing criterion's match type. For example, resending an existing `{ \"text\": \"plumber\", \"matchType\": \"exact\" }` preserves it; sending `\"plumber\"` instead removes that EXACT criterion and requests a BROAD one. Changing text or match type removes criteria no longer requested and creates any missing criteria. New criteria get new IDs and do not inherit removed criteria's bid overrides, labels, or history. Historical reporting for a removed criterion is not transferred to its replacement. To add keywords without replacing a set, use [POST /v1/ads/keywords](https://docs.zernio.com/ad-campaigns/add-ad-keywords). Use `PATCH /v1/ads/keywords/{keywordId}` to pause/enable one keyword, or `DELETE /v1/ads/keywords/{keywordId}` to remove it.
|
|
2922
2922
|
# @param ad_id [String]
|
|
2923
2923
|
# @param update_ad_request [UpdateAdRequest]
|
|
2924
2924
|
# @param [Hash] opts the optional parameters
|
|
@@ -3657,7 +3657,7 @@ module Zernio
|
|
|
3657
3657
|
end
|
|
3658
3658
|
|
|
3659
3659
|
# Edit a Google campaign's device, location, or language targeting
|
|
3660
|
-
# Google Ads compliance row M.10: geo and language targeting set at creation must stay editable afterwards. Send at least one of `devices`, `locations`, `languages`; each provided field REPLACES that field's existing criteria on the campaign (a full set, not a delta). Fields left out of the body are untouched. Google only; every other platform returns 501. `locations` accepts the same shapes as campaign creation: a bare array of ISO country codes, or an object with `countries`/`regions`/`cities`/`zips`/`metros` key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Negative (excluded) locations are left untouched by this endpoint. `languages` is an array of Google's language codes (ISO 639-1, plus variants such as `zh_CN`); an unknown code returns 400. The response includes the refreshed `devices`/`locations`/`languages` state read back from Google after the edit, and invalidates the cached copy `GET` on this campaign would otherwise keep serving.
|
|
3660
|
+
# Google Ads compliance row M.10: geo and language targeting set at creation must stay editable afterwards. Send at least one of `devices`, `locations`, `languages`; each provided field REPLACES that field's existing criteria on the campaign (a full set, not a delta). Fields left out of the body are untouched. Google only; every other platform returns 501. `locations` accepts the same shapes as campaign creation: a bare array of ISO country codes, or an object with `countries`/`regions`/`cities`/`zips`/`metros` key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Negative (excluded) locations are left untouched by this endpoint. An empty location list returns 400 instead of removing every criterion: a Google campaign with no location criteria targets every country, so omit `locations` to leave targeting alone. The removes and the creates go out in ONE Google `googleAds:mutate`, so a failed edit leaves the campaign's previous set intact rather than a half-applied one. `languages` is an array of Google's language codes (ISO 639-1, plus variants such as `zh_CN`); an unknown code returns 400. The response includes the refreshed `devices`/`locations`/`languages` state read back from Google after the edit, and invalidates the cached copy `GET` on this campaign would otherwise keep serving.
|
|
3661
3661
|
# @param campaign_id [String] Google platform campaign ID
|
|
3662
3662
|
# @param update_campaign_targeting_request [UpdateCampaignTargetingRequest]
|
|
3663
3663
|
# @param [Hash] opts the optional parameters
|
|
@@ -3668,7 +3668,7 @@ module Zernio
|
|
|
3668
3668
|
end
|
|
3669
3669
|
|
|
3670
3670
|
# Edit a Google campaign's device, location, or language targeting
|
|
3671
|
-
# Google Ads compliance row M.10: geo and language targeting set at creation must stay editable afterwards. Send at least one of `devices`, `locations`, `languages`; each provided field REPLACES that field's existing criteria on the campaign (a full set, not a delta). Fields left out of the body are untouched. Google only; every other platform returns 501. `locations` accepts the same shapes as campaign creation: a bare array of ISO country codes, or an object with `countries`/`regions`/`cities`/`zips`/`metros` key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Negative (excluded) locations are left untouched by this endpoint. `languages` is an array of Google's language codes (ISO 639-1, plus variants such as `zh_CN`); an unknown code returns 400. The response includes the refreshed `devices`/`locations`/`languages` state read back from Google after the edit, and invalidates the cached copy `GET` on this campaign would otherwise keep serving.
|
|
3671
|
+
# Google Ads compliance row M.10: geo and language targeting set at creation must stay editable afterwards. Send at least one of `devices`, `locations`, `languages`; each provided field REPLACES that field's existing criteria on the campaign (a full set, not a delta). Fields left out of the body are untouched. Google only; every other platform returns 501. `locations` accepts the same shapes as campaign creation: a bare array of ISO country codes, or an object with `countries`/`regions`/`cities`/`zips`/`metros` key lists (`key` from GET /v1/ads/targeting/search?dimension=geo). Negative (excluded) locations are left untouched by this endpoint. An empty location list returns 400 instead of removing every criterion: a Google campaign with no location criteria targets every country, so omit `locations` to leave targeting alone. The removes and the creates go out in ONE Google `googleAds:mutate`, so a failed edit leaves the campaign's previous set intact rather than a half-applied one. `languages` is an array of Google's language codes (ISO 639-1, plus variants such as `zh_CN`); an unknown code returns 400. The response includes the refreshed `devices`/`locations`/`languages` state read back from Google after the edit, and invalidates the cached copy `GET` on this campaign would otherwise keep serving.
|
|
3672
3672
|
# @param campaign_id [String] Google platform campaign ID
|
|
3673
3673
|
# @param update_campaign_targeting_request [UpdateCampaignTargetingRequest]
|
|
3674
3674
|
# @param [Hash] opts the optional parameters
|