late-sdk 0.0.657 → 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.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -0
  3. data/docs/AdAccountsApi.md +364 -0
  4. data/docs/AdCampaignsApi.md +3 -3
  5. data/docs/AdDailyMetrics.md +1 -1
  6. data/docs/AdMetrics.md +1 -1
  7. data/docs/CreateStandaloneAdRequest.md +4 -0
  8. data/docs/CreateValueRuleSet201Response.md +20 -0
  9. data/docs/CreateValueRuleSetRequest.md +24 -0
  10. data/docs/DeleteValueRuleSet200Response.md +20 -0
  11. data/docs/GetCampaignAnalytics200ResponseAnalyticsDailyInner.md +1 -1
  12. data/docs/GetValueRuleSet200Response.md +18 -0
  13. data/docs/ListValueRuleSets200Response.md +22 -0
  14. data/docs/ListValueRuleSets200ResponsePaging.md +18 -0
  15. data/docs/UpdateAdSetRequest.md +4 -0
  16. data/docs/UpdateValueRuleSet200Response.md +24 -0
  17. data/docs/UpdateValueRuleSetRequest.md +22 -0
  18. data/docs/ValueRule.md +28 -0
  19. data/docs/ValueRuleCriterion.md +26 -0
  20. data/docs/ValueRuleSet.md +22 -0
  21. data/lib/zernio-sdk/api/ad_accounts_api.rb +367 -0
  22. data/lib/zernio-sdk/api/ad_campaigns_api.rb +4 -4
  23. data/lib/zernio-sdk/models/ad_daily_metrics.rb +2 -2
  24. data/lib/zernio-sdk/models/ad_metrics.rb +1 -1
  25. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +42 -1
  26. data/lib/zernio-sdk/models/create_value_rule_set201_response.rb +158 -0
  27. data/lib/zernio-sdk/models/create_value_rule_set_request.rb +283 -0
  28. data/lib/zernio-sdk/models/delete_value_rule_set200_response.rb +156 -0
  29. data/lib/zernio-sdk/models/get_campaign_analytics200_response_analytics_daily_inner.rb +1 -1
  30. data/lib/zernio-sdk/models/get_value_rule_set200_response.rb +147 -0
  31. data/lib/zernio-sdk/models/list_value_rule_sets200_response.rb +167 -0
  32. data/lib/zernio-sdk/models/list_value_rule_sets200_response_paging.rb +149 -0
  33. data/lib/zernio-sdk/models/update_ad_set_request.rb +42 -1
  34. data/lib/zernio-sdk/models/update_value_rule_set200_response.rb +176 -0
  35. data/lib/zernio-sdk/models/update_value_rule_set_request.rb +257 -0
  36. data/lib/zernio-sdk/models/value_rule.rb +346 -0
  37. data/lib/zernio-sdk/models/value_rule_criterion.rb +305 -0
  38. data/lib/zernio-sdk/models/value_rule_set.rb +221 -0
  39. data/lib/zernio-sdk/version.rb +1 -1
  40. data/lib/zernio-sdk.rb +11 -0
  41. data/openapi.yaml +400 -8
  42. data/spec/api/ad_accounts_api_spec.rb +66 -0
  43. data/spec/api/ad_campaigns_api_spec.rb +2 -2
  44. data/spec/models/create_standalone_ad_request_spec.rb +12 -0
  45. data/spec/models/create_value_rule_set201_response_spec.rb +42 -0
  46. data/spec/models/create_value_rule_set_request_spec.rb +54 -0
  47. data/spec/models/delete_value_rule_set200_response_spec.rb +42 -0
  48. data/spec/models/get_value_rule_set200_response_spec.rb +36 -0
  49. data/spec/models/list_value_rule_sets200_response_paging_spec.rb +36 -0
  50. data/spec/models/list_value_rule_sets200_response_spec.rb +48 -0
  51. data/spec/models/update_ad_set_request_spec.rb +12 -0
  52. data/spec/models/update_value_rule_set200_response_spec.rb +54 -0
  53. data/spec/models/update_value_rule_set_request_spec.rb +48 -0
  54. data/spec/models/value_rule_criterion_spec.rb +68 -0
  55. data/spec/models/value_rule_set_spec.rb +48 -0
  56. data/spec/models/value_rule_spec.rb +70 -0
  57. data/zernio-sdk-0.0.659.gem +0 -0
  58. metadata +47 -3
  59. data/zernio-sdk-0.0.657.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96ce6b63a1b7202495bf2383619b20407f403fc204a855bbc53319ee637edb23
4
- data.tar.gz: 869288d3c0b0becacb04679b5bf628e495a6450fbf5c55aeebe9d9e674ba6685
3
+ metadata.gz: 3f6fa769ddf9f9d76e8216b95653006ebdc22ec2e6139898b00b4baac9e7ed3d
4
+ data.tar.gz: b4d07220726fdd3525182b83538ccaeea64c251bf9d5f88d5f23ea451f857f0f
5
5
  SHA512:
