zernio-sdk 0.0.539 → 0.0.541

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 (109) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -42
  3. data/docs/AdAudiencesApi.md +5 -5
  4. data/docs/AdCampaignsApi.md +0 -142
  5. data/docs/AdsApi.md +18 -700
  6. data/docs/InboxApi.md +79 -0
  7. data/docs/InboxWebhookMessageAttachmentsInner.md +1 -1
  8. data/docs/SMSApi.md +1 -276
  9. data/docs/SendSmsRequest.md +1 -1
  10. data/docs/WebhookPayloadMessageMessage.md +1 -1
  11. data/docs/WebhookPayloadMessageMessageAttachmentsInner.md +22 -0
  12. data/docs/WebhookPayloadMessageSentMessage.md +1 -1
  13. data/docs/WebhookPayloadMessageSentMessageAttachmentsInner.md +22 -0
  14. data/lib/zernio-sdk/api/ad_audiences_api.rb +4 -4
  15. data/lib/zernio-sdk/api/ad_campaigns_api.rb +0 -142
  16. data/lib/zernio-sdk/api/ads_api.rb +39 -739
  17. data/lib/zernio-sdk/api/inbox_api.rb +92 -0
  18. data/lib/zernio-sdk/api/sms_api.rb +2 -256
  19. data/lib/zernio-sdk/models/inbox_webhook_message_attachments_inner.rb +1 -1
  20. data/lib/zernio-sdk/models/send_sms_request.rb +1 -1
  21. data/lib/zernio-sdk/models/webhook_payload_message_message.rb +1 -1
  22. data/lib/zernio-sdk/models/{create_sms_sender_id_request.rb → webhook_payload_message_message_attachments_inner.rb} +52 -33
  23. data/lib/zernio-sdk/models/webhook_payload_message_sent_message.rb +1 -1
  24. data/lib/zernio-sdk/models/{update_ad_creative_request.rb → webhook_payload_message_sent_message_attachments_inner.rb} +46 -44
  25. data/lib/zernio-sdk/version.rb +1 -1
  26. data/lib/zernio-sdk.rb +3 -26
  27. data/openapi.yaml +87 -624
  28. data/spec/api/ad_audiences_api_spec.rb +2 -2
  29. data/spec/api/ad_campaigns_api_spec.rb +0 -25
  30. data/spec/api/ads_api_spec.rb +0 -128
  31. data/spec/api/inbox_api_spec.rb +48 -0
  32. data/spec/api/sms_api_spec.rb +1 -47
  33. data/spec/models/{list_ad_images200_response_spec.rb → webhook_payload_message_message_attachments_inner_spec.rb} +9 -9
  34. data/spec/models/{list_ad_creatives200_response_spec.rb → webhook_payload_message_sent_message_attachments_inner_spec.rb} +9 -9
  35. metadata +13 -105
  36. data/docs/CreateAdCampaign201Response.md +0 -24
  37. data/docs/CreateAdCampaignRequest.md +0 -32
  38. data/docs/CreateAdCreative201Response.md +0 -20
  39. data/docs/CreateAdCreativeRequest.md +0 -38
  40. data/docs/CreateAdCreativeRequestCarouselCardsInner.md +0 -26
  41. data/docs/CreateSmsSenderId200Response.md +0 -22
  42. data/docs/CreateSmsSenderIdRequest.md +0 -18
  43. data/docs/DeleteAdCreative200Response.md +0 -20
  44. data/docs/DeleteSmsSenderId200Response.md +0 -18
  45. data/docs/DuplicateAd200Response.md +0 -22
  46. data/docs/DuplicateAdRequest.md +0 -28
  47. data/docs/DuplicateAdSet200Response.md +0 -22
  48. data/docs/DuplicateAdSetRequest.md +0 -36
  49. data/docs/GetAdCreative200Response.md +0 -18
  50. data/docs/ListAdCreatives200Response.md +0 -22
  51. data/docs/ListAdImages200Response.md +0 -22
  52. data/docs/ListAdLabels200Response.md +0 -22
  53. data/docs/ListHighDemandPeriods200Response.md +0 -22
  54. data/docs/ListSmsSenderIds200Response.md +0 -20
  55. data/docs/ListSmsSenderIds200ResponseBudget.md +0 -24
  56. data/docs/ListSmsSenderIds200ResponseBudgetPendingRequest.md +0 -22
  57. data/docs/ListSmsSenderIds200ResponseSenderIdsInner.md +0 -24
  58. data/docs/RequestSmsSenderIdLimitIncrease200Response.md +0 -20
  59. data/docs/RequestSmsSenderIdLimitIncreaseRequest.md +0 -20
  60. data/docs/UpdateAdCreative200Response.md +0 -22
  61. data/docs/UpdateAdCreativeRequest.md +0 -20
  62. data/lib/zernio-sdk/models/create_ad_campaign201_response.rb +0 -210
  63. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +0 -343
  64. data/lib/zernio-sdk/models/create_ad_creative201_response.rb +0 -157
  65. data/lib/zernio-sdk/models/create_ad_creative_request.rb +0 -390
  66. data/lib/zernio-sdk/models/create_ad_creative_request_carousel_cards_inner.rb +0 -255
  67. data/lib/zernio-sdk/models/create_sms_sender_id200_response.rb +0 -166
  68. data/lib/zernio-sdk/models/delete_ad_creative200_response.rb +0 -156
  69. data/lib/zernio-sdk/models/delete_sms_sender_id200_response.rb +0 -147
  70. data/lib/zernio-sdk/models/duplicate_ad200_response.rb +0 -200
  71. data/lib/zernio-sdk/models/duplicate_ad_request.rb +0 -243
  72. data/lib/zernio-sdk/models/duplicate_ad_set200_response.rb +0 -201
  73. data/lib/zernio-sdk/models/duplicate_ad_set_request.rb +0 -302
  74. data/lib/zernio-sdk/models/get_ad_creative200_response.rb +0 -148
  75. data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +0 -167
  76. data/lib/zernio-sdk/models/list_ad_images200_response.rb +0 -167
  77. data/lib/zernio-sdk/models/list_ad_labels200_response.rb +0 -167
  78. data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +0 -168
  79. data/lib/zernio-sdk/models/list_sms_sender_ids200_response.rb +0 -158
  80. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget.rb +0 -178
  81. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget_pending_request.rb +0 -167
  82. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_sender_ids_inner.rb +0 -175
  83. data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase200_response.rb +0 -156
  84. data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase_request.rb +0 -210
  85. data/lib/zernio-sdk/models/update_ad_creative200_response.rb +0 -165
  86. data/spec/models/create_ad_campaign201_response_spec.rb +0 -58
  87. data/spec/models/create_ad_campaign_request_spec.rb +0 -94
  88. data/spec/models/create_ad_creative201_response_spec.rb +0 -42
  89. data/spec/models/create_ad_creative_request_carousel_cards_inner_spec.rb +0 -60
  90. data/spec/models/create_ad_creative_request_spec.rb +0 -96
  91. data/spec/models/create_sms_sender_id200_response_spec.rb +0 -48
  92. data/spec/models/create_sms_sender_id_request_spec.rb +0 -36
  93. data/spec/models/delete_ad_creative200_response_spec.rb +0 -42
  94. data/spec/models/delete_sms_sender_id200_response_spec.rb +0 -36
  95. data/spec/models/duplicate_ad200_response_spec.rb +0 -52
  96. data/spec/models/duplicate_ad_request_spec.rb +0 -74
  97. data/spec/models/duplicate_ad_set200_response_spec.rb +0 -52
  98. data/spec/models/duplicate_ad_set_request_spec.rb +0 -102
  99. data/spec/models/get_ad_creative200_response_spec.rb +0 -36
  100. data/spec/models/list_ad_labels200_response_spec.rb +0 -48
  101. data/spec/models/list_high_demand_periods200_response_spec.rb +0 -48
  102. data/spec/models/list_sms_sender_ids200_response_budget_pending_request_spec.rb +0 -48
  103. data/spec/models/list_sms_sender_ids200_response_budget_spec.rb +0 -54
  104. data/spec/models/list_sms_sender_ids200_response_sender_ids_inner_spec.rb +0 -54
  105. data/spec/models/list_sms_sender_ids200_response_spec.rb +0 -42
  106. data/spec/models/request_sms_sender_id_limit_increase200_response_spec.rb +0 -42
  107. data/spec/models/request_sms_sender_id_limit_increase_request_spec.rb +0 -42
  108. data/spec/models/update_ad_creative200_response_spec.rb +0 -48
  109. data/spec/models/update_ad_creative_request_spec.rb +0 -42
