zernio-sdk 0.0.529 → 0.0.530

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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +19 -9
  3. data/docs/AdsApi.md +293 -11
  4. data/docs/CreateCallAdRequest.md +80 -0
  5. data/docs/CreateMessagingAdRequest.md +78 -0
  6. data/docs/{CreateCtwaAdRequest.md → CtwaAdRequestBody.md} +10 -10
  7. data/docs/{CreateCtwaAdRequestCitiesInner.md → CtwaAdRequestBodyCitiesInner.md} +2 -2
  8. data/docs/{CreateCtwaAdRequestCreativesInner.md → CtwaAdRequestBodyCreativesInner.md} +3 -3
  9. data/docs/{CreateCtwaAdRequestCreativesInnerVideo.md → CtwaAdRequestBodyCreativesInnerVideo.md} +2 -2
  10. data/docs/{CreateCtwaAdRequestPlacements.md → CtwaAdRequestBodyPlacements.md} +2 -2
  11. data/docs/{CreateCtwaAdRequestRegionsInner.md → CtwaAdRequestBodyRegionsInner.md} +2 -2
  12. data/docs/{CreateCtwaAdRequestVideo.md → CtwaAdRequestBodyVideo.md} +2 -2
  13. data/docs/{CreateCtwaAdRequestZipsInner.md → CtwaAdRequestBodyZipsInner.md} +2 -2
  14. data/docs/GenerateAdPreviews200Response.md +18 -0
  15. data/docs/GenerateAdPreviews200ResponsePreviewsInner.md +20 -0
  16. data/docs/GenerateAdPreviewsRequest.md +26 -0
  17. data/docs/GetAdPreviews200Response.md +20 -0
  18. data/lib/zernio-sdk/api/ads_api.rb +283 -13
  19. data/lib/zernio-sdk/models/create_call_ad_request.rb +869 -0
  20. data/lib/zernio-sdk/models/create_messaging_ad_request.rb +844 -0
  21. data/lib/zernio-sdk/models/{create_ctwa_ad_request.rb → ctwa_ad_request_body.rb} +12 -12
  22. data/lib/zernio-sdk/models/{create_ctwa_ad_request_cities_inner.rb → ctwa_ad_request_body_cities_inner.rb} +3 -3
  23. data/lib/zernio-sdk/models/{create_ctwa_ad_request_creatives_inner.rb → ctwa_ad_request_body_creatives_inner.rb} +4 -4
  24. data/lib/zernio-sdk/models/{create_ctwa_ad_request_creatives_inner_video.rb → ctwa_ad_request_body_creatives_inner_video.rb} +3 -3
  25. data/lib/zernio-sdk/models/{create_ctwa_ad_request_placements.rb → ctwa_ad_request_body_placements.rb} +3 -3
  26. data/lib/zernio-sdk/models/{create_ctwa_ad_request_regions_inner.rb → ctwa_ad_request_body_regions_inner.rb} +3 -3
  27. data/lib/zernio-sdk/models/{create_ctwa_ad_request_video.rb → ctwa_ad_request_body_video.rb} +3 -3
  28. data/lib/zernio-sdk/models/{create_ctwa_ad_request_zips_inner.rb → ctwa_ad_request_body_zips_inner.rb} +3 -3
  29. data/lib/zernio-sdk/models/generate_ad_previews200_response.rb +149 -0
  30. data/lib/zernio-sdk/models/generate_ad_previews200_response_previews_inner.rb +158 -0
  31. data/lib/zernio-sdk/models/generate_ad_previews_request.rb +254 -0
  32. data/lib/zernio-sdk/models/get_ad_previews200_response.rb +158 -0
  33. data/lib/zernio-sdk/version.rb +1 -1
  34. data/lib/zernio-sdk.rb +14 -8
  35. data/openapi.yaml +484 -320
  36. data/spec/api/ads_api_spec.rb +52 -3
  37. data/spec/models/create_call_ad_request_spec.rb +238 -0
  38. data/spec/models/create_messaging_ad_request_spec.rb +236 -0
  39. data/spec/models/{create_ctwa_ad_request_cities_inner_spec.rb → ctwa_ad_request_body_cities_inner_spec.rb} +6 -6
  40. data/spec/models/{create_ctwa_ad_request_creatives_inner_spec.rb → ctwa_ad_request_body_creatives_inner_spec.rb} +6 -6
  41. data/spec/models/{create_ctwa_ad_request_creatives_inner_video_spec.rb → ctwa_ad_request_body_creatives_inner_video_spec.rb} +6 -6
  42. data/spec/models/{create_ctwa_ad_request_placements_spec.rb → ctwa_ad_request_body_placements_spec.rb} +6 -6
  43. data/spec/models/{create_ctwa_ad_request_regions_inner_spec.rb → ctwa_ad_request_body_regions_inner_spec.rb} +6 -6
  44. data/spec/models/{create_ctwa_ad_request_spec.rb → ctwa_ad_request_body_spec.rb} +6 -6
  45. data/spec/models/{create_ctwa_ad_request_video_spec.rb → ctwa_ad_request_body_video_spec.rb} +6 -6
  46. data/spec/models/{create_ctwa_ad_request_zips_inner_spec.rb → ctwa_ad_request_body_zips_inner_spec.rb} +6 -6
  47. data/spec/models/generate_ad_previews200_response_previews_inner_spec.rb +42 -0
  48. data/spec/models/generate_ad_previews200_response_spec.rb +36 -0
  49. data/spec/models/generate_ad_previews_request_spec.rb +60 -0
  50. data/spec/models/get_ad_previews200_response_spec.rb +42 -0
  51. metadata +57 -33
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2e0db6a79e9e00f953f3027692b48bb968aca3afcf369eb2b39a1d3e7fe8c9c4
4
- data.tar.gz: fadcc6fc532b75244e7488b02a5f115345f7aedd432c284d3ba2e5dd565dd0ef
3
+ metadata.gz: 9f98c1b082341df724303142f79b13ef03a82d8bf3c09787ab044b8eccabdd63
4
+ data.tar.gz: 8065ffc4263bc298936251d8f9b397ba7a3983385ec945798c9dd5eef80c272b
5
5
  SHA512:
