zernio-sdk 0.0.531 → 0.0.532
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 +9 -0
- data/docs/AdsApi.md +287 -0
- data/docs/CreateRfPrediction201Response.md +22 -0
- data/docs/CreateRfPredictionRequest.md +34 -0
- data/docs/CreateStandaloneAdRequest.md +4 -0
- data/docs/ReserveRfPrediction201Response.md +20 -0
- data/docs/ReserveRfPredictionRequest.md +20 -0
- data/docs/RfPrediction.md +42 -0
- data/lib/zernio-sdk/api/ads_api.rb +294 -0
- data/lib/zernio-sdk/models/create_rf_prediction201_response.rb +165 -0
- data/lib/zernio-sdk/models/create_rf_prediction_request.rb +323 -0
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +33 -1
- data/lib/zernio-sdk/models/reserve_rf_prediction201_response.rb +156 -0
- data/lib/zernio-sdk/models/reserve_rf_prediction_request.rb +190 -0
- data/lib/zernio-sdk/models/rf_prediction.rb +273 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +5 -0
- data/openapi.yaml +150 -0
- data/spec/api/ads_api_spec.rb +52 -0
- data/spec/models/create_rf_prediction201_response_spec.rb +48 -0
- data/spec/models/create_rf_prediction_request_spec.rb +84 -0
- data/spec/models/create_standalone_ad_request_spec.rb +16 -0
- data/spec/models/reserve_rf_prediction201_response_spec.rb +42 -0
- data/spec/models/reserve_rf_prediction_request_spec.rb +42 -0
- data/spec/models/rf_prediction_spec.rb +108 -0
- metadata +21 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f5c7aae8aa0d4f6849a28e26a4d71c5074264026717d7b7a666e9e636170781e
|
|
4
|
+
data.tar.gz: 053dd32b6648528c8e4b2cb94c628288dd06335acce9f4fe08e57586ccb143fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70e1a5658a768a16184940231db1e86b53c137367242e296332283d73566a018c71ecd34d36b02c0efdebb3416a72cc792a438bd2a6b3506347dfaacc7c6423a
|
|
7
|
+
data.tar.gz: dc2c702ccf60d3420b39d02ede8806e452de4e9330071598190e67a663b6053fdd83c9bd4d88b584ee8dea45dab97b9a92ae9ff2d56813c0742ec0542f2f8571
|
data/README.md
CHANGED
|
@@ -111,12 +111,14 @@ Class | Method | HTTP request | Description
|
|
|
111
111
|
*Zernio::AdsApi* | [**adjust_conversions**](docs/AdsApi.md#adjust_conversions) | **POST** /v1/ads/conversions/adjustments | Adjust uploaded conversions
|
|
112
112
|
*Zernio::AdsApi* | [**archive_lead_form**](docs/AdsApi.md#archive_lead_form) | **DELETE** /v1/ads/lead-forms/{formId} | Archive a lead form
|
|
113
113
|
*Zernio::AdsApi* | [**boost_post**](docs/AdsApi.md#boost_post) | **POST** /v1/ads/boost | Boost post as ad
|
|
114
|
+
*Zernio::AdsApi* | [**cancel_rf_reservation**](docs/AdsApi.md#cancel_rf_reservation) | **DELETE** /v1/ads/rf-predictions/{predictionId} | Cancel a Reach & Frequency reservation (Meta)
|
|
114
115
|
*Zernio::AdsApi* | [**create_ad_insights_report**](docs/AdsApi.md#create_ad_insights_report) | **POST** /v1/ads/insights/reports | Submit an async insights report run (Meta)
|
|
115
116
|
*Zernio::AdsApi* | [**create_call_ad**](docs/AdsApi.md#create_call_ad) | **POST** /v1/ads/call | Create Click-to-Call ad
|
|
116
117
|
*Zernio::AdsApi* | [**create_conversion_destination**](docs/AdsApi.md#create_conversion_destination) | **POST** /v1/accounts/{accountId}/conversion-destinations | Create a conversion destination
|
|
117
118
|
*Zernio::AdsApi* | [**create_ctwa_ad**](docs/AdsApi.md#create_ctwa_ad) | **POST** /v1/ads/ctwa | Create Click-to-WhatsApp ad (deprecated)
|
|
118
119
|
*Zernio::AdsApi* | [**create_lead_form**](docs/AdsApi.md#create_lead_form) | **POST** /v1/ads/lead-forms | Create a lead form
|
|
119
120
|
*Zernio::AdsApi* | [**create_messaging_ad**](docs/AdsApi.md#create_messaging_ad) | **POST** /v1/ads/messaging | Create click-to-message ad (WhatsApp / Messenger / Instagram Direct)
|
|
121
|
+
*Zernio::AdsApi* | [**create_rf_prediction**](docs/AdsApi.md#create_rf_prediction) | **POST** /v1/ads/rf-predictions | Create a Reach & Frequency prediction (Meta)
|
|
120
122
|
*Zernio::AdsApi* | [**create_standalone_ad**](docs/AdsApi.md#create_standalone_ad) | **POST** /v1/ads/create | Create standalone ad
|
|
121
123
|
*Zernio::AdsApi* | [**create_test_lead**](docs/AdsApi.md#create_test_lead) | **POST** /v1/ads/lead-forms/{formId}/test-leads | Create a test lead
|
|
122
124
|
*Zernio::AdsApi* | [**delete_ad**](docs/AdsApi.md#delete_ad) | **DELETE** /v1/ads/{adId} | Cancel an ad
|
|
@@ -140,6 +142,7 @@ Class | Method | HTTP request | Description
|
|
|
140
142
|
*Zernio::AdsApi* | [**get_lead_form**](docs/AdsApi.md#get_lead_form) | **GET** /v1/ads/lead-forms/{formId} | Get a lead form
|
|
141
143
|
*Zernio::AdsApi* | [**get_linked_in_bid_pricing**](docs/AdsApi.md#get_linked_in_bid_pricing) | **POST** /v1/ads/targeting/bid-pricing | Suggested bid and budget bounds (LinkedIn)
|
|
142
144
|
*Zernio::AdsApi* | [**get_linked_in_supply_forecast**](docs/AdsApi.md#get_linked_in_supply_forecast) | **POST** /v1/ads/targeting/supply-forecast | Impressions, clicks and spend forecast (LinkedIn)
|
|
145
|
+
*Zernio::AdsApi* | [**get_rf_prediction**](docs/AdsApi.md#get_rf_prediction) | **GET** /v1/ads/rf-predictions/{predictionId} | Read a Reach & Frequency prediction (Meta)
|
|
143
146
|
*Zernio::AdsApi* | [**list_ad_accounts**](docs/AdsApi.md#list_ad_accounts) | **GET** /v1/ads/accounts | List ad accounts
|
|
144
147
|
*Zernio::AdsApi* | [**list_ad_catalog_product_sets**](docs/AdsApi.md#list_ad_catalog_product_sets) | **GET** /v1/ads/catalogs/{catalogId}/product-sets | List a catalog's product sets
|
|
145
148
|
*Zernio::AdsApi* | [**list_ad_catalogs**](docs/AdsApi.md#list_ad_catalogs) | **GET** /v1/ads/catalogs | List Meta product catalogs
|
|
@@ -154,6 +157,7 @@ Class | Method | HTTP request | Description
|
|
|
154
157
|
*Zernio::AdsApi* | [**list_whats_app_conversions**](docs/AdsApi.md#list_whats_app_conversions) | **GET** /v1/whatsapp/conversions | List conversion events
|
|
155
158
|
*Zernio::AdsApi* | [**query_ad_insights**](docs/AdsApi.md#query_ad_insights) | **GET** /v1/ads/insights | Flexible live insights query (Meta)
|
|
156
159
|
*Zernio::AdsApi* | [**remove_conversion_associations**](docs/AdsApi.md#remove_conversion_associations) | **DELETE** /v1/accounts/{accountId}/conversion-destinations/{destinationId}/associations | Remove associated campaigns
|
|
160
|
+
*Zernio::AdsApi* | [**reserve_rf_prediction**](docs/AdsApi.md#reserve_rf_prediction) | **POST** /v1/ads/rf-predictions/{predictionId}/reserve | Reserve a Reach & Frequency prediction (Meta)
|
|
157
161
|
*Zernio::AdsApi* | [**search_ad_interests**](docs/AdsApi.md#search_ad_interests) | **GET** /v1/ads/interests | Search targeting interests
|
|
158
162
|
*Zernio::AdsApi* | [**search_ad_targeting**](docs/AdsApi.md#search_ad_targeting) | **GET** /v1/ads/targeting/search | Search targeting options
|
|
159
163
|
*Zernio::AdsApi* | [**send_conversions**](docs/AdsApi.md#send_conversions) | **POST** /v1/ads/conversions | Send conversion events
|
|
@@ -770,6 +774,8 @@ Class | Method | HTTP request | Description
|
|
|
770
774
|
- [Zernio::CreateProfileRequest](docs/CreateProfileRequest.md)
|
|
771
775
|
- [Zernio::CreateQueueSlot201Response](docs/CreateQueueSlot201Response.md)
|
|
772
776
|
- [Zernio::CreateQueueSlotRequest](docs/CreateQueueSlotRequest.md)
|
|
777
|
+
- [Zernio::CreateRfPrediction201Response](docs/CreateRfPrediction201Response.md)
|
|
778
|
+
- [Zernio::CreateRfPredictionRequest](docs/CreateRfPredictionRequest.md)
|
|
773
779
|
- [Zernio::CreateSequence200Response](docs/CreateSequence200Response.md)
|
|
774
780
|
- [Zernio::CreateSequence200ResponseSequence](docs/CreateSequence200ResponseSequence.md)
|
|
775
781
|
- [Zernio::CreateSequenceRequest](docs/CreateSequenceRequest.md)
|
|
@@ -1521,6 +1527,8 @@ Class | Method | HTTP request | Description
|
|
|
1521
1527
|
- [Zernio::ReplyToMention200Response](docs/ReplyToMention200Response.md)
|
|
1522
1528
|
- [Zernio::ReplyToMentionRequest](docs/ReplyToMentionRequest.md)
|
|
1523
1529
|
- [Zernio::ResendSmsRegistrationOtp200Response](docs/ResendSmsRegistrationOtp200Response.md)
|
|
1530
|
+
- [Zernio::ReserveRfPrediction201Response](docs/ReserveRfPrediction201Response.md)
|
|
1531
|
+
- [Zernio::ReserveRfPredictionRequest](docs/ReserveRfPredictionRequest.md)
|
|
1524
1532
|
- [Zernio::RestoreWorkflowVersion200Response](docs/RestoreWorkflowVersion200Response.md)
|
|
1525
1533
|
- [Zernio::RestoreWorkflowVersion200ResponseWorkflow](docs/RestoreWorkflowVersion200ResponseWorkflow.md)
|
|
1526
1534
|
- [Zernio::RetweetPost200Response](docs/RetweetPost200Response.md)
|
|
@@ -1532,6 +1540,7 @@ Class | Method | HTTP request | Description
|
|
|
1532
1540
|
- [Zernio::ReviewWebhookReview](docs/ReviewWebhookReview.md)
|
|
1533
1541
|
- [Zernio::ReviewWebhookReviewReply](docs/ReviewWebhookReviewReply.md)
|
|
1534
1542
|
- [Zernio::ReviewWebhookReviewReviewer](docs/ReviewWebhookReviewReviewer.md)
|
|
1543
|
+
- [Zernio::RfPrediction](docs/RfPrediction.md)
|
|
1535
1544
|
- [Zernio::SavedTargetingAudience](docs/SavedTargetingAudience.md)
|
|
1536
1545
|
- [Zernio::ScheduleBroadcast200Response](docs/ScheduleBroadcast200Response.md)
|
|
1537
1546
|
- [Zernio::ScheduleBroadcast200ResponseBroadcast](docs/ScheduleBroadcast200ResponseBroadcast.md)
|
data/docs/AdsApi.md
CHANGED
|
@@ -8,12 +8,14 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
8
8
|
| [**adjust_conversions**](AdsApi.md#adjust_conversions) | **POST** /v1/ads/conversions/adjustments | Adjust uploaded conversions |
|
|
9
9
|
| [**archive_lead_form**](AdsApi.md#archive_lead_form) | **DELETE** /v1/ads/lead-forms/{formId} | Archive a lead form |
|
|
10
10
|
| [**boost_post**](AdsApi.md#boost_post) | **POST** /v1/ads/boost | Boost post as ad |
|
|
11
|
+
| [**cancel_rf_reservation**](AdsApi.md#cancel_rf_reservation) | **DELETE** /v1/ads/rf-predictions/{predictionId} | Cancel a Reach & Frequency reservation (Meta) |
|
|
11
12
|
| [**create_ad_insights_report**](AdsApi.md#create_ad_insights_report) | **POST** /v1/ads/insights/reports | Submit an async insights report run (Meta) |
|
|
12
13
|
| [**create_call_ad**](AdsApi.md#create_call_ad) | **POST** /v1/ads/call | Create Click-to-Call ad |
|
|
13
14
|
| [**create_conversion_destination**](AdsApi.md#create_conversion_destination) | **POST** /v1/accounts/{accountId}/conversion-destinations | Create a conversion destination |
|
|
14
15
|
| [**create_ctwa_ad**](AdsApi.md#create_ctwa_ad) | **POST** /v1/ads/ctwa | Create Click-to-WhatsApp ad (deprecated) |
|
|
15
16
|
| [**create_lead_form**](AdsApi.md#create_lead_form) | **POST** /v1/ads/lead-forms | Create a lead form |
|
|
16
17
|
| [**create_messaging_ad**](AdsApi.md#create_messaging_ad) | **POST** /v1/ads/messaging | Create click-to-message ad (WhatsApp / Messenger / Instagram Direct) |
|
|
18
|
+
| [**create_rf_prediction**](AdsApi.md#create_rf_prediction) | **POST** /v1/ads/rf-predictions | Create a Reach & Frequency prediction (Meta) |
|
|
17
19
|
| [**create_standalone_ad**](AdsApi.md#create_standalone_ad) | **POST** /v1/ads/create | Create standalone ad |
|
|
18
20
|
| [**create_test_lead**](AdsApi.md#create_test_lead) | **POST** /v1/ads/lead-forms/{formId}/test-leads | Create a test lead |
|
|
19
21
|
| [**delete_ad**](AdsApi.md#delete_ad) | **DELETE** /v1/ads/{adId} | Cancel an ad |
|
|
@@ -37,6 +39,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
37
39
|
| [**get_lead_form**](AdsApi.md#get_lead_form) | **GET** /v1/ads/lead-forms/{formId} | Get a lead form |
|
|
38
40
|
| [**get_linked_in_bid_pricing**](AdsApi.md#get_linked_in_bid_pricing) | **POST** /v1/ads/targeting/bid-pricing | Suggested bid and budget bounds (LinkedIn) |
|
|
39
41
|
| [**get_linked_in_supply_forecast**](AdsApi.md#get_linked_in_supply_forecast) | **POST** /v1/ads/targeting/supply-forecast | Impressions, clicks and spend forecast (LinkedIn) |
|
|
42
|
+
| [**get_rf_prediction**](AdsApi.md#get_rf_prediction) | **GET** /v1/ads/rf-predictions/{predictionId} | Read a Reach & Frequency prediction (Meta) |
|
|
40
43
|
| [**list_ad_accounts**](AdsApi.md#list_ad_accounts) | **GET** /v1/ads/accounts | List ad accounts |
|
|
41
44
|
| [**list_ad_catalog_product_sets**](AdsApi.md#list_ad_catalog_product_sets) | **GET** /v1/ads/catalogs/{catalogId}/product-sets | List a catalog's product sets |
|
|
42
45
|
| [**list_ad_catalogs**](AdsApi.md#list_ad_catalogs) | **GET** /v1/ads/catalogs | List Meta product catalogs |
|
|
@@ -51,6 +54,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
51
54
|
| [**list_whats_app_conversions**](AdsApi.md#list_whats_app_conversions) | **GET** /v1/whatsapp/conversions | List conversion events |
|
|
52
55
|
| [**query_ad_insights**](AdsApi.md#query_ad_insights) | **GET** /v1/ads/insights | Flexible live insights query (Meta) |
|
|
53
56
|
| [**remove_conversion_associations**](AdsApi.md#remove_conversion_associations) | **DELETE** /v1/accounts/{accountId}/conversion-destinations/{destinationId}/associations | Remove associated campaigns |
|
|
57
|
+
| [**reserve_rf_prediction**](AdsApi.md#reserve_rf_prediction) | **POST** /v1/ads/rf-predictions/{predictionId}/reserve | Reserve a Reach & Frequency prediction (Meta) |
|
|
54
58
|
| [**search_ad_interests**](AdsApi.md#search_ad_interests) | **GET** /v1/ads/interests | Search targeting interests |
|
|
55
59
|
| [**search_ad_targeting**](AdsApi.md#search_ad_targeting) | **GET** /v1/ads/targeting/search | Search targeting options |
|
|
56
60
|
| [**send_conversions**](AdsApi.md#send_conversions) | **POST** /v1/ads/conversions | Send conversion events |
|
|
@@ -345,6 +349,78 @@ end
|
|
|
345
349
|
- **Accept**: application/json
|
|
346
350
|
|
|
347
351
|
|
|
352
|
+
## cancel_rf_reservation
|
|
353
|
+
|
|
354
|
+
> cancel_rf_reservation(prediction_id, account_id, ad_account_id)
|
|
355
|
+
|
|
356
|
+
Cancel a Reach & Frequency reservation (Meta)
|
|
357
|
+
|
|
358
|
+
Releases a RESERVATION's locked price and inventory. Unreserved predictions expire on their own.
|
|
359
|
+
|
|
360
|
+
### Examples
|
|
361
|
+
|
|
362
|
+
```ruby
|
|
363
|
+
require 'time'
|
|
364
|
+
require 'zernio-sdk'
|
|
365
|
+
# setup authorization
|
|
366
|
+
Zernio.configure do |config|
|
|
367
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
368
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
api_instance = Zernio::AdsApi.new
|
|
372
|
+
prediction_id = 'prediction_id_example' # String |
|
|
373
|
+
account_id = 'account_id_example' # String |
|
|
374
|
+
ad_account_id = 'ad_account_id_example' # String |
|
|
375
|
+
|
|
376
|
+
begin
|
|
377
|
+
# Cancel a Reach & Frequency reservation (Meta)
|
|
378
|
+
api_instance.cancel_rf_reservation(prediction_id, account_id, ad_account_id)
|
|
379
|
+
rescue Zernio::ApiError => e
|
|
380
|
+
puts "Error when calling AdsApi->cancel_rf_reservation: #{e}"
|
|
381
|
+
end
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
#### Using the cancel_rf_reservation_with_http_info variant
|
|
385
|
+
|
|
386
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
387
|
+
|
|
388
|
+
> <Array(nil, Integer, Hash)> cancel_rf_reservation_with_http_info(prediction_id, account_id, ad_account_id)
|
|
389
|
+
|
|
390
|
+
```ruby
|
|
391
|
+
begin
|
|
392
|
+
# Cancel a Reach & Frequency reservation (Meta)
|
|
393
|
+
data, status_code, headers = api_instance.cancel_rf_reservation_with_http_info(prediction_id, account_id, ad_account_id)
|
|
394
|
+
p status_code # => 2xx
|
|
395
|
+
p headers # => { ... }
|
|
396
|
+
p data # => nil
|
|
397
|
+
rescue Zernio::ApiError => e
|
|
398
|
+
puts "Error when calling AdsApi->cancel_rf_reservation_with_http_info: #{e}"
|
|
399
|
+
end
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
### Parameters
|
|
403
|
+
|
|
404
|
+
| Name | Type | Description | Notes |
|
|
405
|
+
| ---- | ---- | ----------- | ----- |
|
|
406
|
+
| **prediction_id** | **String** | | |
|
|
407
|
+
| **account_id** | **String** | | |
|
|
408
|
+
| **ad_account_id** | **String** | | |
|
|
409
|
+
|
|
410
|
+
### Return type
|
|
411
|
+
|
|
412
|
+
nil (empty response body)
|
|
413
|
+
|
|
414
|
+
### Authorization
|
|
415
|
+
|
|
416
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
417
|
+
|
|
418
|
+
### HTTP request headers
|
|
419
|
+
|
|
420
|
+
- **Content-Type**: Not defined
|
|
421
|
+
- **Accept**: application/json
|
|
422
|
+
|
|
423
|
+
|
|
348
424
|
## create_ad_insights_report
|
|
349
425
|
|
|
350
426
|
> <CreateAdInsightsReport202Response> create_ad_insights_report(create_ad_insights_report_request)
|
|
@@ -759,6 +835,75 @@ nil (empty response body)
|
|
|
759
835
|
- **Accept**: application/json
|
|
760
836
|
|
|
761
837
|
|
|
838
|
+
## create_rf_prediction
|
|
839
|
+
|
|
840
|
+
> <CreateRfPrediction201Response> create_rf_prediction(create_rf_prediction_request)
|
|
841
|
+
|
|
842
|
+
Create a Reach & Frequency prediction (Meta)
|
|
843
|
+
|
|
844
|
+
Creates an R&F prediction — a QUOTE, nothing is bought and no ad entities are created. Provide a date range plus exactly one of `budgetAmount` (Meta predicts reach) or `reach` (Meta predicts the budget). The response carries the estimate and its allowed bounds (min/max budget and reach). Predictions expire on their own; to buy, reserve one via POST /v1/ads/rf-predictions/{predictionId}/reserve and pass the RESERVED id to POST /v1/ads/create with `buyingType: \"RESERVED\"`. Reservation campaigns reject automatic placements, so omitted `placements` default to Facebook feed (+ Instagram stream when a linked IG professional account resolves); Instagram placements require that IG account. Meta only.
|
|
845
|
+
|
|
846
|
+
### Examples
|
|
847
|
+
|
|
848
|
+
```ruby
|
|
849
|
+
require 'time'
|
|
850
|
+
require 'zernio-sdk'
|
|
851
|
+
# setup authorization
|
|
852
|
+
Zernio.configure do |config|
|
|
853
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
854
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
855
|
+
end
|
|
856
|
+
|
|
857
|
+
api_instance = Zernio::AdsApi.new
|
|
858
|
+
create_rf_prediction_request = Zernio::CreateRfPredictionRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', start_date: Time.now, end_date: Time.now}) # CreateRfPredictionRequest |
|
|
859
|
+
|
|
860
|
+
begin
|
|
861
|
+
# Create a Reach & Frequency prediction (Meta)
|
|
862
|
+
result = api_instance.create_rf_prediction(create_rf_prediction_request)
|
|
863
|
+
p result
|
|
864
|
+
rescue Zernio::ApiError => e
|
|
865
|
+
puts "Error when calling AdsApi->create_rf_prediction: #{e}"
|
|
866
|
+
end
|
|
867
|
+
```
|
|
868
|
+
|
|
869
|
+
#### Using the create_rf_prediction_with_http_info variant
|
|
870
|
+
|
|
871
|
+
This returns an Array which contains the response data, status code and headers.
|
|
872
|
+
|
|
873
|
+
> <Array(<CreateRfPrediction201Response>, Integer, Hash)> create_rf_prediction_with_http_info(create_rf_prediction_request)
|
|
874
|
+
|
|
875
|
+
```ruby
|
|
876
|
+
begin
|
|
877
|
+
# Create a Reach & Frequency prediction (Meta)
|
|
878
|
+
data, status_code, headers = api_instance.create_rf_prediction_with_http_info(create_rf_prediction_request)
|
|
879
|
+
p status_code # => 2xx
|
|
880
|
+
p headers # => { ... }
|
|
881
|
+
p data # => <CreateRfPrediction201Response>
|
|
882
|
+
rescue Zernio::ApiError => e
|
|
883
|
+
puts "Error when calling AdsApi->create_rf_prediction_with_http_info: #{e}"
|
|
884
|
+
end
|
|
885
|
+
```
|
|
886
|
+
|
|
887
|
+
### Parameters
|
|
888
|
+
|
|
889
|
+
| Name | Type | Description | Notes |
|
|
890
|
+
| ---- | ---- | ----------- | ----- |
|
|
891
|
+
| **create_rf_prediction_request** | [**CreateRfPredictionRequest**](CreateRfPredictionRequest.md) | | |
|
|
892
|
+
|
|
893
|
+
### Return type
|
|
894
|
+
|
|
895
|
+
[**CreateRfPrediction201Response**](CreateRfPrediction201Response.md)
|
|
896
|
+
|
|
897
|
+
### Authorization
|
|
898
|
+
|
|
899
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
900
|
+
|
|
901
|
+
### HTTP request headers
|
|
902
|
+
|
|
903
|
+
- **Content-Type**: application/json
|
|
904
|
+
- **Accept**: application/json
|
|
905
|
+
|
|
906
|
+
|
|
762
907
|
## create_standalone_ad
|
|
763
908
|
|
|
764
909
|
> <CreateStandaloneAd201Response> create_standalone_ad(create_standalone_ad_request, opts)
|
|
@@ -2433,6 +2578,77 @@ end
|
|
|
2433
2578
|
- **Accept**: application/json
|
|
2434
2579
|
|
|
2435
2580
|
|
|
2581
|
+
## get_rf_prediction
|
|
2582
|
+
|
|
2583
|
+
> <CreateRfPrediction201Response> get_rf_prediction(prediction_id, account_id, ad_account_id)
|
|
2584
|
+
|
|
2585
|
+
Read a Reach & Frequency prediction (Meta)
|
|
2586
|
+
|
|
2587
|
+
### Examples
|
|
2588
|
+
|
|
2589
|
+
```ruby
|
|
2590
|
+
require 'time'
|
|
2591
|
+
require 'zernio-sdk'
|
|
2592
|
+
# setup authorization
|
|
2593
|
+
Zernio.configure do |config|
|
|
2594
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
2595
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
2596
|
+
end
|
|
2597
|
+
|
|
2598
|
+
api_instance = Zernio::AdsApi.new
|
|
2599
|
+
prediction_id = 'prediction_id_example' # String |
|
|
2600
|
+
account_id = 'account_id_example' # String |
|
|
2601
|
+
ad_account_id = 'ad_account_id_example' # String |
|
|
2602
|
+
|
|
2603
|
+
begin
|
|
2604
|
+
# Read a Reach & Frequency prediction (Meta)
|
|
2605
|
+
result = api_instance.get_rf_prediction(prediction_id, account_id, ad_account_id)
|
|
2606
|
+
p result
|
|
2607
|
+
rescue Zernio::ApiError => e
|
|
2608
|
+
puts "Error when calling AdsApi->get_rf_prediction: #{e}"
|
|
2609
|
+
end
|
|
2610
|
+
```
|
|
2611
|
+
|
|
2612
|
+
#### Using the get_rf_prediction_with_http_info variant
|
|
2613
|
+
|
|
2614
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2615
|
+
|
|
2616
|
+
> <Array(<CreateRfPrediction201Response>, Integer, Hash)> get_rf_prediction_with_http_info(prediction_id, account_id, ad_account_id)
|
|
2617
|
+
|
|
2618
|
+
```ruby
|
|
2619
|
+
begin
|
|
2620
|
+
# Read a Reach & Frequency prediction (Meta)
|
|
2621
|
+
data, status_code, headers = api_instance.get_rf_prediction_with_http_info(prediction_id, account_id, ad_account_id)
|
|
2622
|
+
p status_code # => 2xx
|
|
2623
|
+
p headers # => { ... }
|
|
2624
|
+
p data # => <CreateRfPrediction201Response>
|
|
2625
|
+
rescue Zernio::ApiError => e
|
|
2626
|
+
puts "Error when calling AdsApi->get_rf_prediction_with_http_info: #{e}"
|
|
2627
|
+
end
|
|
2628
|
+
```
|
|
2629
|
+
|
|
2630
|
+
### Parameters
|
|
2631
|
+
|
|
2632
|
+
| Name | Type | Description | Notes |
|
|
2633
|
+
| ---- | ---- | ----------- | ----- |
|
|
2634
|
+
| **prediction_id** | **String** | | |
|
|
2635
|
+
| **account_id** | **String** | | |
|
|
2636
|
+
| **ad_account_id** | **String** | | |
|
|
2637
|
+
|
|
2638
|
+
### Return type
|
|
2639
|
+
|
|
2640
|
+
[**CreateRfPrediction201Response**](CreateRfPrediction201Response.md)
|
|
2641
|
+
|
|
2642
|
+
### Authorization
|
|
2643
|
+
|
|
2644
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
2645
|
+
|
|
2646
|
+
### HTTP request headers
|
|
2647
|
+
|
|
2648
|
+
- **Content-Type**: Not defined
|
|
2649
|
+
- **Accept**: application/json
|
|
2650
|
+
|
|
2651
|
+
|
|
2436
2652
|
## list_ad_accounts
|
|
2437
2653
|
|
|
2438
2654
|
> <ListAdAccounts200Response> list_ad_accounts(account_id, opts)
|
|
@@ -3519,6 +3735,77 @@ end
|
|
|
3519
3735
|
- **Accept**: application/json
|
|
3520
3736
|
|
|
3521
3737
|
|
|
3738
|
+
## reserve_rf_prediction
|
|
3739
|
+
|
|
3740
|
+
> <ReserveRfPrediction201Response> reserve_rf_prediction(prediction_id, reserve_rf_prediction_request)
|
|
3741
|
+
|
|
3742
|
+
Reserve a Reach & Frequency prediction (Meta)
|
|
3743
|
+
|
|
3744
|
+
Locks the quoted price + inventory until the returned `expiresAt` and mints a NEW prediction id — pass that RESERVED id (not the original) as `rfPredictionId` on POST /v1/ads/create. Release an unused reservation via DELETE. Meta only.
|
|
3745
|
+
|
|
3746
|
+
### Examples
|
|
3747
|
+
|
|
3748
|
+
```ruby
|
|
3749
|
+
require 'time'
|
|
3750
|
+
require 'zernio-sdk'
|
|
3751
|
+
# setup authorization
|
|
3752
|
+
Zernio.configure do |config|
|
|
3753
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
3754
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
3755
|
+
end
|
|
3756
|
+
|
|
3757
|
+
api_instance = Zernio::AdsApi.new
|
|
3758
|
+
prediction_id = 'prediction_id_example' # String |
|
|
3759
|
+
reserve_rf_prediction_request = Zernio::ReserveRfPredictionRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example'}) # ReserveRfPredictionRequest |
|
|
3760
|
+
|
|
3761
|
+
begin
|
|
3762
|
+
# Reserve a Reach & Frequency prediction (Meta)
|
|
3763
|
+
result = api_instance.reserve_rf_prediction(prediction_id, reserve_rf_prediction_request)
|
|
3764
|
+
p result
|
|
3765
|
+
rescue Zernio::ApiError => e
|
|
3766
|
+
puts "Error when calling AdsApi->reserve_rf_prediction: #{e}"
|
|
3767
|
+
end
|
|
3768
|
+
```
|
|
3769
|
+
|
|
3770
|
+
#### Using the reserve_rf_prediction_with_http_info variant
|
|
3771
|
+
|
|
3772
|
+
This returns an Array which contains the response data, status code and headers.
|
|
3773
|
+
|
|
3774
|
+
> <Array(<ReserveRfPrediction201Response>, Integer, Hash)> reserve_rf_prediction_with_http_info(prediction_id, reserve_rf_prediction_request)
|
|
3775
|
+
|
|
3776
|
+
```ruby
|
|
3777
|
+
begin
|
|
3778
|
+
# Reserve a Reach & Frequency prediction (Meta)
|
|
3779
|
+
data, status_code, headers = api_instance.reserve_rf_prediction_with_http_info(prediction_id, reserve_rf_prediction_request)
|
|
3780
|
+
p status_code # => 2xx
|
|
3781
|
+
p headers # => { ... }
|
|
3782
|
+
p data # => <ReserveRfPrediction201Response>
|
|
3783
|
+
rescue Zernio::ApiError => e
|
|
3784
|
+
puts "Error when calling AdsApi->reserve_rf_prediction_with_http_info: #{e}"
|
|
3785
|
+
end
|
|
3786
|
+
```
|
|
3787
|
+
|
|
3788
|
+
### Parameters
|
|
3789
|
+
|
|
3790
|
+
| Name | Type | Description | Notes |
|
|
3791
|
+
| ---- | ---- | ----------- | ----- |
|
|
3792
|
+
| **prediction_id** | **String** | | |
|
|
3793
|
+
| **reserve_rf_prediction_request** | [**ReserveRfPredictionRequest**](ReserveRfPredictionRequest.md) | | |
|
|
3794
|
+
|
|
3795
|
+
### Return type
|
|
3796
|
+
|
|
3797
|
+
[**ReserveRfPrediction201Response**](ReserveRfPrediction201Response.md)
|
|
3798
|
+
|
|
3799
|
+
### Authorization
|
|
3800
|
+
|
|
3801
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
3802
|
+
|
|
3803
|
+
### HTTP request headers
|
|
3804
|
+
|
|
3805
|
+
- **Content-Type**: application/json
|
|
3806
|
+
- **Accept**: application/json
|
|
3807
|
+
|
|
3808
|
+
|
|
3522
3809
|
## search_ad_interests
|
|
3523
3810
|
|
|
3524
3811
|
> <SearchAdInterests200Response> search_ad_interests(q, account_id)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::CreateRfPrediction201Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | | [optional] |
|
|
8
|
+
| **currency** | **String** | | [optional] |
|
|
9
|
+
| **prediction** | [**RfPrediction**](RfPrediction.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::CreateRfPrediction201Response.new(
|
|
17
|
+
ad_account_id: null,
|
|
18
|
+
currency: null,
|
|
19
|
+
prediction: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Zernio::CreateRfPredictionRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **account_id** | **String** | Zernio SocialAccount id (posting or ads variant). | |
|
|
8
|
+
| **ad_account_id** | **String** | Meta ad account id (act_<n>). | |
|
|
9
|
+
| **budget_amount** | **Float** | Whole currency units. Exactly one of budgetAmount / reach. | [optional] |
|
|
10
|
+
| **reach** | **Integer** | Target unique reach. Exactly one of budgetAmount / reach. | [optional] |
|
|
11
|
+
| **start_date** | **Time** | Campaign window start (must be in the future). | |
|
|
12
|
+
| **end_date** | **Time** | | |
|
|
13
|
+
| **frequency_cap** | **Integer** | Max impressions per person over the window. | [optional] |
|
|
14
|
+
| **targeting** | **Object** | Canonical camelCase TargetingSpec (same shape as /v1/ads/create's `targeting`). Defaults to countries: [US]. | [optional] |
|
|
15
|
+
| **placements** | **Object** | Meta placements object (same shape as /v1/ads/create's `placements`). | [optional] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'zernio-sdk'
|
|
21
|
+
|
|
22
|
+
instance = Zernio::CreateRfPredictionRequest.new(
|
|
23
|
+
account_id: null,
|
|
24
|
+
ad_account_id: null,
|
|
25
|
+
budget_amount: null,
|
|
26
|
+
reach: null,
|
|
27
|
+
start_date: null,
|
|
28
|
+
end_date: null,
|
|
29
|
+
frequency_cap: null,
|
|
30
|
+
targeting: null,
|
|
31
|
+
placements: null
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
| **goal** | **String** | Required on legacy and multi-creative shapes; the attach shape inherits it from the ad set. Available goals vary by platform. **Meta** - `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event such as PURCHASE or START_TRIAL. - `lead_conversion`: OUTCOME_LEADS optimizing website pixel leads. Same pixel and event fields, but with a leads-class event such as LEAD, SUBMIT_APPLICATION, SCHEDULE or CONTACT. Meta gates conversion events by objective, so leads-class events are rejected under `conversions`. - `lead_generation`: OUTCOME_LEADS with instant forms. Requires `leadGenFormId`. `promotedObject.pageId` is optional and auto-filled from the connected Page. - `app_promotion`: requires `promotedObject.applicationId` and `promotedObject.objectStoreUrl`. - `catalog_sales`: Advantage+ catalog ads, for example vehicle inventory. Requires `promotedObject.productSetId`, `promotedObject.pixelId` and `promotedObject.customEventType`. Builds a catalog TEMPLATE creative from the copy fields, which may carry template tags like {{product.name}} or {{vehicle.make}}. No imageUrl or video is sent; Meta renders the visuals per catalog item. Discover catalogs via GET /v1/ads/catalogs and product sets via GET /v1/ads/catalogs/{catalogId}/product-sets. Single shape only, no creatives[], adSetId, dynamicCreative or placementAssets. **TikTok** - `conversions`: website-conversion ad group. Requires `promotedObject.pixelId`, your TikTok Pixel ID. Accepts an optional `promotedObject.customEventType` with a TikTok optimization_event code your pixel tracks (newer pixels use e.g. SHOPPING for purchase events; legacy pixels use ON_WEB_ORDER, INITIATE_ORDER, ON_WEB_REGISTER or FORM). To inherit pixel and event from an existing ad group, pass `adSetId` instead. **LinkedIn** - `engagement`, `traffic`, `awareness` and `video_views` create standalone Direct Sponsored Content ads. `traffic` requires `linkUrl`; `video_views` requires `video`. - `job_applicants` requires a `platformSpecificData.jobs` creative. - For `lead_generation` or `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost. | [optional] |
|
|
15
15
|
| **optimization_goal** | **String** | Meta only. Explicit ad-set `optimization_goal` (e.g. `LANDING_PAGE_VIEWS`, `LINK_CLICKS`, `REACH`, `IMPRESSIONS`, `OFFSITE_CONVERSIONS`, `THRUPLAY`, `LEAD_GENERATION`). Overrides the default derived from `goal` (e.g. `traffic` defaults to `LINK_CLICKS`). Forwarded verbatim to Meta, which validates compatibility with the campaign objective and rejects incompatible combinations. | [optional] |
|
|
16
16
|
| **billing_event** | **String** | Meta only. Explicit ad-set `billing_event`. Defaults to `IMPRESSIONS`. Forwarded verbatim to Meta, which validates compatibility with the optimization goal. | [optional] |
|
|
17
|
+
| **buying_type** | **String** | Meta only. RESERVED = Reach & Frequency: requires `rfPredictionId` (a RESERVED prediction from /v1/ads/rf-predictions + /reserve). Budget, schedule and pricing come from the reservation, so budgetAmount/budgetType are not required and bid fields are ignored. Only the plain single-ad shape (no creatives[], adSetId, existingCampaignId or dynamicCreative). | [optional] |
|
|
18
|
+
| **rf_prediction_id** | **String** | Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id — pass that one). Requires buyingType RESERVED. | [optional] |
|
|
17
19
|
| **budget_amount** | **Float** | Required on legacy + multi-creative shapes. Inherited on attach. | [optional] |
|
|
18
20
|
| **budget_type** | **String** | Required on legacy + multi-creative shapes. Inherited on attach. | [optional] |
|
|
19
21
|
| **status** | **String** | Meta and TikTok. Publish state of the created entities. Omitted or ACTIVE publishes live (default, back-compat); PAUSED creates them paused and skips activation, so you can review before they spend. On TikTok the whole campaign > ad group > ad hierarchy stays paused. | [optional] |
|
|
@@ -93,6 +95,8 @@ instance = Zernio::CreateStandaloneAdRequest.new(
|
|
|
93
95
|
goal: null,
|
|
94
96
|
optimization_goal: null,
|
|
95
97
|
billing_event: null,
|
|
98
|
+
buying_type: null,
|
|
99
|
+
rf_prediction_id: null,
|
|
96
100
|
budget_amount: null,
|
|
97
101
|
budget_type: null,
|
|
98
102
|
status: null,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::ReserveRfPrediction201Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ad_account_id** | **String** | | [optional] |
|
|
8
|
+
| **prediction** | [**RfPrediction**](RfPrediction.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::ReserveRfPrediction201Response.new(
|
|
16
|
+
ad_account_id: null,
|
|
17
|
+
prediction: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::ReserveRfPredictionRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **account_id** | **String** | | |
|
|
8
|
+
| **ad_account_id** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::ReserveRfPredictionRequest.new(
|
|
16
|
+
account_id: null,
|
|
17
|
+
ad_account_id: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Zernio::RfPrediction
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **prediction_id** | **String** | | [optional] |
|
|
8
|
+
| **status** | **String** | ready | pending | failed:<meta code> | [optional] |
|
|
9
|
+
| **budget** | **Float** | Quoted (or provided) lifetime budget for the window. | [optional] |
|
|
10
|
+
| **reach** | **Integer** | Predicted (or requested) unique reach. | [optional] |
|
|
11
|
+
| **impressions** | **Integer** | | [optional] |
|
|
12
|
+
| **min_budget** | **Float** | Meta's allowed lower bound for this spec. | [optional] |
|
|
13
|
+
| **max_budget** | **Float** | | [optional] |
|
|
14
|
+
| **min_reach** | **Integer** | | [optional] |
|
|
15
|
+
| **max_reach** | **Integer** | | [optional] |
|
|
16
|
+
| **frequency_cap** | **Integer** | | [optional] |
|
|
17
|
+
| **start_time** | **Integer** | Unix seconds; the reserved window the R&F ad set will run on. | [optional] |
|
|
18
|
+
| **stop_time** | **Integer** | | [optional] |
|
|
19
|
+
| **expires_at** | **String** | When the reservation's locked price expires (set after reserving). | [optional] |
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
require 'zernio-sdk'
|
|
25
|
+
|
|
26
|
+
instance = Zernio::RfPrediction.new(
|
|
27
|
+
prediction_id: null,
|
|
28
|
+
status: null,
|
|
29
|
+
budget: null,
|
|
30
|
+
reach: null,
|
|
31
|
+
impressions: null,
|
|
32
|
+
min_budget: null,
|
|
33
|
+
max_budget: null,
|
|
34
|
+
min_reach: null,
|
|
35
|
+
max_reach: null,
|
|
36
|
+
frequency_cap: null,
|
|
37
|
+
start_time: null,
|
|
38
|
+
stop_time: null,
|
|
39
|
+
expires_at: null
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|