zernio-sdk 0.0.536 → 0.0.537
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 +29 -1
- data/docs/AdAudiencesApi.md +5 -5
- data/docs/AdCampaignsApi.md +142 -0
- data/docs/AdsApi.md +715 -33
- data/docs/CreateAdCampaign201Response.md +24 -0
- data/docs/CreateAdCampaignRequest.md +32 -0
- data/docs/CreateAdCreative201Response.md +20 -0
- data/docs/CreateAdCreativeRequest.md +38 -0
- data/docs/CreateAdCreativeRequestCarouselCardsInner.md +26 -0
- data/docs/DeleteAdCreative200Response.md +20 -0
- data/docs/DuplicateAd200Response.md +22 -0
- data/docs/DuplicateAdRequest.md +28 -0
- data/docs/DuplicateAdSet200Response.md +22 -0
- data/docs/DuplicateAdSetRequest.md +36 -0
- data/docs/GetAdCreative200Response.md +18 -0
- data/docs/ListAdCreatives200Response.md +22 -0
- data/docs/ListAdImages200Response.md +22 -0
- data/docs/ListAdLabels200Response.md +22 -0
- data/docs/ListHighDemandPeriods200Response.md +22 -0
- data/docs/UpdateAdCreative200Response.md +22 -0
- data/docs/UpdateAdCreativeRequest.md +20 -0
- data/lib/zernio-sdk/api/ad_audiences_api.rb +4 -4
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +142 -0
- data/lib/zernio-sdk/api/ads_api.rb +748 -48
- data/lib/zernio-sdk/models/create_ad_campaign201_response.rb +210 -0
- data/lib/zernio-sdk/models/create_ad_campaign_request.rb +343 -0
- data/lib/zernio-sdk/models/create_ad_creative201_response.rb +157 -0
- data/lib/zernio-sdk/models/create_ad_creative_request.rb +390 -0
- data/lib/zernio-sdk/models/create_ad_creative_request_carousel_cards_inner.rb +255 -0
- data/lib/zernio-sdk/models/delete_ad_creative200_response.rb +156 -0
- data/lib/zernio-sdk/models/duplicate_ad200_response.rb +200 -0
- data/lib/zernio-sdk/models/duplicate_ad_request.rb +243 -0
- data/lib/zernio-sdk/models/duplicate_ad_set200_response.rb +201 -0
- data/lib/zernio-sdk/models/duplicate_ad_set_request.rb +302 -0
- data/lib/zernio-sdk/models/get_ad_creative200_response.rb +148 -0
- data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_ad_images200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_ad_labels200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +168 -0
- data/lib/zernio-sdk/models/update_ad_creative200_response.rb +165 -0
- data/lib/zernio-sdk/models/update_ad_creative_request.rb +200 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +17 -0
- data/openapi.yaml +445 -7
- data/spec/api/ad_audiences_api_spec.rb +2 -2
- data/spec/api/ad_campaigns_api_spec.rb +25 -0
- data/spec/api/ads_api_spec.rb +128 -0
- data/spec/models/create_ad_campaign201_response_spec.rb +58 -0
- data/spec/models/create_ad_campaign_request_spec.rb +94 -0
- data/spec/models/create_ad_creative201_response_spec.rb +42 -0
- data/spec/models/create_ad_creative_request_carousel_cards_inner_spec.rb +60 -0
- data/spec/models/create_ad_creative_request_spec.rb +96 -0
- data/spec/models/delete_ad_creative200_response_spec.rb +42 -0
- data/spec/models/duplicate_ad200_response_spec.rb +52 -0
- data/spec/models/duplicate_ad_request_spec.rb +74 -0
- data/spec/models/duplicate_ad_set200_response_spec.rb +52 -0
- data/spec/models/duplicate_ad_set_request_spec.rb +102 -0
- data/spec/models/get_ad_creative200_response_spec.rb +36 -0
- data/spec/models/list_ad_creatives200_response_spec.rb +48 -0
- data/spec/models/list_ad_images200_response_spec.rb +48 -0
- data/spec/models/list_ad_labels200_response_spec.rb +48 -0
- data/spec/models/list_high_demand_periods200_response_spec.rb +48 -0
- data/spec/models/update_ad_creative200_response_spec.rb +48 -0
- data/spec/models/update_ad_creative_request_spec.rb +42 -0
- metadata +70 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::CreateAdCampaign201Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | | [optional] |
|
|
8
|
+
| **campaign_id** | **String** | Platform id of the new campaign | [optional] |
|
|
9
|
+
| **objective** | **String** | Resolved ODAX objective (e.g. OUTCOME_SALES). | [optional] |
|
|
10
|
+
| **status** | **String** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::CreateAdCampaign201Response.new(
|
|
18
|
+
ad_account_id: null,
|
|
19
|
+
campaign_id: null,
|
|
20
|
+
objective: null,
|
|
21
|
+
status: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Zernio::CreateAdCampaignRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
|
|
8
|
+
| **ad_account_id** | **String** | Meta ad account id (act_<n>). | |
|
|
9
|
+
| **name** | **String** | | |
|
|
10
|
+
| **goal** | **String** | Mapped to the ODAX objective (same mapping as POST /v1/ads/create). | |
|
|
11
|
+
| **special_ad_categories** | **Array<String>** | | [optional] |
|
|
12
|
+
| **budget_amount** | **Float** | Campaign-level (CBO) budget in whole currency units. Requires budgetType. | [optional] |
|
|
13
|
+
| **budget_type** | **String** | | [optional] |
|
|
14
|
+
| **status** | **String** | | [optional][default to 'PAUSED'] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'zernio-sdk'
|
|
20
|
+
|
|
21
|
+
instance = Zernio::CreateAdCampaignRequest.new(
|
|
22
|
+
account_id: null,
|
|
23
|
+
ad_account_id: null,
|
|
24
|
+
name: null,
|
|
25
|
+
goal: null,
|
|
26
|
+
special_ad_categories: null,
|
|
27
|
+
budget_amount: null,
|
|
28
|
+
budget_type: null,
|
|
29
|
+
status: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::CreateAdCreative201Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | | [optional] |
|
|
8
|
+
| **creative_id** | **String** | Platform creative id, reusable via existingCreativeId. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::CreateAdCreative201Response.new(
|
|
16
|
+
ad_account_id: null,
|
|
17
|
+
creative_id: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Zernio::CreateAdCreativeRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token and Page. | |
|
|
8
|
+
| **ad_account_id** | **String** | Meta ad account id (act_<n>). | |
|
|
9
|
+
| **headline** | **String** | | |
|
|
10
|
+
| **body** | **String** | Primary text | |
|
|
11
|
+
| **description** | **String** | Link description below the headline; omitted = Meta scrapes the destination's OG description. | [optional] |
|
|
12
|
+
| **call_to_action** | **String** | CTA type (same whitelist as POST /v1/ads/create). | [optional][default to 'LEARN_MORE'] |
|
|
13
|
+
| **link_url** | **String** | | |
|
|
14
|
+
| **image_url** | **String** | Publicly reachable image; uploaded to the account's library server-side. | [optional] |
|
|
15
|
+
| **image_hash** | **String** | Existing library image hash (POST /v1/ads/images or GET /v1/ads/images). | [optional] |
|
|
16
|
+
| **carousel_cards** | [**Array<CreateAdCreativeRequestCarouselCardsInner>**](CreateAdCreativeRequestCarouselCardsInner.md) | | [optional] |
|
|
17
|
+
| **url_tags** | **String** | Appended to every outbound URL (e.g. utm_source=fb). | [optional] |
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'zernio-sdk'
|
|
23
|
+
|
|
24
|
+
instance = Zernio::CreateAdCreativeRequest.new(
|
|
25
|
+
account_id: null,
|
|
26
|
+
ad_account_id: null,
|
|
27
|
+
headline: null,
|
|
28
|
+
body: null,
|
|
29
|
+
description: null,
|
|
30
|
+
call_to_action: null,
|
|
31
|
+
link_url: null,
|
|
32
|
+
image_url: null,
|
|
33
|
+
image_hash: null,
|
|
34
|
+
carousel_cards: null,
|
|
35
|
+
url_tags: null
|
|
36
|
+
)
|
|
37
|
+
```
|
|
38
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Zernio::CreateAdCreativeRequestCarouselCardsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **image_url** | **String** | | |
|
|
8
|
+
| **link_url** | **String** | | |
|
|
9
|
+
| **headline** | **String** | | [optional] |
|
|
10
|
+
| **description** | **String** | | [optional] |
|
|
11
|
+
| **call_to_action** | **String** | | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'zernio-sdk'
|
|
17
|
+
|
|
18
|
+
instance = Zernio::CreateAdCreativeRequestCarouselCardsInner.new(
|
|
19
|
+
image_url: null,
|
|
20
|
+
link_url: null,
|
|
21
|
+
headline: null,
|
|
22
|
+
description: null,
|
|
23
|
+
call_to_action: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::DeleteAdCreative200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **creative_id** | **String** | | [optional] |
|
|
8
|
+
| **message** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::DeleteAdCreative200Response.new(
|
|
16
|
+
creative_id: null,
|
|
17
|
+
message: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::DuplicateAd200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **copied_ad_id** | **String** | Platform ID of the new ad | [optional] |
|
|
8
|
+
| **discovery** | **String** | | [optional] |
|
|
9
|
+
| **raw** | **Object** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::DuplicateAd200Response.new(
|
|
17
|
+
copied_ad_id: null,
|
|
18
|
+
discovery: null,
|
|
19
|
+
raw: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Zernio::DuplicateAdRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_set_id** | **String** | Destination platform ad set id (defaults to the source's ad set) | [optional] |
|
|
8
|
+
| **status_option** | **String** | | [optional][default to 'PAUSED'] |
|
|
9
|
+
| **rename_strategy** | **String** | | [optional] |
|
|
10
|
+
| **rename_prefix** | **String** | | [optional] |
|
|
11
|
+
| **rename_suffix** | **String** | | [optional] |
|
|
12
|
+
| **sync_after** | **Boolean** | | [optional][default to true] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'zernio-sdk'
|
|
18
|
+
|
|
19
|
+
instance = Zernio::DuplicateAdRequest.new(
|
|
20
|
+
ad_set_id: null,
|
|
21
|
+
status_option: null,
|
|
22
|
+
rename_strategy: null,
|
|
23
|
+
rename_prefix: null,
|
|
24
|
+
rename_suffix: null,
|
|
25
|
+
sync_after: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::DuplicateAdSet200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **copied_ad_set_id** | **String** | Platform ID of the new ad set | [optional] |
|
|
8
|
+
| **discovery** | **String** | | [optional] |
|
|
9
|
+
| **raw** | **Object** | Meta's native copy response (includes ad_object_ids for child copies) | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::DuplicateAdSet200Response.new(
|
|
17
|
+
copied_ad_set_id: null,
|
|
18
|
+
discovery: null,
|
|
19
|
+
raw: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Zernio::DuplicateAdSetRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **platform** | **String** | | |
|
|
8
|
+
| **campaign_id** | **String** | Destination platform campaign id (defaults to the source's campaign) | [optional] |
|
|
9
|
+
| **deep_copy** | **Boolean** | Copy child ads + creatives | [optional][default to true] |
|
|
10
|
+
| **status_option** | **String** | | [optional][default to 'PAUSED'] |
|
|
11
|
+
| **start_time** | **Time** | Reschedule the copy's start time | [optional] |
|
|
12
|
+
| **end_time** | **Time** | | [optional] |
|
|
13
|
+
| **rename_strategy** | **String** | | [optional] |
|
|
14
|
+
| **rename_prefix** | **String** | | [optional] |
|
|
15
|
+
| **rename_suffix** | **String** | | [optional] |
|
|
16
|
+
| **sync_after** | **Boolean** | | [optional][default to true] |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'zernio-sdk'
|
|
22
|
+
|
|
23
|
+
instance = Zernio::DuplicateAdSetRequest.new(
|
|
24
|
+
platform: null,
|
|
25
|
+
campaign_id: null,
|
|
26
|
+
deep_copy: null,
|
|
27
|
+
status_option: null,
|
|
28
|
+
start_time: null,
|
|
29
|
+
end_time: null,
|
|
30
|
+
rename_strategy: null,
|
|
31
|
+
rename_prefix: null,
|
|
32
|
+
rename_suffix: null,
|
|
33
|
+
sync_after: null
|
|
34
|
+
)
|
|
35
|
+
```
|
|
36
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::GetAdCreative200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **creative** | **Object** | Raw Meta creative node | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::GetAdCreative200Response.new(
|
|
15
|
+
creative: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::ListAdCreatives200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | | [optional] |
|
|
8
|
+
| **data** | **Array<Object>** | | [optional] |
|
|
9
|
+
| **paging** | [**QueryAdInsights200ResponsePaging**](QueryAdInsights200ResponsePaging.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::ListAdCreatives200Response.new(
|
|
17
|
+
ad_account_id: null,
|
|
18
|
+
data: null,
|
|
19
|
+
paging: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::ListAdImages200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | | [optional] |
|
|
8
|
+
| **data** | **Array<Object>** | | [optional] |
|
|
9
|
+
| **paging** | [**QueryAdInsights200ResponsePaging**](QueryAdInsights200ResponsePaging.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::ListAdImages200Response.new(
|
|
17
|
+
ad_account_id: null,
|
|
18
|
+
data: null,
|
|
19
|
+
paging: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::ListAdLabels200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | | [optional] |
|
|
8
|
+
| **data** | **Array<Object>** | | [optional] |
|
|
9
|
+
| **paging** | [**QueryAdInsights200ResponsePaging**](QueryAdInsights200ResponsePaging.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::ListAdLabels200Response.new(
|
|
17
|
+
ad_account_id: null,
|
|
18
|
+
data: null,
|
|
19
|
+
paging: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::ListHighDemandPeriods200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **object_id** | **String** | The campaign / ad set id the schedules belong to. | [optional] |
|
|
8
|
+
| **data** | **Array<Object>** | | [optional] |
|
|
9
|
+
| **paging** | [**QueryAdInsights200ResponsePaging**](QueryAdInsights200ResponsePaging.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::ListHighDemandPeriods200Response.new(
|
|
17
|
+
object_id: null,
|
|
18
|
+
data: null,
|
|
19
|
+
paging: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::UpdateAdCreative200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **creative_id** | **String** | | [optional] |
|
|
8
|
+
| **name** | **String** | | [optional] |
|
|
9
|
+
| **message** | **String** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::UpdateAdCreative200Response.new(
|
|
17
|
+
creative_id: null,
|
|
18
|
+
name: null,
|
|
19
|
+
message: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::UpdateAdCreativeRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
|
|
8
|
+
| **name** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::UpdateAdCreativeRequest.new(
|
|
16
|
+
account_id: null,
|
|
17
|
+
name: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -372,8 +372,8 @@ module Zernio
|
|
|
372
372
|
return data, status_code, headers
|
|
373
373
|
end
|
|
374
374
|
|
|
375
|
-
# Update
|
|
376
|
-
# Update
|
|
375
|
+
# Update an audience
|
|
376
|
+
# Update an audience. `saved_targeting` audiences accept `name`, `description`, and `spec` (full replacement, no merge, Zernio-only, no platform call). Platform audiences (uploaded/website/lookalike) accept `name` and `description` only, updated on the platform first and then mirrored locally; their rules are immutable, so `spec` returns 400 for them. Platform audience updates are Meta-only for now (other platforms return 501). Ads already created from a saved_targeting audience are unaffected, they snapshot the targeting at creation.
|
|
377
377
|
# @param audience_id [String]
|
|
378
378
|
# @param update_ad_audience_request [UpdateAdAudienceRequest]
|
|
379
379
|
# @param [Hash] opts the optional parameters
|
|
@@ -383,8 +383,8 @@ module Zernio
|
|
|
383
383
|
data
|
|
384
384
|
end
|
|
385
385
|
|
|
386
|
-
# Update
|
|
387
|
-
# Update
|
|
386
|
+
# Update an audience
|
|
387
|
+
# Update an audience. `saved_targeting` audiences accept `name`, `description`, and `spec` (full replacement, no merge, Zernio-only, no platform call). Platform audiences (uploaded/website/lookalike) accept `name` and `description` only, updated on the platform first and then mirrored locally; their rules are immutable, so `spec` returns 400 for them. Platform audience updates are Meta-only for now (other platforms return 501). Ads already created from a saved_targeting audience are unaffected, they snapshot the targeting at creation.
|
|
388
388
|
# @param audience_id [String]
|
|
389
389
|
# @param update_ad_audience_request [UpdateAdAudienceRequest]
|
|
390
390
|
# @param [Hash] opts the optional parameters
|
|
@@ -87,6 +87,74 @@ module Zernio
|
|
|
87
87
|
return data, status_code, headers
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
+
# Create a standalone campaign (Meta)
|
|
91
|
+
# Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it later via `existingCampaignId` on the create endpoints. A budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created `PAUSED` unless `status: ACTIVE`. The campaign materializes in `/v1/ads/tree` via the next sync discovery pass. Meta only.
|
|
92
|
+
# @param create_ad_campaign_request [CreateAdCampaignRequest]
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [CreateAdCampaign201Response]
|
|
95
|
+
def create_ad_campaign(create_ad_campaign_request, opts = {})
|
|
96
|
+
data, _status_code, _headers = create_ad_campaign_with_http_info(create_ad_campaign_request, opts)
|
|
97
|
+
data
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Create a standalone campaign (Meta)
|
|
101
|
+
# Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it later via `existingCampaignId` on the create endpoints. A budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created `PAUSED` unless `status: ACTIVE`. The campaign materializes in `/v1/ads/tree` via the next sync discovery pass. Meta only.
|
|
102
|
+
# @param create_ad_campaign_request [CreateAdCampaignRequest]
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(CreateAdCampaign201Response, Integer, Hash)>] CreateAdCampaign201Response data, response status code and response headers
|
|
105
|
+
def create_ad_campaign_with_http_info(create_ad_campaign_request, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: AdCampaignsApi.create_ad_campaign ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'create_ad_campaign_request' is set
|
|
110
|
+
if @api_client.config.client_side_validation && create_ad_campaign_request.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'create_ad_campaign_request' when calling AdCampaignsApi.create_ad_campaign"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/v1/ads/campaigns'
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
# HTTP header 'Accept' (if needed)
|
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
123
|
+
# HTTP header 'Content-Type'
|
|
124
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
125
|
+
if !content_type.nil?
|
|
126
|
+
header_params['Content-Type'] = content_type
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# form parameters
|
|
130
|
+
form_params = opts[:form_params] || {}
|
|
131
|
+
|
|
132
|
+
# http body (model)
|
|
133
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ad_campaign_request)
|
|
134
|
+
|
|
135
|
+
# return_type
|
|
136
|
+
return_type = opts[:debug_return_type] || 'CreateAdCampaign201Response'
|
|
137
|
+
|
|
138
|
+
# auth_names
|
|
139
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
140
|
+
|
|
141
|
+
new_options = opts.merge(
|
|
142
|
+
:operation => :"AdCampaignsApi.create_ad_campaign",
|
|
143
|
+
:header_params => header_params,
|
|
144
|
+
:query_params => query_params,
|
|
145
|
+
:form_params => form_params,
|
|
146
|
+
:body => post_body,
|
|
147
|
+
:auth_names => auth_names,
|
|
148
|
+
:return_type => return_type
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: AdCampaignsApi#create_ad_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
90
158
|
# Delete a campaign
|
|
91
159
|
# Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime.
|
|
92
160
|
# @param campaign_id [String] Platform campaign ID
|
|
@@ -235,6 +303,80 @@ module Zernio
|
|
|
235
303
|
return data, status_code, headers
|
|
236
304
|
end
|
|
237
305
|
|
|
306
|
+
# Duplicate an ad set (Meta)
|
|
307
|
+
# Duplicates an ad set, including its ads and creatives by default (`deepCopy: true`), via Meta's native `POST /{adset-id}/copies`. The copy is created paused so callers can review before launching. `campaignId` retargets the copy into another campaign; omitted = the source's own campaign. The new hierarchy materializes asynchronously — sync discovery is triggered automatically (`syncAfter: false` to skip). Meta only.
|
|
308
|
+
# @param ad_set_id [String] Source platform ad set ID
|
|
309
|
+
# @param duplicate_ad_set_request [DuplicateAdSetRequest]
|
|
310
|
+
# @param [Hash] opts the optional parameters
|
|
311
|
+
# @return [DuplicateAdSet200Response]
|
|
312
|
+
def duplicate_ad_set(ad_set_id, duplicate_ad_set_request, opts = {})
|
|
313
|
+
data, _status_code, _headers = duplicate_ad_set_with_http_info(ad_set_id, duplicate_ad_set_request, opts)
|
|
314
|
+
data
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# Duplicate an ad set (Meta)
|
|
318
|
+
# Duplicates an ad set, including its ads and creatives by default (`deepCopy: true`), via Meta's native `POST /{adset-id}/copies`. The copy is created paused so callers can review before launching. `campaignId` retargets the copy into another campaign; omitted = the source's own campaign. The new hierarchy materializes asynchronously — sync discovery is triggered automatically (`syncAfter: false` to skip). Meta only.
|
|
319
|
+
# @param ad_set_id [String] Source platform ad set ID
|
|
320
|
+
# @param duplicate_ad_set_request [DuplicateAdSetRequest]
|
|
321
|
+
# @param [Hash] opts the optional parameters
|
|
322
|
+
# @return [Array<(DuplicateAdSet200Response, Integer, Hash)>] DuplicateAdSet200Response data, response status code and response headers
|
|
323
|
+
def duplicate_ad_set_with_http_info(ad_set_id, duplicate_ad_set_request, opts = {})
|
|
324
|
+
if @api_client.config.debugging
|
|
325
|
+
@api_client.config.logger.debug 'Calling API: AdCampaignsApi.duplicate_ad_set ...'
|
|
326
|
+
end
|
|
327
|
+
# verify the required parameter 'ad_set_id' is set
|
|
328
|
+
if @api_client.config.client_side_validation && ad_set_id.nil?
|
|
329
|
+
fail ArgumentError, "Missing the required parameter 'ad_set_id' when calling AdCampaignsApi.duplicate_ad_set"
|
|
330
|
+
end
|
|
331
|
+
# verify the required parameter 'duplicate_ad_set_request' is set
|
|
332
|
+
if @api_client.config.client_side_validation && duplicate_ad_set_request.nil?
|
|
333
|
+
fail ArgumentError, "Missing the required parameter 'duplicate_ad_set_request' when calling AdCampaignsApi.duplicate_ad_set"
|
|
334
|
+
end
|
|
335
|
+
# resource path
|
|
336
|
+
local_var_path = '/v1/ads/ad-sets/{adSetId}/duplicate'.sub('{' + 'adSetId' + '}', CGI.escape(ad_set_id.to_s))
|
|
337
|
+
|
|
338
|
+
# query parameters
|
|
339
|
+
query_params = opts[:query_params] || {}
|
|
340
|
+
|
|
341
|
+
# header parameters
|
|
342
|
+
header_params = opts[:header_params] || {}
|
|
343
|
+
# HTTP header 'Accept' (if needed)
|
|
344
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
345
|
+
# HTTP header 'Content-Type'
|
|
346
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
347
|
+
if !content_type.nil?
|
|
348
|
+
header_params['Content-Type'] = content_type
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# form parameters
|
|
352
|
+
form_params = opts[:form_params] || {}
|
|
353
|
+
|
|
354
|
+
# http body (model)
|
|
355
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(duplicate_ad_set_request)
|
|
356
|
+
|
|
357
|
+
# return_type
|
|
358
|
+
return_type = opts[:debug_return_type] || 'DuplicateAdSet200Response'
|
|
359
|
+
|
|
360
|
+
# auth_names
|
|
361
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
362
|
+
|
|
363
|
+
new_options = opts.merge(
|
|
364
|
+
:operation => :"AdCampaignsApi.duplicate_ad_set",
|
|
365
|
+
:header_params => header_params,
|
|
366
|
+
:query_params => query_params,
|
|
367
|
+
:form_params => form_params,
|
|
368
|
+
:body => post_body,
|
|
369
|
+
:auth_names => auth_names,
|
|
370
|
+
:return_type => return_type
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
374
|
+
if @api_client.config.debugging
|
|
375
|
+
@api_client.config.logger.debug "API called: AdCampaignsApi#duplicate_ad_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
376
|
+
end
|
|
377
|
+
return data, status_code, headers
|
|
378
|
+
end
|
|
379
|
+
|
|
238
380
|
# Live ad-set details incl. learning phase (Meta)
|
|
239
381
|
# Reads the ad set live from Meta, returned verbatim. The default projection includes `learning_stage_info` (learning-phase status: LEARNING / SUCCESS / FAIL / WAIVING — Meta omits its `status` key on paused ad sets), delivery settings, budgets, schedule and targeting. `fields` is a raw-passthrough override; unknown fields return Meta's 400 verbatim. Meta only.
|
|
240
382
|
# @param ad_set_id [String] Meta ad set id (platformAdSetId).
|