late-sdk 0.0.778 → 0.0.780
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 +2 -0
- data/docs/AdCampaignsApi.md +70 -0
- data/docs/AdTargetingApi.md +1 -1
- data/docs/DeleteAdSet200Response.md +20 -0
- data/docs/TargetingSpec.md +1 -1
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +63 -0
- data/lib/zernio-sdk/api/ad_targeting_api.rb +2 -2
- data/lib/zernio-sdk/models/delete_ad_set200_response.rb +157 -0
- data/lib/zernio-sdk/models/targeting_spec.rb +1 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +47 -4
- data/spec/api/ad_campaigns_api_spec.rb +12 -0
- data/spec/api/ad_targeting_api_spec.rb +1 -1
- data/spec/models/delete_ad_set200_response_spec.rb +42 -0
- data/zernio-sdk-0.0.780.gem +0 -0
- metadata +6 -2
- data/zernio-sdk-0.0.778.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: c2d60528804bb9fff32f0e5d68791891c08c16ec5db91a6bb7074001b444b421
|
|
4
|
+
data.tar.gz: '0493f8a8e105f69d3b24f2deac6f22e08bc8a43c14221e77d4d5fb308d21914f'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f7b1ab25ac7175e129fa7974b95ee8c95df13bbf6e9f2e1aa274db118631dfa4760ffc8af1aebbd602ccd333751dd6557af26728cfd714655d3eff48cf2190e2
|
|
7
|
+
data.tar.gz: 444082cbccd7305076beb3256dcfb3aa00e2b02a8a7a1566c131f85a0fc96d97ed4f0a04f1b13f2ebd3b018433c9a691c3a3d8ce1c431ecc7799bbbb2b336992
|
data/README.md
CHANGED
|
@@ -139,6 +139,7 @@ Class | Method | HTTP request | Description
|
|
|
139
139
|
*Zernio::AdCampaignsApi* | [**create_standalone_ad**](docs/AdCampaignsApi.md#create_standalone_ad) | **POST** /v1/ads/create | Create standalone ad
|
|
140
140
|
*Zernio::AdCampaignsApi* | [**delete_ad**](docs/AdCampaignsApi.md#delete_ad) | **DELETE** /v1/ads/{adId} | Cancel an ad
|
|
141
141
|
*Zernio::AdCampaignsApi* | [**delete_ad_campaign**](docs/AdCampaignsApi.md#delete_ad_campaign) | **DELETE** /v1/ads/campaigns/{campaignId} | Delete a campaign
|
|
142
|
+
*Zernio::AdCampaignsApi* | [**delete_ad_set**](docs/AdCampaignsApi.md#delete_ad_set) | **DELETE** /v1/ads/ad-sets/{adSetId} | Delete an ad set
|
|
142
143
|
*Zernio::AdCampaignsApi* | [**duplicate_ad**](docs/AdCampaignsApi.md#duplicate_ad) | **POST** /v1/ads/{adId}/duplicate | Duplicate an ad
|
|
143
144
|
*Zernio::AdCampaignsApi* | [**duplicate_ad_campaign**](docs/AdCampaignsApi.md#duplicate_ad_campaign) | **POST** /v1/ads/campaigns/{campaignId}/duplicate | Duplicate a campaign
|
|
144
145
|
*Zernio::AdCampaignsApi* | [**duplicate_ad_set**](docs/AdCampaignsApi.md#duplicate_ad_set) | **POST** /v1/ads/ad-sets/{adSetId}/duplicate | Duplicate an ad set
|
|
@@ -1032,6 +1033,7 @@ Class | Method | HTTP request | Description
|
|
|
1032
1033
|
- [Zernio::DeleteAdCampaign200Response](docs/DeleteAdCampaign200Response.md)
|
|
1033
1034
|
- [Zernio::DeleteAdCampaignRequest](docs/DeleteAdCampaignRequest.md)
|
|
1034
1035
|
- [Zernio::DeleteAdCreative200Response](docs/DeleteAdCreative200Response.md)
|
|
1036
|
+
- [Zernio::DeleteAdSet200Response](docs/DeleteAdSet200Response.md)
|
|
1035
1037
|
- [Zernio::DeleteAdVideo200Response](docs/DeleteAdVideo200Response.md)
|
|
1036
1038
|
- [Zernio::DeleteDiscordScheduledEvent200Response](docs/DeleteDiscordScheduledEvent200Response.md)
|
|
1037
1039
|
- [Zernio::DeleteGoogleBusinessMedia200Response](docs/DeleteGoogleBusinessMedia200Response.md)
|
data/docs/AdCampaignsApi.md
CHANGED
|
@@ -11,6 +11,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
11
11
|
| [**create_standalone_ad**](AdCampaignsApi.md#create_standalone_ad) | **POST** /v1/ads/create | Create standalone ad |
|
|
12
12
|
| [**delete_ad**](AdCampaignsApi.md#delete_ad) | **DELETE** /v1/ads/{adId} | Cancel an ad |
|
|
13
13
|
| [**delete_ad_campaign**](AdCampaignsApi.md#delete_ad_campaign) | **DELETE** /v1/ads/campaigns/{campaignId} | Delete a campaign |
|
|
14
|
+
| [**delete_ad_set**](AdCampaignsApi.md#delete_ad_set) | **DELETE** /v1/ads/ad-sets/{adSetId} | Delete an ad set |
|
|
14
15
|
| [**duplicate_ad**](AdCampaignsApi.md#duplicate_ad) | **POST** /v1/ads/{adId}/duplicate | Duplicate an ad |
|
|
15
16
|
| [**duplicate_ad_campaign**](AdCampaignsApi.md#duplicate_ad_campaign) | **POST** /v1/ads/campaigns/{campaignId}/duplicate | Duplicate a campaign |
|
|
16
17
|
| [**duplicate_ad_set**](AdCampaignsApi.md#duplicate_ad_set) | **POST** /v1/ads/ad-sets/{adSetId}/duplicate | Duplicate an ad set |
|
|
@@ -528,6 +529,75 @@ end
|
|
|
528
529
|
- **Accept**: application/json
|
|
529
530
|
|
|
530
531
|
|
|
532
|
+
## delete_ad_set
|
|
533
|
+
|
|
534
|
+
> <DeleteAdSet200Response> delete_ad_set(ad_set_id)
|
|
535
|
+
|
|
536
|
+
Delete an ad set
|
|
537
|
+
|
|
538
|
+
Deletes the ad set on the platform, cascading to its ads only (never the campaign). Locally, every Ad document under the ad set is marked `status: cancelled`. Delete is soft on platforms that have no hard delete: LinkedIn moves the campaign to `PENDING_DELETION`, Pinterest archives the ad group, and X soft-flags the line item. Google removes the ad group. All remain readable for reporting.
|
|
539
|
+
|
|
540
|
+
### Examples
|
|
541
|
+
|
|
542
|
+
```ruby
|
|
543
|
+
require 'time'
|
|
544
|
+
require 'zernio-sdk'
|
|
545
|
+
# setup authorization
|
|
546
|
+
Zernio.configure do |config|
|
|
547
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
548
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
api_instance = Zernio::AdCampaignsApi.new
|
|
552
|
+
ad_set_id = 'ad_set_id_example' # String | Platform ad set ID
|
|
553
|
+
|
|
554
|
+
begin
|
|
555
|
+
# Delete an ad set
|
|
556
|
+
result = api_instance.delete_ad_set(ad_set_id)
|
|
557
|
+
p result
|
|
558
|
+
rescue Zernio::ApiError => e
|
|
559
|
+
puts "Error when calling AdCampaignsApi->delete_ad_set: #{e}"
|
|
560
|
+
end
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
#### Using the delete_ad_set_with_http_info variant
|
|
564
|
+
|
|
565
|
+
This returns an Array which contains the response data, status code and headers.
|
|
566
|
+
|
|
567
|
+
> <Array(<DeleteAdSet200Response>, Integer, Hash)> delete_ad_set_with_http_info(ad_set_id)
|
|
568
|
+
|
|
569
|
+
```ruby
|
|
570
|
+
begin
|
|
571
|
+
# Delete an ad set
|
|
572
|
+
data, status_code, headers = api_instance.delete_ad_set_with_http_info(ad_set_id)
|
|
573
|
+
p status_code # => 2xx
|
|
574
|
+
p headers # => { ... }
|
|
575
|
+
p data # => <DeleteAdSet200Response>
|
|
576
|
+
rescue Zernio::ApiError => e
|
|
577
|
+
puts "Error when calling AdCampaignsApi->delete_ad_set_with_http_info: #{e}"
|
|
578
|
+
end
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
### Parameters
|
|
582
|
+
|
|
583
|
+
| Name | Type | Description | Notes |
|
|
584
|
+
| ---- | ---- | ----------- | ----- |
|
|
585
|
+
| **ad_set_id** | **String** | Platform ad set ID | |
|
|
586
|
+
|
|
587
|
+
### Return type
|
|
588
|
+
|
|
589
|
+
[**DeleteAdSet200Response**](DeleteAdSet200Response.md)
|
|
590
|
+
|
|
591
|
+
### Authorization
|
|
592
|
+
|
|
593
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
594
|
+
|
|
595
|
+
### HTTP request headers
|
|
596
|
+
|
|
597
|
+
- **Content-Type**: Not defined
|
|
598
|
+
- **Accept**: application/json
|
|
599
|
+
|
|
600
|
+
|
|
531
601
|
## duplicate_ad
|
|
532
602
|
|
|
533
603
|
> <DuplicateAd200Response> duplicate_ad(ad_id, opts)
|
data/docs/AdTargetingApi.md
CHANGED
|
@@ -295,7 +295,7 @@ end
|
|
|
295
295
|
|
|
296
296
|
Search targeting options
|
|
297
297
|
|
|
298
|
-
Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. LinkedIn geo searches also return every matching level in one list, and neither `geoType` nor `countryCode` is applied: LinkedIn's typeahead only returns a name and a URN per result, with no level or country field to filter on. Every result has `type` set to `location`, and its id is a `urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`, `POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`. Pinterest resolves against three whole-catalog endpoints (interests, locations, regions) with no server-side query or pagination, so matching, ranking and the `limit` cutoff all happen in Zernio; the catalog is independent of any ad account and results never carry `audienceSize`. Names come back localized to the connected Pinterest account's language (there is no way to force a locale), so match against whatever language that account returns. `geoType` routes to a different catalog: `country` and `metro_area` read the locations catalog (`type` is `country` or `metro`); `region` reads the regions catalog (`type` is `region`, its id a `regions[].key` on `POST /v1/ads/create`); `all` and the default `city` merge both catalogs with honest per-entry `type`s, since Pinterest has no city-level catalog and `city` is an alias for `all`, not a literal city search. `zip`, `subcity`, `neighborhood`, `place` and `geo_market` return a 400: Pinterest exposes no postal-code catalog, pass postal codes directly as `targeting.zips: [{ key }]` on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
298
|
+
Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. LinkedIn geo searches also return every matching level in one list, and neither `geoType` nor `countryCode` is applied: LinkedIn's typeahead only returns a name and a URN per result, with no level or country field to filter on. Every result has `type` set to `location`, and its id is a `urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`, `POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`. Google geo searches resolve against Google's geoTargetConstants and return every matching level in one list; `geoType` is not applied (Google's `target_type` is an open taxonomy that does not map one-to-one onto the `geoType` enum), so filter client-side on the returned `type` (`country`, `region`, `city`, `zip`, `metro`, or the lowercased Google target type for rarer levels). `countryCode` scopes the search to one country. Each id is Google's numeric criterion id, usable as a `regions`/`cities`/`zips`/`metros` `key` on `POST /v1/ads/create`. Google city radius is not supported (pass a `customLocations` lat/lng pin for a radius); country targeting also accepts plain ISO codes via `countries` with no search call. Pinterest resolves against three whole-catalog endpoints (interests, locations, regions) with no server-side query or pagination, so matching, ranking and the `limit` cutoff all happen in Zernio; the catalog is independent of any ad account and results never carry `audienceSize`. Names come back localized to the connected Pinterest account's language (there is no way to force a locale), so match against whatever language that account returns. `geoType` routes to a different catalog: `country` and `metro_area` read the locations catalog (`type` is `country` or `metro`); `region` reads the regions catalog (`type` is `region`, its id a `regions[].key` on `POST /v1/ads/create`); `all` and the default `city` merge both catalogs with honest per-entry `type`s, since Pinterest has no city-level catalog and `city` is an alias for `all`, not a literal city search. `zip`, `subcity`, `neighborhood`, `place` and `geo_market` return a 400: Pinterest exposes no postal-code catalog, pass postal codes directly as `targeting.zips: [{ key }]` on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
299
299
|
|
|
300
300
|
### Examples
|
|
301
301
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::DeleteAdSet200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **deleted** | **Boolean** | | [optional] |
|
|
8
|
+
| **ad_count** | **Integer** | Local Ad documents marked cancelled | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::DeleteAdSet200Response.new(
|
|
16
|
+
deleted: null,
|
|
17
|
+
ad_count: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/TargetingSpec.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| **cities** | [**Array<TargetingSpecCitiesInner>**](TargetingSpecCitiesInner.md) | City targeting. Optional `radius` + `distanceUnit` extend beyond the city limits; both must be set together or both omitted. `radius` is only honoured on platforms whose capability map allows city radius (Meta). | [optional] |
|
|
10
10
|
| **zips** | [**Array<BoostPostRequestTargetingRegionsInner>**](BoostPostRequestTargetingRegionsInner.md) | Postal/ZIP targeting. `key` is the platform's postal location ID (e.g. Meta `US:94304`). Supported on Meta, Google, TikTok, Pinterest, X. | [optional] |
|
|
11
11
|
| **metros** | [**Array<BoostPostRequestTargetingRegionsInner>**](BoostPostRequestTargetingRegionsInner.md) | DMA / metro-area targeting. `key` is the platform's metro ID (e.g. Meta `DMA:807`). | [optional] |
|
|
12
|
-
| **custom_locations** | [**Array<TargetingSpecCustomLocationsInner>**](TargetingSpecCustomLocationsInner.md) | Point-radius (lat/lng) targeting (Meta custom_locations / Google proximity). Honoured
|
|
12
|
+
| **custom_locations** | [**Array<TargetingSpecCustomLocationsInner>**](TargetingSpecCustomLocationsInner.md) | Point-radius (lat/lng) targeting (Meta custom_locations / Google proximity). Honoured on Meta and Google; ignored on platforms without radius support. | [optional] |
|
|
13
13
|
| **excluded_locations** | [**TargetingSpecExcludedLocations**](TargetingSpecExcludedLocations.md) | | [optional] |
|
|
14
14
|
| **age_min** | **Integer** | Minimum age. Applied on Meta, TikTok and Pinterest; ignored on Google, LinkedIn and X. Each platform clamps to its own range: Meta and Pinterest effectively cap at 65 (65 = 65+), TikTok maps up to 100. Pinterest has no under-18 bucket, so an ageMin below 18 starts at 18 there. | [optional] |
|
|
15
15
|
| **age_max** | **Integer** | Maximum age. Same per-platform application and clamping as ageMin. | [optional] |
|
|
@@ -523,6 +523,69 @@ module Zernio
|
|
|
523
523
|
return data, status_code, headers
|
|
524
524
|
end
|
|
525
525
|
|
|
526
|
+
# Delete an ad set
|
|
527
|
+
# Deletes the ad set on the platform, cascading to its ads only (never the campaign). Locally, every Ad document under the ad set is marked `status: cancelled`. Delete is soft on platforms that have no hard delete: LinkedIn moves the campaign to `PENDING_DELETION`, Pinterest archives the ad group, and X soft-flags the line item. Google removes the ad group. All remain readable for reporting.
|
|
528
|
+
# @param ad_set_id [String] Platform ad set ID
|
|
529
|
+
# @param [Hash] opts the optional parameters
|
|
530
|
+
# @return [DeleteAdSet200Response]
|
|
531
|
+
def delete_ad_set(ad_set_id, opts = {})
|
|
532
|
+
data, _status_code, _headers = delete_ad_set_with_http_info(ad_set_id, opts)
|
|
533
|
+
data
|
|
534
|
+
end
|
|
535
|
+
|
|
536
|
+
# Delete an ad set
|
|
537
|
+
# Deletes the ad set on the platform, cascading to its ads only (never the campaign). Locally, every Ad document under the ad set is marked `status: cancelled`. Delete is soft on platforms that have no hard delete: LinkedIn moves the campaign to `PENDING_DELETION`, Pinterest archives the ad group, and X soft-flags the line item. Google removes the ad group. All remain readable for reporting.
|
|
538
|
+
# @param ad_set_id [String] Platform ad set ID
|
|
539
|
+
# @param [Hash] opts the optional parameters
|
|
540
|
+
# @return [Array<(DeleteAdSet200Response, Integer, Hash)>] DeleteAdSet200Response data, response status code and response headers
|
|
541
|
+
def delete_ad_set_with_http_info(ad_set_id, opts = {})
|
|
542
|
+
if @api_client.config.debugging
|
|
543
|
+
@api_client.config.logger.debug 'Calling API: AdCampaignsApi.delete_ad_set ...'
|
|
544
|
+
end
|
|
545
|
+
# verify the required parameter 'ad_set_id' is set
|
|
546
|
+
if @api_client.config.client_side_validation && ad_set_id.nil?
|
|
547
|
+
fail ArgumentError, "Missing the required parameter 'ad_set_id' when calling AdCampaignsApi.delete_ad_set"
|
|
548
|
+
end
|
|
549
|
+
# resource path
|
|
550
|
+
local_var_path = '/v1/ads/ad-sets/{adSetId}'.sub('{' + 'adSetId' + '}', CGI.escape(ad_set_id.to_s))
|
|
551
|
+
|
|
552
|
+
# query parameters
|
|
553
|
+
query_params = opts[:query_params] || {}
|
|
554
|
+
|
|
555
|
+
# header parameters
|
|
556
|
+
header_params = opts[:header_params] || {}
|
|
557
|
+
# HTTP header 'Accept' (if needed)
|
|
558
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
559
|
+
|
|
560
|
+
# form parameters
|
|
561
|
+
form_params = opts[:form_params] || {}
|
|
562
|
+
|
|
563
|
+
# http body (model)
|
|
564
|
+
post_body = opts[:debug_body]
|
|
565
|
+
|
|
566
|
+
# return_type
|
|
567
|
+
return_type = opts[:debug_return_type] || 'DeleteAdSet200Response'
|
|
568
|
+
|
|
569
|
+
# auth_names
|
|
570
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
571
|
+
|
|
572
|
+
new_options = opts.merge(
|
|
573
|
+
:operation => :"AdCampaignsApi.delete_ad_set",
|
|
574
|
+
:header_params => header_params,
|
|
575
|
+
:query_params => query_params,
|
|
576
|
+
:form_params => form_params,
|
|
577
|
+
:body => post_body,
|
|
578
|
+
:auth_names => auth_names,
|
|
579
|
+
:return_type => return_type
|
|
580
|
+
)
|
|
581
|
+
|
|
582
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
583
|
+
if @api_client.config.debugging
|
|
584
|
+
@api_client.config.logger.debug "API called: AdCampaignsApi#delete_ad_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
585
|
+
end
|
|
586
|
+
return data, status_code, headers
|
|
587
|
+
end
|
|
588
|
+
|
|
526
589
|
# Duplicate an ad
|
|
527
590
|
# Duplicates a single ad via Meta's native `POST /{ad-id}/copies`. The copy is created paused. `adSetId` retargets the copy into another ad set; omitted = the source's own ad set. Accepts the Zernio ad id or the platform ad id. Sync discovery is triggered automatically (`syncAfter: false` to skip).
|
|
528
591
|
# @param ad_id [String] Zernio ad ID or platform ad ID
|
|
@@ -295,7 +295,7 @@ module Zernio
|
|
|
295
295
|
end
|
|
296
296
|
|
|
297
297
|
# Search targeting options
|
|
298
|
-
# Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. LinkedIn geo searches also return every matching level in one list, and neither `geoType` nor `countryCode` is applied: LinkedIn's typeahead only returns a name and a URN per result, with no level or country field to filter on. Every result has `type` set to `location`, and its id is a `urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`, `POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`. Pinterest resolves against three whole-catalog endpoints (interests, locations, regions) with no server-side query or pagination, so matching, ranking and the `limit` cutoff all happen in Zernio; the catalog is independent of any ad account and results never carry `audienceSize`. Names come back localized to the connected Pinterest account's language (there is no way to force a locale), so match against whatever language that account returns. `geoType` routes to a different catalog: `country` and `metro_area` read the locations catalog (`type` is `country` or `metro`); `region` reads the regions catalog (`type` is `region`, its id a `regions[].key` on `POST /v1/ads/create`); `all` and the default `city` merge both catalogs with honest per-entry `type`s, since Pinterest has no city-level catalog and `city` is an alias for `all`, not a literal city search. `zip`, `subcity`, `neighborhood`, `place` and `geo_market` return a 400: Pinterest exposes no postal-code catalog, pass postal codes directly as `targeting.zips: [{ key }]` on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
298
|
+
# Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. LinkedIn geo searches also return every matching level in one list, and neither `geoType` nor `countryCode` is applied: LinkedIn's typeahead only returns a name and a URN per result, with no level or country field to filter on. Every result has `type` set to `location`, and its id is a `urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`, `POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`. Google geo searches resolve against Google's geoTargetConstants and return every matching level in one list; `geoType` is not applied (Google's `target_type` is an open taxonomy that does not map one-to-one onto the `geoType` enum), so filter client-side on the returned `type` (`country`, `region`, `city`, `zip`, `metro`, or the lowercased Google target type for rarer levels). `countryCode` scopes the search to one country. Each id is Google's numeric criterion id, usable as a `regions`/`cities`/`zips`/`metros` `key` on `POST /v1/ads/create`. Google city radius is not supported (pass a `customLocations` lat/lng pin for a radius); country targeting also accepts plain ISO codes via `countries` with no search call. Pinterest resolves against three whole-catalog endpoints (interests, locations, regions) with no server-side query or pagination, so matching, ranking and the `limit` cutoff all happen in Zernio; the catalog is independent of any ad account and results never carry `audienceSize`. Names come back localized to the connected Pinterest account's language (there is no way to force a locale), so match against whatever language that account returns. `geoType` routes to a different catalog: `country` and `metro_area` read the locations catalog (`type` is `country` or `metro`); `region` reads the regions catalog (`type` is `region`, its id a `regions[].key` on `POST /v1/ads/create`); `all` and the default `city` merge both catalogs with honest per-entry `type`s, since Pinterest has no city-level catalog and `city` is an alias for `all`, not a literal city search. `zip`, `subcity`, `neighborhood`, `place` and `geo_market` return a 400: Pinterest exposes no postal-code catalog, pass postal codes directly as `targeting.zips: [{ key }]` on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
299
299
|
# @param account_id [String] Social account ID (a connected account on the target ad platform).
|
|
300
300
|
# @param q [String] Search query. For geo, the locality name only (no region/country suffix).
|
|
301
301
|
# @param [Hash] opts the optional parameters
|
|
@@ -310,7 +310,7 @@ module Zernio
|
|
|
310
310
|
end
|
|
311
311
|
|
|
312
312
|
# Search targeting options
|
|
313
|
-
# Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. LinkedIn geo searches also return every matching level in one list, and neither `geoType` nor `countryCode` is applied: LinkedIn's typeahead only returns a name and a URN per result, with no level or country field to filter on. Every result has `type` set to `location`, and its id is a `urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`, `POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`. Pinterest resolves against three whole-catalog endpoints (interests, locations, regions) with no server-side query or pagination, so matching, ranking and the `limit` cutoff all happen in Zernio; the catalog is independent of any ad account and results never carry `audienceSize`. Names come back localized to the connected Pinterest account's language (there is no way to force a locale), so match against whatever language that account returns. `geoType` routes to a different catalog: `country` and `metro_area` read the locations catalog (`type` is `country` or `metro`); `region` reads the regions catalog (`type` is `region`, its id a `regions[].key` on `POST /v1/ads/create`); `all` and the default `city` merge both catalogs with honest per-entry `type`s, since Pinterest has no city-level catalog and `city` is an alias for `all`, not a literal city search. `zip`, `subcity`, `neighborhood`, `place` and `geo_market` return a 400: Pinterest exposes no postal-code catalog, pass postal codes directly as `targeting.zips: [{ key }]` on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
313
|
+
# Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. LinkedIn geo searches also return every matching level in one list, and neither `geoType` nor `countryCode` is applied: LinkedIn's typeahead only returns a name and a URN per result, with no level or country field to filter on. Every result has `type` set to `location`, and its id is a `urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`, `POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`. Google geo searches resolve against Google's geoTargetConstants and return every matching level in one list; `geoType` is not applied (Google's `target_type` is an open taxonomy that does not map one-to-one onto the `geoType` enum), so filter client-side on the returned `type` (`country`, `region`, `city`, `zip`, `metro`, or the lowercased Google target type for rarer levels). `countryCode` scopes the search to one country. Each id is Google's numeric criterion id, usable as a `regions`/`cities`/`zips`/`metros` `key` on `POST /v1/ads/create`. Google city radius is not supported (pass a `customLocations` lat/lng pin for a radius); country targeting also accepts plain ISO codes via `countries` with no search call. Pinterest resolves against three whole-catalog endpoints (interests, locations, regions) with no server-side query or pagination, so matching, ranking and the `limit` cutoff all happen in Zernio; the catalog is independent of any ad account and results never carry `audienceSize`. Names come back localized to the connected Pinterest account's language (there is no way to force a locale), so match against whatever language that account returns. `geoType` routes to a different catalog: `country` and `metro_area` read the locations catalog (`type` is `country` or `metro`); `region` reads the regions catalog (`type` is `region`, its id a `regions[].key` on `POST /v1/ads/create`); `all` and the default `city` merge both catalogs with honest per-entry `type`s, since Pinterest has no city-level catalog and `city` is an alias for `all`, not a literal city search. `zip`, `subcity`, `neighborhood`, `place` and `geo_market` return a 400: Pinterest exposes no postal-code catalog, pass postal codes directly as `targeting.zips: [{ key }]` on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
314
314
|
# @param account_id [String] Social account ID (a connected account on the target ad platform).
|
|
315
315
|
# @param q [String] Search query. For geo, the locality name only (no region/country suffix).
|
|
316
316
|
# @param [Hash] opts the optional parameters
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class DeleteAdSet200Response < ApiModelBase
|
|
18
|
+
attr_accessor :deleted
|
|
19
|
+
|
|
20
|
+
# Local Ad documents marked cancelled
|
|
21
|
+
attr_accessor :ad_count
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'deleted' => :'deleted',
|
|
27
|
+
:'ad_count' => :'adCount'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'deleted' => :'Boolean',
|
|
45
|
+
:'ad_count' => :'Integer'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DeleteAdSet200Response` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DeleteAdSet200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'deleted')
|
|
72
|
+
self.deleted = attributes[:'deleted']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'ad_count')
|
|
76
|
+
self.ad_count = attributes[:'ad_count']
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
81
|
+
# @return Array for valid properties with the reasons
|
|
82
|
+
def list_invalid_properties
|
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
84
|
+
invalid_properties = Array.new
|
|
85
|
+
invalid_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
def valid?
|
|
91
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Checks equality by comparing each attribute.
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def ==(o)
|
|
98
|
+
return true if self.equal?(o)
|
|
99
|
+
self.class == o.class &&
|
|
100
|
+
deleted == o.deleted &&
|
|
101
|
+
ad_count == o.ad_count
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @see the `==` method
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def eql?(o)
|
|
107
|
+
self == o
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Calculates hash code according to all attributes.
|
|
111
|
+
# @return [Integer] Hash code
|
|
112
|
+
def hash
|
|
113
|
+
[deleted, ad_count].hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def self.build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
122
|
+
transformed_hash = {}
|
|
123
|
+
openapi_types.each_pair do |key, type|
|
|
124
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = nil
|
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
127
|
+
# check to ensure the input is an array given that the attribute
|
|
128
|
+
# is documented as an array but the input is not
|
|
129
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
130
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
131
|
+
end
|
|
132
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
new(transformed_hash)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Returns the object in the form of hash
|
|
140
|
+
# @return [Hash] Returns the object in the form of hash
|
|
141
|
+
def to_hash
|
|
142
|
+
hash = {}
|
|
143
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
144
|
+
value = self.send(attr)
|
|
145
|
+
if value.nil?
|
|
146
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
147
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
hash[param] = _to_hash(value)
|
|
151
|
+
end
|
|
152
|
+
hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
end
|
|
@@ -31,7 +31,7 @@ module Zernio
|
|
|
31
31
|
# DMA / metro-area targeting. `key` is the platform's metro ID (e.g. Meta `DMA:807`).
|
|
32
32
|
attr_accessor :metros
|
|
33
33
|
|
|
34
|
-
# Point-radius (lat/lng) targeting (Meta custom_locations / Google proximity). Honoured
|
|
34
|
+
# Point-radius (lat/lng) targeting (Meta custom_locations / Google proximity). Honoured on Meta and Google; ignored on platforms without radius support.
|
|
35
35
|
attr_accessor :custom_locations
|
|
36
36
|
|
|
37
37
|
attr_accessor :excluded_locations
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -383,6 +383,7 @@ require 'zernio-sdk/models/delete_account_group200_response'
|
|
|
383
383
|
require 'zernio-sdk/models/delete_ad_campaign200_response'
|
|
384
384
|
require 'zernio-sdk/models/delete_ad_campaign_request'
|
|
385
385
|
require 'zernio-sdk/models/delete_ad_creative200_response'
|
|
386
|
+
require 'zernio-sdk/models/delete_ad_set200_response'
|
|
386
387
|
require 'zernio-sdk/models/delete_ad_video200_response'
|
|
387
388
|
require 'zernio-sdk/models/delete_discord_scheduled_event200_response'
|
|
388
389
|
require 'zernio-sdk/models/delete_google_business_media200_response'
|
data/openapi.yaml
CHANGED
|
@@ -8163,7 +8163,7 @@ components:
|
|
|
8163
8163
|
name: { type: string }
|
|
8164
8164
|
customLocations:
|
|
8165
8165
|
type: array
|
|
8166
|
-
description: "Point-radius (lat/lng) targeting (Meta custom_locations / Google proximity). Honoured
|
|
8166
|
+
description: "Point-radius (lat/lng) targeting (Meta custom_locations / Google proximity). Honoured on Meta and Google; ignored on platforms without radius support."
|
|
8167
8167
|
items:
|
|
8168
8168
|
type: object
|
|
8169
8169
|
required: [latitude, longitude, radius, distanceUnit]
|
|
@@ -39651,7 +39651,7 @@ paths:
|
|
|
39651
39651
|
x-resource-group: "ads"
|
|
39652
39652
|
operationId: updateAdCampaign
|
|
39653
39653
|
tags: ["Ad Campaigns"]
|
|
39654
|
-
x-platforms: ["meta", "google"]
|
|
39654
|
+
x-platforms: ["meta", "google", "tiktok", "linkedin", "pinterest", "x", "openai"]
|
|
39655
39655
|
summary: Update a campaign
|
|
39656
39656
|
description: |
|
|
39657
39657
|
Campaign-level edits. Send at least one of `budget`, `bidStrategy`, `name`
|
|
@@ -39734,7 +39734,7 @@ paths:
|
|
|
39734
39734
|
x-resource-group: "ads"
|
|
39735
39735
|
operationId: deleteAdCampaign
|
|
39736
39736
|
tags: ["Ad Campaigns"]
|
|
39737
|
-
x-platforms: ["meta", "tiktok", "
|
|
39737
|
+
x-platforms: ["meta", "google", "tiktok", "linkedin", "pinterest", "x", "openai"]
|
|
39738
39738
|
summary: Delete a campaign
|
|
39739
39739
|
description: |
|
|
39740
39740
|
Deletes the whole campaign on the platform, cascading to its ad sets
|
|
@@ -40083,7 +40083,7 @@ paths:
|
|
|
40083
40083
|
x-resource-group: "ads"
|
|
40084
40084
|
operationId: updateAdSet
|
|
40085
40085
|
tags: ["Ad Campaigns"]
|
|
40086
|
-
x-platforms: ["meta", "tiktok", "openai"]
|
|
40086
|
+
x-platforms: ["meta", "google", "tiktok", "linkedin", "pinterest", "x", "openai"]
|
|
40087
40087
|
summary: Update an ad set
|
|
40088
40088
|
description: |
|
|
40089
40089
|
Ad-set-level writes. Use this for ABO budget updates, ad-set-scoped
|
|
@@ -40236,6 +40236,38 @@ paths:
|
|
|
40236
40236
|
'409': { description: "Campaign is CBO — route to /v1/ads/campaigns/{campaignId} instead" }
|
|
40237
40237
|
'422': { description: "bidStrategy is LOWEST_COST_WITH_MIN_ROAS on OpenAI (unsupported: no ROAS-based bidding)" }
|
|
40238
40238
|
'501': { description: "bidStrategy not supported on the platform (Meta, TikTok, and OpenAI only)" }
|
|
40239
|
+
delete:
|
|
40240
|
+
x-resource-group: "ads"
|
|
40241
|
+
operationId: deleteAdSet
|
|
40242
|
+
tags: ["Ad Campaigns"]
|
|
40243
|
+
x-platforms: ["meta", "google", "tiktok", "linkedin", "pinterest", "x"]
|
|
40244
|
+
summary: Delete an ad set
|
|
40245
|
+
description: |
|
|
40246
|
+
Deletes the ad set on the platform, cascading to its ads only (never the
|
|
40247
|
+
campaign). Locally, every Ad document under the ad set is marked
|
|
40248
|
+
`status: cancelled`.
|
|
40249
|
+
|
|
40250
|
+
Delete is soft on platforms that have no hard delete: LinkedIn moves the
|
|
40251
|
+
campaign to `PENDING_DELETION`, Pinterest archives the ad group, and X
|
|
40252
|
+
soft-flags the line item. Google removes the ad group. All remain readable
|
|
40253
|
+
for reporting.
|
|
40254
|
+
security:
|
|
40255
|
+
- bearerAuth: []
|
|
40256
|
+
parameters:
|
|
40257
|
+
- { name: adSetId, in: path, required: true, schema: { type: string }, description: Platform ad set ID }
|
|
40258
|
+
responses:
|
|
40259
|
+
'200':
|
|
40260
|
+
description: Ad set deleted
|
|
40261
|
+
content:
|
|
40262
|
+
application/json:
|
|
40263
|
+
schema:
|
|
40264
|
+
type: object
|
|
40265
|
+
properties:
|
|
40266
|
+
deleted: { type: boolean }
|
|
40267
|
+
adCount: { type: integer, description: Local Ad documents marked cancelled }
|
|
40268
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
40269
|
+
'404': { description: Ad set not found }
|
|
40270
|
+
'501': { description: Operation not supported on this platform }
|
|
40239
40271
|
|
|
40240
40272
|
/v1/ads/ad-sets/{adSetId}/status:
|
|
40241
40273
|
put:
|
|
@@ -44573,6 +44605,17 @@ paths:
|
|
|
44573
44605
|
`urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`,
|
|
44574
44606
|
`POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`.
|
|
44575
44607
|
|
|
44608
|
+
Google geo searches resolve against Google's geoTargetConstants and return
|
|
44609
|
+
every matching level in one list; `geoType` is not applied (Google's
|
|
44610
|
+
`target_type` is an open taxonomy that does not map one-to-one onto the
|
|
44611
|
+
`geoType` enum), so filter client-side on the returned `type` (`country`,
|
|
44612
|
+
`region`, `city`, `zip`, `metro`, or the lowercased Google target type for
|
|
44613
|
+
rarer levels). `countryCode` scopes the search to one country. Each id is
|
|
44614
|
+
Google's numeric criterion id, usable as a `regions`/`cities`/`zips`/`metros`
|
|
44615
|
+
`key` on `POST /v1/ads/create`. Google city radius is not supported (pass a
|
|
44616
|
+
`customLocations` lat/lng pin for a radius); country targeting also accepts
|
|
44617
|
+
plain ISO codes via `countries` with no search call.
|
|
44618
|
+
|
|
44576
44619
|
Pinterest resolves against three whole-catalog endpoints (interests, locations,
|
|
44577
44620
|
regions) with no server-side query or pagination, so matching, ranking and the
|
|
44578
44621
|
`limit` cutoff all happen in Zernio; the catalog is independent of any ad account
|
|
@@ -121,6 +121,18 @@ describe 'AdCampaignsApi' do
|
|
|
121
121
|
end
|
|
122
122
|
end
|
|
123
123
|
|
|
124
|
+
# unit tests for delete_ad_set
|
|
125
|
+
# Delete an ad set
|
|
126
|
+
# Deletes the ad set on the platform, cascading to its ads only (never the campaign). Locally, every Ad document under the ad set is marked `status: cancelled`. Delete is soft on platforms that have no hard delete: LinkedIn moves the campaign to `PENDING_DELETION`, Pinterest archives the ad group, and X soft-flags the line item. Google removes the ad group. All remain readable for reporting.
|
|
127
|
+
# @param ad_set_id Platform ad set ID
|
|
128
|
+
# @param [Hash] opts the optional parameters
|
|
129
|
+
# @return [DeleteAdSet200Response]
|
|
130
|
+
describe 'delete_ad_set test' do
|
|
131
|
+
it 'should work' do
|
|
132
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
124
136
|
# unit tests for duplicate_ad
|
|
125
137
|
# Duplicate an ad
|
|
126
138
|
# Duplicates a single ad via Meta's native `POST /{ad-id}/copies`. The copy is created paused. `adSetId` retargets the copy into another ad set; omitted = the source's own ad set. Accepts the Zernio ad id or the platform ad id. Sync discovery is triggered automatically (`syncAfter: false` to skip).
|
|
@@ -83,7 +83,7 @@ describe 'AdTargetingApi' do
|
|
|
83
83
|
|
|
84
84
|
# unit tests for search_ad_targeting
|
|
85
85
|
# Search targeting options
|
|
86
|
-
# Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. LinkedIn geo searches also return every matching level in one list, and neither `geoType` nor `countryCode` is applied: LinkedIn's typeahead only returns a name and a URN per result, with no level or country field to filter on. Every result has `type` set to `location`, and its id is a `urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`, `POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`. Pinterest resolves against three whole-catalog endpoints (interests, locations, regions) with no server-side query or pagination, so matching, ranking and the `limit` cutoff all happen in Zernio; the catalog is independent of any ad account and results never carry `audienceSize`. Names come back localized to the connected Pinterest account's language (there is no way to force a locale), so match against whatever language that account returns. `geoType` routes to a different catalog: `country` and `metro_area` read the locations catalog (`type` is `country` or `metro`); `region` reads the regions catalog (`type` is `region`, its id a `regions[].key` on `POST /v1/ads/create`); `all` and the default `city` merge both catalogs with honest per-entry `type`s, since Pinterest has no city-level catalog and `city` is an alias for `all`, not a literal city search. `zip`, `subcity`, `neighborhood`, `place` and `geo_market` return a 400: Pinterest exposes no postal-code catalog, pass postal codes directly as `targeting.zips: [{ key }]` on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
86
|
+
# Resolve a human-readable query into the platform's opaque targeting ids used in the `TargetingSpec` (`countries`/`regions`/`cities`/`zips`/`metros` geo keys, and `interests`/`behaviors` entity ids) on `POST /v1/ads/create`, `POST /v1/ads/targeting/reach-estimate`, and `saved_targeting` audiences. The `dimension` param selects what is searched, `geo` (locations, further scoped by `geoType`), `interest`, `behavior`, or `income`. Availability of each dimension varies by platform (e.g. behaviours are Meta/TikTok only). Results are normalized across platforms into a single shape, so the same client code consumes Meta, TikTok, LinkedIn, X, Pinterest, and Google results. TikTok geo searches return every matching level in one list (`type` is `country`, `region`, `city`, `district`, or `metro` for DMA areas) — `geoType` is not applied. Results are scoped to the advertiser's targetable markets, and every id is usable in `regions`/`cities`/`metros` keys on `POST /v1/ads/create`. LinkedIn geo searches also return every matching level in one list, and neither `geoType` nor `countryCode` is applied: LinkedIn's typeahead only returns a name and a URN per result, with no level or country field to filter on. Every result has `type` set to `location`, and its id is a `urn:li:geo:*` URN usable as a `regions[].key` on `POST /v1/ads/create`, `POST /v1/ads/boost` and `POST /v1/ads/targeting/reach-estimate`. Google geo searches resolve against Google's geoTargetConstants and return every matching level in one list; `geoType` is not applied (Google's `target_type` is an open taxonomy that does not map one-to-one onto the `geoType` enum), so filter client-side on the returned `type` (`country`, `region`, `city`, `zip`, `metro`, or the lowercased Google target type for rarer levels). `countryCode` scopes the search to one country. Each id is Google's numeric criterion id, usable as a `regions`/`cities`/`zips`/`metros` `key` on `POST /v1/ads/create`. Google city radius is not supported (pass a `customLocations` lat/lng pin for a radius); country targeting also accepts plain ISO codes via `countries` with no search call. Pinterest resolves against three whole-catalog endpoints (interests, locations, regions) with no server-side query or pagination, so matching, ranking and the `limit` cutoff all happen in Zernio; the catalog is independent of any ad account and results never carry `audienceSize`. Names come back localized to the connected Pinterest account's language (there is no way to force a locale), so match against whatever language that account returns. `geoType` routes to a different catalog: `country` and `metro_area` read the locations catalog (`type` is `country` or `metro`); `region` reads the regions catalog (`type` is `region`, its id a `regions[].key` on `POST /v1/ads/create`); `all` and the default `city` merge both catalogs with honest per-entry `type`s, since Pinterest has no city-level catalog and `city` is an alias for `all`, not a literal city search. `zip`, `subcity`, `neighborhood`, `place` and `geo_market` return a 400: Pinterest exposes no postal-code catalog, pass postal codes directly as `targeting.zips: [{ key }]` on `POST /v1/ads/create`. For geo queries, `q` should contain only the locality name (e.g. `\"Amsterdam\"`, not `\"Amsterdam, NL\"`). Use `countryCode` to disambiguate.
|
|
87
87
|
# @param account_id Social account ID (a connected account on the target ad platform).
|
|
88
88
|
# @param q Search query. For geo, the locality name only (no region/country suffix).
|
|
89
89
|
# @param [Hash] opts the optional parameters
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::DeleteAdSet200Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::DeleteAdSet200Response do
|
|
21
|
+
#let(:instance) { Zernio::DeleteAdSet200Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of DeleteAdSet200Response' do
|
|
24
|
+
it 'should create an instance of DeleteAdSet200Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::DeleteAdSet200Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "deleted"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "ad_count"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: late-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.780
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -454,6 +454,7 @@ files:
|
|
|
454
454
|
- docs/DeleteAdCampaign200Response.md
|
|
455
455
|
- docs/DeleteAdCampaignRequest.md
|
|
456
456
|
- docs/DeleteAdCreative200Response.md
|
|
457
|
+
- docs/DeleteAdSet200Response.md
|
|
457
458
|
- docs/DeleteAdVideo200Response.md
|
|
458
459
|
- docs/DeleteDiscordScheduledEvent200Response.md
|
|
459
460
|
- docs/DeleteGoogleBusinessMedia200Response.md
|
|
@@ -2302,6 +2303,7 @@ files:
|
|
|
2302
2303
|
- lib/zernio-sdk/models/delete_ad_campaign200_response.rb
|
|
2303
2304
|
- lib/zernio-sdk/models/delete_ad_campaign_request.rb
|
|
2304
2305
|
- lib/zernio-sdk/models/delete_ad_creative200_response.rb
|
|
2306
|
+
- lib/zernio-sdk/models/delete_ad_set200_response.rb
|
|
2305
2307
|
- lib/zernio-sdk/models/delete_ad_video200_response.rb
|
|
2306
2308
|
- lib/zernio-sdk/models/delete_discord_scheduled_event200_response.rb
|
|
2307
2309
|
- lib/zernio-sdk/models/delete_google_business_media200_response.rb
|
|
@@ -4099,6 +4101,7 @@ files:
|
|
|
4099
4101
|
- spec/models/delete_ad_campaign200_response_spec.rb
|
|
4100
4102
|
- spec/models/delete_ad_campaign_request_spec.rb
|
|
4101
4103
|
- spec/models/delete_ad_creative200_response_spec.rb
|
|
4104
|
+
- spec/models/delete_ad_set200_response_spec.rb
|
|
4102
4105
|
- spec/models/delete_ad_video200_response_spec.rb
|
|
4103
4106
|
- spec/models/delete_discord_scheduled_event200_response_spec.rb
|
|
4104
4107
|
- spec/models/delete_google_business_media200_response_spec.rb
|
|
@@ -5464,7 +5467,7 @@ files:
|
|
|
5464
5467
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
5465
5468
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
5466
5469
|
- spec/spec_helper.rb
|
|
5467
|
-
- zernio-sdk-0.0.
|
|
5470
|
+
- zernio-sdk-0.0.780.gem
|
|
5468
5471
|
- zernio-sdk.gemspec
|
|
5469
5472
|
homepage: https://openapi-generator.tech
|
|
5470
5473
|
licenses:
|
|
@@ -6541,6 +6544,7 @@ test_files:
|
|
|
6541
6544
|
- spec/models/list_whats_app_flow_responses200_response_spec.rb
|
|
6542
6545
|
- spec/models/send_inbox_message_request_interactive_action_one_of9_spec.rb
|
|
6543
6546
|
- spec/models/delete_google_business_place_action200_response_spec.rb
|
|
6547
|
+
- spec/models/delete_ad_set200_response_spec.rb
|
|
6544
6548
|
- spec/models/create_ctwa_ad201_response_spec.rb
|
|
6545
6549
|
- spec/models/get_lead_form200_response_spec.rb
|
|
6546
6550
|
- spec/models/create_account_group201_response_spec.rb
|
data/zernio-sdk-0.0.778.gem
DELETED
|
Binary file
|