late-sdk 0.0.690 → 0.0.691
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/docs/AdCampaignsApi.md +2 -2
- data/docs/UpdateAdCampaign200Response.md +5 -1
- data/docs/UpdateAdCampaignRequest.md +10 -6
- data/docs/UpdateAdCampaignRequestPlatformSpecificData.md +1 -1
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +4 -4
- data/lib/zernio-sdk/models/update_ad_campaign200_response.rb +21 -1
- data/lib/zernio-sdk/models/update_ad_campaign_request.rb +42 -21
- data/lib/zernio-sdk/models/update_ad_campaign_request_budget.rb +1 -0
- data/lib/zernio-sdk/models/update_ad_campaign_request_platform_specific_data.rb +2 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +38 -33
- data/spec/api/ad_campaigns_api_spec.rb +2 -2
- data/spec/models/update_ad_campaign200_response_spec.rb +12 -0
- data/spec/models/update_ad_campaign_request_spec.rb +19 -7
- data/zernio-sdk-0.0.691.gem +0 -0
- metadata +2 -2
- data/zernio-sdk-0.0.690.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: b37cfa09d6b3550aac2a1d67795444e2901936164366b5856b511485ecdabd35
|
|
4
|
+
data.tar.gz: 351eca4be8ad2d79b8696c32562a87644c83b4f543450cf75ed79a4dbf68cff0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12771245792d498a567d88509c0eff842a130c6d763f73ca5488681838e1c4a5dfbe98e7d2500e453200d309f3af354c4426de0e36f4135e3a9bb1e61aa7320b
|
|
7
|
+
data.tar.gz: 6a9e1acbf662ca46711939e3683c2e3c0e094152eb8981bb6cbbcf884ec9f89fadf82fb727b3b670b0f3f6ad09534aefa0ecfe29c545d3efcad728bb4f22f7e1
|
data/docs/AdCampaignsApi.md
CHANGED
|
@@ -387,7 +387,7 @@ end
|
|
|
387
387
|
|
|
388
388
|
Delete a campaign
|
|
389
389
|
|
|
390
|
-
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`.
|
|
390
|
+
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`. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would 404. That state is produced by the two-step create flow (campaign, then ads via `existingCampaignId`) whenever Meta rejects the ad step. To delete such a shell, send `accountId` in the body: we skip the local lookup entirely and forward the delete to Meta. `accountId` is ignored when the campaign does have ads.
|
|
391
391
|
|
|
392
392
|
### Examples
|
|
393
393
|
|
|
@@ -1359,7 +1359,7 @@ end
|
|
|
1359
1359
|
|
|
1360
1360
|
Update a campaign
|
|
1361
1361
|
|
|
1362
|
-
Campaign-level edits.
|
|
1362
|
+
Campaign-level edits. Send at least one of `budget`, `bidStrategy`, `name` or `platformSpecificData`. An unsupported field is always an error, never a silent drop. | Body field | Meta | Google | Others | |---|---|---|---| | `bidStrategy` | Yes | Yes | 501 | | `bidAmount`, `roasAverageFloor` | 400 — ad-set level | Yes | 400 | | `budget` (CBO; ABO returns 409) | Yes | 501 | 501 | | `name` | Yes | 501 | 501 | | `platformSpecificData.spendCap` | Yes | 400 | 400 | | `accountId` (empty campaigns) | Yes | - | - | Google maps the shared enum onto its own strategies: `LOWEST_COST_WITHOUT_CAP` to Maximize Clicks, `LOWEST_COST_WITH_BID_CAP` to Maximize Clicks with a max CPC (`bidAmount`), `COST_CAP` to Target CPA (`bidAmount`), `LOWEST_COST_WITH_MIN_ROAS` to Target ROAS (`roasAverageFloor`). A campaign on a PORTFOLIO bidding strategy is rejected: detach it in Google Ads first, since it is shared across campaigns. `accountId` forwards the update straight to Meta for a campaign with zero ads, which would otherwise 404; the response then carries `updated: 0`.
|
|
1363
1363
|
|
|
1364
1364
|
### Examples
|
|
1365
1365
|
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **updated** | **Integer** |
|
|
7
|
+
| **updated** | **Integer** | Local Ad documents mirrored. 0 on the empty-campaign path. | [optional] |
|
|
8
8
|
| **budget** | [**AdBudget**](AdBudget.md) | | [optional] |
|
|
9
9
|
| **budget_level** | **String** | | [optional] |
|
|
10
10
|
| **bid_strategy** | [**BidStrategy**](BidStrategy.md) | | [optional] |
|
|
11
|
+
| **bid_amount** | **Float** | | [optional] |
|
|
12
|
+
| **roas_average_floor** | **Float** | | [optional] |
|
|
11
13
|
| **platform_specific_data** | **Object** | | [optional] |
|
|
12
14
|
|
|
13
15
|
## Example
|
|
@@ -20,6 +22,8 @@ instance = Zernio::UpdateAdCampaign200Response.new(
|
|
|
20
22
|
budget: null,
|
|
21
23
|
budget_level: null,
|
|
22
24
|
bid_strategy: null,
|
|
25
|
+
bid_amount: null,
|
|
26
|
+
roas_average_floor: null,
|
|
23
27
|
platform_specific_data: null
|
|
24
28
|
)
|
|
25
29
|
```
|
|
@@ -4,11 +4,13 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **
|
|
8
|
-
| **
|
|
7
|
+
| **platform** | **String** | Required: platform campaign IDs are not globally unique. | |
|
|
8
|
+
| **account_id** | **String** | **Meta only.** Zernio SocialAccount id owning the ad account. Needed only for an EMPTY campaign (zero ads); ignored otherwise. | [optional] |
|
|
9
|
+
| **bid_strategy** | [**BidStrategy**](BidStrategy.md) | **Meta + Google.** On Meta, the campaign default that ad sets inherit unless they override it. On Google, the campaign's own bidding strategy. | [optional] |
|
|
10
|
+
| **bid_amount** | **Float** | **Google only.** Whole currency units (USD: 12 = $12.00). Max CPC for LOWEST_COST_WITH_BID_CAP, CPA target for COST_CAP; required for both. | [optional] |
|
|
11
|
+
| **roas_average_floor** | **Float** | **Google only.** Decimal ROAS multiplier (2.0 = 2.0x), required for LOWEST_COST_WITH_MIN_ROAS. | [optional] |
|
|
9
12
|
| **budget** | [**UpdateAdCampaignRequestBudget**](UpdateAdCampaignRequestBudget.md) | | [optional] |
|
|
10
|
-
| **
|
|
11
|
-
| **name** | **String** | Rename the campaign (Meta only; other platforms return 501). At least one of budget/bidStrategy/name/platformSpecificData is required. | [optional] |
|
|
13
|
+
| **name** | **String** | **Meta only.** Rename the campaign. | [optional] |
|
|
12
14
|
| **platform_specific_data** | [**UpdateAdCampaignRequestPlatformSpecificData**](UpdateAdCampaignRequestPlatformSpecificData.md) | | [optional] |
|
|
13
15
|
|
|
14
16
|
## Example
|
|
@@ -17,10 +19,12 @@
|
|
|
17
19
|
require 'zernio-sdk'
|
|
18
20
|
|
|
19
21
|
instance = Zernio::UpdateAdCampaignRequest.new(
|
|
20
|
-
account_id: null,
|
|
21
22
|
platform: null,
|
|
22
|
-
|
|
23
|
+
account_id: null,
|
|
23
24
|
bid_strategy: null,
|
|
25
|
+
bid_amount: null,
|
|
26
|
+
roas_average_floor: null,
|
|
27
|
+
budget: null,
|
|
24
28
|
name: null,
|
|
25
29
|
platform_specific_data: null
|
|
26
30
|
)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **spend_cap** | **Float** | Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap
|
|
7
|
+
| **spend_cap** | **Float** | Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap; 0 is rejected by Meta. | [optional] |
|
|
8
8
|
|
|
9
9
|
## Example
|
|
10
10
|
|
|
@@ -369,7 +369,7 @@ module Zernio
|
|
|
369
369
|
end
|
|
370
370
|
|
|
371
371
|
# Delete a campaign
|
|
372
|
-
# 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`.
|
|
372
|
+
# 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`. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would 404. That state is produced by the two-step create flow (campaign, then ads via `existingCampaignId`) whenever Meta rejects the ad step. To delete such a shell, send `accountId` in the body: we skip the local lookup entirely and forward the delete to Meta. `accountId` is ignored when the campaign does have ads.
|
|
373
373
|
# @param campaign_id [String] Platform campaign ID
|
|
374
374
|
# @param delete_ad_campaign_request [DeleteAdCampaignRequest]
|
|
375
375
|
# @param [Hash] opts the optional parameters
|
|
@@ -380,7 +380,7 @@ module Zernio
|
|
|
380
380
|
end
|
|
381
381
|
|
|
382
382
|
# Delete a campaign
|
|
383
|
-
# 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`.
|
|
383
|
+
# 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`. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would 404. That state is produced by the two-step create flow (campaign, then ads via `existingCampaignId`) whenever Meta rejects the ad step. To delete such a shell, send `accountId` in the body: we skip the local lookup entirely and forward the delete to Meta. `accountId` is ignored when the campaign does have ads.
|
|
384
384
|
# @param campaign_id [String] Platform campaign ID
|
|
385
385
|
# @param delete_ad_campaign_request [DeleteAdCampaignRequest]
|
|
386
386
|
# @param [Hash] opts the optional parameters
|
|
@@ -1455,7 +1455,7 @@ module Zernio
|
|
|
1455
1455
|
end
|
|
1456
1456
|
|
|
1457
1457
|
# Update a campaign
|
|
1458
|
-
# Campaign-level edits.
|
|
1458
|
+
# Campaign-level edits. Send at least one of `budget`, `bidStrategy`, `name` or `platformSpecificData`. An unsupported field is always an error, never a silent drop. | Body field | Meta | Google | Others | |---|---|---|---| | `bidStrategy` | Yes | Yes | 501 | | `bidAmount`, `roasAverageFloor` | 400 — ad-set level | Yes | 400 | | `budget` (CBO; ABO returns 409) | Yes | 501 | 501 | | `name` | Yes | 501 | 501 | | `platformSpecificData.spendCap` | Yes | 400 | 400 | | `accountId` (empty campaigns) | Yes | - | - | Google maps the shared enum onto its own strategies: `LOWEST_COST_WITHOUT_CAP` to Maximize Clicks, `LOWEST_COST_WITH_BID_CAP` to Maximize Clicks with a max CPC (`bidAmount`), `COST_CAP` to Target CPA (`bidAmount`), `LOWEST_COST_WITH_MIN_ROAS` to Target ROAS (`roasAverageFloor`). A campaign on a PORTFOLIO bidding strategy is rejected: detach it in Google Ads first, since it is shared across campaigns. `accountId` forwards the update straight to Meta for a campaign with zero ads, which would otherwise 404; the response then carries `updated: 0`.
|
|
1459
1459
|
# @param campaign_id [String] Platform campaign ID
|
|
1460
1460
|
# @param update_ad_campaign_request [UpdateAdCampaignRequest]
|
|
1461
1461
|
# @param [Hash] opts the optional parameters
|
|
@@ -1466,7 +1466,7 @@ module Zernio
|
|
|
1466
1466
|
end
|
|
1467
1467
|
|
|
1468
1468
|
# Update a campaign
|
|
1469
|
-
# Campaign-level edits.
|
|
1469
|
+
# Campaign-level edits. Send at least one of `budget`, `bidStrategy`, `name` or `platformSpecificData`. An unsupported field is always an error, never a silent drop. | Body field | Meta | Google | Others | |---|---|---|---| | `bidStrategy` | Yes | Yes | 501 | | `bidAmount`, `roasAverageFloor` | 400 — ad-set level | Yes | 400 | | `budget` (CBO; ABO returns 409) | Yes | 501 | 501 | | `name` | Yes | 501 | 501 | | `platformSpecificData.spendCap` | Yes | 400 | 400 | | `accountId` (empty campaigns) | Yes | - | - | Google maps the shared enum onto its own strategies: `LOWEST_COST_WITHOUT_CAP` to Maximize Clicks, `LOWEST_COST_WITH_BID_CAP` to Maximize Clicks with a max CPC (`bidAmount`), `COST_CAP` to Target CPA (`bidAmount`), `LOWEST_COST_WITH_MIN_ROAS` to Target ROAS (`roasAverageFloor`). A campaign on a PORTFOLIO bidding strategy is rejected: detach it in Google Ads first, since it is shared across campaigns. `accountId` forwards the update straight to Meta for a campaign with zero ads, which would otherwise 404; the response then carries `updated: 0`.
|
|
1470
1470
|
# @param campaign_id [String] Platform campaign ID
|
|
1471
1471
|
# @param update_ad_campaign_request [UpdateAdCampaignRequest]
|
|
1472
1472
|
# @param [Hash] opts the optional parameters
|
|
@@ -14,7 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
+
# Echoes back only the fields you sent, plus `updated`.
|
|
17
18
|
class UpdateAdCampaign200Response < ApiModelBase
|
|
19
|
+
# Local Ad documents mirrored. 0 on the empty-campaign path.
|
|
18
20
|
attr_accessor :updated
|
|
19
21
|
|
|
20
22
|
attr_accessor :budget
|
|
@@ -23,6 +25,10 @@ module Zernio
|
|
|
23
25
|
|
|
24
26
|
attr_accessor :bid_strategy
|
|
25
27
|
|
|
28
|
+
attr_accessor :bid_amount
|
|
29
|
+
|
|
30
|
+
attr_accessor :roas_average_floor
|
|
31
|
+
|
|
26
32
|
attr_accessor :platform_specific_data
|
|
27
33
|
|
|
28
34
|
class EnumAttributeValidator
|
|
@@ -54,6 +60,8 @@ module Zernio
|
|
|
54
60
|
:'budget' => :'budget',
|
|
55
61
|
:'budget_level' => :'budgetLevel',
|
|
56
62
|
:'bid_strategy' => :'bidStrategy',
|
|
63
|
+
:'bid_amount' => :'bidAmount',
|
|
64
|
+
:'roas_average_floor' => :'roasAverageFloor',
|
|
57
65
|
:'platform_specific_data' => :'platformSpecificData'
|
|
58
66
|
}
|
|
59
67
|
end
|
|
@@ -75,6 +83,8 @@ module Zernio
|
|
|
75
83
|
:'budget' => :'AdBudget',
|
|
76
84
|
:'budget_level' => :'String',
|
|
77
85
|
:'bid_strategy' => :'BidStrategy',
|
|
86
|
+
:'bid_amount' => :'Float',
|
|
87
|
+
:'roas_average_floor' => :'Float',
|
|
78
88
|
:'platform_specific_data' => :'Object'
|
|
79
89
|
}
|
|
80
90
|
end
|
|
@@ -117,6 +127,14 @@ module Zernio
|
|
|
117
127
|
self.bid_strategy = attributes[:'bid_strategy']
|
|
118
128
|
end
|
|
119
129
|
|
|
130
|
+
if attributes.key?(:'bid_amount')
|
|
131
|
+
self.bid_amount = attributes[:'bid_amount']
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'roas_average_floor')
|
|
135
|
+
self.roas_average_floor = attributes[:'roas_average_floor']
|
|
136
|
+
end
|
|
137
|
+
|
|
120
138
|
if attributes.key?(:'platform_specific_data')
|
|
121
139
|
self.platform_specific_data = attributes[:'platform_specific_data']
|
|
122
140
|
end
|
|
@@ -158,6 +176,8 @@ module Zernio
|
|
|
158
176
|
budget == o.budget &&
|
|
159
177
|
budget_level == o.budget_level &&
|
|
160
178
|
bid_strategy == o.bid_strategy &&
|
|
179
|
+
bid_amount == o.bid_amount &&
|
|
180
|
+
roas_average_floor == o.roas_average_floor &&
|
|
161
181
|
platform_specific_data == o.platform_specific_data
|
|
162
182
|
end
|
|
163
183
|
|
|
@@ -170,7 +190,7 @@ module Zernio
|
|
|
170
190
|
# Calculates hash code according to all attributes.
|
|
171
191
|
# @return [Integer] Hash code
|
|
172
192
|
def hash
|
|
173
|
-
[updated, budget, budget_level, bid_strategy, platform_specific_data].hash
|
|
193
|
+
[updated, budget, budget_level, bid_strategy, bid_amount, roas_average_floor, platform_specific_data].hash
|
|
174
194
|
end
|
|
175
195
|
|
|
176
196
|
# Builds the object from hash
|
|
@@ -15,17 +15,24 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class UpdateAdCampaignRequest < ApiModelBase
|
|
18
|
-
#
|
|
19
|
-
attr_accessor :account_id
|
|
20
|
-
|
|
18
|
+
# Required: platform campaign IDs are not globally unique.
|
|
21
19
|
attr_accessor :platform
|
|
22
20
|
|
|
23
|
-
|
|
21
|
+
# **Meta only.** Zernio SocialAccount id owning the ad account. Needed only for an EMPTY campaign (zero ads); ignored otherwise.
|
|
22
|
+
attr_accessor :account_id
|
|
24
23
|
|
|
25
|
-
#
|
|
24
|
+
# **Meta + Google.** On Meta, the campaign default that ad sets inherit unless they override it. On Google, the campaign's own bidding strategy.
|
|
26
25
|
attr_accessor :bid_strategy
|
|
27
26
|
|
|
28
|
-
#
|
|
27
|
+
# **Google only.** Whole currency units (USD: 12 = $12.00). Max CPC for LOWEST_COST_WITH_BID_CAP, CPA target for COST_CAP; required for both.
|
|
28
|
+
attr_accessor :bid_amount
|
|
29
|
+
|
|
30
|
+
# **Google only.** Decimal ROAS multiplier (2.0 = 2.0x), required for LOWEST_COST_WITH_MIN_ROAS.
|
|
31
|
+
attr_accessor :roas_average_floor
|
|
32
|
+
|
|
33
|
+
attr_accessor :budget
|
|
34
|
+
|
|
35
|
+
# **Meta only.** Rename the campaign.
|
|
29
36
|
attr_accessor :name
|
|
30
37
|
|
|
31
38
|
attr_accessor :platform_specific_data
|
|
@@ -55,10 +62,12 @@ module Zernio
|
|
|
55
62
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
56
63
|
def self.attribute_map
|
|
57
64
|
{
|
|
58
|
-
:'account_id' => :'accountId',
|
|
59
65
|
:'platform' => :'platform',
|
|
60
|
-
:'
|
|
66
|
+
:'account_id' => :'accountId',
|
|
61
67
|
:'bid_strategy' => :'bidStrategy',
|
|
68
|
+
:'bid_amount' => :'bidAmount',
|
|
69
|
+
:'roas_average_floor' => :'roasAverageFloor',
|
|
70
|
+
:'budget' => :'budget',
|
|
62
71
|
:'name' => :'name',
|
|
63
72
|
:'platform_specific_data' => :'platformSpecificData'
|
|
64
73
|
}
|
|
@@ -77,10 +86,12 @@ module Zernio
|
|
|
77
86
|
# Attribute type mapping.
|
|
78
87
|
def self.openapi_types
|
|
79
88
|
{
|
|
80
|
-
:'account_id' => :'String',
|
|
81
89
|
:'platform' => :'String',
|
|
82
|
-
:'
|
|
90
|
+
:'account_id' => :'String',
|
|
83
91
|
:'bid_strategy' => :'BidStrategy',
|
|
92
|
+
:'bid_amount' => :'Float',
|
|
93
|
+
:'roas_average_floor' => :'Float',
|
|
94
|
+
:'budget' => :'UpdateAdCampaignRequestBudget',
|
|
84
95
|
:'name' => :'String',
|
|
85
96
|
:'platform_specific_data' => :'UpdateAdCampaignRequestPlatformSpecificData'
|
|
86
97
|
}
|
|
@@ -108,24 +119,32 @@ module Zernio
|
|
|
108
119
|
h[k.to_sym] = v
|
|
109
120
|
}
|
|
110
121
|
|
|
111
|
-
if attributes.key?(:'account_id')
|
|
112
|
-
self.account_id = attributes[:'account_id']
|
|
113
|
-
end
|
|
114
|
-
|
|
115
122
|
if attributes.key?(:'platform')
|
|
116
123
|
self.platform = attributes[:'platform']
|
|
117
124
|
else
|
|
118
125
|
self.platform = nil
|
|
119
126
|
end
|
|
120
127
|
|
|
121
|
-
if attributes.key?(:'
|
|
122
|
-
self.
|
|
128
|
+
if attributes.key?(:'account_id')
|
|
129
|
+
self.account_id = attributes[:'account_id']
|
|
123
130
|
end
|
|
124
131
|
|
|
125
132
|
if attributes.key?(:'bid_strategy')
|
|
126
133
|
self.bid_strategy = attributes[:'bid_strategy']
|
|
127
134
|
end
|
|
128
135
|
|
|
136
|
+
if attributes.key?(:'bid_amount')
|
|
137
|
+
self.bid_amount = attributes[:'bid_amount']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'roas_average_floor')
|
|
141
|
+
self.roas_average_floor = attributes[:'roas_average_floor']
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'budget')
|
|
145
|
+
self.budget = attributes[:'budget']
|
|
146
|
+
end
|
|
147
|
+
|
|
129
148
|
if attributes.key?(:'name')
|
|
130
149
|
self.name = attributes[:'name']
|
|
131
150
|
end
|
|
@@ -156,7 +175,7 @@ module Zernio
|
|
|
156
175
|
def valid?
|
|
157
176
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
158
177
|
return false if @platform.nil?
|
|
159
|
-
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram"])
|
|
178
|
+
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "google"])
|
|
160
179
|
return false unless platform_validator.valid?(@platform)
|
|
161
180
|
return false if !@name.nil? && @name.to_s.length > 255
|
|
162
181
|
true
|
|
@@ -165,7 +184,7 @@ module Zernio
|
|
|
165
184
|
# Custom attribute writer method checking allowed values (enum).
|
|
166
185
|
# @param [Object] platform Object to be assigned
|
|
167
186
|
def platform=(platform)
|
|
168
|
-
validator = EnumAttributeValidator.new('String', ["facebook", "instagram"])
|
|
187
|
+
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "google"])
|
|
169
188
|
unless validator.valid?(platform)
|
|
170
189
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
171
190
|
end
|
|
@@ -191,10 +210,12 @@ module Zernio
|
|
|
191
210
|
def ==(o)
|
|
192
211
|
return true if self.equal?(o)
|
|
193
212
|
self.class == o.class &&
|
|
194
|
-
account_id == o.account_id &&
|
|
195
213
|
platform == o.platform &&
|
|
196
|
-
|
|
214
|
+
account_id == o.account_id &&
|
|
197
215
|
bid_strategy == o.bid_strategy &&
|
|
216
|
+
bid_amount == o.bid_amount &&
|
|
217
|
+
roas_average_floor == o.roas_average_floor &&
|
|
218
|
+
budget == o.budget &&
|
|
198
219
|
name == o.name &&
|
|
199
220
|
platform_specific_data == o.platform_specific_data
|
|
200
221
|
end
|
|
@@ -208,7 +229,7 @@ module Zernio
|
|
|
208
229
|
# Calculates hash code according to all attributes.
|
|
209
230
|
# @return [Integer] Hash code
|
|
210
231
|
def hash
|
|
211
|
-
[account_id,
|
|
232
|
+
[platform, account_id, bid_strategy, bid_amount, roas_average_floor, budget, name, platform_specific_data].hash
|
|
212
233
|
end
|
|
213
234
|
|
|
214
235
|
# Builds the object from hash
|
|
@@ -14,9 +14,9 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
#
|
|
17
|
+
# **Meta only.** Platform implied by the `platform` body param, same convention as POST /v1/ads/create.
|
|
18
18
|
class UpdateAdCampaignRequestPlatformSpecificData < ApiModelBase
|
|
19
|
-
# Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap
|
|
19
|
+
# Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap; 0 is rejected by Meta.
|
|
20
20
|
attr_accessor :spend_cap
|
|
21
21
|
|
|
22
22
|
# Attribute mapping from ruby-style variable name to JSON key.
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -36573,7 +36573,7 @@ paths:
|
|
|
36573
36573
|
x-resource-group: "ads"
|
|
36574
36574
|
operationId: updateAdCampaignStatus
|
|
36575
36575
|
tags: ["Ad Campaigns"]
|
|
36576
|
-
x-platforms: ["meta", "google", "tiktok", "linkedin", "pinterest", "x"]
|
|
36576
|
+
x-platforms: ["meta", "google", "tiktok", "linkedin", "pinterest", "x", "openai"]
|
|
36577
36577
|
summary: Pause or resume a campaign
|
|
36578
36578
|
description: |
|
|
36579
36579
|
Updates the status of all ads in a campaign. Makes one platform API call (not per-ad) since status cascades through the campaign hierarchy.
|
|
@@ -36615,26 +36615,31 @@ paths:
|
|
|
36615
36615
|
x-resource-group: "ads"
|
|
36616
36616
|
operationId: updateAdCampaign
|
|
36617
36617
|
tags: ["Ad Campaigns"]
|
|
36618
|
-
x-platforms: ["meta", "google"
|
|
36618
|
+
x-platforms: ["meta", "google"]
|
|
36619
36619
|
summary: Update a campaign
|
|
36620
36620
|
description: |
|
|
36621
|
-
Campaign-level edits.
|
|
36621
|
+
Campaign-level edits. Send at least one of `budget`, `bidStrategy`, `name`
|
|
36622
|
+
or `platformSpecificData`. An unsupported field is always an error, never a
|
|
36623
|
+
silent drop.
|
|
36622
36624
|
|
|
36623
|
-
|
|
36624
|
-
|
|
36625
|
-
|
|
36626
|
-
|
|
36627
|
-
|
|
36625
|
+
| Body field | Meta | Google | Others |
|
|
36626
|
+
|---|---|---|---|
|
|
36627
|
+
| `bidStrategy` | Yes | Yes | 501 |
|
|
36628
|
+
| `bidAmount`, `roasAverageFloor` | 400 — ad-set level | Yes | 400 |
|
|
36629
|
+
| `budget` (CBO; ABO returns 409) | Yes | 501 | 501 |
|
|
36630
|
+
| `name` | Yes | 501 | 501 |
|
|
36631
|
+
| `platformSpecificData.spendCap` | Yes | 400 | 400 |
|
|
36632
|
+
| `accountId` (empty campaigns) | Yes | - | - |
|
|
36628
36633
|
|
|
36629
|
-
|
|
36630
|
-
|
|
36631
|
-
|
|
36632
|
-
|
|
36633
|
-
|
|
36634
|
-
|
|
36635
|
-
account's currency.
|
|
36634
|
+
Google maps the shared enum onto its own strategies: `LOWEST_COST_WITHOUT_CAP`
|
|
36635
|
+
to Maximize Clicks, `LOWEST_COST_WITH_BID_CAP` to Maximize Clicks with a max
|
|
36636
|
+
CPC (`bidAmount`), `COST_CAP` to Target CPA (`bidAmount`),
|
|
36637
|
+
`LOWEST_COST_WITH_MIN_ROAS` to Target ROAS (`roasAverageFloor`). A campaign on
|
|
36638
|
+
a PORTFOLIO bidding strategy is rejected: detach it in Google Ads first, since
|
|
36639
|
+
it is shared across campaigns.
|
|
36636
36640
|
|
|
36637
|
-
Meta
|
|
36641
|
+
`accountId` forwards the update straight to Meta for a campaign with zero ads,
|
|
36642
|
+
which would otherwise 404; the response then carries `updated: 0`.
|
|
36638
36643
|
security:
|
|
36639
36644
|
- bearerAuth: []
|
|
36640
36645
|
parameters:
|
|
@@ -36647,26 +36652,26 @@ paths:
|
|
|
36647
36652
|
type: object
|
|
36648
36653
|
required: [platform]
|
|
36649
36654
|
properties:
|
|
36650
|
-
|
|
36651
|
-
|
|
36655
|
+
platform: { type: string, enum: [facebook, instagram, google], description: "Required: platform campaign IDs are not globally unique." }
|
|
36656
|
+
accountId: { type: string, description: "**Meta only.** Zernio SocialAccount id owning the ad account. Needed only for an EMPTY campaign (zero ads); ignored otherwise." }
|
|
36657
|
+
bidStrategy:
|
|
36658
|
+
allOf: [{ $ref: '#/components/schemas/BidStrategy' }]
|
|
36659
|
+
description: "**Meta + Google.** On Meta, the campaign default that ad sets inherit unless they override it. On Google, the campaign's own bidding strategy."
|
|
36660
|
+
bidAmount: { type: number, description: "**Google only.** Whole currency units (USD: 12 = $12.00). Max CPC for LOWEST_COST_WITH_BID_CAP, CPA target for COST_CAP; required for both." }
|
|
36661
|
+
roasAverageFloor: { type: number, description: "**Google only.** Decimal ROAS multiplier (2.0 = 2.0x), required for LOWEST_COST_WITH_MIN_ROAS." }
|
|
36652
36662
|
budget:
|
|
36653
36663
|
type: object
|
|
36664
|
+
description: "**Meta only.** The CBO budget."
|
|
36654
36665
|
required: [amount, type]
|
|
36655
36666
|
properties:
|
|
36656
36667
|
amount: { type: number, description: Budget amount in the ad account's currency }
|
|
36657
36668
|
type: { type: string, enum: [daily, lifetime] }
|
|
36658
|
-
|
|
36659
|
-
allOf: [{ $ref: '#/components/schemas/BidStrategy' }]
|
|
36660
|
-
description: "Campaign-level default. Ad sets inherit this unless they override."
|
|
36661
|
-
name: { type: string, maxLength: 255, description: "Rename the campaign (Meta only; other platforms return 501). At least one of budget/bidStrategy/name/platformSpecificData is required." }
|
|
36669
|
+
name: { type: string, maxLength: 255, description: "**Meta only.** Rename the campaign." }
|
|
36662
36670
|
platformSpecificData:
|
|
36663
36671
|
type: object
|
|
36664
|
-
description:
|
|
36665
|
-
Platform-specific campaign settings. The platform is implied by the `platform`
|
|
36666
|
-
body param (same convention as platformSpecificData on POST /v1/ads/create).
|
|
36667
|
-
Meta (facebook/instagram) only; other platforms return 400.
|
|
36672
|
+
description: "**Meta only.** Platform implied by the `platform` body param, same convention as POST /v1/ads/create."
|
|
36668
36673
|
properties:
|
|
36669
|
-
spendCap: { type: [number, "null"], description: "Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap
|
|
36674
|
+
spendCap: { type: [number, "null"], description: "Campaign lifetime spend cap, in the ad account's currency (Meta `spend_cap`). Pass null to remove the cap; 0 is rejected by Meta." }
|
|
36670
36675
|
responses:
|
|
36671
36676
|
'200':
|
|
36672
36677
|
description: Campaign updated
|
|
@@ -36674,13 +36679,16 @@ paths:
|
|
|
36674
36679
|
application/json:
|
|
36675
36680
|
schema:
|
|
36676
36681
|
type: object
|
|
36682
|
+
description: Echoes back only the fields you sent, plus `updated`.
|
|
36677
36683
|
properties:
|
|
36678
|
-
updated: { type: integer }
|
|
36684
|
+
updated: { type: integer, description: "Local Ad documents mirrored. 0 on the empty-campaign path." }
|
|
36679
36685
|
budget: { $ref: '#/components/schemas/AdBudget' }
|
|
36680
36686
|
budgetLevel: { type: string, enum: [campaign] }
|
|
36681
36687
|
bidStrategy: { $ref: '#/components/schemas/BidStrategy' }
|
|
36688
|
+
bidAmount: { type: number }
|
|
36689
|
+
roasAverageFloor: { type: number }
|
|
36682
36690
|
platformSpecificData: { type: object }
|
|
36683
|
-
'400': { description: Invalid input }
|
|
36691
|
+
'400': { description: "Invalid input, or a field the resolved platform does not support at the campaign level (see the support table)" }
|
|
36684
36692
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
36685
36693
|
'404': { description: Campaign not found }
|
|
36686
36694
|
'409': { description: "Campaign is ABO — route to /v1/ads/ad-sets/{adSetId} instead" }
|
|
@@ -36690,16 +36698,13 @@ paths:
|
|
|
36690
36698
|
x-resource-group: "ads"
|
|
36691
36699
|
operationId: deleteAdCampaign
|
|
36692
36700
|
tags: ["Ad Campaigns"]
|
|
36693
|
-
x-platforms: ["meta", "
|
|
36701
|
+
x-platforms: ["meta", "tiktok"]
|
|
36694
36702
|
summary: Delete a campaign
|
|
36695
36703
|
description: |
|
|
36696
36704
|
Deletes the whole campaign on the platform, cascading to its ad sets
|
|
36697
36705
|
and ads. Locally, all Ad documents for this campaign are marked
|
|
36698
36706
|
`status: cancelled`.
|
|
36699
36707
|
|
|
36700
|
-
Meta-only for now. Other platforms return 501 Not Implemented — fall
|
|
36701
|
-
back to DELETE /v1/ads/{adId} per ad in the meantime.
|
|
36702
|
-
|
|
36703
36708
|
**Empty campaigns.** A campaign with zero ads has no local Ad documents
|
|
36704
36709
|
to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would
|
|
36705
36710
|
404. That state is produced by the two-step create flow (campaign, then
|
|
@@ -96,7 +96,7 @@ describe 'AdCampaignsApi' do
|
|
|
96
96
|
|
|
97
97
|
# unit tests for delete_ad_campaign
|
|
98
98
|
# Delete a campaign
|
|
99
|
-
# 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`.
|
|
99
|
+
# 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`. **Empty campaigns.** A campaign with zero ads has no local Ad documents to resolve, so it is invisible to `/v1/ads/tree` and this endpoint would 404. That state is produced by the two-step create flow (campaign, then ads via `existingCampaignId`) whenever Meta rejects the ad step. To delete such a shell, send `accountId` in the body: we skip the local lookup entirely and forward the delete to Meta. `accountId` is ignored when the campaign does have ads.
|
|
100
100
|
# @param campaign_id Platform campaign ID
|
|
101
101
|
# @param delete_ad_campaign_request
|
|
102
102
|
# @param [Hash] opts the optional parameters
|
|
@@ -303,7 +303,7 @@ describe 'AdCampaignsApi' do
|
|
|
303
303
|
|
|
304
304
|
# unit tests for update_ad_campaign
|
|
305
305
|
# Update a campaign
|
|
306
|
-
# Campaign-level edits.
|
|
306
|
+
# Campaign-level edits. Send at least one of `budget`, `bidStrategy`, `name` or `platformSpecificData`. An unsupported field is always an error, never a silent drop. | Body field | Meta | Google | Others | |---|---|---|---| | `bidStrategy` | Yes | Yes | 501 | | `bidAmount`, `roasAverageFloor` | 400 — ad-set level | Yes | 400 | | `budget` (CBO; ABO returns 409) | Yes | 501 | 501 | | `name` | Yes | 501 | 501 | | `platformSpecificData.spendCap` | Yes | 400 | 400 | | `accountId` (empty campaigns) | Yes | - | - | Google maps the shared enum onto its own strategies: `LOWEST_COST_WITHOUT_CAP` to Maximize Clicks, `LOWEST_COST_WITH_BID_CAP` to Maximize Clicks with a max CPC (`bidAmount`), `COST_CAP` to Target CPA (`bidAmount`), `LOWEST_COST_WITH_MIN_ROAS` to Target ROAS (`roasAverageFloor`). A campaign on a PORTFOLIO bidding strategy is rejected: detach it in Google Ads first, since it is shared across campaigns. `accountId` forwards the update straight to Meta for a campaign with zero ads, which would otherwise 404; the response then carries `updated: 0`.
|
|
307
307
|
# @param campaign_id Platform campaign ID
|
|
308
308
|
# @param update_ad_campaign_request
|
|
309
309
|
# @param [Hash] opts the optional parameters
|
|
@@ -55,6 +55,18 @@ describe Zernio::UpdateAdCampaign200Response do
|
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
describe 'test attribute "bid_amount"' do
|
|
59
|
+
it 'should work' do
|
|
60
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
describe 'test attribute "roas_average_floor"' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
58
70
|
describe 'test attribute "platform_specific_data"' do
|
|
59
71
|
it 'should work' do
|
|
60
72
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -27,29 +27,41 @@ describe Zernio::UpdateAdCampaignRequest do
|
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
describe 'test attribute "platform"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram", "google"])
|
|
34
|
+
# validator.allowable_values.each do |value|
|
|
35
|
+
# expect { instance.platform = value }.not_to raise_error
|
|
36
|
+
# end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
30
40
|
describe 'test attribute "account_id"' do
|
|
31
41
|
it 'should work' do
|
|
32
42
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
43
|
end
|
|
34
44
|
end
|
|
35
45
|
|
|
36
|
-
describe 'test attribute "
|
|
46
|
+
describe 'test attribute "bid_strategy"' do
|
|
37
47
|
it 'should work' do
|
|
38
48
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["facebook", "instagram"])
|
|
40
|
-
# validator.allowable_values.each do |value|
|
|
41
|
-
# expect { instance.platform = value }.not_to raise_error
|
|
42
|
-
# end
|
|
43
49
|
end
|
|
44
50
|
end
|
|
45
51
|
|
|
46
|
-
describe 'test attribute "
|
|
52
|
+
describe 'test attribute "bid_amount"' do
|
|
47
53
|
it 'should work' do
|
|
48
54
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
49
55
|
end
|
|
50
56
|
end
|
|
51
57
|
|
|
52
|
-
describe 'test attribute "
|
|
58
|
+
describe 'test attribute "roas_average_floor"' do
|
|
59
|
+
it 'should work' do
|
|
60
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
describe 'test attribute "budget"' do
|
|
53
65
|
it 'should work' do
|
|
54
66
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
55
67
|
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.691
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -5018,7 +5018,7 @@ files:
|
|
|
5018
5018
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
5019
5019
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
5020
5020
|
- spec/spec_helper.rb
|
|
5021
|
-
- zernio-sdk-0.0.
|
|
5021
|
+
- zernio-sdk-0.0.691.gem
|
|
5022
5022
|
- zernio-sdk.gemspec
|
|
5023
5023
|
homepage: https://openapi-generator.tech
|
|
5024
5024
|
licenses:
|
data/zernio-sdk-0.0.690.gem
DELETED
|
Binary file
|