zernio-sdk 0.0.536 → 0.0.537

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 (66) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +29 -1
  3. data/docs/AdAudiencesApi.md +5 -5
  4. data/docs/AdCampaignsApi.md +142 -0
  5. data/docs/AdsApi.md +715 -33
  6. data/docs/CreateAdCampaign201Response.md +24 -0
  7. data/docs/CreateAdCampaignRequest.md +32 -0
  8. data/docs/CreateAdCreative201Response.md +20 -0
  9. data/docs/CreateAdCreativeRequest.md +38 -0
  10. data/docs/CreateAdCreativeRequestCarouselCardsInner.md +26 -0
  11. data/docs/DeleteAdCreative200Response.md +20 -0
  12. data/docs/DuplicateAd200Response.md +22 -0
  13. data/docs/DuplicateAdRequest.md +28 -0
  14. data/docs/DuplicateAdSet200Response.md +22 -0
  15. data/docs/DuplicateAdSetRequest.md +36 -0
  16. data/docs/GetAdCreative200Response.md +18 -0
  17. data/docs/ListAdCreatives200Response.md +22 -0
  18. data/docs/ListAdImages200Response.md +22 -0
  19. data/docs/ListAdLabels200Response.md +22 -0
  20. data/docs/ListHighDemandPeriods200Response.md +22 -0
  21. data/docs/UpdateAdCreative200Response.md +22 -0
  22. data/docs/UpdateAdCreativeRequest.md +20 -0
  23. data/lib/zernio-sdk/api/ad_audiences_api.rb +4 -4
  24. data/lib/zernio-sdk/api/ad_campaigns_api.rb +142 -0
  25. data/lib/zernio-sdk/api/ads_api.rb +748 -48
  26. data/lib/zernio-sdk/models/create_ad_campaign201_response.rb +210 -0
  27. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +343 -0
  28. data/lib/zernio-sdk/models/create_ad_creative201_response.rb +157 -0
  29. data/lib/zernio-sdk/models/create_ad_creative_request.rb +390 -0
  30. data/lib/zernio-sdk/models/create_ad_creative_request_carousel_cards_inner.rb +255 -0
  31. data/lib/zernio-sdk/models/delete_ad_creative200_response.rb +156 -0
  32. data/lib/zernio-sdk/models/duplicate_ad200_response.rb +200 -0
  33. data/lib/zernio-sdk/models/duplicate_ad_request.rb +243 -0
  34. data/lib/zernio-sdk/models/duplicate_ad_set200_response.rb +201 -0
  35. data/lib/zernio-sdk/models/duplicate_ad_set_request.rb +302 -0
  36. data/lib/zernio-sdk/models/get_ad_creative200_response.rb +148 -0
  37. data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +167 -0
  38. data/lib/zernio-sdk/models/list_ad_images200_response.rb +167 -0
  39. data/lib/zernio-sdk/models/list_ad_labels200_response.rb +167 -0
  40. data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +168 -0
  41. data/lib/zernio-sdk/models/update_ad_creative200_response.rb +165 -0
  42. data/lib/zernio-sdk/models/update_ad_creative_request.rb +200 -0
  43. data/lib/zernio-sdk/version.rb +1 -1
  44. data/lib/zernio-sdk.rb +17 -0
  45. data/openapi.yaml +445 -7
  46. data/spec/api/ad_audiences_api_spec.rb +2 -2
  47. data/spec/api/ad_campaigns_api_spec.rb +25 -0
  48. data/spec/api/ads_api_spec.rb +128 -0
  49. data/spec/models/create_ad_campaign201_response_spec.rb +58 -0
  50. data/spec/models/create_ad_campaign_request_spec.rb +94 -0
  51. data/spec/models/create_ad_creative201_response_spec.rb +42 -0
  52. data/spec/models/create_ad_creative_request_carousel_cards_inner_spec.rb +60 -0
  53. data/spec/models/create_ad_creative_request_spec.rb +96 -0
  54. data/spec/models/delete_ad_creative200_response_spec.rb +42 -0
  55. data/spec/models/duplicate_ad200_response_spec.rb +52 -0
  56. data/spec/models/duplicate_ad_request_spec.rb +74 -0
  57. data/spec/models/duplicate_ad_set200_response_spec.rb +52 -0
  58. data/spec/models/duplicate_ad_set_request_spec.rb +102 -0
  59. data/spec/models/get_ad_creative200_response_spec.rb +36 -0
  60. data/spec/models/list_ad_creatives200_response_spec.rb +48 -0
  61. data/spec/models/list_ad_images200_response_spec.rb +48 -0
  62. data/spec/models/list_ad_labels200_response_spec.rb +48 -0
  63. data/spec/models/list_high_demand_periods200_response_spec.rb +48 -0
  64. data/spec/models/update_ad_creative200_response_spec.rb +48 -0
  65. data/spec/models/update_ad_creative_request_spec.rb +42 -0
  66. metadata +70 -2
