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.
- checksums.yaml +4 -4
- data/README.md +4 -42
- data/docs/AdAudiencesApi.md +5 -5
- data/docs/AdCampaignsApi.md +0 -142
- data/docs/AdsApi.md +18 -700
- data/docs/InboxApi.md +79 -0
- data/docs/InboxWebhookMessageAttachmentsInner.md +1 -1
- data/docs/SMSApi.md +1 -276
- data/docs/SendSmsRequest.md +1 -1
- data/docs/WebhookPayloadMessageMessage.md +1 -1
- data/docs/WebhookPayloadMessageMessageAttachmentsInner.md +22 -0
- data/docs/WebhookPayloadMessageSentMessage.md +1 -1
- data/docs/WebhookPayloadMessageSentMessageAttachmentsInner.md +22 -0
- data/lib/zernio-sdk/api/ad_audiences_api.rb +4 -4
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +0 -142
- data/lib/zernio-sdk/api/ads_api.rb +39 -739
- data/lib/zernio-sdk/api/inbox_api.rb +92 -0
- data/lib/zernio-sdk/api/sms_api.rb +2 -256
- data/lib/zernio-sdk/models/inbox_webhook_message_attachments_inner.rb +1 -1
- data/lib/zernio-sdk/models/send_sms_request.rb +1 -1
- data/lib/zernio-sdk/models/webhook_payload_message_message.rb +1 -1
- data/lib/zernio-sdk/models/{create_sms_sender_id_request.rb → webhook_payload_message_message_attachments_inner.rb} +52 -33
- data/lib/zernio-sdk/models/webhook_payload_message_sent_message.rb +1 -1
- data/lib/zernio-sdk/models/{update_ad_creative_request.rb → webhook_payload_message_sent_message_attachments_inner.rb} +46 -44
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -26
- data/openapi.yaml +87 -624
- data/spec/api/ad_audiences_api_spec.rb +2 -2
- data/spec/api/ad_campaigns_api_spec.rb +0 -25
- data/spec/api/ads_api_spec.rb +0 -128
- data/spec/api/inbox_api_spec.rb +48 -0
- data/spec/api/sms_api_spec.rb +1 -47
- data/spec/models/{list_ad_images200_response_spec.rb → webhook_payload_message_message_attachments_inner_spec.rb} +9 -9
- data/spec/models/{list_ad_creatives200_response_spec.rb → webhook_payload_message_sent_message_attachments_inner_spec.rb} +9 -9
- metadata +13 -105
- data/docs/CreateAdCampaign201Response.md +0 -24
- data/docs/CreateAdCampaignRequest.md +0 -32
- data/docs/CreateAdCreative201Response.md +0 -20
- data/docs/CreateAdCreativeRequest.md +0 -38
- data/docs/CreateAdCreativeRequestCarouselCardsInner.md +0 -26
- data/docs/CreateSmsSenderId200Response.md +0 -22
- data/docs/CreateSmsSenderIdRequest.md +0 -18
- data/docs/DeleteAdCreative200Response.md +0 -20
- data/docs/DeleteSmsSenderId200Response.md +0 -18
- data/docs/DuplicateAd200Response.md +0 -22
- data/docs/DuplicateAdRequest.md +0 -28
- data/docs/DuplicateAdSet200Response.md +0 -22
- data/docs/DuplicateAdSetRequest.md +0 -36
- data/docs/GetAdCreative200Response.md +0 -18
- data/docs/ListAdCreatives200Response.md +0 -22
- data/docs/ListAdImages200Response.md +0 -22
- data/docs/ListAdLabels200Response.md +0 -22
- data/docs/ListHighDemandPeriods200Response.md +0 -22
- data/docs/ListSmsSenderIds200Response.md +0 -20
- data/docs/ListSmsSenderIds200ResponseBudget.md +0 -24
- data/docs/ListSmsSenderIds200ResponseBudgetPendingRequest.md +0 -22
- data/docs/ListSmsSenderIds200ResponseSenderIdsInner.md +0 -24
- data/docs/RequestSmsSenderIdLimitIncrease200Response.md +0 -20
- data/docs/RequestSmsSenderIdLimitIncreaseRequest.md +0 -20
- data/docs/UpdateAdCreative200Response.md +0 -22
- data/docs/UpdateAdCreativeRequest.md +0 -20
- data/lib/zernio-sdk/models/create_ad_campaign201_response.rb +0 -210
- data/lib/zernio-sdk/models/create_ad_campaign_request.rb +0 -343
- data/lib/zernio-sdk/models/create_ad_creative201_response.rb +0 -157
- data/lib/zernio-sdk/models/create_ad_creative_request.rb +0 -390
- data/lib/zernio-sdk/models/create_ad_creative_request_carousel_cards_inner.rb +0 -255
- data/lib/zernio-sdk/models/create_sms_sender_id200_response.rb +0 -166
- data/lib/zernio-sdk/models/delete_ad_creative200_response.rb +0 -156
- data/lib/zernio-sdk/models/delete_sms_sender_id200_response.rb +0 -147
- data/lib/zernio-sdk/models/duplicate_ad200_response.rb +0 -200
- data/lib/zernio-sdk/models/duplicate_ad_request.rb +0 -243
- data/lib/zernio-sdk/models/duplicate_ad_set200_response.rb +0 -201
- data/lib/zernio-sdk/models/duplicate_ad_set_request.rb +0 -302
- data/lib/zernio-sdk/models/get_ad_creative200_response.rb +0 -148
- data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +0 -167
- data/lib/zernio-sdk/models/list_ad_images200_response.rb +0 -167
- data/lib/zernio-sdk/models/list_ad_labels200_response.rb +0 -167
- data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +0 -168
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response.rb +0 -158
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget.rb +0 -178
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget_pending_request.rb +0 -167
- data/lib/zernio-sdk/models/list_sms_sender_ids200_response_sender_ids_inner.rb +0 -175
- data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase200_response.rb +0 -156
- data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase_request.rb +0 -210
- data/lib/zernio-sdk/models/update_ad_creative200_response.rb +0 -165
- data/spec/models/create_ad_campaign201_response_spec.rb +0 -58
- data/spec/models/create_ad_campaign_request_spec.rb +0 -94
- data/spec/models/create_ad_creative201_response_spec.rb +0 -42
- data/spec/models/create_ad_creative_request_carousel_cards_inner_spec.rb +0 -60
- data/spec/models/create_ad_creative_request_spec.rb +0 -96
- data/spec/models/create_sms_sender_id200_response_spec.rb +0 -48
- data/spec/models/create_sms_sender_id_request_spec.rb +0 -36
- data/spec/models/delete_ad_creative200_response_spec.rb +0 -42
- data/spec/models/delete_sms_sender_id200_response_spec.rb +0 -36
- data/spec/models/duplicate_ad200_response_spec.rb +0 -52
- data/spec/models/duplicate_ad_request_spec.rb +0 -74
- data/spec/models/duplicate_ad_set200_response_spec.rb +0 -52
- data/spec/models/duplicate_ad_set_request_spec.rb +0 -102
- data/spec/models/get_ad_creative200_response_spec.rb +0 -36
- data/spec/models/list_ad_labels200_response_spec.rb +0 -48
- data/spec/models/list_high_demand_periods200_response_spec.rb +0 -48
- data/spec/models/list_sms_sender_ids200_response_budget_pending_request_spec.rb +0 -48
- data/spec/models/list_sms_sender_ids200_response_budget_spec.rb +0 -54
- data/spec/models/list_sms_sender_ids200_response_sender_ids_inner_spec.rb +0 -54
- data/spec/models/list_sms_sender_ids200_response_spec.rb +0 -42
- data/spec/models/request_sms_sender_id_limit_increase200_response_spec.rb +0 -42
- data/spec/models/request_sms_sender_id_limit_increase_request_spec.rb +0 -42
- data/spec/models/update_ad_creative200_response_spec.rb +0 -48
- data/spec/models/update_ad_creative_request_spec.rb +0 -42
|
@@ -382,74 +382,6 @@ module Zernio
|
|
|
382
382
|
return data, status_code, headers
|
|
383
383
|
end
|
|
384
384
|
|
|
385
|
-
# Create a standalone creative (Meta)
|
|
386
|
-
# 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.
|
|
387
|
-
# @param create_ad_creative_request [CreateAdCreativeRequest]
|
|
388
|
-
# @param [Hash] opts the optional parameters
|
|
389
|
-
# @return [CreateAdCreative201Response]
|
|
390
|
-
def create_ad_creative(create_ad_creative_request, opts = {})
|
|
391
|
-
data, _status_code, _headers = create_ad_creative_with_http_info(create_ad_creative_request, opts)
|
|
392
|
-
data
|
|
393
|
-
end
|
|
394
|
-
|
|
395
|
-
# Create a standalone creative (Meta)
|
|
396
|
-
# 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.
|
|
397
|
-
# @param create_ad_creative_request [CreateAdCreativeRequest]
|
|
398
|
-
# @param [Hash] opts the optional parameters
|
|
399
|
-
# @return [Array<(CreateAdCreative201Response, Integer, Hash)>] CreateAdCreative201Response data, response status code and response headers
|
|
400
|
-
def create_ad_creative_with_http_info(create_ad_creative_request, opts = {})
|
|
401
|
-
if @api_client.config.debugging
|
|
402
|
-
@api_client.config.logger.debug 'Calling API: AdsApi.create_ad_creative ...'
|
|
403
|
-
end
|
|
404
|
-
# verify the required parameter 'create_ad_creative_request' is set
|
|
405
|
-
if @api_client.config.client_side_validation && create_ad_creative_request.nil?
|
|
406
|
-
fail ArgumentError, "Missing the required parameter 'create_ad_creative_request' when calling AdsApi.create_ad_creative"
|
|
407
|
-
end
|
|
408
|
-
# resource path
|
|
409
|
-
local_var_path = '/v1/ads/creatives'
|
|
410
|
-
|
|
411
|
-
# query parameters
|
|
412
|
-
query_params = opts[:query_params] || {}
|
|
413
|
-
|
|
414
|
-
# header parameters
|
|
415
|
-
header_params = opts[:header_params] || {}
|
|
416
|
-
# HTTP header 'Accept' (if needed)
|
|
417
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
418
|
-
# HTTP header 'Content-Type'
|
|
419
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
420
|
-
if !content_type.nil?
|
|
421
|
-
header_params['Content-Type'] = content_type
|
|
422
|
-
end
|
|
423
|
-
|
|
424
|
-
# form parameters
|
|
425
|
-
form_params = opts[:form_params] || {}
|
|
426
|
-
|
|
427
|
-
# http body (model)
|
|
428
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_ad_creative_request)
|
|
429
|
-
|
|
430
|
-
# return_type
|
|
431
|
-
return_type = opts[:debug_return_type] || 'CreateAdCreative201Response'
|
|
432
|
-
|
|
433
|
-
# auth_names
|
|
434
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
435
|
-
|
|
436
|
-
new_options = opts.merge(
|
|
437
|
-
:operation => :"AdsApi.create_ad_creative",
|
|
438
|
-
:header_params => header_params,
|
|
439
|
-
:query_params => query_params,
|
|
440
|
-
:form_params => form_params,
|
|
441
|
-
:body => post_body,
|
|
442
|
-
:auth_names => auth_names,
|
|
443
|
-
:return_type => return_type
|
|
444
|
-
)
|
|
445
|
-
|
|
446
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
447
|
-
if @api_client.config.debugging
|
|
448
|
-
@api_client.config.logger.debug "API called: AdsApi#create_ad_creative\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
449
|
-
end
|
|
450
|
-
return data, status_code, headers
|
|
451
|
-
end
|
|
452
|
-
|
|
453
385
|
# Submit an async insights report run (Meta)
|
|
454
386
|
# Submits an asynchronous Meta insights report. Same query surface as GET /v1/ads/insights, but in the JSON body; Meta processes the report server-side, which is the right choice for long ranges or large accounts where the sync query is slow or rate-limited. Returns a `reportRunId` to poll via GET /v1/ads/insights/reports/{reportRunId}. Meta only.
|
|
455
387
|
# @param create_ad_insights_report_request [CreateAdInsightsReportRequest]
|
|
@@ -1144,76 +1076,6 @@ module Zernio
|
|
|
1144
1076
|
return data, status_code, headers
|
|
1145
1077
|
end
|
|
1146
1078
|
|
|
1147
|
-
# Delete a creative (Meta)
|
|
1148
|
-
# Deletes a creative from the library. Meta only allows deleting creatives not referenced by any ad — otherwise its 400 surfaces verbatim.
|
|
1149
|
-
# @param creative_id [String] Platform creative id
|
|
1150
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
1151
|
-
# @param [Hash] opts the optional parameters
|
|
1152
|
-
# @return [DeleteAdCreative200Response]
|
|
1153
|
-
def delete_ad_creative(creative_id, account_id, opts = {})
|
|
1154
|
-
data, _status_code, _headers = delete_ad_creative_with_http_info(creative_id, account_id, opts)
|
|
1155
|
-
data
|
|
1156
|
-
end
|
|
1157
|
-
|
|
1158
|
-
# Delete a creative (Meta)
|
|
1159
|
-
# Deletes a creative from the library. Meta only allows deleting creatives not referenced by any ad — otherwise its 400 surfaces verbatim.
|
|
1160
|
-
# @param creative_id [String] Platform creative id
|
|
1161
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
1162
|
-
# @param [Hash] opts the optional parameters
|
|
1163
|
-
# @return [Array<(DeleteAdCreative200Response, Integer, Hash)>] DeleteAdCreative200Response data, response status code and response headers
|
|
1164
|
-
def delete_ad_creative_with_http_info(creative_id, account_id, opts = {})
|
|
1165
|
-
if @api_client.config.debugging
|
|
1166
|
-
@api_client.config.logger.debug 'Calling API: AdsApi.delete_ad_creative ...'
|
|
1167
|
-
end
|
|
1168
|
-
# verify the required parameter 'creative_id' is set
|
|
1169
|
-
if @api_client.config.client_side_validation && creative_id.nil?
|
|
1170
|
-
fail ArgumentError, "Missing the required parameter 'creative_id' when calling AdsApi.delete_ad_creative"
|
|
1171
|
-
end
|
|
1172
|
-
# verify the required parameter 'account_id' is set
|
|
1173
|
-
if @api_client.config.client_side_validation && account_id.nil?
|
|
1174
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdsApi.delete_ad_creative"
|
|
1175
|
-
end
|
|
1176
|
-
# resource path
|
|
1177
|
-
local_var_path = '/v1/ads/creatives/{creativeId}'.sub('{' + 'creativeId' + '}', CGI.escape(creative_id.to_s))
|
|
1178
|
-
|
|
1179
|
-
# query parameters
|
|
1180
|
-
query_params = opts[:query_params] || {}
|
|
1181
|
-
query_params[:'accountId'] = account_id
|
|
1182
|
-
|
|
1183
|
-
# header parameters
|
|
1184
|
-
header_params = opts[:header_params] || {}
|
|
1185
|
-
# HTTP header 'Accept' (if needed)
|
|
1186
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1187
|
-
|
|
1188
|
-
# form parameters
|
|
1189
|
-
form_params = opts[:form_params] || {}
|
|
1190
|
-
|
|
1191
|
-
# http body (model)
|
|
1192
|
-
post_body = opts[:debug_body]
|
|
1193
|
-
|
|
1194
|
-
# return_type
|
|
1195
|
-
return_type = opts[:debug_return_type] || 'DeleteAdCreative200Response'
|
|
1196
|
-
|
|
1197
|
-
# auth_names
|
|
1198
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1199
|
-
|
|
1200
|
-
new_options = opts.merge(
|
|
1201
|
-
:operation => :"AdsApi.delete_ad_creative",
|
|
1202
|
-
:header_params => header_params,
|
|
1203
|
-
:query_params => query_params,
|
|
1204
|
-
:form_params => form_params,
|
|
1205
|
-
:body => post_body,
|
|
1206
|
-
:auth_names => auth_names,
|
|
1207
|
-
:return_type => return_type
|
|
1208
|
-
)
|
|
1209
|
-
|
|
1210
|
-
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1211
|
-
if @api_client.config.debugging
|
|
1212
|
-
@api_client.config.logger.debug "API called: AdsApi#delete_ad_creative\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1213
|
-
end
|
|
1214
|
-
return data, status_code, headers
|
|
1215
|
-
end
|
|
1216
|
-
|
|
1217
1079
|
# Delete a conversion destination
|
|
1218
1080
|
# LinkedIn-only today. LinkedIn does not expose hard-delete on conversion rules — what their UI calls \"delete\" is the same `enabled: false` flip we apply here. The rule remains fetchable via GET with `status: 'inactive'`; the unified discovery endpoint hides it by default. `adAccountId` may be passed as a query parameter (recommended) or as a JSON body field for clients that can send DELETE bodies.
|
|
1219
1081
|
# @param account_id [String]
|
|
@@ -1286,76 +1148,6 @@ module Zernio
|
|
|
1286
1148
|
return data, status_code, headers
|
|
1287
1149
|
end
|
|
1288
1150
|
|
|
1289
|
-
# Duplicate an ad (Meta)
|
|
1290
|
-
# 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.
|
|
1291
|
-
# @param ad_id [String] Zernio ad ID or platform ad ID
|
|
1292
|
-
# @param [Hash] opts the optional parameters
|
|
1293
|
-
# @option opts [DuplicateAdRequest] :duplicate_ad_request
|
|
1294
|
-
# @return [DuplicateAd200Response]
|
|
1295
|
-
def duplicate_ad(ad_id, opts = {})
|
|
1296
|
-
data, _status_code, _headers = duplicate_ad_with_http_info(ad_id, opts)
|
|
1297
|
-
data
|
|
1298
|
-
end
|
|
1299
|
-
|
|
1300
|
-
# Duplicate an ad (Meta)
|
|
1301
|
-
# 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.
|
|
1302
|
-
# @param ad_id [String] Zernio ad ID or platform ad ID
|
|
1303
|
-
# @param [Hash] opts the optional parameters
|
|
1304
|
-
# @option opts [DuplicateAdRequest] :duplicate_ad_request
|
|
1305
|
-
# @return [Array<(DuplicateAd200Response, Integer, Hash)>] DuplicateAd200Response data, response status code and response headers
|
|
1306
|
-
def duplicate_ad_with_http_info(ad_id, opts = {})
|
|
1307
|
-
if @api_client.config.debugging
|
|
1308
|
-
@api_client.config.logger.debug 'Calling API: AdsApi.duplicate_ad ...'
|
|
1309
|
-
end
|
|
1310
|
-
# verify the required parameter 'ad_id' is set
|
|
1311
|
-
if @api_client.config.client_side_validation && ad_id.nil?
|
|
1312
|
-
fail ArgumentError, "Missing the required parameter 'ad_id' when calling AdsApi.duplicate_ad"
|
|
1313
|
-
end
|
|
1314
|
-
# resource path
|
|
1315
|
-
local_var_path = '/v1/ads/{adId}/duplicate'.sub('{' + 'adId' + '}', CGI.escape(ad_id.to_s))
|
|
1316
|
-
|
|
1317
|
-
# query parameters
|
|
1318
|
-
query_params = opts[:query_params] || {}
|
|
1319
|
-
|
|
1320
|
-
# header parameters
|
|
1321
|
-
header_params = opts[:header_params] || {}
|
|
1322
|
-
# HTTP header 'Accept' (if needed)
|
|
1323
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1324
|
-
# HTTP header 'Content-Type'
|
|
1325
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1326
|
-
if !content_type.nil?
|
|
1327
|
-
header_params['Content-Type'] = content_type
|
|
1328
|
-
end
|
|
1329
|
-
|
|
1330
|
-
# form parameters
|
|
1331
|
-
form_params = opts[:form_params] || {}
|
|
1332
|
-
|
|
1333
|
-
# http body (model)
|
|
1334
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'duplicate_ad_request'])
|
|
1335
|
-
|
|
1336
|
-
# return_type
|
|
1337
|
-
return_type = opts[:debug_return_type] || 'DuplicateAd200Response'
|
|
1338
|
-
|
|
1339
|
-
# auth_names
|
|
1340
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1341
|
-
|
|
1342
|
-
new_options = opts.merge(
|
|
1343
|
-
:operation => :"AdsApi.duplicate_ad",
|
|
1344
|
-
:header_params => header_params,
|
|
1345
|
-
:query_params => query_params,
|
|
1346
|
-
:form_params => form_params,
|
|
1347
|
-
:body => post_body,
|
|
1348
|
-
:auth_names => auth_names,
|
|
1349
|
-
:return_type => return_type
|
|
1350
|
-
)
|
|
1351
|
-
|
|
1352
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1353
|
-
if @api_client.config.debugging
|
|
1354
|
-
@api_client.config.logger.debug "API called: AdsApi#duplicate_ad\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1355
|
-
end
|
|
1356
|
-
return data, status_code, headers
|
|
1357
|
-
end
|
|
1358
|
-
|
|
1359
1151
|
# Estimate audience reach
|
|
1360
1152
|
# Returns a normalized pre-flight audience-size estimate for a targeting spec, before any campaign is created. Backed by each platform's native reach API (Meta `delivery_estimate`, LinkedIn `audienceCounts`, X `audience_summary`, Pinterest `audience_sizing`). Platforms without a usable pre-flight reach API (Google Search/Display, TikTok) return `available: false` with no bounds, so clients can hide or grey out the estimate rather than treat the absence as an error.
|
|
1361
1153
|
# @param estimate_ad_reach_request [EstimateAdReachRequest]
|
|
@@ -1782,79 +1574,6 @@ module Zernio
|
|
|
1782
1574
|
return data, status_code, headers
|
|
1783
1575
|
end
|
|
1784
1576
|
|
|
1785
|
-
# Creative details (Meta)
|
|
1786
|
-
# One creative's details, verbatim from Meta. `fields` is a raw-passthrough override of the default projection. Meta only.
|
|
1787
|
-
# @param creative_id [String] Platform creative id
|
|
1788
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
1789
|
-
# @param [Hash] opts the optional parameters
|
|
1790
|
-
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
1791
|
-
# @return [GetAdCreative200Response]
|
|
1792
|
-
def get_ad_creative(creative_id, account_id, opts = {})
|
|
1793
|
-
data, _status_code, _headers = get_ad_creative_with_http_info(creative_id, account_id, opts)
|
|
1794
|
-
data
|
|
1795
|
-
end
|
|
1796
|
-
|
|
1797
|
-
# Creative details (Meta)
|
|
1798
|
-
# One creative's details, verbatim from Meta. `fields` is a raw-passthrough override of the default projection. Meta only.
|
|
1799
|
-
# @param creative_id [String] Platform creative id
|
|
1800
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
1801
|
-
# @param [Hash] opts the optional parameters
|
|
1802
|
-
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
1803
|
-
# @return [Array<(GetAdCreative200Response, Integer, Hash)>] GetAdCreative200Response data, response status code and response headers
|
|
1804
|
-
def get_ad_creative_with_http_info(creative_id, account_id, opts = {})
|
|
1805
|
-
if @api_client.config.debugging
|
|
1806
|
-
@api_client.config.logger.debug 'Calling API: AdsApi.get_ad_creative ...'
|
|
1807
|
-
end
|
|
1808
|
-
# verify the required parameter 'creative_id' is set
|
|
1809
|
-
if @api_client.config.client_side_validation && creative_id.nil?
|
|
1810
|
-
fail ArgumentError, "Missing the required parameter 'creative_id' when calling AdsApi.get_ad_creative"
|
|
1811
|
-
end
|
|
1812
|
-
# verify the required parameter 'account_id' is set
|
|
1813
|
-
if @api_client.config.client_side_validation && account_id.nil?
|
|
1814
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdsApi.get_ad_creative"
|
|
1815
|
-
end
|
|
1816
|
-
# resource path
|
|
1817
|
-
local_var_path = '/v1/ads/creatives/{creativeId}'.sub('{' + 'creativeId' + '}', CGI.escape(creative_id.to_s))
|
|
1818
|
-
|
|
1819
|
-
# query parameters
|
|
1820
|
-
query_params = opts[:query_params] || {}
|
|
1821
|
-
query_params[:'accountId'] = account_id
|
|
1822
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
1823
|
-
|
|
1824
|
-
# header parameters
|
|
1825
|
-
header_params = opts[:header_params] || {}
|
|
1826
|
-
# HTTP header 'Accept' (if needed)
|
|
1827
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1828
|
-
|
|
1829
|
-
# form parameters
|
|
1830
|
-
form_params = opts[:form_params] || {}
|
|
1831
|
-
|
|
1832
|
-
# http body (model)
|
|
1833
|
-
post_body = opts[:debug_body]
|
|
1834
|
-
|
|
1835
|
-
# return_type
|
|
1836
|
-
return_type = opts[:debug_return_type] || 'GetAdCreative200Response'
|
|
1837
|
-
|
|
1838
|
-
# auth_names
|
|
1839
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1840
|
-
|
|
1841
|
-
new_options = opts.merge(
|
|
1842
|
-
:operation => :"AdsApi.get_ad_creative",
|
|
1843
|
-
:header_params => header_params,
|
|
1844
|
-
:query_params => query_params,
|
|
1845
|
-
:form_params => form_params,
|
|
1846
|
-
:body => post_body,
|
|
1847
|
-
:auth_names => auth_names,
|
|
1848
|
-
:return_type => return_type
|
|
1849
|
-
)
|
|
1850
|
-
|
|
1851
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1852
|
-
if @api_client.config.debugging
|
|
1853
|
-
@api_client.config.logger.debug "API called: AdsApi#get_ad_creative\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1854
|
-
end
|
|
1855
|
-
return data, status_code, headers
|
|
1856
|
-
end
|
|
1857
|
-
|
|
1858
1577
|
# Poll an async insights report run (Meta)
|
|
1859
1578
|
# Status and results for a report run created via POST /v1/ads/insights/reports. While the job runs, returns `status` and `percentCompletion`. Once `status` is \"Job Completed\" the response also carries a `data` page, cursor-paginated via `limit` / `after`.
|
|
1860
1579
|
# @param report_run_id [String]
|
|
@@ -3127,51 +2846,51 @@ module Zernio
|
|
|
3127
2846
|
return data, status_code, headers
|
|
3128
2847
|
end
|
|
3129
2848
|
|
|
3130
|
-
#
|
|
3131
|
-
# Lists the ad account's
|
|
2849
|
+
# A/B tests and lift studies (Meta)
|
|
2850
|
+
# 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.
|
|
3132
2851
|
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
3133
2852
|
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
3134
2853
|
# @param [Hash] opts the optional parameters
|
|
3135
2854
|
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
3136
2855
|
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
3137
2856
|
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
3138
|
-
# @return [
|
|
3139
|
-
def
|
|
3140
|
-
data, _status_code, _headers =
|
|
2857
|
+
# @return [ListAdStudies200Response]
|
|
2858
|
+
def list_ad_studies(account_id, ad_account_id, opts = {})
|
|
2859
|
+
data, _status_code, _headers = list_ad_studies_with_http_info(account_id, ad_account_id, opts)
|
|
3141
2860
|
data
|
|
3142
2861
|
end
|
|
3143
2862
|
|
|
3144
|
-
#
|
|
3145
|
-
# Lists the ad account's
|
|
2863
|
+
# A/B tests and lift studies (Meta)
|
|
2864
|
+
# 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.
|
|
3146
2865
|
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
3147
2866
|
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
3148
2867
|
# @param [Hash] opts the optional parameters
|
|
3149
2868
|
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
3150
2869
|
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
3151
2870
|
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
3152
|
-
# @return [Array<(
|
|
3153
|
-
def
|
|
2871
|
+
# @return [Array<(ListAdStudies200Response, Integer, Hash)>] ListAdStudies200Response data, response status code and response headers
|
|
2872
|
+
def list_ad_studies_with_http_info(account_id, ad_account_id, opts = {})
|
|
3154
2873
|
if @api_client.config.debugging
|
|
3155
|
-
@api_client.config.logger.debug 'Calling API: AdsApi.
|
|
2874
|
+
@api_client.config.logger.debug 'Calling API: AdsApi.list_ad_studies ...'
|
|
3156
2875
|
end
|
|
3157
2876
|
# verify the required parameter 'account_id' is set
|
|
3158
2877
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
3159
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdsApi.
|
|
2878
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdsApi.list_ad_studies"
|
|
3160
2879
|
end
|
|
3161
2880
|
# verify the required parameter 'ad_account_id' is set
|
|
3162
2881
|
if @api_client.config.client_side_validation && ad_account_id.nil?
|
|
3163
|
-
fail ArgumentError, "Missing the required parameter 'ad_account_id' when calling AdsApi.
|
|
2882
|
+
fail ArgumentError, "Missing the required parameter 'ad_account_id' when calling AdsApi.list_ad_studies"
|
|
3164
2883
|
end
|
|
3165
2884
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
3166
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.
|
|
2885
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.list_ad_studies, must be smaller than or equal to 100.'
|
|
3167
2886
|
end
|
|
3168
2887
|
|
|
3169
2888
|
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
3170
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.
|
|
2889
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.list_ad_studies, must be greater than or equal to 1.'
|
|
3171
2890
|
end
|
|
3172
2891
|
|
|
3173
2892
|
# resource path
|
|
3174
|
-
local_var_path = '/v1/ads/
|
|
2893
|
+
local_var_path = '/v1/ads/studies'
|
|
3175
2894
|
|
|
3176
2895
|
# query parameters
|
|
3177
2896
|
query_params = opts[:query_params] || {}
|
|
@@ -3193,13 +2912,13 @@ module Zernio
|
|
|
3193
2912
|
post_body = opts[:debug_body]
|
|
3194
2913
|
|
|
3195
2914
|
# return_type
|
|
3196
|
-
return_type = opts[:debug_return_type] || '
|
|
2915
|
+
return_type = opts[:debug_return_type] || 'ListAdStudies200Response'
|
|
3197
2916
|
|
|
3198
2917
|
# auth_names
|
|
3199
2918
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3200
2919
|
|
|
3201
2920
|
new_options = opts.merge(
|
|
3202
|
-
:operation => :"AdsApi.
|
|
2921
|
+
:operation => :"AdsApi.list_ad_studies",
|
|
3203
2922
|
:header_params => header_params,
|
|
3204
2923
|
:query_params => query_params,
|
|
3205
2924
|
:form_params => form_params,
|
|
@@ -3210,297 +2929,36 @@ module Zernio
|
|
|
3210
2929
|
|
|
3211
2930
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3212
2931
|
if @api_client.config.debugging
|
|
3213
|
-
@api_client.config.logger.debug "API called: AdsApi#
|
|
2932
|
+
@api_client.config.logger.debug "API called: AdsApi#list_ad_studies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3214
2933
|
end
|
|
3215
2934
|
return data, status_code, headers
|
|
3216
2935
|
end
|
|
3217
2936
|
|
|
3218
|
-
#
|
|
3219
|
-
#
|
|
3220
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
3221
|
-
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
2937
|
+
# List ads
|
|
2938
|
+
# 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.
|
|
3222
2939
|
# @param [Hash] opts the optional parameters
|
|
3223
|
-
# @option opts [
|
|
3224
|
-
# @option opts [Integer] :limit
|
|
3225
|
-
# @option opts [String] :
|
|
3226
|
-
# @
|
|
3227
|
-
|
|
3228
|
-
|
|
2940
|
+
# @option opts [Integer] :page Page number (1-based) (default to 1)
|
|
2941
|
+
# @option opts [Integer] :limit (default to 50)
|
|
2942
|
+
# @option opts [String] :source all (default) = Zernio-created + platform-discovered ads. zernio = restrict to Zernio-created only. (default to 'all')
|
|
2943
|
+
# @option opts [AdStatus] :status
|
|
2944
|
+
# @option opts [String] :platform
|
|
2945
|
+
# @option opts [String] :account_id Social account ID
|
|
2946
|
+
# @option opts [String] :ad_account_id Platform ad account ID (e.g. act_123 for Meta). Mirrors the same filter on /v1/ads/campaigns and /v1/ads/tree.
|
|
2947
|
+
# @option opts [String] :profile_id Profile ID
|
|
2948
|
+
# @option opts [String] :campaign_id Platform campaign ID (filter ads within a campaign)
|
|
2949
|
+
# @option opts [String] :platform_ad_id Meta ad ID. Returns the ad with this platform-side ad ID.
|
|
2950
|
+
# @option opts [String] :effective_object_story_id 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.
|
|
2951
|
+
# @option opts [String] :effective_instagram_media_id 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.
|
|
2952
|
+
# @option opts [Date] :from_date Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
2953
|
+
# @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
2954
|
+
# @return [ListAds200Response]
|
|
2955
|
+
def list_ads(opts = {})
|
|
2956
|
+
data, _status_code, _headers = list_ads_with_http_info(opts)
|
|
3229
2957
|
data
|
|
3230
2958
|
end
|
|
3231
2959
|
|
|
3232
|
-
#
|
|
3233
|
-
#
|
|
3234
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
3235
|
-
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
3236
|
-
# @param [Hash] opts the optional parameters
|
|
3237
|
-
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
3238
|
-
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
3239
|
-
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
3240
|
-
# @return [Array<(ListAdImages200Response, Integer, Hash)>] ListAdImages200Response data, response status code and response headers
|
|
3241
|
-
def list_ad_images_with_http_info(account_id, ad_account_id, opts = {})
|
|
3242
|
-
if @api_client.config.debugging
|
|
3243
|
-
@api_client.config.logger.debug 'Calling API: AdsApi.list_ad_images ...'
|
|
3244
|
-
end
|
|
3245
|
-
# verify the required parameter 'account_id' is set
|
|
3246
|
-
if @api_client.config.client_side_validation && account_id.nil?
|
|
3247
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdsApi.list_ad_images"
|
|
3248
|
-
end
|
|
3249
|
-
# verify the required parameter 'ad_account_id' is set
|
|
3250
|
-
if @api_client.config.client_side_validation && ad_account_id.nil?
|
|
3251
|
-
fail ArgumentError, "Missing the required parameter 'ad_account_id' when calling AdsApi.list_ad_images"
|
|
3252
|
-
end
|
|
3253
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
3254
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.list_ad_images, must be smaller than or equal to 100.'
|
|
3255
|
-
end
|
|
3256
|
-
|
|
3257
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
3258
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.list_ad_images, must be greater than or equal to 1.'
|
|
3259
|
-
end
|
|
3260
|
-
|
|
3261
|
-
# resource path
|
|
3262
|
-
local_var_path = '/v1/ads/images'
|
|
3263
|
-
|
|
3264
|
-
# query parameters
|
|
3265
|
-
query_params = opts[:query_params] || {}
|
|
3266
|
-
query_params[:'accountId'] = account_id
|
|
3267
|
-
query_params[:'adAccountId'] = ad_account_id
|
|
3268
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
3269
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3270
|
-
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
3271
|
-
|
|
3272
|
-
# header parameters
|
|
3273
|
-
header_params = opts[:header_params] || {}
|
|
3274
|
-
# HTTP header 'Accept' (if needed)
|
|
3275
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3276
|
-
|
|
3277
|
-
# form parameters
|
|
3278
|
-
form_params = opts[:form_params] || {}
|
|
3279
|
-
|
|
3280
|
-
# http body (model)
|
|
3281
|
-
post_body = opts[:debug_body]
|
|
3282
|
-
|
|
3283
|
-
# return_type
|
|
3284
|
-
return_type = opts[:debug_return_type] || 'ListAdImages200Response'
|
|
3285
|
-
|
|
3286
|
-
# auth_names
|
|
3287
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3288
|
-
|
|
3289
|
-
new_options = opts.merge(
|
|
3290
|
-
:operation => :"AdsApi.list_ad_images",
|
|
3291
|
-
:header_params => header_params,
|
|
3292
|
-
:query_params => query_params,
|
|
3293
|
-
:form_params => form_params,
|
|
3294
|
-
:body => post_body,
|
|
3295
|
-
:auth_names => auth_names,
|
|
3296
|
-
:return_type => return_type
|
|
3297
|
-
)
|
|
3298
|
-
|
|
3299
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3300
|
-
if @api_client.config.debugging
|
|
3301
|
-
@api_client.config.logger.debug "API called: AdsApi#list_ad_images\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3302
|
-
end
|
|
3303
|
-
return data, status_code, headers
|
|
3304
|
-
end
|
|
3305
|
-
|
|
3306
|
-
# Ad labels (Meta)
|
|
3307
|
-
# Lists the ad account's organizational labels (Meta's `/act_X/adlabels`), rows returned verbatim (id, name, created/updated time). Meta only.
|
|
3308
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
3309
|
-
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
3310
|
-
# @param [Hash] opts the optional parameters
|
|
3311
|
-
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
3312
|
-
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
3313
|
-
# @return [ListAdLabels200Response]
|
|
3314
|
-
def list_ad_labels(account_id, ad_account_id, opts = {})
|
|
3315
|
-
data, _status_code, _headers = list_ad_labels_with_http_info(account_id, ad_account_id, opts)
|
|
3316
|
-
data
|
|
3317
|
-
end
|
|
3318
|
-
|
|
3319
|
-
# Ad labels (Meta)
|
|
3320
|
-
# Lists the ad account's organizational labels (Meta's `/act_X/adlabels`), rows returned verbatim (id, name, created/updated time). Meta only.
|
|
3321
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
3322
|
-
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
3323
|
-
# @param [Hash] opts the optional parameters
|
|
3324
|
-
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
3325
|
-
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
3326
|
-
# @return [Array<(ListAdLabels200Response, Integer, Hash)>] ListAdLabels200Response data, response status code and response headers
|
|
3327
|
-
def list_ad_labels_with_http_info(account_id, ad_account_id, opts = {})
|
|
3328
|
-
if @api_client.config.debugging
|
|
3329
|
-
@api_client.config.logger.debug 'Calling API: AdsApi.list_ad_labels ...'
|
|
3330
|
-
end
|
|
3331
|
-
# verify the required parameter 'account_id' is set
|
|
3332
|
-
if @api_client.config.client_side_validation && account_id.nil?
|
|
3333
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdsApi.list_ad_labels"
|
|
3334
|
-
end
|
|
3335
|
-
# verify the required parameter 'ad_account_id' is set
|
|
3336
|
-
if @api_client.config.client_side_validation && ad_account_id.nil?
|
|
3337
|
-
fail ArgumentError, "Missing the required parameter 'ad_account_id' when calling AdsApi.list_ad_labels"
|
|
3338
|
-
end
|
|
3339
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
3340
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.list_ad_labels, must be smaller than or equal to 100.'
|
|
3341
|
-
end
|
|
3342
|
-
|
|
3343
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
3344
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.list_ad_labels, must be greater than or equal to 1.'
|
|
3345
|
-
end
|
|
3346
|
-
|
|
3347
|
-
# resource path
|
|
3348
|
-
local_var_path = '/v1/ads/labels'
|
|
3349
|
-
|
|
3350
|
-
# query parameters
|
|
3351
|
-
query_params = opts[:query_params] || {}
|
|
3352
|
-
query_params[:'accountId'] = account_id
|
|
3353
|
-
query_params[:'adAccountId'] = ad_account_id
|
|
3354
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3355
|
-
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
3356
|
-
|
|
3357
|
-
# header parameters
|
|
3358
|
-
header_params = opts[:header_params] || {}
|
|
3359
|
-
# HTTP header 'Accept' (if needed)
|
|
3360
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3361
|
-
|
|
3362
|
-
# form parameters
|
|
3363
|
-
form_params = opts[:form_params] || {}
|
|
3364
|
-
|
|
3365
|
-
# http body (model)
|
|
3366
|
-
post_body = opts[:debug_body]
|
|
3367
|
-
|
|
3368
|
-
# return_type
|
|
3369
|
-
return_type = opts[:debug_return_type] || 'ListAdLabels200Response'
|
|
3370
|
-
|
|
3371
|
-
# auth_names
|
|
3372
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3373
|
-
|
|
3374
|
-
new_options = opts.merge(
|
|
3375
|
-
:operation => :"AdsApi.list_ad_labels",
|
|
3376
|
-
:header_params => header_params,
|
|
3377
|
-
:query_params => query_params,
|
|
3378
|
-
:form_params => form_params,
|
|
3379
|
-
:body => post_body,
|
|
3380
|
-
:auth_names => auth_names,
|
|
3381
|
-
:return_type => return_type
|
|
3382
|
-
)
|
|
3383
|
-
|
|
3384
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3385
|
-
if @api_client.config.debugging
|
|
3386
|
-
@api_client.config.logger.debug "API called: AdsApi#list_ad_labels\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3387
|
-
end
|
|
3388
|
-
return data, status_code, headers
|
|
3389
|
-
end
|
|
3390
|
-
|
|
3391
|
-
# A/B tests and lift studies (Meta)
|
|
3392
|
-
# 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.
|
|
3393
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
3394
|
-
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
3395
|
-
# @param [Hash] opts the optional parameters
|
|
3396
|
-
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
3397
|
-
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
3398
|
-
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
3399
|
-
# @return [ListAdStudies200Response]
|
|
3400
|
-
def list_ad_studies(account_id, ad_account_id, opts = {})
|
|
3401
|
-
data, _status_code, _headers = list_ad_studies_with_http_info(account_id, ad_account_id, opts)
|
|
3402
|
-
data
|
|
3403
|
-
end
|
|
3404
|
-
|
|
3405
|
-
# A/B tests and lift studies (Meta)
|
|
3406
|
-
# 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.
|
|
3407
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
3408
|
-
# @param ad_account_id [String] Meta ad account id (act_<n>).
|
|
3409
|
-
# @param [Hash] opts the optional parameters
|
|
3410
|
-
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
3411
|
-
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
3412
|
-
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
3413
|
-
# @return [Array<(ListAdStudies200Response, Integer, Hash)>] ListAdStudies200Response data, response status code and response headers
|
|
3414
|
-
def list_ad_studies_with_http_info(account_id, ad_account_id, opts = {})
|
|
3415
|
-
if @api_client.config.debugging
|
|
3416
|
-
@api_client.config.logger.debug 'Calling API: AdsApi.list_ad_studies ...'
|
|
3417
|
-
end
|
|
3418
|
-
# verify the required parameter 'account_id' is set
|
|
3419
|
-
if @api_client.config.client_side_validation && account_id.nil?
|
|
3420
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdsApi.list_ad_studies"
|
|
3421
|
-
end
|
|
3422
|
-
# verify the required parameter 'ad_account_id' is set
|
|
3423
|
-
if @api_client.config.client_side_validation && ad_account_id.nil?
|
|
3424
|
-
fail ArgumentError, "Missing the required parameter 'ad_account_id' when calling AdsApi.list_ad_studies"
|
|
3425
|
-
end
|
|
3426
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
3427
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.list_ad_studies, must be smaller than or equal to 100.'
|
|
3428
|
-
end
|
|
3429
|
-
|
|
3430
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
3431
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.list_ad_studies, must be greater than or equal to 1.'
|
|
3432
|
-
end
|
|
3433
|
-
|
|
3434
|
-
# resource path
|
|
3435
|
-
local_var_path = '/v1/ads/studies'
|
|
3436
|
-
|
|
3437
|
-
# query parameters
|
|
3438
|
-
query_params = opts[:query_params] || {}
|
|
3439
|
-
query_params[:'accountId'] = account_id
|
|
3440
|
-
query_params[:'adAccountId'] = ad_account_id
|
|
3441
|
-
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
|
3442
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3443
|
-
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
3444
|
-
|
|
3445
|
-
# header parameters
|
|
3446
|
-
header_params = opts[:header_params] || {}
|
|
3447
|
-
# HTTP header 'Accept' (if needed)
|
|
3448
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3449
|
-
|
|
3450
|
-
# form parameters
|
|
3451
|
-
form_params = opts[:form_params] || {}
|
|
3452
|
-
|
|
3453
|
-
# http body (model)
|
|
3454
|
-
post_body = opts[:debug_body]
|
|
3455
|
-
|
|
3456
|
-
# return_type
|
|
3457
|
-
return_type = opts[:debug_return_type] || 'ListAdStudies200Response'
|
|
3458
|
-
|
|
3459
|
-
# auth_names
|
|
3460
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3461
|
-
|
|
3462
|
-
new_options = opts.merge(
|
|
3463
|
-
:operation => :"AdsApi.list_ad_studies",
|
|
3464
|
-
:header_params => header_params,
|
|
3465
|
-
:query_params => query_params,
|
|
3466
|
-
:form_params => form_params,
|
|
3467
|
-
:body => post_body,
|
|
3468
|
-
:auth_names => auth_names,
|
|
3469
|
-
:return_type => return_type
|
|
3470
|
-
)
|
|
3471
|
-
|
|
3472
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3473
|
-
if @api_client.config.debugging
|
|
3474
|
-
@api_client.config.logger.debug "API called: AdsApi#list_ad_studies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3475
|
-
end
|
|
3476
|
-
return data, status_code, headers
|
|
3477
|
-
end
|
|
3478
|
-
|
|
3479
|
-
# List ads
|
|
3480
|
-
# 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.
|
|
3481
|
-
# @param [Hash] opts the optional parameters
|
|
3482
|
-
# @option opts [Integer] :page Page number (1-based) (default to 1)
|
|
3483
|
-
# @option opts [Integer] :limit (default to 50)
|
|
3484
|
-
# @option opts [String] :source all (default) = Zernio-created + platform-discovered ads. zernio = restrict to Zernio-created only. (default to 'all')
|
|
3485
|
-
# @option opts [AdStatus] :status
|
|
3486
|
-
# @option opts [String] :platform
|
|
3487
|
-
# @option opts [String] :account_id Social account ID
|
|
3488
|
-
# @option opts [String] :ad_account_id Platform ad account ID (e.g. act_123 for Meta). Mirrors the same filter on /v1/ads/campaigns and /v1/ads/tree.
|
|
3489
|
-
# @option opts [String] :profile_id Profile ID
|
|
3490
|
-
# @option opts [String] :campaign_id Platform campaign ID (filter ads within a campaign)
|
|
3491
|
-
# @option opts [String] :platform_ad_id Meta ad ID. Returns the ad with this platform-side ad ID.
|
|
3492
|
-
# @option opts [String] :effective_object_story_id 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.
|
|
3493
|
-
# @option opts [String] :effective_instagram_media_id 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.
|
|
3494
|
-
# @option opts [Date] :from_date Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
3495
|
-
# @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
3496
|
-
# @return [ListAds200Response]
|
|
3497
|
-
def list_ads(opts = {})
|
|
3498
|
-
data, _status_code, _headers = list_ads_with_http_info(opts)
|
|
3499
|
-
data
|
|
3500
|
-
end
|
|
3501
|
-
|
|
3502
|
-
# List ads
|
|
3503
|
-
# 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.
|
|
2960
|
+
# List ads
|
|
2961
|
+
# 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.
|
|
3504
2962
|
# @param [Hash] opts the optional parameters
|
|
3505
2963
|
# @option opts [Integer] :page Page number (1-based) (default to 1)
|
|
3506
2964
|
# @option opts [Integer] :limit (default to 50)
|
|
@@ -3885,90 +3343,6 @@ module Zernio
|
|
|
3885
3343
|
return data, status_code, headers
|
|
3886
3344
|
end
|
|
3887
3345
|
|
|
3888
|
-
# High demand periods / budget schedules (Meta)
|
|
3889
|
-
# 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.
|
|
3890
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
3891
|
-
# @param [Hash] opts the optional parameters
|
|
3892
|
-
# @option opts [String] :campaign_id Platform campaign id. Exactly one of campaignId / adSetId.
|
|
3893
|
-
# @option opts [String] :ad_set_id Platform ad set id. Exactly one of campaignId / adSetId.
|
|
3894
|
-
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
3895
|
-
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
3896
|
-
# @return [ListHighDemandPeriods200Response]
|
|
3897
|
-
def list_high_demand_periods(account_id, opts = {})
|
|
3898
|
-
data, _status_code, _headers = list_high_demand_periods_with_http_info(account_id, opts)
|
|
3899
|
-
data
|
|
3900
|
-
end
|
|
3901
|
-
|
|
3902
|
-
# High demand periods / budget schedules (Meta)
|
|
3903
|
-
# 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.
|
|
3904
|
-
# @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
3905
|
-
# @param [Hash] opts the optional parameters
|
|
3906
|
-
# @option opts [String] :campaign_id Platform campaign id. Exactly one of campaignId / adSetId.
|
|
3907
|
-
# @option opts [String] :ad_set_id Platform ad set id. Exactly one of campaignId / adSetId.
|
|
3908
|
-
# @option opts [Integer] :limit Rows per page (default to 25)
|
|
3909
|
-
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
3910
|
-
# @return [Array<(ListHighDemandPeriods200Response, Integer, Hash)>] ListHighDemandPeriods200Response data, response status code and response headers
|
|
3911
|
-
def list_high_demand_periods_with_http_info(account_id, opts = {})
|
|
3912
|
-
if @api_client.config.debugging
|
|
3913
|
-
@api_client.config.logger.debug 'Calling API: AdsApi.list_high_demand_periods ...'
|
|
3914
|
-
end
|
|
3915
|
-
# verify the required parameter 'account_id' is set
|
|
3916
|
-
if @api_client.config.client_side_validation && account_id.nil?
|
|
3917
|
-
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdsApi.list_high_demand_periods"
|
|
3918
|
-
end
|
|
3919
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
|
|
3920
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.list_high_demand_periods, must be smaller than or equal to 100.'
|
|
3921
|
-
end
|
|
3922
|
-
|
|
3923
|
-
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
|
3924
|
-
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling AdsApi.list_high_demand_periods, must be greater than or equal to 1.'
|
|
3925
|
-
end
|
|
3926
|
-
|
|
3927
|
-
# resource path
|
|
3928
|
-
local_var_path = '/v1/ads/high-demand-periods'
|
|
3929
|
-
|
|
3930
|
-
# query parameters
|
|
3931
|
-
query_params = opts[:query_params] || {}
|
|
3932
|
-
query_params[:'accountId'] = account_id
|
|
3933
|
-
query_params[:'campaignId'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
|
|
3934
|
-
query_params[:'adSetId'] = opts[:'ad_set_id'] if !opts[:'ad_set_id'].nil?
|
|
3935
|
-
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
3936
|
-
query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil?
|
|
3937
|
-
|
|
3938
|
-
# header parameters
|
|
3939
|
-
header_params = opts[:header_params] || {}
|
|
3940
|
-
# HTTP header 'Accept' (if needed)
|
|
3941
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
3942
|
-
|
|
3943
|
-
# form parameters
|
|
3944
|
-
form_params = opts[:form_params] || {}
|
|
3945
|
-
|
|
3946
|
-
# http body (model)
|
|
3947
|
-
post_body = opts[:debug_body]
|
|
3948
|
-
|
|
3949
|
-
# return_type
|
|
3950
|
-
return_type = opts[:debug_return_type] || 'ListHighDemandPeriods200Response'
|
|
3951
|
-
|
|
3952
|
-
# auth_names
|
|
3953
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
3954
|
-
|
|
3955
|
-
new_options = opts.merge(
|
|
3956
|
-
:operation => :"AdsApi.list_high_demand_periods",
|
|
3957
|
-
:header_params => header_params,
|
|
3958
|
-
:query_params => query_params,
|
|
3959
|
-
:form_params => form_params,
|
|
3960
|
-
:body => post_body,
|
|
3961
|
-
:auth_names => auth_names,
|
|
3962
|
-
:return_type => return_type
|
|
3963
|
-
)
|
|
3964
|
-
|
|
3965
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3966
|
-
if @api_client.config.debugging
|
|
3967
|
-
@api_client.config.logger.debug "API called: AdsApi#list_high_demand_periods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3968
|
-
end
|
|
3969
|
-
return data, status_code, headers
|
|
3970
|
-
end
|
|
3971
|
-
|
|
3972
3346
|
# List lead forms
|
|
3973
3347
|
# Lists the Lead Gen forms owned by the connected Facebook Page. Requires the Ads add-on.
|
|
3974
3348
|
# @param account_id [String] Connected facebook account id.
|
|
@@ -4940,80 +4314,6 @@ module Zernio
|
|
|
4940
4314
|
return data, status_code, headers
|
|
4941
4315
|
end
|
|
4942
4316
|
|
|
4943
|
-
# Rename a creative (Meta)
|
|
4944
|
-
# 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.
|
|
4945
|
-
# @param creative_id [String] Platform creative id
|
|
4946
|
-
# @param update_ad_creative_request [UpdateAdCreativeRequest]
|
|
4947
|
-
# @param [Hash] opts the optional parameters
|
|
4948
|
-
# @return [UpdateAdCreative200Response]
|
|
4949
|
-
def update_ad_creative(creative_id, update_ad_creative_request, opts = {})
|
|
4950
|
-
data, _status_code, _headers = update_ad_creative_with_http_info(creative_id, update_ad_creative_request, opts)
|
|
4951
|
-
data
|
|
4952
|
-
end
|
|
4953
|
-
|
|
4954
|
-
# Rename a creative (Meta)
|
|
4955
|
-
# 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.
|
|
4956
|
-
# @param creative_id [String] Platform creative id
|
|
4957
|
-
# @param update_ad_creative_request [UpdateAdCreativeRequest]
|
|
4958
|
-
# @param [Hash] opts the optional parameters
|
|
4959
|
-
# @return [Array<(UpdateAdCreative200Response, Integer, Hash)>] UpdateAdCreative200Response data, response status code and response headers
|
|
4960
|
-
def update_ad_creative_with_http_info(creative_id, update_ad_creative_request, opts = {})
|
|
4961
|
-
if @api_client.config.debugging
|
|
4962
|
-
@api_client.config.logger.debug 'Calling API: AdsApi.update_ad_creative ...'
|
|
4963
|
-
end
|
|
4964
|
-
# verify the required parameter 'creative_id' is set
|
|
4965
|
-
if @api_client.config.client_side_validation && creative_id.nil?
|
|
4966
|
-
fail ArgumentError, "Missing the required parameter 'creative_id' when calling AdsApi.update_ad_creative"
|
|
4967
|
-
end
|
|
4968
|
-
# verify the required parameter 'update_ad_creative_request' is set
|
|
4969
|
-
if @api_client.config.client_side_validation && update_ad_creative_request.nil?
|
|
4970
|
-
fail ArgumentError, "Missing the required parameter 'update_ad_creative_request' when calling AdsApi.update_ad_creative"
|
|
4971
|
-
end
|
|
4972
|
-
# resource path
|
|
4973
|
-
local_var_path = '/v1/ads/creatives/{creativeId}'.sub('{' + 'creativeId' + '}', CGI.escape(creative_id.to_s))
|
|
4974
|
-
|
|
4975
|
-
# query parameters
|
|
4976
|
-
query_params = opts[:query_params] || {}
|
|
4977
|
-
|
|
4978
|
-
# header parameters
|
|
4979
|
-
header_params = opts[:header_params] || {}
|
|
4980
|
-
# HTTP header 'Accept' (if needed)
|
|
4981
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
4982
|
-
# HTTP header 'Content-Type'
|
|
4983
|
-
content_type = @api_client.select_header_content_type(['application/json'])
|
|
4984
|
-
if !content_type.nil?
|
|
4985
|
-
header_params['Content-Type'] = content_type
|
|
4986
|
-
end
|
|
4987
|
-
|
|
4988
|
-
# form parameters
|
|
4989
|
-
form_params = opts[:form_params] || {}
|
|
4990
|
-
|
|
4991
|
-
# http body (model)
|
|
4992
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_ad_creative_request)
|
|
4993
|
-
|
|
4994
|
-
# return_type
|
|
4995
|
-
return_type = opts[:debug_return_type] || 'UpdateAdCreative200Response'
|
|
4996
|
-
|
|
4997
|
-
# auth_names
|
|
4998
|
-
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
4999
|
-
|
|
5000
|
-
new_options = opts.merge(
|
|
5001
|
-
:operation => :"AdsApi.update_ad_creative",
|
|
5002
|
-
:header_params => header_params,
|
|
5003
|
-
:query_params => query_params,
|
|
5004
|
-
:form_params => form_params,
|
|
5005
|
-
:body => post_body,
|
|
5006
|
-
:auth_names => auth_names,
|
|
5007
|
-
:return_type => return_type
|
|
5008
|
-
)
|
|
5009
|
-
|
|
5010
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
5011
|
-
if @api_client.config.debugging
|
|
5012
|
-
@api_client.config.logger.debug "API called: AdsApi#update_ad_creative\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
5013
|
-
end
|
|
5014
|
-
return data, status_code, headers
|
|
5015
|
-
end
|
|
5016
|
-
|
|
5017
4317
|
# Pause or resume a single ad
|
|
5018
4318
|
# Ad-scoped pause/resume — touches ONLY this ad, never its parent ad set or campaign (so sibling ads keep running). Thin wrapper over the `status` field of PUT /v1/ads/{adId}, for callers that want a URL symmetric to /v1/ads/campaigns/{campaignId}/status and /v1/ads/ad-sets/{adSetId}/status. `{adId}` accepts the same identifier dialects as GET/PUT /v1/ads/{adId} (Zernio hex `_id`, Meta numeric `platformAdId`, or the creative's effective story/media IDs). `platform` is inferred from the ad, so it's not required in the body. Ads in terminal statuses (rejected, completed, cancelled) and no-op flips (already in the target state) are skipped.
|
|
5019
4319
|
# @param ad_id [String] Zernio `_id` (hex), Meta `platformAdId` (numeric), or one of the creative's effective story/media IDs.
|