6
- metadata.gz: b01573d5ee8adf9f841cf202c718f6b7c9080038e83bce3f3aee59fc7d3495428e208cb3f58891bccd1e2a94b58797cdce10982eeeb44b3e411529b821bb4966
7
- data.tar.gz: c46db1bad44769174f88ce13a5ecc7f81fe4d353485c4ab69fb582f9825296417f38d58928c8a26891c0ebcd2abf10620d56a05bb6a8c6e9c79279ada1b6a22d
6
+ metadata.gz: ed03ffc83007d0a63e494d26999cde4a20adc0a1cb7db90568dc48ffd6f48eba1cce24d79e1b8de523a417df3927058aca4ea45523fc24958f97251a2bf2bc36
7
+ data.tar.gz: 35c5a0b7f2db063f2db33968f186cb517902076e7ae157120a0745b42bea4f27112655f92ce07bfb22ee2ac7e4d8197dc4d3ce5bb6e2590a2a89770e4b6b9c52
data/README.md CHANGED
@@ -111,18 +111,22 @@ Class | Method | HTTP request | Description
111
111
  *Zernio::AdsApi* | [**archive_lead_form**](docs/AdsApi.md#archive_lead_form) | **DELETE** /v1/ads/lead-forms/{formId} | Archive a lead form
112
112
  *Zernio::AdsApi* | [**boost_post**](docs/AdsApi.md#boost_post) | **POST** /v1/ads/boost | Boost post as ad
113
113
  *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)
114
+ *Zernio::AdsApi* | [**create_call_ad**](docs/AdsApi.md#create_call_ad) | **POST** /v1/ads/call | Create Click-to-Call ad
114
115
  *Zernio::AdsApi* | [**create_conversion_destination**](docs/AdsApi.md#create_conversion_destination) | **POST** /v1/accounts/{accountId}/conversion-destinations | Create a conversion destination
115
- *Zernio::AdsApi* | [**create_ctwa_ad**](docs/AdsApi.md#create_ctwa_ad) | **POST** /v1/ads/ctwa | Create Click-to-WhatsApp ad
116
+ *Zernio::AdsApi* | [**create_ctwa_ad**](docs/AdsApi.md#create_ctwa_ad) | **POST** /v1/ads/ctwa | Create Click-to-WhatsApp ad (deprecated)
116
117
  *Zernio::AdsApi* | [**create_lead_form**](docs/AdsApi.md#create_lead_form) | **POST** /v1/ads/lead-forms | Create a lead form
118
+ *Zernio::AdsApi* | [**create_messaging_ad**](docs/AdsApi.md#create_messaging_ad) | **POST** /v1/ads/messaging | Create click-to-message ad (WhatsApp / Messenger / Instagram Direct)
117
119
  *Zernio::AdsApi* | [**create_standalone_ad**](docs/AdsApi.md#create_standalone_ad) | **POST** /v1/ads/create | Create standalone ad
118
120
  *Zernio::AdsApi* | [**create_test_lead**](docs/AdsApi.md#create_test_lead) | **POST** /v1/ads/lead-forms/{formId}/test-leads | Create a test lead
119
121
  *Zernio::AdsApi* | [**delete_ad**](docs/AdsApi.md#delete_ad) | **DELETE** /v1/ads/{adId} | Cancel an ad
120
122
  *Zernio::AdsApi* | [**delete_conversion_destination**](docs/AdsApi.md#delete_conversion_destination) | **DELETE** /v1/accounts/{accountId}/conversion-destinations/{destinationId} | Delete a conversion destination
121
123
  *Zernio::AdsApi* | [**estimate_ad_reach**](docs/AdsApi.md#estimate_ad_reach) | **POST** /v1/ads/targeting/reach-estimate | Estimate audience reach
124
+ *Zernio::AdsApi* | [**generate_ad_previews**](docs/AdsApi.md#generate_ad_previews) | **POST** /v1/ads/preview | Render pre-create ad previews (Meta)
122
125
  *Zernio::AdsApi* | [**get_ad**](docs/AdsApi.md#get_ad) | **GET** /v1/ads/{adId} | Get ad details
123
126
  *Zernio::AdsApi* | [**get_ad_analytics**](docs/AdsApi.md#get_ad_analytics) | **GET** /v1/ads/{adId}/analytics | Get ad analytics
124
127
  *Zernio::AdsApi* | [**get_ad_comments**](docs/AdsApi.md#get_ad_comments) | **GET** /v1/ads/{adId}/comments | List comments on an ad
125
128
  *Zernio::AdsApi* | [**get_ad_insights_report**](docs/AdsApi.md#get_ad_insights_report) | **GET** /v1/ads/insights/reports/{reportRunId} | Poll an async insights report run (Meta)
129
+ *Zernio::AdsApi* | [**get_ad_previews**](docs/AdsApi.md#get_ad_previews) | **GET** /v1/ads/{adId}/preview | Render previews of an existing ad (Meta)
126
130
  *Zernio::AdsApi* | [**get_ad_tracking_tags**](docs/AdsApi.md#get_ad_tracking_tags) | **GET** /v1/ads/{adId}/tracking-tags | Get ad tracking tags
127
131
  *Zernio::AdsApi* | [**get_campaign_analytics**](docs/AdsApi.md#get_campaign_analytics) | **GET** /v1/ads/campaigns/{campaignId}/analytics | Get campaign analytics
128
132
  *Zernio::AdsApi* | [**get_conversion_destination**](docs/AdsApi.md#get_conversion_destination) | **GET** /v1/accounts/{accountId}/conversion-destinations/{destinationId} | Get a conversion destination
@@ -698,6 +702,7 @@ Class | Method | HTTP request | Description
698
702
  - [Zernio::CreateBroadcastRequestSegmentFilters](docs/CreateBroadcastRequestSegmentFilters.md)
699
703
  - [Zernio::CreateBroadcastRequestTemplate](docs/CreateBroadcastRequestTemplate.md)
700
704
  - [Zernio::CreateBroadcastRequestTemplateVariableMappingValue](docs/CreateBroadcastRequestTemplateVariableMappingValue.md)
705
+ - [Zernio::CreateCallAdRequest](docs/CreateCallAdRequest.md)
701
706
  - [Zernio::CreateCommentAutomation200Response](docs/CreateCommentAutomation200Response.md)
702
707
  - [Zernio::CreateCommentAutomation200ResponseAutomation](docs/CreateCommentAutomation200ResponseAutomation.md)
703
708
  - [Zernio::CreateCommentAutomation200ResponseAutomationStats](docs/CreateCommentAutomation200ResponseAutomationStats.md)
@@ -710,14 +715,6 @@ Class | Method | HTTP request | Description
710
715
  - [Zernio::CreateConversionDestinationRequest](docs/CreateConversionDestinationRequest.md)
711
716
  - [Zernio::CreateConversionDestinationRequestValue](docs/CreateConversionDestinationRequestValue.md)
712
717
  - [Zernio::CreateCtwaAd201Response](docs/CreateCtwaAd201Response.md)
713
- - [Zernio::CreateCtwaAdRequest](docs/CreateCtwaAdRequest.md)
714
- - [Zernio::CreateCtwaAdRequestCitiesInner](docs/CreateCtwaAdRequestCitiesInner.md)
715
- - [Zernio::CreateCtwaAdRequestCreativesInner](docs/CreateCtwaAdRequestCreativesInner.md)
716
- - [Zernio::CreateCtwaAdRequestCreativesInnerVideo](docs/CreateCtwaAdRequestCreativesInnerVideo.md)
717
- - [Zernio::CreateCtwaAdRequestPlacements](docs/CreateCtwaAdRequestPlacements.md)
718
- - [Zernio::CreateCtwaAdRequestRegionsInner](docs/CreateCtwaAdRequestRegionsInner.md)
719
- - [Zernio::CreateCtwaAdRequestVideo](docs/CreateCtwaAdRequestVideo.md)
720
- - [Zernio::CreateCtwaAdRequestZipsInner](docs/CreateCtwaAdRequestZipsInner.md)
721
718
  - [Zernio::CreateCustomField200Response](docs/CreateCustomField200Response.md)
722
719
  - [Zernio::CreateCustomFieldRequest](docs/CreateCustomFieldRequest.md)
723
720
  - [Zernio::CreateDiscordGuildRole201Response](docs/CreateDiscordGuildRole201Response.md)
@@ -747,6 +744,7 @@ Class | Method | HTTP request | Description
747
744
  - [Zernio::CreateLeadFormRequest](docs/CreateLeadFormRequest.md)
748
745
  - [Zernio::CreateLeadFormRequestQuestionsInner](docs/CreateLeadFormRequestQuestionsInner.md)
749
746
  - [Zernio::CreateLeadFormRequestQuestionsInnerOptionsInner](docs/CreateLeadFormRequestQuestionsInnerOptionsInner.md)
747
+ - [Zernio::CreateMessagingAdRequest](docs/CreateMessagingAdRequest.md)
750
748
  - [Zernio::CreatePhoneNumberKycLink200Response](docs/CreatePhoneNumberKycLink200Response.md)
751
749
  - [Zernio::CreatePhoneNumberKycLinkRequest](docs/CreatePhoneNumberKycLinkRequest.md)
752
750
  - [Zernio::CreatePhoneNumberKycLinkRequestBranding](docs/CreatePhoneNumberKycLinkRequestBranding.md)
@@ -824,6 +822,14 @@ Class | Method | HTTP request | Description
824
822
  - [Zernio::CreateWorkflow200ResponseWorkflow](docs/CreateWorkflow200ResponseWorkflow.md)
825
823
  - [Zernio::CreateWorkflowRequest](docs/CreateWorkflowRequest.md)
826
824
  - [Zernio::CrosspostDiscordMessage200Response](docs/CrosspostDiscordMessage200Response.md)
825
+ - [Zernio::CtwaAdRequestBody](docs/CtwaAdRequestBody.md)
826
+ - [Zernio::CtwaAdRequestBodyCitiesInner](docs/CtwaAdRequestBodyCitiesInner.md)
827
+ - [Zernio::CtwaAdRequestBodyCreativesInner](docs/CtwaAdRequestBodyCreativesInner.md)
828
+ - [Zernio::CtwaAdRequestBodyCreativesInnerVideo](docs/CtwaAdRequestBodyCreativesInnerVideo.md)
829
+ - [Zernio::CtwaAdRequestBodyPlacements](docs/CtwaAdRequestBodyPlacements.md)
830
+ - [Zernio::CtwaAdRequestBodyRegionsInner](docs/CtwaAdRequestBodyRegionsInner.md)
831
+ - [Zernio::CtwaAdRequestBodyVideo](docs/CtwaAdRequestBodyVideo.md)
832
+ - [Zernio::CtwaAdRequestBodyZipsInner](docs/CtwaAdRequestBodyZipsInner.md)
827
833
  - [Zernio::CtwaMultiResponse](docs/CtwaMultiResponse.md)
828
834
  - [Zernio::CtwaSingleResponse](docs/CtwaSingleResponse.md)
829
835
  - [Zernio::DeactivateSmsRegistration200Response](docs/DeactivateSmsRegistration200Response.md)
@@ -912,6 +918,9 @@ Class | Method | HTTP request | Description
912
918
  - [Zernio::GbpSpecialHourPeriod](docs/GbpSpecialHourPeriod.md)
913
919
  - [Zernio::GbpSpecialHourPeriodStartDate](docs/GbpSpecialHourPeriodStartDate.md)
914
920
  - [Zernio::GbpUpdateFreeFormServiceItemLabel](docs/GbpUpdateFreeFormServiceItemLabel.md)
921
+ - [Zernio::GenerateAdPreviews200Response](docs/GenerateAdPreviews200Response.md)
922
+ - [Zernio::GenerateAdPreviews200ResponsePreviewsInner](docs/GenerateAdPreviews200ResponsePreviewsInner.md)
923
+ - [Zernio::GenerateAdPreviewsRequest](docs/GenerateAdPreviewsRequest.md)
915
924
  - [Zernio::GeoRestriction](docs/GeoRestriction.md)
916
925
  - [Zernio::GetAccountHealth200Response](docs/GetAccountHealth200Response.md)
917
926
  - [Zernio::GetAccountHealth200ResponsePermissions](docs/GetAccountHealth200ResponsePermissions.md)
@@ -926,6 +935,7 @@ Class | Method | HTTP request | Description
926
935
  - [Zernio::GetAdComments200ResponsePagination](docs/GetAdComments200ResponsePagination.md)
927
936
  - [Zernio::GetAdInsightsReport200Response](docs/GetAdInsightsReport200Response.md)
928
937
  - [Zernio::GetAdInsightsReport200ResponsePaging](docs/GetAdInsightsReport200ResponsePaging.md)
938
+ - [Zernio::GetAdPreviews200Response](docs/GetAdPreviews200Response.md)
929
939
  - [Zernio::GetAdTrackingTags200Response](docs/GetAdTrackingTags200Response.md)
930
940
  - [Zernio::GetAdTree200Response](docs/GetAdTree200Response.md)
931
941
  - [Zernio::GetAdsTimeline200Response](docs/GetAdsTimeline200Response.md)
data/docs/AdsApi.md CHANGED
@@ -9,18 +9,22 @@ All URIs are relative to *https://zernio.com/api*
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
11
  | [**create_ad_insights_report**](AdsApi.md#create_ad_insights_report) | **POST** /v1/ads/insights/reports | Submit an async insights report run (Meta) |
12
+ | [**create_call_ad**](AdsApi.md#create_call_ad) | **POST** /v1/ads/call | Create Click-to-Call ad |
12
13
  | [**create_conversion_destination**](AdsApi.md#create_conversion_destination) | **POST** /v1/accounts/{accountId}/conversion-destinations | Create a conversion destination |
13
- | [**create_ctwa_ad**](AdsApi.md#create_ctwa_ad) | **POST** /v1/ads/ctwa | Create Click-to-WhatsApp ad |
14
+ | [**create_ctwa_ad**](AdsApi.md#create_ctwa_ad) | **POST** /v1/ads/ctwa | Create Click-to-WhatsApp ad (deprecated) |
14
15
  | [**create_lead_form**](AdsApi.md#create_lead_form) | **POST** /v1/ads/lead-forms | Create a lead form |
16
+ | [**create_messaging_ad**](AdsApi.md#create_messaging_ad) | **POST** /v1/ads/messaging | Create click-to-message ad (WhatsApp / Messenger / Instagram Direct) |
15
17
  | [**create_standalone_ad**](AdsApi.md#create_standalone_ad) | **POST** /v1/ads/create | Create standalone ad |
16
18
  | [**create_test_lead**](AdsApi.md#create_test_lead) | **POST** /v1/ads/lead-forms/{formId}/test-leads | Create a test lead |
17
19
  | [**delete_ad**](AdsApi.md#delete_ad) | **DELETE** /v1/ads/{adId} | Cancel an ad |
18
20
  | [**delete_conversion_destination**](AdsApi.md#delete_conversion_destination) | **DELETE** /v1/accounts/{accountId}/conversion-destinations/{destinationId} | Delete a conversion destination |
19
21
  | [**estimate_ad_reach**](AdsApi.md#estimate_ad_reach) | **POST** /v1/ads/targeting/reach-estimate | Estimate audience reach |
22
+ | [**generate_ad_previews**](AdsApi.md#generate_ad_previews) | **POST** /v1/ads/preview | Render pre-create ad previews (Meta) |
20
23
  | [**get_ad**](AdsApi.md#get_ad) | **GET** /v1/ads/{adId} | Get ad details |
21
24
  | [**get_ad_analytics**](AdsApi.md#get_ad_analytics) | **GET** /v1/ads/{adId}/analytics | Get ad analytics |
22
25
  | [**get_ad_comments**](AdsApi.md#get_ad_comments) | **GET** /v1/ads/{adId}/comments | List comments on an ad |
23
26
  | [**get_ad_insights_report**](AdsApi.md#get_ad_insights_report) | **GET** /v1/ads/insights/reports/{reportRunId} | Poll an async insights report run (Meta) |
27
+ | [**get_ad_previews**](AdsApi.md#get_ad_previews) | **GET** /v1/ads/{adId}/preview | Render previews of an existing ad (Meta) |
24
28
  | [**get_ad_tracking_tags**](AdsApi.md#get_ad_tracking_tags) | **GET** /v1/ads/{adId}/tracking-tags | Get ad tracking tags |
25
29
  | [**get_campaign_analytics**](AdsApi.md#get_campaign_analytics) | **GET** /v1/ads/campaigns/{campaignId}/analytics | Get campaign analytics |
26
30
  | [**get_conversion_destination**](AdsApi.md#get_conversion_destination) | **GET** /v1/accounts/{accountId}/conversion-destinations/{destinationId} | Get a conversion destination |
@@ -406,6 +410,74 @@ end
406
410
  - **Accept**: application/json
407
411
 
408
412
 
413
+ ## create_call_ad
414
+
415
+ > create_call_ad(create_call_ad_request)
416
+
417
+ Create Click-to-Call ad
418
+
419
+ Same shape and flow as POST /v1/ads/ctwa, but the CTA is CALL_NOW dialing `phoneNumber` via a tel: link. The ad set is destination_type PHONE_CALL optimizing QUALITY_CALL and the campaign objective defaults to OUTCOME_LEADS. Supports the same single-creative and multi-creative shapes as CTWA.
420
+
421
+ ### Examples
422
+
423
+ ```ruby
424
+ require 'time'
425
+ require 'zernio-sdk'
426
+ # setup authorization
427
+ Zernio.configure do |config|
428
+ # Configure Bearer authorization (JWT): bearerAuth
429
+ config.access_token = 'YOUR_BEARER_TOKEN'
430
+ end
431
+
432
+ api_instance = Zernio::AdsApi.new
433
+ create_call_ad_request = Zernio::CreateCallAdRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', budget_amount: 3.56, budget_type: 'daily', phone_number: 'phone_number_example', link_url: 'link_url_example'}) # CreateCallAdRequest |
434
+
435
+ begin
436
+ # Create Click-to-Call ad
437
+ api_instance.create_call_ad(create_call_ad_request)
438
+ rescue Zernio::ApiError => e
439
+ puts "Error when calling AdsApi->create_call_ad: #{e}"
440
+ end
441
+ ```
442
+
443
+ #### Using the create_call_ad_with_http_info variant
444
+
445
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
446
+
447
+ > <Array(nil, Integer, Hash)> create_call_ad_with_http_info(create_call_ad_request)
448
+
449
+ ```ruby
450
+ begin
451
+ # Create Click-to-Call ad
452
+ data, status_code, headers = api_instance.create_call_ad_with_http_info(create_call_ad_request)
453
+ p status_code # => 2xx
454
+ p headers # => { ... }
455
+ p data # => nil
456
+ rescue Zernio::ApiError => e
457
+ puts "Error when calling AdsApi->create_call_ad_with_http_info: #{e}"
458
+ end
459
+ ```
460
+
461
+ ### Parameters
462
+
463
+ | Name | Type | Description | Notes |
464
+ | ---- | ---- | ----------- | ----- |
465
+ | **create_call_ad_request** | [**CreateCallAdRequest**](CreateCallAdRequest.md) | | |
466
+
467
+ ### Return type
468
+
469
+ nil (empty response body)
470
+
471
+ ### Authorization
472
+
473
+ [bearerAuth](../README.md#bearerAuth)
474
+
475
+ ### HTTP request headers
476
+
477
+ - **Content-Type**: application/json
478
+ - **Accept**: application/json
479
+
480
+
409
481
  ## create_conversion_destination
410
482
 
411
483
  > <CreateConversionDestination201Response> create_conversion_destination(account_id, create_conversion_destination_request)
@@ -479,11 +551,11 @@ end
479
551
 
480
552
  ## create_ctwa_ad
481
553
 
482
- > <CreateCtwaAd201Response> create_ctwa_ad(create_ctwa_ad_request)
554
+ > <CreateCtwaAd201Response> create_ctwa_ad(ctwa_ad_request_body)
483
555
 
484
- Create Click-to-WhatsApp ad
556
+ Create Click-to-WhatsApp ad (deprecated)
485
557
 
486
- Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
558
+ Deprecated: use POST /v1/ads/messaging with `destination: whatsapp`. This endpoint stays available for back-compat; no removal planned. Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
487
559
 
488
560
  ### Examples
489
561
 
@@ -497,11 +569,11 @@ Zernio.configure do |config|
497
569
  end
498
570
 
499
571
  api_instance = Zernio::AdsApi.new
500
- create_ctwa_ad_request = Zernio::CreateCtwaAdRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', budget_amount: 3.56, budget_type: 'daily'}) # CreateCtwaAdRequest |
572
+ ctwa_ad_request_body = Zernio::CtwaAdRequestBody.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', budget_amount: 3.56, budget_type: 'daily'}) # CtwaAdRequestBody |
501
573
 
502
574
  begin
503
- # Create Click-to-WhatsApp ad
504
- result = api_instance.create_ctwa_ad(create_ctwa_ad_request)
575
+ # Create Click-to-WhatsApp ad (deprecated)
576
+ result = api_instance.create_ctwa_ad(ctwa_ad_request_body)
505
577
  p result
506
578
  rescue Zernio::ApiError => e
507
579
  puts "Error when calling AdsApi->create_ctwa_ad: #{e}"
@@ -512,12 +584,12 @@ end
512
584
 
513
585
  This returns an Array which contains the response data, status code and headers.
514
586
 
515
- > <Array(<CreateCtwaAd201Response>, Integer, Hash)> create_ctwa_ad_with_http_info(create_ctwa_ad_request)
587
+ > <Array(<CreateCtwaAd201Response>, Integer, Hash)> create_ctwa_ad_with_http_info(ctwa_ad_request_body)
516
588
 
517
589
  ```ruby
518
590
  begin
519
- # Create Click-to-WhatsApp ad
520
- data, status_code, headers = api_instance.create_ctwa_ad_with_http_info(create_ctwa_ad_request)
591
+ # Create Click-to-WhatsApp ad (deprecated)
592
+ data, status_code, headers = api_instance.create_ctwa_ad_with_http_info(ctwa_ad_request_body)
521
593
  p status_code # => 2xx
522
594
  p headers # => { ... }
523
595
  p data # => <CreateCtwaAd201Response>
@@ -530,7 +602,7 @@ end
530
602
 
531
603
  | Name | Type | Description | Notes |
532
604
  | ---- | ---- | ----------- | ----- |
533
- | **create_ctwa_ad_request** | [**CreateCtwaAdRequest**](CreateCtwaAdRequest.md) | | |
605
+ | **ctwa_ad_request_body** | [**CtwaAdRequestBody**](CtwaAdRequestBody.md) | | |
534
606
 
535
607
  ### Return type
536
608
 
@@ -615,6 +687,74 @@ end
615
687
  - **Accept**: application/json
616
688
 
617
689
 
690
+ ## create_messaging_ad
691
+
692
+ > create_messaging_ad(create_messaging_ad_request)
693
+
694
+ Create click-to-message ad (WhatsApp / Messenger / Instagram Direct)
695
+
696
+ Creates a click-to-message ad; `destination` selects where the tapped ad opens a conversation: WhatsApp, the Page's Messenger inbox or the linked Instagram account's Direct inbox. The ad set is created with the matching destination_type and CONVERSATIONS optimization; the campaign objective defaults to OUTCOME_ENGAGEMENT. Supports single-creative and multi-creative shapes. Supersedes POST /v1/ads/ctwa (deprecated, equivalent to `destination: whatsapp`).
697
+
698
+ ### Examples
699
+
700
+ ```ruby
701
+ require 'time'
702
+ require 'zernio-sdk'
703
+ # setup authorization
704
+ Zernio.configure do |config|
705
+ # Configure Bearer authorization (JWT): bearerAuth
706
+ config.access_token = 'YOUR_BEARER_TOKEN'
707
+ end
708
+
709
+ api_instance = Zernio::AdsApi.new
710
+ create_messaging_ad_request = Zernio::CreateMessagingAdRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', budget_amount: 3.56, budget_type: 'daily', destination: 'whatsapp'}) # CreateMessagingAdRequest |
711
+
712
+ begin
713
+ # Create click-to-message ad (WhatsApp / Messenger / Instagram Direct)
714
+ api_instance.create_messaging_ad(create_messaging_ad_request)
715
+ rescue Zernio::ApiError => e
716
+ puts "Error when calling AdsApi->create_messaging_ad: #{e}"
717
+ end
718
+ ```
719
+
720
+ #### Using the create_messaging_ad_with_http_info variant
721
+
722
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
723
+
724
+ > <Array(nil, Integer, Hash)> create_messaging_ad_with_http_info(create_messaging_ad_request)
725
+
726
+ ```ruby
727
+ begin
728
+ # Create click-to-message ad (WhatsApp / Messenger / Instagram Direct)
729
+ data, status_code, headers = api_instance.create_messaging_ad_with_http_info(create_messaging_ad_request)
730
+ p status_code # => 2xx
731
+ p headers # => { ... }
732
+ p data # => nil
733
+ rescue Zernio::ApiError => e
734
+ puts "Error when calling AdsApi->create_messaging_ad_with_http_info: #{e}"
735
+ end
736
+ ```
737
+
738
+ ### Parameters
739
+
740
+ | Name | Type | Description | Notes |
741
+ | ---- | ---- | ----------- | ----- |
742
+ | **create_messaging_ad_request** | [**CreateMessagingAdRequest**](CreateMessagingAdRequest.md) | | |
743
+
744
+ ### Return type
745
+
746
+ nil (empty response body)
747
+
748
+ ### Authorization
749
+
750
+ [bearerAuth](../README.md#bearerAuth)
751
+
752
+ ### HTTP request headers
753
+
754
+ - **Content-Type**: application/json
755
+ - **Accept**: application/json
756
+
757
+
618
758
  ## create_standalone_ad
619
759
 
620
760
  > <CreateStandaloneAd201Response> create_standalone_ad(create_standalone_ad_request, opts)
@@ -971,6 +1111,75 @@ end
971
1111
  - **Accept**: application/json
972
1112
 
973
1113
 
1114
+ ## generate_ad_previews
1115
+
1116
+ > <GenerateAdPreviews200Response> generate_ad_previews(generate_ad_previews_request)
1117
+
1118
+ Render pre-create ad previews (Meta)
1119
+
1120
+ Renders how a creative would look per placement BEFORE any ad exists, via Meta's `/generatepreviews`. Provide exactly one creative source: `existingCreativeId` or `creativeSpec`. Each preview is an HTML `<iframe>` snippet embeddable directly. Unknown `formats` values return Meta's 400 verbatim. Meta only.
1121
+
1122
+ ### Examples
1123
+
1124
+ ```ruby
1125
+ require 'time'
1126
+ require 'zernio-sdk'
1127
+ # setup authorization
1128
+ Zernio.configure do |config|
1129
+ # Configure Bearer authorization (JWT): bearerAuth
1130
+ config.access_token = 'YOUR_BEARER_TOKEN'
1131
+ end
1132
+
1133
+ api_instance = Zernio::AdsApi.new
1134
+ generate_ad_previews_request = Zernio::GenerateAdPreviewsRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example'}) # GenerateAdPreviewsRequest |
1135
+
1136
+ begin
1137
+ # Render pre-create ad previews (Meta)
1138
+ result = api_instance.generate_ad_previews(generate_ad_previews_request)
1139
+ p result
1140
+ rescue Zernio::ApiError => e
1141
+ puts "Error when calling AdsApi->generate_ad_previews: #{e}"
1142
+ end
1143
+ ```
1144
+
1145
+ #### Using the generate_ad_previews_with_http_info variant
1146
+
1147
+ This returns an Array which contains the response data, status code and headers.
1148
+
1149
+ > <Array(<GenerateAdPreviews200Response>, Integer, Hash)> generate_ad_previews_with_http_info(generate_ad_previews_request)
1150
+
1151
+ ```ruby
1152
+ begin
1153
+ # Render pre-create ad previews (Meta)
1154
+ data, status_code, headers = api_instance.generate_ad_previews_with_http_info(generate_ad_previews_request)
1155
+ p status_code # => 2xx
1156
+ p headers # => { ... }
1157
+ p data # => <GenerateAdPreviews200Response>
1158
+ rescue Zernio::ApiError => e
1159
+ puts "Error when calling AdsApi->generate_ad_previews_with_http_info: #{e}"
1160
+ end
1161
+ ```
1162
+
1163
+ ### Parameters
1164
+
1165
+ | Name | Type | Description | Notes |
1166
+ | ---- | ---- | ----------- | ----- |
1167
+ | **generate_ad_previews_request** | [**GenerateAdPreviewsRequest**](GenerateAdPreviewsRequest.md) | | |
1168
+
1169
+ ### Return type
1170
+
1171
+ [**GenerateAdPreviews200Response**](GenerateAdPreviews200Response.md)
1172
+
1173
+ ### Authorization
1174
+
1175
+ [bearerAuth](../README.md#bearerAuth)
1176
+
1177
+ ### HTTP request headers
1178
+
1179
+ - **Content-Type**: application/json
1180
+ - **Accept**: application/json
1181
+
1182
+
974
1183
  ## get_ad
975
1184
 
976
1185
  > <GetAd200Response> get_ad(ad_id)
@@ -1271,6 +1480,79 @@ end
1271
1480
  - **Accept**: application/json
1272
1481
 
1273
1482
 
1483
+ ## get_ad_previews
1484
+
1485
+ > <GetAdPreviews200Response> get_ad_previews(ad_id, opts)
1486
+
1487
+ Render previews of an existing ad (Meta)
1488
+
1489
+ Renders an EXISTING ad per placement via Meta's `/{ad_id}/previews`. Each preview is an HTML `<iframe>` snippet embeddable directly. Unknown `formats` values return Meta's 400 verbatim. Meta only.
1490
+
1491
+ ### Examples
1492
+
1493
+ ```ruby
1494
+ require 'time'
1495
+ require 'zernio-sdk'
1496
+ # setup authorization
1497
+ Zernio.configure do |config|
1498
+ # Configure Bearer authorization (JWT): bearerAuth
1499
+ config.access_token = 'YOUR_BEARER_TOKEN'
1500
+ end
1501
+
1502
+ api_instance = Zernio::AdsApi.new
1503
+ ad_id = 'ad_id_example' # String | Zernio ad id (24-char hex).
1504
+ opts = {
1505
+ formats: 'formats_example' # String | Comma-separated Meta ad_format values (max 10), one preview per format. Defaults to DESKTOP_FEED_STANDARD.
1506
+ }
1507
+
1508
+ begin
1509
+ # Render previews of an existing ad (Meta)
1510
+ result = api_instance.get_ad_previews(ad_id, opts)
1511
+ p result
1512
+ rescue Zernio::ApiError => e
1513
+ puts "Error when calling AdsApi->get_ad_previews: #{e}"
1514
+ end
1515
+ ```
1516
+
1517
+ #### Using the get_ad_previews_with_http_info variant
1518
+
1519
+ This returns an Array which contains the response data, status code and headers.
1520
+
1521
+ > <Array(<GetAdPreviews200Response>, Integer, Hash)> get_ad_previews_with_http_info(ad_id, opts)
1522
+
1523
+ ```ruby
1524
+ begin
1525
+ # Render previews of an existing ad (Meta)
1526
+ data, status_code, headers = api_instance.get_ad_previews_with_http_info(ad_id, opts)
1527
+ p status_code # => 2xx
1528
+ p headers # => { ... }
1529
+ p data # => <GetAdPreviews200Response>
1530
+ rescue Zernio::ApiError => e
1531
+ puts "Error when calling AdsApi->get_ad_previews_with_http_info: #{e}"
1532
+ end
1533
+ ```
1534
+
1535
+ ### Parameters
1536
+
1537
+ | Name | Type | Description | Notes |
1538
+ | ---- | ---- | ----------- | ----- |
1539
+ | **ad_id** | **String** | Zernio ad id (24-char hex). | |
1540
+ | **formats** | **String** | Comma-separated Meta ad_format values (max 10), one preview per format. Defaults to DESKTOP_FEED_STANDARD. | [optional] |
1541
+
1542
+ ### Return type
1543
+
1544
+ [**GetAdPreviews200Response**](GetAdPreviews200Response.md)
1545
+
1546
+ ### Authorization
1547
+
1548
+ [bearerAuth](../README.md#bearerAuth)
1549
+
1550
+ ### HTTP request headers
1551
+
1552
+ - **Content-Type**: Not defined
1553
+ - **Accept**: application/json
1554
+
1555
+
1274
1556
  ## get_ad_tracking_tags
1275
1557
 
1276
1558
  > <GetAdTrackingTags200Response> get_ad_tracking_tags(ad_id)
@@ -0,0 +1,80 @@
1
+ # Zernio::CreateCallAdRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | Facebook or Instagram SocialAccount ID. | |
8
+ | **ad_account_id** | **String** | Meta ad account ID, e.g. &#x60;act_123456789&#x60;. | |
9
+ | **name** | **String** | Ad display name. Used to derive campaign / ad set names. On the multi-creative shape, each ad&#39;s Meta name gets a \&quot; #N\&quot; suffix (1-indexed) so Ads Manager shows them as a numbered batch. | |
10
+ | **headline** | **String** | Single-creative shape only. Mutually exclusive with &#x60;creatives[]&#x60;. | [optional] |
11
+ | **body** | **String** | Primary text shown above the image / video. Single-creative shape only. Mutually exclusive with &#x60;creatives[]&#x60;. | [optional] |
12
+ | **image_url** | **String** | Image asset for single-creative shape. Mutually exclusive with &#x60;video&#x60; and with &#x60;creatives[]&#x60;. Required on the single-creative shape if &#x60;video&#x60; is not supplied. | [optional] |
13
+ | **video** | [**CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md) | | [optional] |
14
+ | **creatives** | [**Array&lt;CtwaAdRequestBodyCreativesInner&gt;**](CtwaAdRequestBodyCreativesInner.md) | Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (&#x60;headline&#x60; / &#x60;body&#x60; / &#x60;imageUrl&#x60; / &#x60;video&#x60;). Each entry must supply its own headline, body, and exactly one of &#x60;imageUrl&#x60; / &#x60;video&#x60;. | [optional] |
15
+ | **budget_amount** | **Float** | Budget amount in the ad account&#39;s currency major units (e.g. dollars for USD, not cents). Must be &gt; 0. | |
16
+ | **budget_type** | **String** | | |
17
+ | **currency** | **String** | ISO 4217 currency code matching the ad account&#39;s currency (e.g. &#x60;USD&#x60;). Optional; Meta infers from the ad account when omitted. | [optional] |
18
+ | **end_date** | **Time** | ISO 8601 datetime. Required when &#x60;budgetType&#x60; is &#x60;lifetime&#x60;. | [optional] |
19
+ | **countries** | **Array&lt;String&gt;** | ISO 3166-1 alpha-2 country codes. Defaults to &#x60;[\&quot;US\&quot;]&#x60; only when no other geo (&#x60;cities&#x60;, &#x60;regions&#x60;, &#x60;zips&#x60;, &#x60;metros&#x60;, &#x60;customLocations&#x60;) is supplied. | [optional] |
20
+ | **cities** | [**Array&lt;CtwaAdRequestBodyCitiesInner&gt;**](CtwaAdRequestBodyCitiesInner.md) | City-level geo targeting for local CTWA campaigns. Each entry maps to Meta&#39;s TargetingGeoLocationCity. &#x60;key&#x60; is Meta&#39;s city ID. &#x60;radius&#x60; and &#x60;distance_unit&#x60; are coupled: set both or neither. Meta enforces a minimum city radius (~17 km / 10 mi); smaller values resolve to a 0-size audience and the ad fails at launch. For a tighter catchment use customLocations (lat/lng). | [optional] |
21
+ | **regions** | [**Array&lt;CtwaAdRequestBodyRegionsInner&gt;**](CtwaAdRequestBodyRegionsInner.md) | Region / state-level geo targeting. &#x60;key&#x60; is Meta&#39;s region ID (lookupable via GET /v1/ads/targeting/search?type&#x3D;region). | [optional] |
22
+ | **zips** | [**Array&lt;CtwaAdRequestBodyZipsInner&gt;**](CtwaAdRequestBodyZipsInner.md) | ZIP / postal-code geo targeting. &#x60;key&#x60; is the platform&#39;s postal id resolved via /v1/ads/targeting/search. | [optional] |
23
+ | **metros** | [**Array&lt;CtwaAdRequestBodyZipsInner&gt;**](CtwaAdRequestBodyZipsInner.md) | DMA / metro-area geo targeting. &#x60;key&#x60; is Meta&#39;s metro id (e.g. &#x60;DMA:807&#x60;). | [optional] |
24
+ | **custom_locations** | [**Array&lt;CreateStandaloneAdRequestCustomLocationsInner&gt;**](CreateStandaloneAdRequestCustomLocationsInner.md) | Point-radius geo (Meta &#x60;geo_locations.custom_locations&#x60;). Use for targeting a radius around a specific lat/long when no Meta city/region key fits. &#x60;distanceUnit&#x60; is required. | [optional] |
25
+ | **age_min** | **Integer** | | [optional] |
26
+ | **age_max** | **Integer** | | [optional] |
27
+ | **interests** | [**Array&lt;CreateStandaloneAdRequestBehaviorsInner&gt;**](CreateStandaloneAdRequestBehaviorsInner.md) | | [optional] |
28
+ | **audience_id** | **String** | Custom audience ID to target. | [optional] |
29
+ | **placements** | [**CtwaAdRequestBodyPlacements**](CtwaAdRequestBodyPlacements.md) | | [optional] |
30
+ | **advantage_audience** | **Integer** | Meta&#39;s Advantage+ audience expansion. &#x60;0&#x60; (default) keeps targeting strict; &#x60;1&#x60; lets Meta expand beyond the supplied targeting when its delivery system finds better matches. Always sent on CREATE (Meta requires it). | [optional] |
31
+ | **objective** | **String** | Defaults to &#x60;OUTCOME_ENGAGEMENT&#x60;. &#x60;OUTCOME_SALES&#x60; and &#x60;OUTCOME_LEADS&#x60; require additional account configuration (Dataset linked to the WABA for sales) and may be rejected by Meta if missing. | [optional] |
32
+ | **bid_strategy** | **String** | Meta bid strategy applied to the shared ad set. Defaults to &#x60;LOWEST_COST_WITHOUT_CAP&#x60; (auto-bid) when omitted. &#x60;LOWEST_COST_WITH_BID_CAP&#x60; and &#x60;COST_CAP&#x60; require &#x60;bidAmount&#x60;. &#x60;LOWEST_COST_WITH_MIN_ROAS&#x60; requires &#x60;roasAverageFloor&#x60;. CTWA&#39;s &#x60;optimization_goal&#x60; is fixed to &#x60;CONVERSATIONS&#x60;, but the bid strategy is independent. | [optional] |
33
+ | **bid_amount** | **Float** | Whole currency units (e.g. &#x60;5&#x60; &#x3D; $5.00 on a USD account). Required when &#x60;bidStrategy&#x60; is &#x60;LOWEST_COST_WITH_BID_CAP&#x60; or &#x60;COST_CAP&#x60;; rejected otherwise. | [optional] |
34
+ | **roas_average_floor** | **Float** | Decimal ROAS multiplier (e.g. &#x60;2.0&#x60; &#x3D; 2.0× ROAS floor). Required when &#x60;bidStrategy&#x60; is &#x60;LOWEST_COST_WITH_MIN_ROAS&#x60;; rejected otherwise. Meta enforces its own upper bound server-side. | [optional] |
35
+ | **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] |
36
+ | **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] |
37
+ | **phone_number** | **String** | E.164 number the CALL_NOW CTA dials (e.g. +34600111222). | |
38
+ | **link_url** | **String** | Website shown as the creative&#39;s link. Required: Meta rejects tel: as link_data.link; the phone number rides only the CTA. | |
39
+
40
+ ## Example
41
+
42
+ ```ruby
43
+ require 'zernio-sdk'
44
+
45
+ instance = Zernio::CreateCallAdRequest.new(
46
+ account_id: null,
47
+ ad_account_id: null,
48
+ name: null,
49
+ headline: null,
50
+ body: null,
51
+ image_url: null,
52
+ video: null,
53
+ creatives: null,
54
+ budget_amount: null,
55
+ budget_type: null,
56
+ currency: null,
57
+ end_date: null,
58
+ countries: null,
59
+ cities: null,
60
+ regions: null,
61
+ zips: null,
62
+ metros: null,
63
+ custom_locations: null,
64
+ age_min: null,
65
+ age_max: null,
66
+ interests: null,
67
+ audience_id: null,
68
+ placements: null,
69
+ advantage_audience: null,
70
+ objective: null,
71
+ bid_strategy: null,
72
+ bid_amount: null,
73
+ roas_average_floor: null,
74
+ dsa_beneficiary: null,
75
+ dsa_payor: null,
76
+ phone_number: null,
77
+ link_url: null
78
+ )
79
+ ```
80
+
@@ -0,0 +1,78 @@
1
+ # Zernio::CreateMessagingAdRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | Facebook or Instagram SocialAccount ID. | |
8
+ | **ad_account_id** | **String** | Meta ad account ID, e.g. &#x60;act_123456789&#x60;. | |
9
+ | **name** | **String** | Ad display name. Used to derive campaign / ad set names. On the multi-creative shape, each ad&#39;s Meta name gets a \&quot; #N\&quot; suffix (1-indexed) so Ads Manager shows them as a numbered batch. | |
10
+ | **headline** | **String** | Single-creative shape only. Mutually exclusive with &#x60;creatives[]&#x60;. | [optional] |
11
+ | **body** | **String** | Primary text shown above the image / video. Single-creative shape only. Mutually exclusive with &#x60;creatives[]&#x60;. | [optional] |
12
+ | **image_url** | **String** | Image asset for single-creative shape. Mutually exclusive with &#x60;video&#x60; and with &#x60;creatives[]&#x60;. Required on the single-creative shape if &#x60;video&#x60; is not supplied. | [optional] |
13
+ | **video** | [**CtwaAdRequestBodyVideo**](CtwaAdRequestBodyVideo.md) | | [optional] |
14
+ | **creatives** | [**Array&lt;CtwaAdRequestBodyCreativesInner&gt;**](CtwaAdRequestBodyCreativesInner.md) | Multi-creative shape: N CTWA ads under one campaign + one ad set, sharing budget and targeting. Mutually exclusive with the top-level single-creative fields (&#x60;headline&#x60; / &#x60;body&#x60; / &#x60;imageUrl&#x60; / &#x60;video&#x60;). Each entry must supply its own headline, body, and exactly one of &#x60;imageUrl&#x60; / &#x60;video&#x60;. | [optional] |
15
+ | **budget_amount** | **Float** | Budget amount in the ad account&#39;s currency major units (e.g. dollars for USD, not cents). Must be &gt; 0. | |
16
+ | **budget_type** | **String** | | |
17
+ | **currency** | **String** | ISO 4217 currency code matching the ad account&#39;s currency (e.g. &#x60;USD&#x60;). Optional; Meta infers from the ad account when omitted. | [optional] |
18
+ | **end_date** | **Time** | ISO 8601 datetime. Required when &#x60;budgetType&#x60; is &#x60;lifetime&#x60;. | [optional] |
19
+ | **countries** | **Array&lt;String&gt;** | ISO 3166-1 alpha-2 country codes. Defaults to &#x60;[\&quot;US\&quot;]&#x60; only when no other geo (&#x60;cities&#x60;, &#x60;regions&#x60;, &#x60;zips&#x60;, &#x60;metros&#x60;, &#x60;customLocations&#x60;) is supplied. | [optional] |
20
+ | **cities** | [**Array&lt;CtwaAdRequestBodyCitiesInner&gt;**](CtwaAdRequestBodyCitiesInner.md) | City-level geo targeting for local CTWA campaigns. Each entry maps to Meta&#39;s TargetingGeoLocationCity. &#x60;key&#x60; is Meta&#39;s city ID. &#x60;radius&#x60; and &#x60;distance_unit&#x60; are coupled: set both or neither. Meta enforces a minimum city radius (~17 km / 10 mi); smaller values resolve to a 0-size audience and the ad fails at launch. For a tighter catchment use customLocations (lat/lng). | [optional] |
21
+ | **regions** | [**Array&lt;CtwaAdRequestBodyRegionsInner&gt;**](CtwaAdRequestBodyRegionsInner.md) | Region / state-level geo targeting. &#x60;key&#x60; is Meta&#39;s region ID (lookupable via GET /v1/ads/targeting/search?type&#x3D;region). | [optional] |
22
+ | **zips** | [**Array&lt;CtwaAdRequestBodyZipsInner&gt;**](CtwaAdRequestBodyZipsInner.md) | ZIP / postal-code geo targeting. &#x60;key&#x60; is the platform&#39;s postal id resolved via /v1/ads/targeting/search. | [optional] |
23
+ | **metros** | [**Array&lt;CtwaAdRequestBodyZipsInner&gt;**](CtwaAdRequestBodyZipsInner.md) | DMA / metro-area geo targeting. &#x60;key&#x60; is Meta&#39;s metro id (e.g. &#x60;DMA:807&#x60;). | [optional] |
24
+ | **custom_locations** | [**Array&lt;CreateStandaloneAdRequestCustomLocationsInner&gt;**](CreateStandaloneAdRequestCustomLocationsInner.md) | Point-radius geo (Meta &#x60;geo_locations.custom_locations&#x60;). Use for targeting a radius around a specific lat/long when no Meta city/region key fits. &#x60;distanceUnit&#x60; is required. | [optional] |
25
+ | **age_min** | **Integer** | | [optional] |
26
+ | **age_max** | **Integer** | | [optional] |
27
+ | **interests** | [**Array&lt;CreateStandaloneAdRequestBehaviorsInner&gt;**](CreateStandaloneAdRequestBehaviorsInner.md) | | [optional] |
28
+ | **audience_id** | **String** | Custom audience ID to target. | [optional] |
29
+ | **placements** | [**CtwaAdRequestBodyPlacements**](CtwaAdRequestBodyPlacements.md) | | [optional] |
30
+ | **advantage_audience** | **Integer** | Meta&#39;s Advantage+ audience expansion. &#x60;0&#x60; (default) keeps targeting strict; &#x60;1&#x60; lets Meta expand beyond the supplied targeting when its delivery system finds better matches. Always sent on CREATE (Meta requires it). | [optional] |
31
+ | **objective** | **String** | Defaults to &#x60;OUTCOME_ENGAGEMENT&#x60;. &#x60;OUTCOME_SALES&#x60; and &#x60;OUTCOME_LEADS&#x60; require additional account configuration (Dataset linked to the WABA for sales) and may be rejected by Meta if missing. | [optional] |
32
+ | **bid_strategy** | **String** | Meta bid strategy applied to the shared ad set. Defaults to &#x60;LOWEST_COST_WITHOUT_CAP&#x60; (auto-bid) when omitted. &#x60;LOWEST_COST_WITH_BID_CAP&#x60; and &#x60;COST_CAP&#x60; require &#x60;bidAmount&#x60;. &#x60;LOWEST_COST_WITH_MIN_ROAS&#x60; requires &#x60;roasAverageFloor&#x60;. CTWA&#39;s &#x60;optimization_goal&#x60; is fixed to &#x60;CONVERSATIONS&#x60;, but the bid strategy is independent. | [optional] |
33
+ | **bid_amount** | **Float** | Whole currency units (e.g. &#x60;5&#x60; &#x3D; $5.00 on a USD account). Required when &#x60;bidStrategy&#x60; is &#x60;LOWEST_COST_WITH_BID_CAP&#x60; or &#x60;COST_CAP&#x60;; rejected otherwise. | [optional] |
34
+ | **roas_average_floor** | **Float** | Decimal ROAS multiplier (e.g. &#x60;2.0&#x60; &#x3D; 2.0× ROAS floor). Required when &#x60;bidStrategy&#x60; is &#x60;LOWEST_COST_WITH_MIN_ROAS&#x60;; rejected otherwise. Meta enforces its own upper bound server-side. | [optional] |
35
+ | **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] |
36
+ | **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] |
37
+ | **destination** | **String** | Where the conversation opens when the ad is tapped. | |
38
+
39
+ ## Example
40
+
41
+ ```ruby
42
+ require 'zernio-sdk'
43
+
44
+ instance = Zernio::CreateMessagingAdRequest.new(
45
+ account_id: null,
46
+ ad_account_id: null,
47
+ name: null,
48
+ headline: null,
49
+ body: null,
50
+ image_url: null,
51
+ video: null,
52
+ creatives: null,
53
+ budget_amount: null,
54
+ budget_type: null,
55
+ currency: null,
56
+ end_date: null,
57
+ countries: null,
58
+ cities: null,
59
+ regions: null,
60
+ zips: null,
61
+ metros: null,
62
+ custom_locations: null,
63
+ age_min: null,
64
+ age_max: null,
65
+ interests: null,
66
+ audience_id: null,
67
+ placements: null,
68
+ advantage_audience: null,
69
+ objective: null,
70
+ bid_strategy: null,
71
+ bid_amount: null,
72
+ roas_average_floor: null,
73
+ dsa_beneficiary: null,
74
+ dsa_payor: null,
75
+ destination: null
76
+ )
77
+ ```
78
+