data/docs/AdsApi.md CHANGED
@@ -9,6 +9,7 @@ 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) |
12
13
  | [**create_ad_insights_report**](AdsApi.md#create_ad_insights_report) | **POST** /v1/ads/insights/reports | Submit an async insights report run (Meta) |
13
14
  | [**create_call_ad**](AdsApi.md#create_call_ad) | **POST** /v1/ads/call | Create Click-to-Call ad |
14
15
  | [**create_conversion_destination**](AdsApi.md#create_conversion_destination) | **POST** /v1/accounts/{accountId}/conversion-destinations | Create a conversion destination |
@@ -19,13 +20,16 @@ All URIs are relative to *https://zernio.com/api*
19
20
  | [**create_standalone_ad**](AdsApi.md#create_standalone_ad) | **POST** /v1/ads/create | Create standalone ad |
20
21
  | [**create_test_lead**](AdsApi.md#create_test_lead) | **POST** /v1/ads/lead-forms/{formId}/test-leads | Create a test lead |
21
22
  | [**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) |
22
24
  | [**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) |
23
26
  | [**estimate_ad_reach**](AdsApi.md#estimate_ad_reach) | **POST** /v1/ads/targeting/reach-estimate | Estimate audience reach |
24
27
  | [**generate_ad_previews**](AdsApi.md#generate_ad_previews) | **POST** /v1/ads/preview | Render pre-create ad previews (Meta) |
25
28
  | [**get_ad**](AdsApi.md#get_ad) | **GET** /v1/ads/{adId} | Get ad details |
26
29
  | [**get_ad_account_finance**](AdsApi.md#get_ad_account_finance) | **GET** /v1/ads/accounts/finance | Ad account finances (Meta) |
27
30
  | [**get_ad_analytics**](AdsApi.md#get_ad_analytics) | **GET** /v1/ads/{adId}/analytics | Get ad analytics |
28
31
  | [**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) |
29
33
  | [**get_ad_insights_report**](AdsApi.md#get_ad_insights_report) | **GET** /v1/ads/insights/reports/{reportRunId} | Poll an async insights report run (Meta) |
30
34
  | [**get_ad_previews**](AdsApi.md#get_ad_previews) | **GET** /v1/ads/{adId}/preview | Render previews of an existing ad (Meta) |
31
35
  | [**get_ad_tracking_tags**](AdsApi.md#get_ad_tracking_tags) | **GET** /v1/ads/{adId}/tracking-tags | Get ad tracking tags |
@@ -43,12 +47,16 @@ All URIs are relative to *https://zernio.com/api*
43
47
  | [**list_ad_accounts**](AdsApi.md#list_ad_accounts) | **GET** /v1/ads/accounts | List ad accounts |
44
48
  | [**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 |
45
49
  | [**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) |
46
53
  | [**list_ad_studies**](AdsApi.md#list_ad_studies) | **GET** /v1/ads/studies | A/B tests and lift studies (Meta) |
47
54
  | [**list_ads**](AdsApi.md#list_ads) | **GET** /v1/ads | List ads |
48
55
  | [**list_ads_business_centers**](AdsApi.md#list_ads_business_centers) | **GET** /v1/ads/business-centers | List TikTok Business Centers |
49
56
  | [**list_conversion_associations**](AdsApi.md#list_conversion_associations) | **GET** /v1/accounts/{accountId}/conversion-destinations/{destinationId}/associations | List associated campaigns |
50
57
  | [**list_conversion_destinations**](AdsApi.md#list_conversion_destinations) | **GET** /v1/accounts/{accountId}/conversion-destinations | List conversion destinations |
51
58
  | [**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) |
52
60
  | [**list_lead_forms**](AdsApi.md#list_lead_forms) | **GET** /v1/ads/lead-forms | List lead forms |
53
61
  | [**list_leads**](AdsApi.md#list_leads) | **GET** /v1/ads/leads | List submitted leads |
54
62
  | [**list_whats_app_conversions**](AdsApi.md#list_whats_app_conversions) | **GET** /v1/whatsapp/conversions | List conversion events |
@@ -61,6 +69,7 @@ All URIs are relative to *https://zernio.com/api*
61
69
  | [**send_whats_app_conversion**](AdsApi.md#send_whats_app_conversion) | **POST** /v1/whatsapp/conversions | Send WhatsApp conversion event |
62
70
  | [**update_ad**](AdsApi.md#update_ad) | **PUT** /v1/ads/{adId} | Update ad |
63
71
  | [**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) |
64
73
  | [**update_ad_status**](AdsApi.md#update_ad_status) | **PUT** /v1/ads/{adId}/status | Pause or resume a single ad |
65
74
  | [**update_ad_tracking_tags**](AdsApi.md#update_ad_tracking_tags) | **PATCH** /v1/ads/{adId}/tracking-tags | Set ad tracking tags |
66
75
  | [**update_conversion_destination**](AdsApi.md#update_conversion_destination) | **PATCH** /v1/accounts/{accountId}/conversion-destinations/{destinationId} | Update a conversion destination |
@@ -421,6 +430,75 @@ nil (empty response body)
421
430
  - **Accept**: application/json
422
431
 
423
432
 
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
+
424
502
  ## create_ad_insights_report
425
503
 
426
504
  > <CreateAdInsightsReport202Response> create_ad_insights_report(create_ad_insights_report_request)
@@ -1117,6 +1195,77 @@ end
1117
1195
  - **Accept**: application/json
1118
1196
 
1119
1197
 
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
+
1120
1269
  ## delete_conversion_destination
1121
1270
 
1122
1271
  > delete_conversion_destination(account_id, destination_id, opts)
@@ -1191,6 +1340,79 @@ nil (empty response body)
1191
1340
  - **Accept**: application/json
1192
1341
 
1193
1342
 
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
+
1194
1416
  ## estimate_ad_reach
1195
1417
 
1196
1418
  > <EstimateAdReach200Response> estimate_ad_reach(estimate_ad_reach_request)
@@ -1623,6 +1845,81 @@ end
1623
1845
  - **Accept**: application/json
1624
1846
 
1625
1847
 
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
+
1626
1923
  ## get_ad_insights_report
1627
1924
 
1628
1925
  > <GetAdInsightsReport200Response> get_ad_insights_report(report_run_id, account_id, opts)
@@ -2866,13 +3163,13 @@ end
2866
3163
  - **Accept**: application/json
2867
3164
 
2868
3165
 
2869
- ## list_ad_studies
3166
+ ## list_ad_creatives
2870
3167
 
2871
- > <ListAdStudies200Response> list_ad_studies(account_id, ad_account_id, opts)
3168
+ > <ListAdCreatives200Response> list_ad_creatives(account_id, ad_account_id, opts)
2872
3169
 
2873
- A/B tests and lift studies (Meta)
3170
+ Creative library (Meta)
2874
3171
 
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.
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.
2876
3173
 
2877
3174
  ### Examples
2878
3175
 
@@ -2895,29 +3192,29 @@ opts = {
2895
3192
  }
2896
3193
 
2897
3194
  begin
2898
- # A/B tests and lift studies (Meta)
2899
- result = api_instance.list_ad_studies(account_id, ad_account_id, opts)
3195
+ # Creative library (Meta)
3196
+ result = api_instance.list_ad_creatives(account_id, ad_account_id, opts)
2900
3197
  p result
2901
3198
  rescue Zernio::ApiError => e
2902
- puts "Error when calling AdsApi->list_ad_studies: #{e}"
3199
+ puts "Error when calling AdsApi->list_ad_creatives: #{e}"
2903
3200
  end
2904
3201
  ```
2905
3202
 
2906
- #### Using the list_ad_studies_with_http_info variant
3203
+ #### Using the list_ad_creatives_with_http_info variant
2907
3204
 
2908
3205
  This returns an Array which contains the response data, status code and headers.
2909
3206
 
2910
- > <Array(<ListAdStudies200Response>, Integer, Hash)> list_ad_studies_with_http_info(account_id, ad_account_id, opts)
3207
+ > <Array(<ListAdCreatives200Response>, Integer, Hash)> list_ad_creatives_with_http_info(account_id, ad_account_id, opts)
2911
3208
 
2912
3209
  ```ruby
2913
3210
  begin
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)
3211
+ # Creative library (Meta)
3212
+ data, status_code, headers = api_instance.list_ad_creatives_with_http_info(account_id, ad_account_id, opts)
2916
3213
  p status_code # => 2xx
2917
3214
  p headers # => { ... }
2918
- p data # => <ListAdStudies200Response>
3215
+ p data # => <ListAdCreatives200Response>
2919
3216
  rescue Zernio::ApiError => e
2920
- puts "Error when calling AdsApi->list_ad_studies_with_http_info: #{e}"
3217
+ puts "Error when calling AdsApi->list_ad_creatives_with_http_info: #{e}"
2921
3218
  end
2922
3219
  ```
2923
3220
 
@@ -2933,7 +3230,7 @@ end
2933
3230
 
2934
3231
  ### Return type
2935
3232
 
2936
- [**ListAdStudies200Response**](ListAdStudies200Response.md)
3233
+ [**ListAdCreatives200Response**](ListAdCreatives200Response.md)
2937
3234
 
2938
3235
  ### Authorization
2939
3236
 
@@ -2945,13 +3242,13 @@ end
2945
3242
  - **Accept**: application/json
2946
3243
 
2947
3244
 
2948
- ## list_ads
3245
+ ## list_ad_images
2949
3246
 
2950
- > <ListAds200Response> list_ads(opts)
3247
+ > <ListAdImages200Response> list_ad_images(account_id, ad_account_id, opts)
2951
3248
 
2952
- List ads
3249
+ Ad image library (Meta)
2953
3250
 
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.
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.
2955
3252
 
2956
3253
  ### Examples
2957
3254
 
@@ -2965,22 +3262,257 @@ Zernio.configure do |config|
2965
3262
  end
2966
3263
 
2967
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>).
2968
3267
  opts = {
2969
- page: 56, # Integer | Page number (1-based)
2970
- limit: 56, # Integer |
2971
- source: 'zernio', # String | all (default) = Zernio-created + platform-discovered ads. zernio = restrict to Zernio-created only.
2972
- status: Zernio::AdStatus::ACTIVE, # AdStatus |
2973
- platform: 'facebook', # String |
2974
- account_id: 'account_id_example', # String | Social account ID
2975
- ad_account_id: 'ad_account_id_example', # String | Platform ad account ID (e.g. act_123 for Meta). Mirrors the same filter on /v1/ads/campaigns and /v1/ads/tree.
2976
- profile_id: 'profile_id_example', # String | Profile ID
2977
- campaign_id: 'campaign_id_example', # String | Platform campaign ID (filter ads within a campaign)
2978
- platform_ad_id: 'platform_ad_id_example', # String | Meta ad ID. Returns the ad with this platform-side ad ID.
2979
- effective_object_story_id: 'effective_object_story_id_example', # String | Facebook `{pageId}_{postId}` of the post the ad's engagement lives on (Meta `effective_object_story_id`). Use to map a Business-Manager-visible post back to the Zernio ad.
2980
- effective_instagram_media_id: 'effective_instagram_media_id_example', # String | Instagram media ID of the boosted post (Meta `effective_instagram_media_id`). Use to map a Business-Manager-visible IG post back to the Zernio ad.
2981
- from_date: Date.parse('2013-10-20'), # Date | Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
2982
- to_date: Date.parse('2013-10-20') # Date | End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
2983
- }
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.
3487
+
3488
+ ### Examples
3489
+
3490
+ ```ruby
3491
+ require 'time'
3492
+ require 'zernio-sdk'
3493
+ # setup authorization
3494
+ Zernio.configure do |config|
3495
+ # Configure Bearer authorization (JWT): bearerAuth
3496
+ config.access_token = 'YOUR_BEARER_TOKEN'
3497
+ end
3498
+
3499
+ api_instance = Zernio::AdsApi.new
3500
+ opts = {
3501
+ page: 56, # Integer | Page number (1-based)
3502
+ limit: 56, # Integer |
3503
+ source: 'zernio', # String | all (default) = Zernio-created + platform-discovered ads. zernio = restrict to Zernio-created only.
3504
+ status: Zernio::AdStatus::ACTIVE, # AdStatus |
3505
+ platform: 'facebook', # String |
3506
+ account_id: 'account_id_example', # String | Social account ID
3507
+ ad_account_id: 'ad_account_id_example', # String | Platform ad account ID (e.g. act_123 for Meta). Mirrors the same filter on /v1/ads/campaigns and /v1/ads/tree.
3508
+ profile_id: 'profile_id_example', # String | Profile ID
3509
+ campaign_id: 'campaign_id_example', # String | Platform campaign ID (filter ads within a campaign)
3510
+ platform_ad_id: 'platform_ad_id_example', # String | Meta ad ID. Returns the ad with this platform-side ad ID.
3511
+ effective_object_story_id: 'effective_object_story_id_example', # String | Facebook `{pageId}_{postId}` of the post the ad's engagement lives on (Meta `effective_object_story_id`). Use to map a Business-Manager-visible post back to the Zernio ad.
3512
+ effective_instagram_media_id: 'effective_instagram_media_id_example', # String | Instagram media ID of the boosted post (Meta `effective_instagram_media_id`). Use to map a Business-Manager-visible IG post back to the Zernio ad.
3513
+ from_date: Date.parse('2013-10-20'), # Date | Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
3514
+ to_date: Date.parse('2013-10-20') # Date | End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
3515
+ }
2984
3516
 
2985
3517
  begin
2986
3518
  # List ads
@@ -3332,6 +3864,85 @@ end
3332
3864
  - **Accept**: application/json
3333
3865
 
3334
3866
 
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
+
3335
3946
  ## list_lead_forms
3336
3947
 
3337
3948
  > <ListLeadForms200Response> list_lead_forms(account_id, opts)
@@ -4236,6 +4847,77 @@ end
4236
4847
  - **Accept**: application/json
4237
4848
 
4238
4849
 
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
+
4239
4921
  ## update_ad_status
4240
4922
 
4241
4923
  > <UpdateAdStatus200Response> update_ad_status(ad_id, update_ad_status_request)