6
- metadata.gz: 117e8293866e05b24b1a5c81d22c2f57351810ea6dcf6bdfa7a0b1f9b35b76ed5bb7741757edf66a73de59d5ac12e728d8b3bd1262499c84b765ce604d82b0fc
7
- data.tar.gz: 0a616b9922f714f71a02f4329e6ca1d192c6a7c0f295115391fb5ab94e11f7fdcadef03a776203f621c275bad79d6069b800f6511a1225dbb7e81f9e90e41121
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)
@@ -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_&lt;n&gt;). | |
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; &#x60;after&#x60; 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
+
@@ -855,7 +855,7 @@ opts = {
855
855
  from_date: Date.parse('2013-10-20'), # Date | Start of the METRICS date range (YYYY-MM-DD). Affects only the spend/impression numbers overlaid on each node, NOT which campaigns are returned. Defaults to 90 days ago.
856
856
  to_date: Date.parse('2013-10-20'), # Date | End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
857
857
  sort: 'newest', # String | Campaign-level sort order. `newest` (default) / `oldest` order by the campaign's newest-ad createdAt. `spend_desc` / `spend_asc` order by aggregated spend in the requested date range; campaigns with no spend land at the end.
858
- time_increment: 1, # Integer | Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except Meta `reach`: the range total is Meta's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
858
+ time_increment: 1, # Integer | Set to `1` to also return a daily breakdown. Mirrors Meta Insights' `time_increment=1`: each node gains a `daily[]` array of per-day metrics (same fields as the aggregated `metrics`) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only `1` (daily) is supported. The daily series covers the same date range and uses the same source data as `metrics`, except `reach` on Meta and TikTok: the range total is the platform's de-duplicated value, so daily reach does not sum to it. See `dailyLevel` to control which levels carry it.
859
859
  daily_level: 'campaign' # String | Which tree levels get the `daily[]` series when `timeIncrement=1`. `campaign` (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. `adset` adds it on ad sets too; `ad` adds it on every ad in `ads[]` as well (heaviest — a long range × up to 100 ads per ad set). Scope with `campaignId` to keep `ad`-level responses small. Ignored when `timeIncrement` is unset.
860
860
  }
861
861
 
@@ -903,7 +903,7 @@ end
903
903
  | **from_date** | **Date** | Start of the METRICS date range (YYYY-MM-DD). Affects only the spend/impression numbers overlaid on each node, NOT which campaigns are returned. Defaults to 90 days ago. | [optional] |
904
904
  | **to_date** | **Date** | End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range. | [optional] |
905
905
  | **sort** | **String** | Campaign-level sort order. &#x60;newest&#x60; (default) / &#x60;oldest&#x60; order by the campaign&#39;s newest-ad createdAt. &#x60;spend_desc&#x60; / &#x60;spend_asc&#x60; order by aggregated spend in the requested date range; campaigns with no spend land at the end. | [optional][default to &#39;newest&#39;] |
906
- | **time_increment** | **Integer** | Set to &#x60;1&#x60; to also return a daily breakdown. Mirrors Meta Insights&#39; &#x60;time_increment&#x3D;1&#x60;: each node gains a &#x60;daily[]&#x60; array of per-day metrics (same fields as the aggregated &#x60;metrics&#x60;) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only &#x60;1&#x60; (daily) is supported. The daily series covers the same date range and uses the same source data as &#x60;metrics&#x60;, except Meta &#x60;reach&#x60;: the range total is Meta&#39;s de-duplicated value, so daily reach does not sum to it. See &#x60;dailyLevel&#x60; to control which levels carry it. | [optional] |
906
+ | **time_increment** | **Integer** | Set to &#x60;1&#x60; to also return a daily breakdown. Mirrors Meta Insights&#39; &#x60;time_increment&#x3D;1&#x60;: each node gains a &#x60;daily[]&#x60; array of per-day metrics (same fields as the aggregated &#x60;metrics&#x60;) alongside the range total, so you get per-entity daily trends in ONE call instead of calling the tree once per day. Only &#x60;1&#x60; (daily) is supported. The daily series covers the same date range and uses the same source data as &#x60;metrics&#x60;, except &#x60;reach&#x60; on Meta and TikTok: the range total is the platform&#39;s de-duplicated value, so daily reach does not sum to it. See &#x60;dailyLevel&#x60; to control which levels carry it. | [optional] |
907
907
  | **daily_level** | **String** | Which tree levels get the &#x60;daily[]&#x60; series when &#x60;timeIncrement&#x3D;1&#x60;. &#x60;campaign&#x60; (default) attaches it on campaign nodes only — the common per-campaign-trend case, and the smallest payload. &#x60;adset&#x60; adds it on ad sets too; &#x60;ad&#x60; adds it on every ad in &#x60;ads[]&#x60; as well (heaviest — a long range × up to 100 ads per ad set). Scope with &#x60;campaignId&#x60; to keep &#x60;ad&#x60;-level responses small. Ignored when &#x60;timeIncrement&#x60; is unset. | [optional][default to &#39;campaign&#39;] |
