late-sdk 0.0.658 → 0.0.659
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 +16 -0
- data/docs/AdAccountsApi.md +364 -0
- data/docs/AdCampaignsApi.md +1 -1
- data/docs/CreateStandaloneAdRequest.md +4 -0
- data/docs/CreateValueRuleSet201Response.md +20 -0
- data/docs/CreateValueRuleSetRequest.md +24 -0
- data/docs/DeleteValueRuleSet200Response.md +20 -0
- data/docs/GetValueRuleSet200Response.md +18 -0
- data/docs/ListValueRuleSets200Response.md +22 -0
- data/docs/ListValueRuleSets200ResponsePaging.md +18 -0
- data/docs/UpdateAdSetRequest.md +4 -0
- data/docs/UpdateValueRuleSet200Response.md +24 -0
- data/docs/UpdateValueRuleSetRequest.md +22 -0
- data/docs/ValueRule.md +28 -0
- data/docs/ValueRuleCriterion.md +26 -0
- data/docs/ValueRuleSet.md +22 -0
- data/lib/zernio-sdk/api/ad_accounts_api.rb +367 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +2 -2
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +42 -1
- data/lib/zernio-sdk/models/create_value_rule_set201_response.rb +158 -0
- data/lib/zernio-sdk/models/create_value_rule_set_request.rb +283 -0
- data/lib/zernio-sdk/models/delete_value_rule_set200_response.rb +156 -0
- data/lib/zernio-sdk/models/get_value_rule_set200_response.rb +147 -0
- data/lib/zernio-sdk/models/list_value_rule_sets200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_value_rule_sets200_response_paging.rb +149 -0
- data/lib/zernio-sdk/models/update_ad_set_request.rb +42 -1
- data/lib/zernio-sdk/models/update_value_rule_set200_response.rb +176 -0
- data/lib/zernio-sdk/models/update_value_rule_set_request.rb +257 -0
- data/lib/zernio-sdk/models/value_rule.rb +346 -0
- data/lib/zernio-sdk/models/value_rule_criterion.rb +305 -0
- data/lib/zernio-sdk/models/value_rule_set.rb +221 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +11 -0
- data/openapi.yaml +395 -3
- data/spec/api/ad_accounts_api_spec.rb +66 -0
- data/spec/api/ad_campaigns_api_spec.rb +1 -1
- data/spec/models/create_standalone_ad_request_spec.rb +12 -0
- data/spec/models/create_value_rule_set201_response_spec.rb +42 -0
- data/spec/models/create_value_rule_set_request_spec.rb +54 -0
- data/spec/models/delete_value_rule_set200_response_spec.rb +42 -0
- data/spec/models/get_value_rule_set200_response_spec.rb +36 -0
- data/spec/models/list_value_rule_sets200_response_paging_spec.rb +36 -0
- data/spec/models/list_value_rule_sets200_response_spec.rb +48 -0
- data/spec/models/update_ad_set_request_spec.rb +12 -0
- data/spec/models/update_value_rule_set200_response_spec.rb +54 -0
- data/spec/models/update_value_rule_set_request_spec.rb +48 -0
- data/spec/models/value_rule_criterion_spec.rb +68 -0
- data/spec/models/value_rule_set_spec.rb +48 -0
- data/spec/models/value_rule_spec.rb +70 -0
- data/zernio-sdk-0.0.659.gem +0 -0
- metadata +46 -2
- data/zernio-sdk-0.0.658.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: 3f6fa769ddf9f9d76e8216b95653006ebdc22ec2e6139898b00b4baac9e7ed3d
|
|
4
|
+
data.tar.gz: b4d07220726fdd3525182b83538ccaeea64c251bf9d5f88d5f23ea451f857f0f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b2631c74bf03c28f836e189ff298ee542bf1600c1f47c6b4ee438e646f6bbba0d1350239015b00e8e2dbb85c6068bf247084a9cffca8c5b577350727acddd7ef
|
|
7
|
+
data.tar.gz: fab8a17c6a8ac5b09d85cb60eda435696bdb20a2d1c903790f261abcae31bf761708aca11aaf274bea8c8eb27609085a250bd92ef7b3c9135c3b2e0b7f8c3802
|
data/README.md
CHANGED
|
@@ -92,18 +92,23 @@ Class | Method | HTTP request | Description
|
|
|
92
92
|
*Zernio::AccountsApi* | [**move_account_to_profile**](docs/AccountsApi.md#move_account_to_profile) | **PATCH** /v1/accounts/{accountId} | Move account to another profile
|
|
93
93
|
*Zernio::AccountsApi* | [**update_account**](docs/AccountsApi.md#update_account) | **PUT** /v1/accounts/{accountId} | Update account
|
|
94
94
|
*Zernio::AccountsApi* | [**update_slack_settings**](docs/AccountsApi.md#update_slack_settings) | **PATCH** /v1/accounts/{accountId}/slack-settings | Update Slack account settings
|
|
95
|
+
*Zernio::AdAccountsApi* | [**create_value_rule_set**](docs/AdAccountsApi.md#create_value_rule_set) | **POST** /v1/ads/value-rule-sets | Create a value rule set
|
|
96
|
+
*Zernio::AdAccountsApi* | [**delete_value_rule_set**](docs/AdAccountsApi.md#delete_value_rule_set) | **DELETE** /v1/ads/value-rule-sets/{valueRuleSetId} | Delete a value rule set
|
|
95
97
|
*Zernio::AdAccountsApi* | [**get_ad_account_finance**](docs/AdAccountsApi.md#get_ad_account_finance) | **GET** /v1/ads/accounts/finance | Ad account finances
|
|
96
98
|
*Zernio::AdAccountsApi* | [**get_ad_comments**](docs/AdAccountsApi.md#get_ad_comments) | **GET** /v1/ads/{adId}/comments | List comments on an ad
|
|
97
99
|
*Zernio::AdAccountsApi* | [**get_ads_activity_log**](docs/AdAccountsApi.md#get_ads_activity_log) | **GET** /v1/ads/activity | Ad account change / audit log
|
|
98
100
|
*Zernio::AdAccountsApi* | [**get_dsa_defaults**](docs/AdAccountsApi.md#get_dsa_defaults) | **GET** /v1/ads/dsa-defaults | Get ad account DSA defaults
|
|
99
101
|
*Zernio::AdAccountsApi* | [**get_dsa_recommendations**](docs/AdAccountsApi.md#get_dsa_recommendations) | **GET** /v1/ads/dsa-recommendations | List DSA beneficiary/payor suggestions
|
|
102
|
+
*Zernio::AdAccountsApi* | [**get_value_rule_set**](docs/AdAccountsApi.md#get_value_rule_set) | **GET** /v1/ads/value-rule-sets/{valueRuleSetId} | Read a value rule set
|
|
100
103
|
*Zernio::AdAccountsApi* | [**list_ad_accounts**](docs/AdAccountsApi.md#list_ad_accounts) | **GET** /v1/ads/accounts | List ad accounts
|
|
101
104
|
*Zernio::AdAccountsApi* | [**list_ad_labels**](docs/AdAccountsApi.md#list_ad_labels) | **GET** /v1/ads/labels | Ad labels
|
|
102
105
|
*Zernio::AdAccountsApi* | [**list_ad_studies**](docs/AdAccountsApi.md#list_ad_studies) | **GET** /v1/ads/studies | A/B tests and lift studies
|
|
103
106
|
*Zernio::AdAccountsApi* | [**list_ads_business_centers**](docs/AdAccountsApi.md#list_ads_business_centers) | **GET** /v1/ads/business-centers | List TikTok Business Centers
|
|
104
107
|
*Zernio::AdAccountsApi* | [**list_high_demand_periods**](docs/AdAccountsApi.md#list_high_demand_periods) | **GET** /v1/ads/high-demand-periods | High demand periods / budget schedules
|
|
105
108
|
*Zernio::AdAccountsApi* | [**list_meta_businesses**](docs/AdAccountsApi.md#list_meta_businesses) | **GET** /v1/ads/businesses | Businesses list
|
|
109
|
+
*Zernio::AdAccountsApi* | [**list_value_rule_sets**](docs/AdAccountsApi.md#list_value_rule_sets) | **GET** /v1/ads/value-rule-sets | List value rule sets
|
|
106
110
|
*Zernio::AdAccountsApi* | [**update_ad_account**](docs/AdAccountsApi.md#update_ad_account) | **PATCH** /v1/ads/accounts | Update ad account settings
|
|
111
|
+
*Zernio::AdAccountsApi* | [**update_value_rule_set**](docs/AdAccountsApi.md#update_value_rule_set) | **PUT** /v1/ads/value-rule-sets/{valueRuleSetId} | Replace a value rule set
|
|
107
112
|
*Zernio::AdAudiencesApi* | [**add_users_to_ad_audience**](docs/AdAudiencesApi.md#add_users_to_ad_audience) | **POST** /v1/ads/audiences/{audienceId}/users | Add users to audience
|
|
108
113
|
*Zernio::AdAudiencesApi* | [**create_ad_audience**](docs/AdAudiencesApi.md#create_ad_audience) | **POST** /v1/ads/audiences | Create custom audience
|
|
109
114
|
*Zernio::AdAudiencesApi* | [**delete_ad_audience**](docs/AdAudiencesApi.md#delete_ad_audience) | **DELETE** /v1/ads/audiences/{audienceId} | Delete custom audience
|
|
@@ -870,6 +875,8 @@ Class | Method | HTTP request | Description
|
|
|
870
875
|
- [Zernio::CreateTestLeadRequestFieldDataInner](docs/CreateTestLeadRequestFieldDataInner.md)
|
|
871
876
|
- [Zernio::CreateTrackingTag201Response](docs/CreateTrackingTag201Response.md)
|
|
872
877
|
- [Zernio::CreateTrackingTagRequest](docs/CreateTrackingTagRequest.md)
|
|
878
|
+
- [Zernio::CreateValueRuleSet201Response](docs/CreateValueRuleSet201Response.md)
|
|
879
|
+
- [Zernio::CreateValueRuleSetRequest](docs/CreateValueRuleSetRequest.md)
|
|
873
880
|
- [Zernio::CreateVerificationRequest](docs/CreateVerificationRequest.md)
|
|
874
881
|
- [Zernio::CreateVoiceCall200Response](docs/CreateVoiceCall200Response.md)
|
|
875
882
|
- [Zernio::CreateVoiceCallRequest](docs/CreateVoiceCallRequest.md)
|
|
@@ -917,6 +924,7 @@ Class | Method | HTTP request | Description
|
|
|
917
924
|
- [Zernio::DeleteInboxReviewReply200Response](docs/DeleteInboxReviewReply200Response.md)
|
|
918
925
|
- [Zernio::DeleteInboxReviewReplyRequest](docs/DeleteInboxReviewReplyRequest.md)
|
|
919
926
|
- [Zernio::DeleteSmsSenderId200Response](docs/DeleteSmsSenderId200Response.md)
|
|
927
|
+
- [Zernio::DeleteValueRuleSet200Response](docs/DeleteValueRuleSet200Response.md)
|
|
920
928
|
- [Zernio::DeleteWhatsappBusinessUsernameRequest](docs/DeleteWhatsappBusinessUsernameRequest.md)
|
|
921
929
|
- [Zernio::DialVoiceWebCall200Response](docs/DialVoiceWebCall200Response.md)
|
|
922
930
|
- [Zernio::DialVoiceWebCallRequest](docs/DialVoiceWebCallRequest.md)
|
|
@@ -1262,6 +1270,7 @@ Class | Method | HTTP request | Description
|
|
|
1262
1270
|
- [Zernio::GetUsage200Response](docs/GetUsage200Response.md)
|
|
1263
1271
|
- [Zernio::GetUser200Response](docs/GetUser200Response.md)
|
|
1264
1272
|
- [Zernio::GetUser200ResponseUser](docs/GetUser200ResponseUser.md)
|
|
1273
|
+
- [Zernio::GetValueRuleSet200Response](docs/GetValueRuleSet200Response.md)
|
|
1265
1274
|
- [Zernio::GetVoiceCall200Response](docs/GetVoiceCall200Response.md)
|
|
1266
1275
|
- [Zernio::GetVoiceCallEstimate200Response](docs/GetVoiceCallEstimate200Response.md)
|
|
1267
1276
|
- [Zernio::GetVoiceCallEstimate200ResponseBreakdown](docs/GetVoiceCallEstimate200ResponseBreakdown.md)
|
|
@@ -1518,6 +1527,8 @@ Class | Method | HTTP request | Description
|
|
|
1518
1527
|
- [Zernio::ListTrackingTags200Response](docs/ListTrackingTags200Response.md)
|
|
1519
1528
|
- [Zernio::ListUsers200Response](docs/ListUsers200Response.md)
|
|
1520
1529
|
- [Zernio::ListUsers200ResponseUsersInner](docs/ListUsers200ResponseUsersInner.md)
|
|
1530
|
+
- [Zernio::ListValueRuleSets200Response](docs/ListValueRuleSets200Response.md)
|
|
1531
|
+
- [Zernio::ListValueRuleSets200ResponsePaging](docs/ListValueRuleSets200ResponsePaging.md)
|
|
1521
1532
|
- [Zernio::ListVoiceCalls200Response](docs/ListVoiceCalls200Response.md)
|
|
1522
1533
|
- [Zernio::ListWhatsAppCalls200Response](docs/ListWhatsAppCalls200Response.md)
|
|
1523
1534
|
- [Zernio::ListWhatsAppCalls200ResponseCallsInner](docs/ListWhatsAppCalls200ResponseCallsInner.md)
|
|
@@ -1972,6 +1983,8 @@ Class | Method | HTTP request | Description
|
|
|
1972
1983
|
- [Zernio::UpdateSequenceRequestStepsInnerTemplate](docs/UpdateSequenceRequestStepsInnerTemplate.md)
|
|
1973
1984
|
- [Zernio::UpdateSlackSettingsRequest](docs/UpdateSlackSettingsRequest.md)
|
|
1974
1985
|
- [Zernio::UpdateTrackingTagRequest](docs/UpdateTrackingTagRequest.md)
|
|
1986
|
+
- [Zernio::UpdateValueRuleSet200Response](docs/UpdateValueRuleSet200Response.md)
|
|
1987
|
+
- [Zernio::UpdateValueRuleSetRequest](docs/UpdateValueRuleSetRequest.md)
|
|
1975
1988
|
- [Zernio::UpdateWebhookSettings200Response](docs/UpdateWebhookSettings200Response.md)
|
|
1976
1989
|
- [Zernio::UpdateWebhookSettingsRequest](docs/UpdateWebhookSettingsRequest.md)
|
|
1977
1990
|
- [Zernio::UpdateWhatsAppBusinessProfileRequest](docs/UpdateWhatsAppBusinessProfileRequest.md)
|
|
@@ -2046,6 +2059,9 @@ Class | Method | HTTP request | Description
|
|
|
2046
2059
|
- [Zernio::ValidateSubreddit200ResponseOneOf](docs/ValidateSubreddit200ResponseOneOf.md)
|
|
2047
2060
|
- [Zernio::ValidateSubreddit200ResponseOneOf1](docs/ValidateSubreddit200ResponseOneOf1.md)
|
|
2048
2061
|
- [Zernio::ValidateSubreddit200ResponseOneOfSubreddit](docs/ValidateSubreddit200ResponseOneOfSubreddit.md)
|
|
2062
|
+
- [Zernio::ValueRule](docs/ValueRule.md)
|
|
2063
|
+
- [Zernio::ValueRuleCriterion](docs/ValueRuleCriterion.md)
|
|
2064
|
+
- [Zernio::ValueRuleSet](docs/ValueRuleSet.md)
|
|
2049
2065
|
- [Zernio::Verification](docs/Verification.md)
|
|
2050
2066
|
- [Zernio::VerifySmsRegistrationOtp200Response](docs/VerifySmsRegistrationOtp200Response.md)
|
|
2051
2067
|
- [Zernio::VerifySmsRegistrationOtpRequest](docs/VerifySmsRegistrationOtpRequest.md)
|
data/docs/AdAccountsApi.md
CHANGED
|
@@ -4,18 +4,163 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_value_rule_set**](AdAccountsApi.md#create_value_rule_set) | **POST** /v1/ads/value-rule-sets | Create a value rule set |
|
|
8
|
+
| [**delete_value_rule_set**](AdAccountsApi.md#delete_value_rule_set) | **DELETE** /v1/ads/value-rule-sets/{valueRuleSetId} | Delete a value rule set |
|
|
7
9
|
| [**get_ad_account_finance**](AdAccountsApi.md#get_ad_account_finance) | **GET** /v1/ads/accounts/finance | Ad account finances |
|
|
8
10
|
| [**get_ad_comments**](AdAccountsApi.md#get_ad_comments) | **GET** /v1/ads/{adId}/comments | List comments on an ad |
|
|
9
11
|
| [**get_ads_activity_log**](AdAccountsApi.md#get_ads_activity_log) | **GET** /v1/ads/activity | Ad account change / audit log |
|
|
10
12
|
| [**get_dsa_defaults**](AdAccountsApi.md#get_dsa_defaults) | **GET** /v1/ads/dsa-defaults | Get ad account DSA defaults |
|
|
11
13
|
| [**get_dsa_recommendations**](AdAccountsApi.md#get_dsa_recommendations) | **GET** /v1/ads/dsa-recommendations | List DSA beneficiary/payor suggestions |
|
|
14
|
+
| [**get_value_rule_set**](AdAccountsApi.md#get_value_rule_set) | **GET** /v1/ads/value-rule-sets/{valueRuleSetId} | Read a value rule set |
|
|
12
15
|
| [**list_ad_accounts**](AdAccountsApi.md#list_ad_accounts) | **GET** /v1/ads/accounts | List ad accounts |
|
|
13
16
|
| [**list_ad_labels**](AdAccountsApi.md#list_ad_labels) | **GET** /v1/ads/labels | Ad labels |
|
|
14
17
|
| [**list_ad_studies**](AdAccountsApi.md#list_ad_studies) | **GET** /v1/ads/studies | A/B tests and lift studies |
|
|
15
18
|
| [**list_ads_business_centers**](AdAccountsApi.md#list_ads_business_centers) | **GET** /v1/ads/business-centers | List TikTok Business Centers |
|
|
16
19
|
| [**list_high_demand_periods**](AdAccountsApi.md#list_high_demand_periods) | **GET** /v1/ads/high-demand-periods | High demand periods / budget schedules |
|
|
17
20
|
| [**list_meta_businesses**](AdAccountsApi.md#list_meta_businesses) | **GET** /v1/ads/businesses | Businesses list |
|
|
21
|
+
| [**list_value_rule_sets**](AdAccountsApi.md#list_value_rule_sets) | **GET** /v1/ads/value-rule-sets | List value rule sets |
|
|
18
22
|
| [**update_ad_account**](AdAccountsApi.md#update_ad_account) | **PATCH** /v1/ads/accounts | Update ad account settings |
|
|
23
|
+
| [**update_value_rule_set**](AdAccountsApi.md#update_value_rule_set) | **PUT** /v1/ads/value-rule-sets/{valueRuleSetId} | Replace a value rule set |
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## create_value_rule_set
|
|
27
|
+
|
|
28
|
+
> <CreateValueRuleSet201Response> create_value_rule_set(create_value_rule_set_request)
|
|
29
|
+
|
|
30
|
+
Create a value rule set
|
|
31
|
+
|
|
32
|
+
Creates a value rule set on the ad account (Meta's `POST /act_X/value_rule_set`). Attach the returned id to an ad set with `valueRuleSetId` on `POST /v1/ads/create` or `PUT /v1/ads/ad-sets/{adSetId}`. **Rule order is semantic**: rules are evaluated in array order and only the first matching rule adjusts the bid for an overlapping audience. `adjustValue` is an unsigned magnitude in percent; the direction lives in `adjustSign`. `INCREASE` accepts 1-1000, `DECREASE` accepts 1-90. There is no signed field and 0 is out of range. `criteriaValueTypes` is positionally paired with `criteriaValues` (same length, same order). Every type is the literal `\"NONE\"` except on `LOCATION`, which uses `LOCATION_COUNTRY` / `LOCATION_REGION` / `LOCATION_CITY` / `LOCATION_COMSCORE_MARKET` and may mix them within one criterion. Location values are Targeting-Search keys: a two-letter country code for `LOCATION_COUNTRY`, a numeric key for the rest. `LOCATION_DMA` was replaced by `LOCATION_COMSCORE_MARKET` on 2026-06-22 and rules using DMAs are no longer active, so this API rejects it. `AUDIENCE_LABEL` values (e.g. `HIGH_VALUE`) are applied to a Custom Audience in Ads Manager. There is no API to provision them, so label strings are passed through unvalidated and a typo produces a rule that never fires. Ads Manager turns a rule set read-only (this API stays editable) when a rule uses more than 2 criteria, a custom age range, or the placements `FB_MARKETPLACE`, `FB_SEARCH`, `FB_VIDEO` or `IG_EXPLORE`. Limits: 6 rule sets per ad account, 10 rules per set, 4 criteria per rule. The per-account cap is enforced by Meta, not here.
|
|
33
|
+
|
|
34
|
+
### Examples
|
|
35
|
+
|
|
36
|
+
```ruby
|
|
37
|
+
require 'time'
|
|
38
|
+
require 'zernio-sdk'
|
|
39
|
+
# setup authorization
|
|
40
|
+
Zernio.configure do |config|
|
|
41
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
42
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
api_instance = Zernio::AdAccountsApi.new
|
|
46
|
+
create_value_rule_set_request = Zernio::CreateValueRuleSetRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', rules: [Zernio::ValueRule.new({name: 'name_example', adjust_sign: 'INCREASE', adjust_value: 37, criteria: [Zernio::ValueRuleCriterion.new({criteria_type: 'AGE', operator: 'CONTAINS', criteria_values: ['criteria_values_example'], criteria_value_types: ['criteria_value_types_example']})]})]}) # CreateValueRuleSetRequest |
|
|
47
|
+
|
|
48
|
+
begin
|
|
49
|
+
# Create a value rule set
|
|
50
|
+
result = api_instance.create_value_rule_set(create_value_rule_set_request)
|
|
51
|
+
p result
|
|
52
|
+
rescue Zernio::ApiError => e
|
|
53
|
+
puts "Error when calling AdAccountsApi->create_value_rule_set: #{e}"
|
|
54
|
+
end
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Using the create_value_rule_set_with_http_info variant
|
|
58
|
+
|
|
59
|
+
This returns an Array which contains the response data, status code and headers.
|
|
60
|
+
|
|
61
|
+
> <Array(<CreateValueRuleSet201Response>, Integer, Hash)> create_value_rule_set_with_http_info(create_value_rule_set_request)
|
|
62
|
+
|
|
63
|
+
```ruby
|
|
64
|
+
begin
|
|
65
|
+
# Create a value rule set
|
|
66
|
+
data, status_code, headers = api_instance.create_value_rule_set_with_http_info(create_value_rule_set_request)
|
|
67
|
+
p status_code # => 2xx
|
|
68
|
+
p headers # => { ... }
|
|
69
|
+
p data # => <CreateValueRuleSet201Response>
|
|
70
|
+
rescue Zernio::ApiError => e
|
|
71
|
+
puts "Error when calling AdAccountsApi->create_value_rule_set_with_http_info: #{e}"
|
|
72
|
+
end
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Parameters
|
|
76
|
+
|
|
77
|
+
| Name | Type | Description | Notes |
|
|
78
|
+
| ---- | ---- | ----------- | ----- |
|
|
79
|
+
| **create_value_rule_set_request** | [**CreateValueRuleSetRequest**](CreateValueRuleSetRequest.md) | | |
|
|
80
|
+
|
|
81
|
+
### Return type
|
|
82
|
+
|
|
83
|
+
[**CreateValueRuleSet201Response**](CreateValueRuleSet201Response.md)
|
|
84
|
+
|
|
85
|
+
### Authorization
|
|
86
|
+
|
|
87
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
88
|
+
|
|
89
|
+
### HTTP request headers
|
|
90
|
+
|
|
91
|
+
- **Content-Type**: application/json
|
|
92
|
+
- **Accept**: application/json
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## delete_value_rule_set
|
|
96
|
+
|
|
97
|
+
> <DeleteValueRuleSet200Response> delete_value_rule_set(value_rule_set_id, account_id)
|
|
98
|
+
|
|
99
|
+
Delete a value rule set
|
|
100
|
+
|
|
101
|
+
Deletes the rule set (Meta's `POST /{value-rule-set-id}/delete_rule_set`, a custom action edge rather than an HTTP DELETE on its side). Ad sets pointing at it are not modified here; detach them first with `valueRulesApplied: false` on `PUT /v1/ads/ad-sets/{adSetId}`.
|
|
102
|
+
|
|
103
|
+
### Examples
|
|
104
|
+
|
|
105
|
+
```ruby
|
|
106
|
+
require 'time'
|
|
107
|
+
require 'zernio-sdk'
|
|
108
|
+
# setup authorization
|
|
109
|
+
Zernio.configure do |config|
|
|
110
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
111
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
api_instance = Zernio::AdAccountsApi.new
|
|
115
|
+
value_rule_set_id = 'value_rule_set_id_example' # String | Platform value rule set id.
|
|
116
|
+
account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
117
|
+
|
|
118
|
+
begin
|
|
119
|
+
# Delete a value rule set
|
|
120
|
+
result = api_instance.delete_value_rule_set(value_rule_set_id, account_id)
|
|
121
|
+
p result
|
|
122
|
+
rescue Zernio::ApiError => e
|
|
123
|
+
puts "Error when calling AdAccountsApi->delete_value_rule_set: #{e}"
|
|
124
|
+
end
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
#### Using the delete_value_rule_set_with_http_info variant
|
|
128
|
+
|
|
129
|
+
This returns an Array which contains the response data, status code and headers.
|
|
130
|
+
|
|
131
|
+
> <Array(<DeleteValueRuleSet200Response>, Integer, Hash)> delete_value_rule_set_with_http_info(value_rule_set_id, account_id)
|
|
132
|
+
|
|
133
|
+
```ruby
|
|
134
|
+
begin
|
|
135
|
+
# Delete a value rule set
|
|
136
|
+
data, status_code, headers = api_instance.delete_value_rule_set_with_http_info(value_rule_set_id, account_id)
|
|
137
|
+
p status_code # => 2xx
|
|
138
|
+
p headers # => { ... }
|
|
139
|
+
p data # => <DeleteValueRuleSet200Response>
|
|
140
|
+
rescue Zernio::ApiError => e
|
|
141
|
+
puts "Error when calling AdAccountsApi->delete_value_rule_set_with_http_info: #{e}"
|
|
142
|
+
end
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Parameters
|
|
146
|
+
|
|
147
|
+
| Name | Type | Description | Notes |
|
|
148
|
+
| ---- | ---- | ----------- | ----- |
|
|
149
|
+
| **value_rule_set_id** | **String** | Platform value rule set id. | |
|
|
150
|
+
| **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
|
|
151
|
+
|
|
152
|
+
### Return type
|
|
153
|
+
|
|
154
|
+
[**DeleteValueRuleSet200Response**](DeleteValueRuleSet200Response.md)
|
|
155
|
+
|
|
156
|
+
### Authorization
|
|
157
|
+
|
|
158
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
159
|
+
|
|
160
|
+
### HTTP request headers
|
|
161
|
+
|
|
162
|
+
- **Content-Type**: Not defined
|
|
163
|
+
- **Accept**: application/json
|
|
19
164
|
|
|
20
165
|
|
|
21
166
|
## get_ad_account_finance
|
|
@@ -391,6 +536,77 @@ end
|
|
|
391
536
|
- **Accept**: application/json
|
|
392
537
|
|
|
393
538
|
|
|
539
|
+
## get_value_rule_set
|
|
540
|
+
|
|
541
|
+
> <GetValueRuleSet200Response> get_value_rule_set(value_rule_set_id, account_id)
|
|
542
|
+
|
|
543
|
+
Read a value rule set
|
|
544
|
+
|
|
545
|
+
Reads one value rule set including every nested rule id and criterion id. This is step one of any edit: `PUT` is a full replace, so you need the ids before you can keep the objects you are not changing. Meta's own read returns `GENDER` values lowercase (`\"male\"`) while writes require `\"MALE\"`. Values are passed through untouched, so never case-compare a stored rule against a fetched one.
|
|
546
|
+
|
|
547
|
+
### Examples
|
|
548
|
+
|
|
549
|
+
```ruby
|
|
550
|
+
require 'time'
|
|
551
|
+
require 'zernio-sdk'
|
|
552
|
+
# setup authorization
|
|
553
|
+
Zernio.configure do |config|
|
|
554
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
555
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
556
|
+
end
|
|
557
|
+
|
|
558
|
+
api_instance = Zernio::AdAccountsApi.new
|
|
559
|
+
value_rule_set_id = 'value_rule_set_id_example' # String | Platform value rule set id.
|
|
560
|
+
account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
561
|
+
|
|
562
|
+
begin
|
|
563
|
+
# Read a value rule set
|
|
564
|
+
result = api_instance.get_value_rule_set(value_rule_set_id, account_id)
|
|
565
|
+
p result
|
|
566
|
+
rescue Zernio::ApiError => e
|
|
567
|
+
puts "Error when calling AdAccountsApi->get_value_rule_set: #{e}"
|
|
568
|
+
end
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
#### Using the get_value_rule_set_with_http_info variant
|
|
572
|
+
|
|
573
|
+
This returns an Array which contains the response data, status code and headers.
|
|
574
|
+
|
|
575
|
+
> <Array(<GetValueRuleSet200Response>, Integer, Hash)> get_value_rule_set_with_http_info(value_rule_set_id, account_id)
|
|
576
|
+
|
|
577
|
+
```ruby
|
|
578
|
+
begin
|
|
579
|
+
# Read a value rule set
|
|
580
|
+
data, status_code, headers = api_instance.get_value_rule_set_with_http_info(value_rule_set_id, account_id)
|
|
581
|
+
p status_code # => 2xx
|
|
582
|
+
p headers # => { ... }
|
|
583
|
+
p data # => <GetValueRuleSet200Response>
|
|
584
|
+
rescue Zernio::ApiError => e
|
|
585
|
+
puts "Error when calling AdAccountsApi->get_value_rule_set_with_http_info: #{e}"
|
|
586
|
+
end
|
|
587
|
+
```
|
|
588
|
+
|
|
589
|
+
### Parameters
|
|
590
|
+
|
|
591
|
+
| Name | Type | Description | Notes |
|
|
592
|
+
| ---- | ---- | ----------- | ----- |
|
|
593
|
+
| **value_rule_set_id** | **String** | Platform value rule set id. | |
|
|
594
|
+
| **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
|
|
595
|
+
|
|
596
|
+
### Return type
|
|
597
|
+
|
|
598
|
+
[**GetValueRuleSet200Response**](GetValueRuleSet200Response.md)
|
|
599
|
+
|
|
600
|
+
### Authorization
|
|
601
|
+
|
|
602
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
603
|
+
|
|
604
|
+
### HTTP request headers
|
|
605
|
+
|
|
606
|
+
- **Content-Type**: Not defined
|
|
607
|
+
- **Accept**: application/json
|
|
608
|
+
|
|
609
|
+
|
|
394
610
|
## list_ad_accounts
|
|
395
611
|
|
|
396
612
|
> <ListAdAccounts200Response> list_ad_accounts(account_id, opts)
|
|
@@ -845,6 +1061,83 @@ end
|
|
|
845
1061
|
- **Accept**: application/json
|
|
846
1062
|
|
|
847
1063
|
|
|
1064
|
+
## list_value_rule_sets
|
|
1065
|
+
|
|
1066
|
+
> <ListValueRuleSets200Response> list_value_rule_sets(account_id, ad_account_id, opts)
|
|
1067
|
+
|
|
1068
|
+
List value rule sets
|
|
1069
|
+
|
|
1070
|
+
Lists the ad account's value rule sets (Meta's `/act_X/value_rule_set`). A value rule set adjusts the auction bid up or down for audience segments you value differently; attach one to an ad set with `valueRuleSetId` on `POST /v1/ads/create` or `PUT /v1/ads/ad-sets/{adSetId}`. Rows are returned in the same camelCase shape the `PUT` body takes, ids included, so a set round-trips 1:1: **the update is a full replace, not a patch**, so you GET, mutate and send the whole thing back. Limits: 6 rule sets per ad account, 10 rules per set, 4 criteria per rule. **Rule order is semantic.** Rules are evaluated in array order and only the FIRST matching rule adjusts the bid for an overlapping audience. The order you send is the order that is stored and returned. Eligibility: value rule sets apply only to ad sets on the `LOWEST_COST_WITHOUT_CAP` (auto-bid) or `COST_CAP` bid strategies. Meta rejects the rest server-side.
|
|
1071
|
+
|
|
1072
|
+
### Examples
|
|
1073
|
+
|
|
1074
|
+
```ruby
|
|
1075
|
+
require 'time'
|
|
1076
|
+
require 'zernio-sdk'
|
|
1077
|
+
# setup authorization
|
|
1078
|
+
Zernio.configure do |config|
|
|
1079
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
1080
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1081
|
+
end
|
|
1082
|
+
|
|
1083
|
+
api_instance = Zernio::AdAccountsApi.new
|
|
1084
|
+
account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
1085
|
+
ad_account_id = 'ad_account_id_example' # String | Meta ad account id (act_<n>).
|
|
1086
|
+
opts = {
|
|
1087
|
+
limit: 56, # Integer | Rows per page
|
|
1088
|
+
after: 'after_example' # String | Cursor from paging.after of the previous page. Meta does not document paging on this edge; `after` comes back null when it omits cursors.
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
begin
|
|
1092
|
+
# List value rule sets
|
|
1093
|
+
result = api_instance.list_value_rule_sets(account_id, ad_account_id, opts)
|
|
1094
|
+
p result
|
|
1095
|
+
rescue Zernio::ApiError => e
|
|
1096
|
+
puts "Error when calling AdAccountsApi->list_value_rule_sets: #{e}"
|
|
1097
|
+
end
|
|
1098
|
+
```
|
|
1099
|
+
|
|
1100
|
+
#### Using the list_value_rule_sets_with_http_info variant
|
|
1101
|
+
|
|
1102
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1103
|
+
|
|
1104
|
+
> <Array(<ListValueRuleSets200Response>, Integer, Hash)> list_value_rule_sets_with_http_info(account_id, ad_account_id, opts)
|
|
1105
|
+
|
|
1106
|
+
```ruby
|
|
1107
|
+
begin
|
|
1108
|
+
# List value rule sets
|
|
1109
|
+
data, status_code, headers = api_instance.list_value_rule_sets_with_http_info(account_id, ad_account_id, opts)
|
|
1110
|
+
p status_code # => 2xx
|
|
1111
|
+
p headers # => { ... }
|
|
1112
|
+
p data # => <ListValueRuleSets200Response>
|
|
1113
|
+
rescue Zernio::ApiError => e
|
|
1114
|
+
puts "Error when calling AdAccountsApi->list_value_rule_sets_with_http_info: #{e}"
|
|
1115
|
+
end
|
|
1116
|
+
```
|
|
1117
|
+
|
|
1118
|
+
### Parameters
|
|
1119
|
+
|
|
1120
|
+
| Name | Type | Description | Notes |
|
|
1121
|
+
| ---- | ---- | ----------- | ----- |
|
|
1122
|
+
| **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
|
|
1123
|
+
| **ad_account_id** | **String** | Meta ad account id (act_<n>). | |
|
|
1124
|
+
| **limit** | **Integer** | Rows per page | [optional][default to 25] |
|
|
1125
|
+
| **after** | **String** | Cursor from paging.after of the previous page. Meta does not document paging on this edge; `after` comes back null when it omits cursors. | [optional] |
|
|
1126
|
+
|
|
1127
|
+
### Return type
|
|
1128
|
+
|
|
1129
|
+
[**ListValueRuleSets200Response**](ListValueRuleSets200Response.md)
|
|
1130
|
+
|
|
1131
|
+
### Authorization
|
|
1132
|
+
|
|
1133
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
1134
|
+
|
|
1135
|
+
### HTTP request headers
|
|
1136
|
+
|
|
1137
|
+
- **Content-Type**: Not defined
|
|
1138
|
+
- **Accept**: application/json
|
|
1139
|
+
|
|
1140
|
+
|
|
848
1141
|
## update_ad_account
|
|
849
1142
|
|
|
850
1143
|
> <UpdateAdAccount200Response> update_ad_account(update_ad_account_request)
|
|
@@ -913,3 +1206,74 @@ end
|
|
|
913
1206
|
- **Content-Type**: application/json
|
|
914
1207
|
- **Accept**: application/json
|
|
915
1208
|
|
|
1209
|
+
|
|
1210
|
+
## update_value_rule_set
|
|
1211
|
+
|
|
1212
|
+
> <UpdateValueRuleSet200Response> update_value_rule_set(value_rule_set_id, update_value_rule_set_request)
|
|
1213
|
+
|
|
1214
|
+
Replace a value rule set
|
|
1215
|
+
|
|
1216
|
+
**THIS IS A FULL REPLACE, NOT A PATCH.** Meta's update is declarative: the body you send becomes the rule set. - `GET /v1/ads/value-rule-sets/{valueRuleSetId}` FIRST. - Keep a rule or criterion by echoing its `id`. - Create one by including the object WITHOUT an `id`. - Delete one by OMITTING it from the array. There is no warning and no undo. `name` and `rules` are both required for exactly this reason: a partial body would silently destroy every rule left out. **Rule order is semantic**: the array order you send is the evaluation order, and only the first matching rule adjusts the bid for an overlapping audience. Existing rule sets created elsewhere may contain `LOCATION_DMA` criteria. Those went inert on 2026-06-22 and are rejected here; migrate them to `LOCATION_COMSCORE_MARKET`.
|
|
1217
|
+
|
|
1218
|
+
### Examples
|
|
1219
|
+
|
|
1220
|
+
```ruby
|
|
1221
|
+
require 'time'
|
|
1222
|
+
require 'zernio-sdk'
|
|
1223
|
+
# setup authorization
|
|
1224
|
+
Zernio.configure do |config|
|
|
1225
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
1226
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1227
|
+
end
|
|
1228
|
+
|
|
1229
|
+
api_instance = Zernio::AdAccountsApi.new
|
|
1230
|
+
value_rule_set_id = 'value_rule_set_id_example' # String | Platform value rule set id.
|
|
1231
|
+
update_value_rule_set_request = Zernio::UpdateValueRuleSetRequest.new({account_id: 'account_id_example', name: 'name_example', rules: [Zernio::ValueRule.new({name: 'name_example', adjust_sign: 'INCREASE', adjust_value: 37, criteria: [Zernio::ValueRuleCriterion.new({criteria_type: 'AGE', operator: 'CONTAINS', criteria_values: ['criteria_values_example'], criteria_value_types: ['criteria_value_types_example']})]})]}) # UpdateValueRuleSetRequest |
|
|
1232
|
+
|
|
1233
|
+
begin
|
|
1234
|
+
# Replace a value rule set
|
|
1235
|
+
result = api_instance.update_value_rule_set(value_rule_set_id, update_value_rule_set_request)
|
|
1236
|
+
p result
|
|
1237
|
+
rescue Zernio::ApiError => e
|
|
1238
|
+
puts "Error when calling AdAccountsApi->update_value_rule_set: #{e}"
|
|
1239
|
+
end
|
|
1240
|
+
```
|
|
1241
|
+
|
|
1242
|
+
#### Using the update_value_rule_set_with_http_info variant
|
|
1243
|
+
|
|
1244
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1245
|
+
|
|
1246
|
+
> <Array(<UpdateValueRuleSet200Response>, Integer, Hash)> update_value_rule_set_with_http_info(value_rule_set_id, update_value_rule_set_request)
|
|
1247
|
+
|
|
1248
|
+
```ruby
|
|
1249
|
+
begin
|
|
1250
|
+
# Replace a value rule set
|
|
1251
|
+
data, status_code, headers = api_instance.update_value_rule_set_with_http_info(value_rule_set_id, update_value_rule_set_request)
|
|
1252
|
+
p status_code # => 2xx
|
|
1253
|
+
p headers # => { ... }
|
|
1254
|
+
p data # => <UpdateValueRuleSet200Response>
|
|
1255
|
+
rescue Zernio::ApiError => e
|
|
1256
|
+
puts "Error when calling AdAccountsApi->update_value_rule_set_with_http_info: #{e}"
|
|
1257
|
+
end
|
|
1258
|
+
```
|
|
1259
|
+
|
|
1260
|
+
### Parameters
|
|
1261
|
+
|
|
1262
|
+
| Name | Type | Description | Notes |
|
|
1263
|
+
| ---- | ---- | ----------- | ----- |
|
|
1264
|
+
| **value_rule_set_id** | **String** | Platform value rule set id. | |
|
|
1265
|
+
| **update_value_rule_set_request** | [**UpdateValueRuleSetRequest**](UpdateValueRuleSetRequest.md) | | |
|
|
1266
|
+
|
|
1267
|
+
### Return type
|
|
1268
|
+
|
|
1269
|
+
[**UpdateValueRuleSet200Response**](UpdateValueRuleSet200Response.md)
|
|
1270
|
+
|
|
1271
|
+
### Authorization
|
|
1272
|
+
|
|
1273
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
1274
|
+
|
|
1275
|
+
### HTTP request headers
|
|
1276
|
+
|
|
1277
|
+
- **Content-Type**: application/json
|
|
1278
|
+
- **Accept**: application/json
|
|
1279
|
+
|
data/docs/AdCampaignsApi.md
CHANGED
|
@@ -1501,7 +1501,7 @@ end
|
|
|
1501
1501
|
|
|
1502
1502
|
Update an ad set
|
|
1503
1503
|
|
|
1504
|
-
Ad-set-level writes. Use this for ABO budget updates, ad-set-scoped pause/resume, bid-strategy edits, and Meta-only post-launch delivery settings via `platformSpecificData`. At least one updatable field is required. Bid strategy compatibility (per Meta's spec): - `LOWEST_COST_WITHOUT_CAP`: no `bidAmount`, no `roasAverageFloor`. - `LOWEST_COST_WITH_BID_CAP` / `COST_CAP`: `bidAmount` REQUIRED (whole currency units). - `LOWEST_COST_WITH_MIN_ROAS`: `roasAverageFloor` REQUIRED (decimal multiplier, e.g. 2.0 = 2.0x ROAS). Delivery settings are validated by Meta against the campaign objective; incompatible combinations (e.g. a billingEvent the optimization goal doesn't allow) surface as 400s from Meta. When updating `budget` on an ABO campaign: if the parent campaign is CBO, the response is 409 with code BUDGET_LEVEL_MISMATCH — route to PUT /v1/ads/campaigns/{campaignId} instead.
|
|
1504
|
+
Ad-set-level writes. Use this for ABO budget updates, ad-set-scoped pause/resume, bid-strategy edits, Meta value-rule-set attach/detach, and Meta-only post-launch delivery settings via `platformSpecificData`. At least one updatable field is required. Value rule sets (Meta only, see `/v1/ads/value-rule-sets`): - ATTACH or REPLACE: send `valueRuleSetId`. Attachment is driven by the id's presence, so `valueRulesApplied: true` is optional. Sending a different id replaces the previous association; there is no separate replace call. - DETACH: send `valueRulesApplied: false` and OMIT `valueRuleSetId`. - Sending `valueRulesApplied: false` TOGETHER with `valueRuleSetId` returns 400 `mutually_exclusive_fields`. This is deliberate: Meta attaches the rule set whenever `value_rule_set_id` is present, even with `value_rules_applied` false, so echoing stored state while asking to detach would silently keep the bid adjustments live. - Eligibility: only ad sets on `LOWEST_COST_WITHOUT_CAP` or `COST_CAP`. Meta rejects the rest server-side. - Read back with `GET /v1/ads/ad-sets/{adSetId}?fields=value_rule_set_id`. Meta does not document `value_rules_applied` as a readable ad-set field, so the boolean cannot be read back. Bid strategy compatibility (per Meta's spec): - `LOWEST_COST_WITHOUT_CAP`: no `bidAmount`, no `roasAverageFloor`. - `LOWEST_COST_WITH_BID_CAP` / `COST_CAP`: `bidAmount` REQUIRED (whole currency units). - `LOWEST_COST_WITH_MIN_ROAS`: `roasAverageFloor` REQUIRED (decimal multiplier, e.g. 2.0 = 2.0x ROAS). Delivery settings are validated by Meta against the campaign objective; incompatible combinations (e.g. a billingEvent the optimization goal doesn't allow) surface as 400s from Meta. When updating `budget` on an ABO campaign: if the parent campaign is CBO, the response is 409 with code BUDGET_LEVEL_MISMATCH — route to PUT /v1/ads/campaigns/{campaignId} instead.
|
|
1505
1505
|
|
|
1506
1506
|
### Examples
|
|
1507
1507
|
|
|
@@ -77,6 +77,8 @@
|
|
|
77
77
|
| **bid_strategy** | [**BidStrategy**](BidStrategy.md) | Meta bid strategy applied to the ad set. | [optional] |
|
|
78
78
|
| **bid_amount** | **Float** | Bid cap in WHOLE currency units (USD: 5 = $5.00; JPY: 100 = ¥100). Required when `bidStrategy` is `LOWEST_COST_WITH_BID_CAP` or `COST_CAP`. | [optional] |
|
|
79
79
|
| **roas_average_floor** | **Float** | Minimum ROAS as a decimal multiplier (e.g. 2.0 = 2.0x ROAS). Required when `bidStrategy` is `LOWEST_COST_WITH_MIN_ROAS`. Sent to Meta as `bid_constraints.roas_average_floor` × 10000. | [optional] |
|
|
80
|
+
| **value_rule_set_id** | **String** | Meta only (facebook, instagram; other platforms return 400). Value rule set to attach to the new ad set, from `/v1/ads/value-rule-sets`. Attachment is driven by this id, so `valueRulesApplied` is optional alongside it. Rejected with 400 in `adSetId` attach mode: that shape inherits the existing ad set's attachment, so the field would be silently ignored. Use `PUT /v1/ads/ad-sets/{adSetId}` there instead. Ignored (stripped before the ad-set create) when `buyingType` is `RESERVED`: value rules only apply to auction ad sets on `LOWEST_COST_WITHOUT_CAP` or `COST_CAP`, and a Reach & Frequency reservation has no auction bid strategy. Read back with `GET /v1/ads/ad-sets/{adSetId}?fields=value_rule_set_id`; the attachment is not mirrored onto Zernio's ad documents. | [optional] |
|
|
81
|
+
| **value_rules_applied** | **Boolean** | Meta only (facebook, instagram; other platforms return 400). Optional when attaching, and requires `valueRuleSetId`. `false` is REJECTED here with 400: a newly created ad set has nothing to detach, so detaching lives on `PUT /v1/ads/ad-sets/{adSetId}`. | [optional] |
|
|
80
82
|
| **platform_specific_data** | [**LinkedInAdsPlatformData**](LinkedInAdsPlatformData.md) | | [optional] |
|
|
81
83
|
| **dsa_beneficiary** | **String** | Legal entity that benefits from the ad. Required when targeting EU users (EU DSA, Article 26). Optional if the ad account has a default beneficiary: set it once via `PATCH /v1/ads/accounts` or in Meta Ads Manager, and Meta fills it in whenever the field is omitted. | [optional] |
|
|
82
84
|
| **dsa_payor** | **String** | Legal entity that pays for the ad. Can differ from `dsaBeneficiary` (for example, an agency paying for a client's ads). Same rules as `dsaBeneficiary`: required for EU targeting unless the ad account has a default payor. | [optional] |
|
|
@@ -163,6 +165,8 @@ instance = Zernio::CreateStandaloneAdRequest.new(
|
|
|
163
165
|
bid_strategy: null,
|
|
164
166
|
bid_amount: null,
|
|
165
167
|
roas_average_floor: null,
|
|
168
|
+
value_rule_set_id: null,
|
|
169
|
+
value_rules_applied: null,
|
|
166
170
|
platform_specific_data: null,
|
|
167
171
|
dsa_beneficiary: null,
|
|
168
172
|
dsa_payor: null,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::CreateValueRuleSet201Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | | [optional] |
|
|
8
|
+
| **value_rule_set_id** | **String** | The new rule set id. Meta does not document the create response body, so this is null on the (unobserved) case where it omits the id. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::CreateValueRuleSet201Response.new(
|
|
16
|
+
ad_account_id: null,
|
|
17
|
+
value_rule_set_id: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::CreateValueRuleSetRequest
|
|
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
|
+
| **rules** | [**Array<ValueRule>**](ValueRule.md) | Evaluated in order; the first matching rule wins. | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::CreateValueRuleSetRequest.new(
|
|
18
|
+
account_id: null,
|
|
19
|
+
ad_account_id: null,
|
|
20
|
+
name: null,
|
|
21
|
+
rules: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::DeleteValueRuleSet200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **value_rule_set_id** | **String** | | [optional] |
|
|
8
|
+
| **message** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::DeleteValueRuleSet200Response.new(
|
|
16
|
+
value_rule_set_id: null,
|
|
17
|
+
message: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::GetValueRuleSet200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **value_rule_set** | [**ValueRuleSet**](ValueRuleSet.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::GetValueRuleSet200Response.new(
|
|
15
|
+
value_rule_set: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::ListValueRuleSets200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | | [optional] |
|
|
8
|
+
| **data** | [**Array<ValueRuleSet>**](ValueRuleSet.md) | | [optional] |
|
|
9
|
+
| **paging** | [**ListValueRuleSets200ResponsePaging**](ListValueRuleSets200ResponsePaging.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::ListValueRuleSets200Response.new(
|
|
17
|
+
ad_account_id: null,
|
|
18
|
+
data: null,
|
|
19
|
+
paging: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::ListValueRuleSets200ResponsePaging
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **after** | **String** | Cursor for the next page; null when exhausted or when Meta omits paging. | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::ListValueRuleSets200ResponsePaging.new(
|
|
15
|
+
after: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|