data/docs/AdsApi.md CHANGED
@@ -9,7 +9,6 @@ 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
  | [**cancel_rf_reservation**](AdsApi.md#cancel_rf_reservation) | **DELETE** /v1/ads/rf-predictions/{predictionId} | Cancel a Reach & Frequency reservation (Meta) |
12
- | [**create_ad_creative**](AdsApi.md#create_ad_creative) | **POST** /v1/ads/creatives | Create a standalone creative (Meta) |
13
12
  | [**create_ad_insights_report**](AdsApi.md#create_ad_insights_report) | **POST** /v1/ads/insights/reports | Submit an async insights report run (Meta) |
14
13
  | [**create_call_ad**](AdsApi.md#create_call_ad) | **POST** /v1/ads/call | Create Click-to-Call ad |
15
14
  | [**create_conversion_destination**](AdsApi.md#create_conversion_destination) | **POST** /v1/accounts/{accountId}/conversion-destinations | Create a conversion destination |
@@ -20,16 +19,13 @@ All URIs are relative to *https://zernio.com/api*
20
19
  | [**create_standalone_ad**](AdsApi.md#create_standalone_ad) | **POST** /v1/ads/create | Create standalone ad |
21
20
  | [**create_test_lead**](AdsApi.md#create_test_lead) | **POST** /v1/ads/lead-forms/{formId}/test-leads | Create a test lead |
22
21
  | [**delete_ad**](AdsApi.md#delete_ad) | **DELETE** /v1/ads/{adId} | Cancel an ad |
23
- | [**delete_ad_creative**](AdsApi.md#delete_ad_creative) | **DELETE** /v1/ads/creatives/{creativeId} | Delete a creative (Meta) |
24
22
  | [**delete_conversion_destination**](AdsApi.md#delete_conversion_destination) | **DELETE** /v1/accounts/{accountId}/conversion-destinations/{destinationId} | Delete a conversion destination |
25
- | [**duplicate_ad**](AdsApi.md#duplicate_ad) | **POST** /v1/ads/{adId}/duplicate | Duplicate an ad (Meta) |
26
23
  | [**estimate_ad_reach**](AdsApi.md#estimate_ad_reach) | **POST** /v1/ads/targeting/reach-estimate | Estimate audience reach |
27
24
  | [**generate_ad_previews**](AdsApi.md#generate_ad_previews) | **POST** /v1/ads/preview | Render pre-create ad previews (Meta) |
28
25
  | [**get_ad**](AdsApi.md#get_ad) | **GET** /v1/ads/{adId} | Get ad details |
29
26
  | [**get_ad_account_finance**](AdsApi.md#get_ad_account_finance) | **GET** /v1/ads/accounts/finance | Ad account finances (Meta) |
30
27
  | [**get_ad_analytics**](AdsApi.md#get_ad_analytics) | **GET** /v1/ads/{adId}/analytics | Get ad analytics |
31
28
  | [**get_ad_comments**](AdsApi.md#get_ad_comments) | **GET** /v1/ads/{adId}/comments | List comments on an ad |
32
- | [**get_ad_creative**](AdsApi.md#get_ad_creative) | **GET** /v1/ads/creatives/{creativeId} | Creative details (Meta) |
33
29
  | [**get_ad_insights_report**](AdsApi.md#get_ad_insights_report) | **GET** /v1/ads/insights/reports/{reportRunId} | Poll an async insights report run (Meta) |
34
30
  | [**get_ad_previews**](AdsApi.md#get_ad_previews) | **GET** /v1/ads/{adId}/preview | Render previews of an existing ad (Meta) |
35
31
  | [**get_ad_tracking_tags**](AdsApi.md#get_ad_tracking_tags) | **GET** /v1/ads/{adId}/tracking-tags | Get ad tracking tags |
@@ -47,16 +43,12 @@ All URIs are relative to *https://zernio.com/api*
47
43
  | [**list_ad_accounts**](AdsApi.md#list_ad_accounts) | **GET** /v1/ads/accounts | List ad accounts |
48
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 |
49
45
  | [**list_ad_catalogs**](AdsApi.md#list_ad_catalogs) | **GET** /v1/ads/catalogs | List Meta product catalogs |
50
- | [**list_ad_creatives**](AdsApi.md#list_ad_creatives) | **GET** /v1/ads/creatives | Creative library (Meta) |
51
- | [**list_ad_images**](AdsApi.md#list_ad_images) | **GET** /v1/ads/images | Ad image library (Meta) |
52
- | [**list_ad_labels**](AdsApi.md#list_ad_labels) | **GET** /v1/ads/labels | Ad labels (Meta) |
53
46
  | [**list_ad_studies**](AdsApi.md#list_ad_studies) | **GET** /v1/ads/studies | A/B tests and lift studies (Meta) |
54
47
  | [**list_ads**](AdsApi.md#list_ads) | **GET** /v1/ads | List ads |
55
48
  | [**list_ads_business_centers**](AdsApi.md#list_ads_business_centers) | **GET** /v1/ads/business-centers | List TikTok Business Centers |
56
49
  | [**list_conversion_associations**](AdsApi.md#list_conversion_associations) | **GET** /v1/accounts/{accountId}/conversion-destinations/{destinationId}/associations | List associated campaigns |
57
50
  | [**list_conversion_destinations**](AdsApi.md#list_conversion_destinations) | **GET** /v1/accounts/{accountId}/conversion-destinations | List conversion destinations |
58
51
  | [**list_form_leads**](AdsApi.md#list_form_leads) | **GET** /v1/ads/lead-forms/{formId}/leads | List leads for a single form |
59
- | [**list_high_demand_periods**](AdsApi.md#list_high_demand_periods) | **GET** /v1/ads/high-demand-periods | High demand periods / budget schedules (Meta) |
60
52
  | [**list_lead_forms**](AdsApi.md#list_lead_forms) | **GET** /v1/ads/lead-forms | List lead forms |
61
53
  | [**list_leads**](AdsApi.md#list_leads) | **GET** /v1/ads/leads | List submitted leads |
62
54
  | [**list_whats_app_conversions**](AdsApi.md#list_whats_app_conversions) | **GET** /v1/whatsapp/conversions | List conversion events |
@@ -69,7 +61,6 @@ All URIs are relative to *https://zernio.com/api*
69
61
  | [**send_whats_app_conversion**](AdsApi.md#send_whats_app_conversion) | **POST** /v1/whatsapp/conversions | Send WhatsApp conversion event |
70
62
  | [**update_ad**](AdsApi.md#update_ad) | **PUT** /v1/ads/{adId} | Update ad |
71
63
  | [**update_ad_account**](AdsApi.md#update_ad_account) | **PATCH** /v1/ads/accounts | Update ad account settings |
72
- | [**update_ad_creative**](AdsApi.md#update_ad_creative) | **PUT** /v1/ads/creatives/{creativeId} | Rename a creative (Meta) |
73
64
  | [**update_ad_status**](AdsApi.md#update_ad_status) | **PUT** /v1/ads/{adId}/status | Pause or resume a single ad |
74
65
  | [**update_ad_tracking_tags**](AdsApi.md#update_ad_tracking_tags) | **PATCH** /v1/ads/{adId}/tracking-tags | Set ad tracking tags |
75
66
  | [**update_conversion_destination**](AdsApi.md#update_conversion_destination) | **PATCH** /v1/accounts/{accountId}/conversion-destinations/{destinationId} | Update a conversion destination |
@@ -430,75 +421,6 @@ nil (empty response body)
430
421
  - **Accept**: application/json
431
422
 
432
423
 
433
- ## create_ad_creative
434
-
435
- > <CreateAdCreative201Response> create_ad_creative(create_ad_creative_request)
436
-
437
- Create a standalone creative (Meta)
438
-
439
- Creates a creative in the library WITHOUT an ad, reusable on the create endpoints via `existingCreativeId`. Provide exactly one of `imageUrl` (uploaded server-side), `imageHash` (from POST /v1/ads/images or the library list), or `carouselCards` (2-10 hand-built cards). The Page (and linked Instagram account, when present) is resolved from `accountId` as the story actor. Meta only.
440
-
441
- ### Examples
442
-
443
- ```ruby
444
- require 'time'
445
- require 'zernio-sdk'
446
- # setup authorization
447
- Zernio.configure do |config|
448
- # Configure Bearer authorization (JWT): bearerAuth
449
- config.access_token = 'YOUR_BEARER_TOKEN'
450
- end
451
-
452
- api_instance = Zernio::AdsApi.new
453
- create_ad_creative_request = Zernio::CreateAdCreativeRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', headline: 'headline_example', body: 'body_example', link_url: 'link_url_example'}) # CreateAdCreativeRequest |
454
-
455
- begin
456
- # Create a standalone creative (Meta)
457
- result = api_instance.create_ad_creative(create_ad_creative_request)
458
- p result
459
- rescue Zernio::ApiError => e
460
- puts "Error when calling AdsApi->create_ad_creative: #{e}"
461
- end
462
- ```
463
-
464
- #### Using the create_ad_creative_with_http_info variant
465
-
466
- This returns an Array which contains the response data, status code and headers.
467
-
468
- > <Array(<CreateAdCreative201Response>, Integer, Hash)> create_ad_creative_with_http_info(create_ad_creative_request)
469
-
470
- ```ruby
471
- begin
472
- # Create a standalone creative (Meta)
473
- data, status_code, headers = api_instance.create_ad_creative_with_http_info(create_ad_creative_request)
474
- p status_code # => 2xx
475
- p headers # => { ... }
476
- p data # => <CreateAdCreative201Response>
477
- rescue Zernio::ApiError => e
478
- puts "Error when calling AdsApi->create_ad_creative_with_http_info: #{e}"
479
- end
480
- ```
481
-
482
- ### Parameters
483
-
484
- | Name | Type | Description | Notes |
485
- | ---- | ---- | ----------- | ----- |
486
- | **create_ad_creative_request** | [**CreateAdCreativeRequest**](CreateAdCreativeRequest.md) | | |
487
-
488
- ### Return type
489
-
490
- [**CreateAdCreative201Response**](CreateAdCreative201Response.md)
491
-
492
- ### Authorization
493
-
494
- [bearerAuth](../README.md#bearerAuth)
495
-
496
- ### HTTP request headers
497
-
498
- - **Content-Type**: application/json
499
- - **Accept**: application/json
500
-
501
-
502
424
  ## create_ad_insights_report
503
425
 
504
426
  > <CreateAdInsightsReport202Response> create_ad_insights_report(create_ad_insights_report_request)
@@ -1195,77 +1117,6 @@ end
1195
1117
  - **Accept**: application/json
1196
1118
 
1197
1119
 
1198
- ## delete_ad_creative
1199
-
1200
- > <DeleteAdCreative200Response> delete_ad_creative(creative_id, account_id)
1201
-
1202
- Delete a creative (Meta)
1203
-
1204
- Deletes a creative from the library. Meta only allows deleting creatives not referenced by any ad — otherwise its 400 surfaces verbatim.
1205
-
1206
- ### Examples
1207
-
1208
- ```ruby
1209
- require 'time'
1210
- require 'zernio-sdk'
1211
- # setup authorization
1212
- Zernio.configure do |config|
1213
- # Configure Bearer authorization (JWT): bearerAuth
1214
- config.access_token = 'YOUR_BEARER_TOKEN'
1215
- end
1216
-
1217
- api_instance = Zernio::AdsApi.new
1218
- creative_id = 'creative_id_example' # String | Platform creative id
1219
- account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
1220
-
1221
- begin
1222
- # Delete a creative (Meta)
1223
- result = api_instance.delete_ad_creative(creative_id, account_id)
1224
- p result
1225
- rescue Zernio::ApiError => e
1226
- puts "Error when calling AdsApi->delete_ad_creative: #{e}"
1227
- end
1228
- ```
1229
-
1230
- #### Using the delete_ad_creative_with_http_info variant
1231
-
1232
- This returns an Array which contains the response data, status code and headers.
1233
-
1234
- > <Array(<DeleteAdCreative200Response>, Integer, Hash)> delete_ad_creative_with_http_info(creative_id, account_id)
1235
-
1236
- ```ruby
1237
- begin
1238
- # Delete a creative (Meta)
1239
- data, status_code, headers = api_instance.delete_ad_creative_with_http_info(creative_id, account_id)
1240
- p status_code # => 2xx
1241
- p headers # => { ... }
1242
- p data # => <DeleteAdCreative200Response>
1243
- rescue Zernio::ApiError => e
1244
- puts "Error when calling AdsApi->delete_ad_creative_with_http_info: #{e}"
1245
- end
1246
- ```
1247
-
1248
- ### Parameters
1249
-
1250
- | Name | Type | Description | Notes |
1251
- | ---- | ---- | ----------- | ----- |
1252
- | **creative_id** | **String** | Platform creative id | |
1253
- | **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
1254
-
1255
- ### Return type
1256
-
1257
- [**DeleteAdCreative200Response**](DeleteAdCreative200Response.md)
1258
-
1259
- ### Authorization
1260
-
1261
- [bearerAuth](../README.md#bearerAuth)
1262
-
1263
- ### HTTP request headers
1264
-
1265
- - **Content-Type**: Not defined
1266
- - **Accept**: application/json
1267
-
1268
-
1269
1120
  ## delete_conversion_destination
1270
1121
 
1271
1122
  > delete_conversion_destination(account_id, destination_id, opts)
@@ -1340,79 +1191,6 @@ nil (empty response body)
1340
1191
  - **Accept**: application/json
1341
1192
 
1342
1193
 
1343
- ## duplicate_ad
1344
-
1345
- > <DuplicateAd200Response> duplicate_ad(ad_id, opts)
1346
-
1347
- Duplicate an ad (Meta)
1348
-
1349
- Duplicates a single ad via Meta's native `POST /{ad-id}/copies`. The copy is created paused. `adSetId` retargets the copy into another ad set; omitted = the source's own ad set. Accepts the Zernio ad id or the platform ad id. Sync discovery is triggered automatically (`syncAfter: false` to skip). Meta only.
1350
-
1351
- ### Examples
1352
-
1353
- ```ruby
1354
- require 'time'
1355
- require 'zernio-sdk'
1356
- # setup authorization
1357
- Zernio.configure do |config|
1358
- # Configure Bearer authorization (JWT): bearerAuth
1359
- config.access_token = 'YOUR_BEARER_TOKEN'
1360
- end
1361
-
1362
- api_instance = Zernio::AdsApi.new
1363
- ad_id = 'ad_id_example' # String | Zernio ad ID or platform ad ID
1364
- opts = {
1365
- duplicate_ad_request: Zernio::DuplicateAdRequest.new # DuplicateAdRequest |
1366
- }
1367
-
1368
- begin
1369
- # Duplicate an ad (Meta)
1370
- result = api_instance.duplicate_ad(ad_id, opts)
1371
- p result
1372
- rescue Zernio::ApiError => e
1373
- puts "Error when calling AdsApi->duplicate_ad: #{e}"
1374
- end
1375
- ```
1376
-
1377
- #### Using the duplicate_ad_with_http_info variant
1378
-
1379
- This returns an Array which contains the response data, status code and headers.
1380
-
1381
- > <Array(<DuplicateAd200Response>, Integer, Hash)> duplicate_ad_with_http_info(ad_id, opts)
1382
-
1383
- ```ruby
1384
- begin
1385
- # Duplicate an ad (Meta)
1386
- data, status_code, headers = api_instance.duplicate_ad_with_http_info(ad_id, opts)
1387
- p status_code # => 2xx
1388
- p headers # => { ... }
1389
- p data # => <DuplicateAd200Response>
1390
- rescue Zernio::ApiError => e
1391
- puts "Error when calling AdsApi->duplicate_ad_with_http_info: #{e}"
1392
- end
1393
- ```
1394
-
1395
- ### Parameters
1396
-
1397
- | Name | Type | Description | Notes |
1398
- | ---- | ---- | ----------- | ----- |
1399
- | **ad_id** | **String** | Zernio ad ID or platform ad ID | |
1400
- | **duplicate_ad_request** | [**DuplicateAdRequest**](DuplicateAdRequest.md) | | [optional] |
1401
-
1402
- ### Return type
1403
-
1404
- [**DuplicateAd200Response**](DuplicateAd200Response.md)
1405
-
1406
- ### Authorization
1407
-
1408
- [bearerAuth](../README.md#bearerAuth)
1409
-
1410
- ### HTTP request headers
1411
-
1412
- - **Content-Type**: application/json
1413
- - **Accept**: application/json
1414
-
1415
-
1416
1194
  ## estimate_ad_reach
1417
1195
 
1418
1196
  > <EstimateAdReach200Response> estimate_ad_reach(estimate_ad_reach_request)
@@ -1845,81 +1623,6 @@ end
1845
1623
  - **Accept**: application/json
1846
1624
 
1847
1625
 
1848
- ## get_ad_creative
1849
-
1850
- > <GetAdCreative200Response> get_ad_creative(creative_id, account_id, opts)
1851
-
1852
- Creative details (Meta)
1853
-
1854
- One creative's details, verbatim from Meta. `fields` is a raw-passthrough override of the default projection. Meta only.
1855
-
1856
- ### Examples
1857
-
1858
- ```ruby
1859
- require 'time'
1860
- require 'zernio-sdk'
1861
- # setup authorization
1862
- Zernio.configure do |config|
1863
- # Configure Bearer authorization (JWT): bearerAuth
1864
- config.access_token = 'YOUR_BEARER_TOKEN'
1865
- end
1866
-
1867
- api_instance = Zernio::AdsApi.new
1868
- creative_id = 'creative_id_example' # String | Platform creative id
1869
- account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
1870
- opts = {
1871
- fields: 'fields_example' # String | Comma-separated Graph field override (supports nested {} projections).
1872
- }
1873
-
1874
- begin
1875
- # Creative details (Meta)
1876
- result = api_instance.get_ad_creative(creative_id, account_id, opts)
1877
- p result
1878
- rescue Zernio::ApiError => e
1879
- puts "Error when calling AdsApi->get_ad_creative: #{e}"
1880
- end
1881
- ```
1882
-
1883
- #### Using the get_ad_creative_with_http_info variant
1884
-
1885
- This returns an Array which contains the response data, status code and headers.
1886
-
1887
- > <Array(<GetAdCreative200Response>, Integer, Hash)> get_ad_creative_with_http_info(creative_id, account_id, opts)
1888
-
1889
- ```ruby
1890
- begin
1891
- # Creative details (Meta)
1892
- data, status_code, headers = api_instance.get_ad_creative_with_http_info(creative_id, account_id, opts)
1893
- p status_code # => 2xx
1894
- p headers # => { ... }
1895
- p data # => <GetAdCreative200Response>
1896
- rescue Zernio::ApiError => e
1897
- puts "Error when calling AdsApi->get_ad_creative_with_http_info: #{e}"
1898
- end
1899
- ```
1900
-
1901
- ### Parameters
1902
-
1903
- | Name | Type | Description | Notes |
1904
- | ---- | ---- | ----------- | ----- |
1905
- | **creative_id** | **String** | Platform creative id | |
1906
- | **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
1907
- | **fields** | **String** | Comma-separated Graph field override (supports nested {} projections). | [optional] |
1908
-
1909
- ### Return type
1910
-
1911
- [**GetAdCreative200Response**](GetAdCreative200Response.md)
1912
-
1913
- ### Authorization
1914
-
1915
- [bearerAuth](../README.md#bearerAuth)
1916
-
1917
- ### HTTP request headers
1918
-
1919
- - **Content-Type**: Not defined
1920
- - **Accept**: application/json
1921
-
1922
-
1923
1626
  ## get_ad_insights_report
1924
1627
 
1925
1628
  > <GetAdInsightsReport200Response> get_ad_insights_report(report_run_id, account_id, opts)
@@ -3163,13 +2866,13 @@ end
3163
2866
  - **Accept**: application/json
3164
2867
 
3165
2868
 
3166
- ## list_ad_creatives
2869
+ ## list_ad_studies
3167
2870
 
3168
- > <ListAdCreatives200Response> list_ad_creatives(account_id, ad_account_id, opts)
2871
+ > <ListAdStudies200Response> list_ad_studies(account_id, ad_account_id, opts)
3169
2872
 
3170
- Creative library (Meta)
2873
+ A/B tests and lift studies (Meta)
3171
2874
 
3172
- Lists the ad account's creative library (Meta's `/act_X/adcreatives`), rows returned verbatim. The default projection covers id, name, status, object type, thumbnail, object_story_spec / asset_feed_spec and url_tags; `fields` is a raw-passthrough override. Any creative id here is reusable on the create endpoints via `existingCreativeId`. Meta only.
2875
+ Lists the ad account's A/B tests and lift studies (Meta's `/act_X/ad_studies`), rows returned verbatim. The default projection covers id, name, type, timing and cells with split percentages; `fields` is a raw-passthrough override. Meta only.
3173
2876
 
3174
2877
  ### Examples
3175
2878
 
@@ -3192,29 +2895,29 @@ opts = {
3192
2895
  }
3193
2896
 
3194
2897
  begin
3195
- # Creative library (Meta)
3196
- result = api_instance.list_ad_creatives(account_id, ad_account_id, opts)
2898
+ # A/B tests and lift studies (Meta)
2899
+ result = api_instance.list_ad_studies(account_id, ad_account_id, opts)
3197
2900
  p result
3198
2901
  rescue Zernio::ApiError => e
3199
- puts "Error when calling AdsApi->list_ad_creatives: #{e}"
2902
+ puts "Error when calling AdsApi->list_ad_studies: #{e}"
3200
2903
  end
3201
2904
  ```
3202
2905
 
3203
- #### Using the list_ad_creatives_with_http_info variant
2906
+ #### Using the list_ad_studies_with_http_info variant
3204
2907
 
3205
2908
  This returns an Array which contains the response data, status code and headers.
3206
2909
 
3207
- > <Array(<ListAdCreatives200Response>, Integer, Hash)> list_ad_creatives_with_http_info(account_id, ad_account_id, opts)
2910
+ > <Array(<ListAdStudies200Response>, Integer, Hash)> list_ad_studies_with_http_info(account_id, ad_account_id, opts)
3208
2911
 
3209
2912
  ```ruby
3210
2913
  begin
3211
- # Creative library (Meta)
3212
- data, status_code, headers = api_instance.list_ad_creatives_with_http_info(account_id, ad_account_id, opts)
2914
+ # A/B tests and lift studies (Meta)
2915
+ data, status_code, headers = api_instance.list_ad_studies_with_http_info(account_id, ad_account_id, opts)
3213
2916
  p status_code # => 2xx
3214
2917
  p headers # => { ... }
3215
- p data # => <ListAdCreatives200Response>
2918
+ p data # => <ListAdStudies200Response>
3216
2919
  rescue Zernio::ApiError => e
3217
- puts "Error when calling AdsApi->list_ad_creatives_with_http_info: #{e}"
2920
+ puts "Error when calling AdsApi->list_ad_studies_with_http_info: #{e}"
3218
2921
  end
3219
2922
  ```
3220
2923
 
@@ -3230,7 +2933,7 @@ end
3230
2933
 
3231
2934
  ### Return type
3232
2935
 
3233
- [**ListAdCreatives200Response**](ListAdCreatives200Response.md)
2936
+ [**ListAdStudies200Response**](ListAdStudies200Response.md)
3234
2937
 
3235
2938
  ### Authorization
3236
2939
 
@@ -3242,248 +2945,13 @@ end
3242
2945
  - **Accept**: application/json
3243
2946
 
3244
2947
 
3245
- ## list_ad_images
2948
+ ## list_ads
3246
2949
 
3247
- > <ListAdImages200Response> list_ad_images(account_id, ad_account_id, opts)
2950
+ > <ListAds200Response> list_ads(opts)
3248
2951
 
3249
- Ad image library (Meta)
2952
+ List ads
3250
2953
 
3251
- Lists the ad account's image library (Meta's `/act_X/adimages`), rows returned verbatim. The default projection covers hash, url, name, dimensions and status; `fields` is a raw-passthrough override. Any `hash` here is reusable wherever Meta accepts `image_hash` (e.g. `imageHash` on POST /v1/ads/creatives). Meta only.
3252
-
3253
- ### Examples
3254
-
3255
- ```ruby
3256
- require 'time'
3257
- require 'zernio-sdk'
3258
- # setup authorization
3259
- Zernio.configure do |config|
3260
- # Configure Bearer authorization (JWT): bearerAuth
3261
- config.access_token = 'YOUR_BEARER_TOKEN'
3262
- end
3263
-
3264
- api_instance = Zernio::AdsApi.new
3265
- account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
3266
- ad_account_id = 'ad_account_id_example' # String | Meta ad account id (act_<n>).
3267
- opts = {
3268
- fields: 'fields_example', # String | Comma-separated Graph field override (supports nested {} projections).
3269
- limit: 56, # Integer | Rows per page
3270
- after: 'after_example' # String | Cursor from paging.after of the previous page.
3271
- }
3272
-
3273
- begin
3274
- # Ad image library (Meta)
3275
- result = api_instance.list_ad_images(account_id, ad_account_id, opts)
3276
- p result
3277
- rescue Zernio::ApiError => e
3278
- puts "Error when calling AdsApi->list_ad_images: #{e}"
3279
- end
3280
- ```
3281
-
3282
- #### Using the list_ad_images_with_http_info variant
3283
-
3284
- This returns an Array which contains the response data, status code and headers.
3285
-
3286
- > <Array(<ListAdImages200Response>, Integer, Hash)> list_ad_images_with_http_info(account_id, ad_account_id, opts)
3287
-
3288
- ```ruby
3289
- begin
3290
- # Ad image library (Meta)
3291
- data, status_code, headers = api_instance.list_ad_images_with_http_info(account_id, ad_account_id, opts)
3292
- p status_code # => 2xx
3293
- p headers # => { ... }
3294
- p data # => <ListAdImages200Response>
3295
- rescue Zernio::ApiError => e
3296
- puts "Error when calling AdsApi->list_ad_images_with_http_info: #{e}"
3297
- end
3298
- ```
3299
-
3300
- ### Parameters
3301
-
3302
- | Name | Type | Description | Notes |
3303
- | ---- | ---- | ----------- | ----- |
3304
- | **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
3305
- | **ad_account_id** | **String** | Meta ad account id (act_&lt;n&gt;). | |
3306
- | **fields** | **String** | Comma-separated Graph field override (supports nested {} projections). | [optional] |
3307
- | **limit** | **Integer** | Rows per page | [optional][default to 25] |
3308
- | **after** | **String** | Cursor from paging.after of the previous page. | [optional] |
3309
-
3310
- ### Return type
3311
-
3312
- [**ListAdImages200Response**](ListAdImages200Response.md)
3313
-
3314
- ### Authorization
3315
-
3316
- [bearerAuth](../README.md#bearerAuth)
3317
-
3318
- ### HTTP request headers
3319
-
3320
- - **Content-Type**: Not defined
3321
- - **Accept**: application/json
3322
-
3323
-
3324
- ## list_ad_labels
3325
-
3326
- > <ListAdLabels200Response> list_ad_labels(account_id, ad_account_id, opts)
3327
-
3328
- Ad labels (Meta)
3329
-
3330
- Lists the ad account's organizational labels (Meta's `/act_X/adlabels`), rows returned verbatim (id, name, created/updated time). Meta only.
3331
-
3332
- ### Examples
3333
-
3334
- ```ruby
3335
- require 'time'
3336
- require 'zernio-sdk'
3337
- # setup authorization
3338
- Zernio.configure do |config|
3339
- # Configure Bearer authorization (JWT): bearerAuth
3340
- config.access_token = 'YOUR_BEARER_TOKEN'
3341
- end
3342
-
3343
- api_instance = Zernio::AdsApi.new
3344
- account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
3345
- ad_account_id = 'ad_account_id_example' # String | Meta ad account id (act_<n>).
3346
- opts = {
3347
- limit: 56, # Integer | Rows per page
3348
- after: 'after_example' # String | Cursor from paging.after of the previous page.
3349
- }
3350
-
3351
- begin
3352
- # Ad labels (Meta)
3353
- result = api_instance.list_ad_labels(account_id, ad_account_id, opts)
3354
- p result
3355
- rescue Zernio::ApiError => e
3356
- puts "Error when calling AdsApi->list_ad_labels: #{e}"
3357
- end
3358
- ```
3359
-
3360
- #### Using the list_ad_labels_with_http_info variant
3361
-
3362
- This returns an Array which contains the response data, status code and headers.
3363
-
3364
- > <Array(<ListAdLabels200Response>, Integer, Hash)> list_ad_labels_with_http_info(account_id, ad_account_id, opts)
3365
-
3366
- ```ruby
3367
- begin
3368
- # Ad labels (Meta)
3369
- data, status_code, headers = api_instance.list_ad_labels_with_http_info(account_id, ad_account_id, opts)
3370
- p status_code # => 2xx
3371
- p headers # => { ... }
3372
- p data # => <ListAdLabels200Response>
3373
- rescue Zernio::ApiError => e
3374
- puts "Error when calling AdsApi->list_ad_labels_with_http_info: #{e}"
3375
- end
3376
- ```
3377
-
3378
- ### Parameters
3379
-
3380
- | Name | Type | Description | Notes |
3381
- | ---- | ---- | ----------- | ----- |
3382
- | **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
3383
- | **ad_account_id** | **String** | Meta ad account id (act_&lt;n&gt;). | |
3384
- | **limit** | **Integer** | Rows per page | [optional][default to 25] |
3385
- | **after** | **String** | Cursor from paging.after of the previous page. | [optional] |
3386
-
3387
- ### Return type
3388
-
3389
- [**ListAdLabels200Response**](ListAdLabels200Response.md)
3390
-
3391
- ### Authorization
3392
-
3393
- [bearerAuth](../README.md#bearerAuth)
3394
-
3395
- ### HTTP request headers
3396
-
3397
- - **Content-Type**: Not defined
3398
- - **Accept**: application/json
3399
-
3400
-
3401
- ## list_ad_studies
3402
-
3403
- > <ListAdStudies200Response> list_ad_studies(account_id, ad_account_id, opts)
3404
-
3405
- A/B tests and lift studies (Meta)
3406
-
3407
- Lists the ad account's A/B tests and lift studies (Meta's `/act_X/ad_studies`), rows returned verbatim. The default projection covers id, name, type, timing and cells with split percentages; `fields` is a raw-passthrough override. Meta only.
3408
-
3409
- ### Examples
3410
-
3411
- ```ruby
3412
- require 'time'
3413
- require 'zernio-sdk'
3414
- # setup authorization
3415
- Zernio.configure do |config|
3416
- # Configure Bearer authorization (JWT): bearerAuth
3417
- config.access_token = 'YOUR_BEARER_TOKEN'
3418
- end
3419
-
3420
- api_instance = Zernio::AdsApi.new
3421
- account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
3422
- ad_account_id = 'ad_account_id_example' # String | Meta ad account id (act_<n>).
3423
- opts = {
3424
- fields: 'fields_example', # String | Comma-separated Graph field override (supports nested {} projections).
3425
- limit: 56, # Integer | Rows per page
3426
- after: 'after_example' # String | Cursor from paging.after of the previous page.
3427
- }
3428
-
3429
- begin
3430
- # A/B tests and lift studies (Meta)
3431
- result = api_instance.list_ad_studies(account_id, ad_account_id, opts)
3432
- p result
3433
- rescue Zernio::ApiError => e
3434
- puts "Error when calling AdsApi->list_ad_studies: #{e}"
3435
- end
3436
- ```
3437
-
3438
- #### Using the list_ad_studies_with_http_info variant
3439
-
3440
- This returns an Array which contains the response data, status code and headers.
3441
-
3442
- > <Array(<ListAdStudies200Response>, Integer, Hash)> list_ad_studies_with_http_info(account_id, ad_account_id, opts)
3443
-
3444
- ```ruby
3445
- begin
3446
- # A/B tests and lift studies (Meta)
3447
- data, status_code, headers = api_instance.list_ad_studies_with_http_info(account_id, ad_account_id, opts)
3448
- p status_code # => 2xx
3449
- p headers # => { ... }
3450
- p data # => <ListAdStudies200Response>
3451
- rescue Zernio::ApiError => e
3452
- puts "Error when calling AdsApi->list_ad_studies_with_http_info: #{e}"
3453
- end
3454
- ```
3455
-
3456
- ### Parameters
3457
-
3458
- | Name | Type | Description | Notes |
3459
- | ---- | ---- | ----------- | ----- |
3460
- | **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
3461
- | **ad_account_id** | **String** | Meta ad account id (act_&lt;n&gt;). | |
3462
- | **fields** | **String** | Comma-separated Graph field override (supports nested {} projections). | [optional] |
3463
- | **limit** | **Integer** | Rows per page | [optional][default to 25] |
3464
- | **after** | **String** | Cursor from paging.after of the previous page. | [optional] |
3465
-
3466
- ### Return type
3467
-
3468
- [**ListAdStudies200Response**](ListAdStudies200Response.md)
3469
-
3470
- ### Authorization
3471
-
3472
- [bearerAuth](../README.md#bearerAuth)
3473
-
3474
- ### HTTP request headers
3475
-
3476
- - **Content-Type**: Not defined
3477
- - **Accept**: application/json
3478
-
3479
-
3480
- ## list_ads
3481
-
3482
- > <ListAds200Response> list_ads(opts)
3483
-
3484
- List ads
3485
-
3486
- Returns a paginated list of ads with metrics computed over an optional date range. Use source=all to include externally-synced ads from platform ad managers. If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max. To find the Zernio ad behind a comment you see in Meta Business Manager, filter by platformAdId (the Meta ad ID), effectiveObjectStoryId (Facebook), or effectiveInstagramMediaId (Instagram) — those are the post/media the ad's engagement lives on, and are also returned on each ad's `creative` object. Then call GET /v1/ads/{adId}/comments with the returned ad id.
2954
+ Returns a paginated list of ads with metrics computed over an optional date range. Use source=all to include externally-synced ads from platform ad managers. If no date range is provided, defaults to the last 90 days. Date range is capped at 730 days max. To find the Zernio ad behind a comment you see in Meta Business Manager, filter by platformAdId (the Meta ad ID), effectiveObjectStoryId (Facebook), or effectiveInstagramMediaId (Instagram) those are the post/media the ad's engagement lives on, and are also returned on each ad's `creative` object. Then call GET /v1/ads/{adId}/comments with the returned ad id.
3487
2955
 
3488
2956
  ### Examples
3489
2957
 
@@ -3864,85 +3332,6 @@ end
3864
3332
  - **Accept**: application/json
3865
3333
 
3866
3334
 
3867
- ## list_high_demand_periods
3868
-
3869
- > <ListHighDemandPeriods200Response> list_high_demand_periods(account_id, opts)
3870
-
3871
- High demand periods / budget schedules (Meta)
3872
-
3873
- Scheduled budget increases (Meta's budget-scheduling API). The Graph edge lives on the campaign and ad-set nodes only, so exactly one of `campaignId` / `adSetId` (platform ids) is required. Rows returned verbatim (budget_value, budget_value_type, time window, recurrence). Meta only.
3874
-
3875
- ### Examples
3876
-
3877
- ```ruby
3878
- require 'time'
3879
- require 'zernio-sdk'
3880
- # setup authorization
3881
- Zernio.configure do |config|
3882
- # Configure Bearer authorization (JWT): bearerAuth
3883
- config.access_token = 'YOUR_BEARER_TOKEN'
3884
- end
3885
-
3886
- api_instance = Zernio::AdsApi.new
3887
- account_id = 'account_id_example' # String | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
3888
- opts = {
3889
- campaign_id: 'campaign_id_example', # String | Platform campaign id. Exactly one of campaignId / adSetId.
3890
- ad_set_id: 'ad_set_id_example', # String | Platform ad set id. Exactly one of campaignId / adSetId.
3891
- limit: 56, # Integer | Rows per page
3892
- after: 'after_example' # String | Cursor from paging.after of the previous page.
3893
- }
3894
-
3895
- begin
3896
- # High demand periods / budget schedules (Meta)
3897
- result = api_instance.list_high_demand_periods(account_id, opts)
3898
- p result
3899
- rescue Zernio::ApiError => e
3900
- puts "Error when calling AdsApi->list_high_demand_periods: #{e}"
3901
- end
3902
- ```
3903
-
3904
- #### Using the list_high_demand_periods_with_http_info variant
3905
-
3906
- This returns an Array which contains the response data, status code and headers.
3907
-
3908
- > <Array(<ListHighDemandPeriods200Response>, Integer, Hash)> list_high_demand_periods_with_http_info(account_id, opts)
3909
-
3910
- ```ruby
3911
- begin
3912
- # High demand periods / budget schedules (Meta)
3913
- data, status_code, headers = api_instance.list_high_demand_periods_with_http_info(account_id, opts)
3914
- p status_code # => 2xx
3915
- p headers # => { ... }
3916
- p data # => <ListHighDemandPeriods200Response>
3917
- rescue Zernio::ApiError => e
3918
- puts "Error when calling AdsApi->list_high_demand_periods_with_http_info: #{e}"
3919
- end
3920
- ```
3921
-
3922
- ### Parameters
3923
-
3924
- | Name | Type | Description | Notes |
3925
- | ---- | ---- | ----------- | ----- |
3926
- | **account_id** | **String** | Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token. | |
3927
- | **campaign_id** | **String** | Platform campaign id. Exactly one of campaignId / adSetId. | [optional] |
3928
- | **ad_set_id** | **String** | Platform ad set id. Exactly one of campaignId / adSetId. | [optional] |
3929
- | **limit** | **Integer** | Rows per page | [optional][default to 25] |
3930
- | **after** | **String** | Cursor from paging.after of the previous page. | [optional] |
3931
-
3932
- ### Return type
3933
-
3934
- [**ListHighDemandPeriods200Response**](ListHighDemandPeriods200Response.md)
3935
-
3936
- ### Authorization
3937
-
3938
- [bearerAuth](../README.md#bearerAuth)
3939
-
3940
- ### HTTP request headers
3941
-
3942
- - **Content-Type**: Not defined
3943
- - **Accept**: application/json
3944
-
3945
-
3946
3335
  ## list_lead_forms
3947
3336
 
3948
3337
  > <ListLeadForms200Response> list_lead_forms(account_id, opts)
@@ -4847,77 +4236,6 @@ end
4847
4236
  - **Accept**: application/json
4848
4237
 
4849
4238
 
4850
- ## update_ad_creative
4851
-
4852
- > <UpdateAdCreative200Response> update_ad_creative(creative_id, update_ad_creative_request)
4853
-
4854
- Rename a creative (Meta)
4855
-
4856
- Renames a creative. Creatives are immutable on Meta beyond `name` — for content changes create a new creative (POST /v1/ads/creatives) and swap it onto the ad (PUT /v1/ads/{adId} with `creative`). Meta only.
4857
-
4858
- ### Examples
4859
-
4860
- ```ruby
4861
- require 'time'
4862
- require 'zernio-sdk'
4863
- # setup authorization
4864
- Zernio.configure do |config|
4865
- # Configure Bearer authorization (JWT): bearerAuth
4866
- config.access_token = 'YOUR_BEARER_TOKEN'
4867
- end
4868
-
4869
- api_instance = Zernio::AdsApi.new
4870
- creative_id = 'creative_id_example' # String | Platform creative id
4871
- update_ad_creative_request = Zernio::UpdateAdCreativeRequest.new({account_id: 'account_id_example', name: 'name_example'}) # UpdateAdCreativeRequest |
4872
-
4873
- begin
4874
- # Rename a creative (Meta)
4875
- result = api_instance.update_ad_creative(creative_id, update_ad_creative_request)
4876
- p result
4877
- rescue Zernio::ApiError => e
4878
- puts "Error when calling AdsApi->update_ad_creative: #{e}"
4879
- end
4880
- ```
4881
-
4882
- #### Using the update_ad_creative_with_http_info variant
4883
-
4884
- This returns an Array which contains the response data, status code and headers.
4885
-
4886
- > <Array(<UpdateAdCreative200Response>, Integer, Hash)> update_ad_creative_with_http_info(creative_id, update_ad_creative_request)
4887
-
4888
- ```ruby
4889
- begin
4890
- # Rename a creative (Meta)
4891
- data, status_code, headers = api_instance.update_ad_creative_with_http_info(creative_id, update_ad_creative_request)
4892
- p status_code # => 2xx
4893
- p headers # => { ... }
4894
- p data # => <UpdateAdCreative200Response>
4895
- rescue Zernio::ApiError => e
4896
- puts "Error when calling AdsApi->update_ad_creative_with_http_info: #{e}"
4897
- end
4898
- ```
4899
-
4900
- ### Parameters
4901
-
4902
- | Name | Type | Description | Notes |
4903
- | ---- | ---- | ----------- | ----- |
4904
- | **creative_id** | **String** | Platform creative id | |
4905
- | **update_ad_creative_request** | [**UpdateAdCreativeRequest**](UpdateAdCreativeRequest.md) | | |
4906
-
4907
- ### Return type
4908
-
4909
- [**UpdateAdCreative200Response**](UpdateAdCreative200Response.md)
4910
-
4911
- ### Authorization
4912
-
4913
- [bearerAuth](../README.md#bearerAuth)
4914
-
4915
- ### HTTP request headers
4916
-
4917
- - **Content-Type**: application/json
4918
- - **Accept**: application/json
4919
-
4920
-
4921
4239
  ## update_ad_status
4922
4240
 
4923
4241
  > <UpdateAdStatus200Response> update_ad_status(ad_id, update_ad_status_request)