908
908
 
909
909
  ### Return type
@@ -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
 
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **spend** | **Float** | | [optional] |
8
8
  | **impressions** | **Integer** | | [optional] |
9
- | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram): Meta&#39;s own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta. | [optional] |
9
+ | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram) and TikTok: the platform&#39;s own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient platform error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, reach is NOT additive on these platforms: neither daily values nor child nodes sum to the range total. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Frequency (impressions / reach) is only meaningful for Meta and TikTok. | [optional] |
10
10
  | **clicks** | **Integer** | | [optional] |
11
11
  | **ctr** | **Float** | Click-through rate (%) | [optional] |
12
12
  | **cpc** | **Float** | Cost per click | [optional] |
data/docs/AdMetrics.md CHANGED
@@ -6,7 +6,7 @@
6
6
  | ---- | ---- | ----------- | ----- |
7
7
  | **spend** | **Float** | | [optional] |
8
8
  | **impressions** | **Integer** | | [optional] |
9
- | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram): Meta&#39;s own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient Meta error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, Meta reach is NOT additive: neither daily values nor child nodes sum to the range total. TikTok: sum of per-day reach, so multi-day ranges overcount vs TikTok Ads Manager. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Only derive frequency (impressions / reach) for Meta. | [optional] |
9
+ | **reach** | **Integer** | Unique people reached in the requested date range. Meta (facebook/instagram) and TikTok: the platform&#39;s own de-duplicated reach for the exact range, fetched live and cached up to ~1 hour (may lag recent delivery; on a transient platform error the value temporarily falls back to a sum of per-day reach, which overcounts people reached on multiple days or by multiple child ads). Because it is de-duplicated, reach is NOT additive on these platforms: neither daily values nor child nodes sum to the range total. Google, LinkedIn, X, Pinterest and OpenAI report 0 (reach not synced). Frequency (impressions / reach) is only meaningful for Meta and TikTok. | [optional] |
10
10
  | **clicks** | **Integer** | | [optional] |
11
11
  | **ctr** | **Float** | Click-through rate (%) | [optional] |
12
12
  | **cpc** | **Float** | Cost per click | [optional] |
@@ -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 &#x3D; $5.00; JPY: 100 &#x3D; ¥100). Required when &#x60;bidStrategy&#x60; is &#x60;LOWEST_COST_WITH_BID_CAP&#x60; or &#x60;COST_CAP&#x60;. | [optional] |
79
79
  | **roas_average_floor** | **Float** | Minimum ROAS as a decimal multiplier (e.g. 2.0 &#x3D; 2.0x ROAS). Required when &#x60;bidStrategy&#x60; is &#x60;LOWEST_COST_WITH_MIN_ROAS&#x60;. Sent to Meta as &#x60;bid_constraints.roas_average_floor&#x60; × 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 &#x60;/v1/ads/value-rule-sets&#x60;. Attachment is driven by this id, so &#x60;valueRulesApplied&#x60; is optional alongside it. Rejected with 400 in &#x60;adSetId&#x60; attach mode: that shape inherits the existing ad set&#39;s attachment, so the field would be silently ignored. Use &#x60;PUT /v1/ads/ad-sets/{adSetId}&#x60; there instead. Ignored (stripped before the ad-set create) when &#x60;buyingType&#x60; is &#x60;RESERVED&#x60;: value rules only apply to auction ad sets on &#x60;LOWEST_COST_WITHOUT_CAP&#x60; or &#x60;COST_CAP&#x60;, and a Reach &amp; Frequency reservation has no auction bid strategy. Read back with &#x60;GET /v1/ads/ad-sets/{adSetId}?fields&#x3D;value_rule_set_id&#x60;; the attachment is not mirrored onto Zernio&#39;s ad documents. | [optional] |
81
+ | **value_rules_applied** | **Boolean** | Meta only (facebook, instagram; other platforms return 400). Optional when attaching, and requires &#x60;valueRuleSetId&#x60;. &#x60;false&#x60; is REJECTED here with 400: a newly created ad set has nothing to detach, so detaching lives on &#x60;PUT /v1/ads/ad-sets/{adSetId}&#x60;. | [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 &#x60;PATCH /v1/ads/accounts&#x60; 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 &#x60;dsaBeneficiary&#x60; (for example, an agency paying for a client&#39;s ads). Same rules as &#x60;dsaBeneficiary&#x60;: 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_&lt;n&gt;). | |
9
+ | **name** | **String** | | |
10
+ | **rules** | [**Array&lt;ValueRule&gt;**](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
+