zernio-sdk 0.0.550 → 0.0.552
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 +73 -75
- data/docs/AdAccountsApi.md +915 -0
- data/docs/AdCampaignsApi.md +615 -15
- data/docs/AdCreativesApi.md +815 -0
- data/docs/AdInsightsApi.md +415 -0
- data/docs/AdTargetingApi.md +371 -0
- data/docs/AnalyticsApi.md +7 -7
- data/docs/BoostPostRequestTracking.md +1 -1
- data/docs/{CreateLeadFormRequestQuestionsInnerOptionsInner.md → BoostPostRequestTrackingUrlTagsInner.md} +2 -2
- data/docs/ConversionsApi.md +890 -0
- data/docs/CreateLeadFormRequestQuestionsInner.md +1 -1
- data/docs/LeadGenApi.md +527 -0
- data/docs/MessagingAdsApi.md +215 -0
- data/docs/ReachAndFrequencyApi.md +294 -0
- data/docs/TrackingTagsApi.md +141 -0
- data/docs/YouTubeDailyViewsResponse.md +2 -0
- data/docs/YouTubeDemographicsResponse.md +2 -0
- data/docs/YouTubeVideoRetentionResponse.md +2 -0
- data/lib/zernio-sdk/api/ad_accounts_api.rb +958 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +618 -12
- data/lib/zernio-sdk/api/ad_creatives_api.rb +826 -0
- data/lib/zernio-sdk/api/ad_insights_api.rb +446 -0
- data/lib/zernio-sdk/api/ad_targeting_api.rb +404 -0
- data/lib/zernio-sdk/api/analytics_api.rb +8 -8
- data/lib/zernio-sdk/api/conversions_api.rb +936 -0
- data/lib/zernio-sdk/api/lead_gen_api.rb +547 -0
- data/lib/zernio-sdk/api/messaging_ads_api.rb +226 -0
- data/lib/zernio-sdk/api/reach_and_frequency_api.rb +316 -0
- data/lib/zernio-sdk/api/tracking_tags_api.rb +137 -0
- data/lib/zernio-sdk/models/boost_post_request_tracking.rb +5 -2
- data/lib/zernio-sdk/models/{create_lead_form_request_questions_inner_options_inner.rb → boost_post_request_tracking_url_tags_inner.rb} +3 -3
- data/lib/zernio-sdk/models/create_lead_form_request_questions_inner.rb +1 -1
- data/lib/zernio-sdk/models/you_tube_daily_views_response.rb +11 -1
- data/lib/zernio-sdk/models/you_tube_demographics_response.rb +11 -1
- data/lib/zernio-sdk/models/you_tube_video_retention_response.rb +11 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +9 -2
- data/openapi.yaml +329 -163
- data/spec/api/ad_accounts_api_spec.rb +206 -0
- data/spec/api/ad_campaigns_api_spec.rb +119 -6
- data/spec/api/ad_creatives_api_spec.rb +182 -0
- data/spec/api/ad_insights_api_spec.rb +120 -0
- data/spec/api/ad_targeting_api_spec.rb +101 -0
- data/spec/api/analytics_api_spec.rb +4 -4
- data/spec/api/conversions_api_spec.rb +199 -0
- data/spec/api/lead_gen_api_spec.rb +131 -0
- data/spec/api/messaging_ads_api_spec.rb +71 -0
- data/spec/api/reach_and_frequency_api_spec.rb +87 -0
- data/spec/api/tracking_tags_api_spec.rb +25 -0
- data/spec/models/{create_lead_form_request_questions_inner_options_inner_spec.rb → boost_post_request_tracking_url_tags_inner_spec.rb} +6 -6
- data/spec/models/you_tube_daily_views_response_spec.rb +6 -0
- data/spec/models/you_tube_demographics_response_spec.rb +6 -0
- data/spec/models/you_tube_video_retention_response_spec.rb +6 -0
- metadata +38 -10
- data/docs/AdsApi.md +0 -5278
- data/lib/zernio-sdk/api/ads_api.rb +0 -5391
- data/spec/api/ads_api_spec.rb +0 -1015
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for Zernio::AdAccountsApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'AdAccountsApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = Zernio::AdAccountsApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of AdAccountsApi' do
|
|
30
|
+
it 'should create an instance of AdAccountsApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(Zernio::AdAccountsApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_ad_account_finance
|
|
36
|
+
# Ad account finances
|
|
37
|
+
# Finances of one Meta ad account: prepaid `balance`, lifetime `amountSpent`, account `spendCap` (null = no cap) and the `fundingSource`. Money values are converted from Meta's minor units to whole units of `currency`.
|
|
38
|
+
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
39
|
+
# @param ad_account_id Meta ad account id (act_<n>).
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @return [GetAdAccountFinance200Response]
|
|
42
|
+
describe 'get_ad_account_finance test' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# unit tests for get_ad_comments
|
|
49
|
+
# List comments on an ad
|
|
50
|
+
# Returns comments on an ad's underlying creative post. Useful for moderating or analyzing engagement on dark posts (ad creatives that never went live organically), which the regular GET /v1/inbox/comments/{postId} endpoint cannot serve because dark posts are not in Zernio's post database. An ad that runs on both Facebook feed and Instagram feed has two separate underlying posts with separate comment threads (the creative's effective_object_story_id and effective_instagram_media_id). Use the `placement` query param to pick one; with no param the Instagram side is returned when it exists, otherwise Facebook. The identifiers are read from the ad record (persisted during sync) with a Marketing-API fallback for ads that predate the field. For Instagram-placed comments, the Instagram account that runs the ad must be connected to Zernio — those comments are read through that account's token. If no connected Instagram account on the profile can read the ad's media, the call returns ads_connection_required (the Facebook side, if any, is still readable via ?placement=facebook). Meta-only. Other ad platforms (TikTok, LinkedIn, Pinterest, Google, X) do not expose a public per-ad comments API and return feature_not_available. Requires the Ads add-on. Response shape matches GET /v1/inbox/comments/{postId}. The `{adId}` path segment accepts any identifier dialect Zernio indexes for the ad: Zernio internal `_id` (24-char hex), Meta's numeric `platformAdId` (the value shipped in `comment.received` webhooks as `comment.ad.id`), or the creative's `effective_object_story_id` / `effective_instagram_media_id`. Caller doesn't need a translation step.
|
|
51
|
+
# @param ad_id Internal Zernio ad ID (ObjectId).
|
|
52
|
+
# @param [Hash] opts the optional parameters
|
|
53
|
+
# @option opts [String] :placement Which side of the ad to return comments for. Omit to default to the Instagram side when present, else Facebook. Returns ad_not_commentable if the ad has no such placement.
|
|
54
|
+
# @option opts [Integer] :limit
|
|
55
|
+
# @option opts [String] :cursor Pagination cursor from a previous response.
|
|
56
|
+
# @return [GetAdComments200Response]
|
|
57
|
+
describe 'get_ad_comments test' do
|
|
58
|
+
it 'should work' do
|
|
59
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# unit tests for get_ads_activity_log
|
|
64
|
+
# Ad account change / audit log
|
|
65
|
+
# Account-level audit log from Meta's `/act_X/activities`: who changed what and when (creates, edits, status flips, budget changes...) with Meta's translated event names and the structured before/after in `extra_data`. Rows are returned verbatim. Meta has no server-side per-object filter on this edge, so `objectId` filters the returned page client-side (combine with paging to walk history for one campaign/ad set/ad).
|
|
66
|
+
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
67
|
+
# @param ad_account_id Meta ad account id (act_<n>).
|
|
68
|
+
# @param [Hash] opts the optional parameters
|
|
69
|
+
# @option opts [Date] :since Start of range (YYYY-MM-DD).
|
|
70
|
+
# @option opts [Date] :_until End of range (YYYY-MM-DD).
|
|
71
|
+
# @option opts [String] :object_id Client-side filter to one Meta object id (campaign, ad set or ad).
|
|
72
|
+
# @option opts [Integer] :limit Rows per page
|
|
73
|
+
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
74
|
+
# @return [GetAdsActivityLog200Response]
|
|
75
|
+
describe 'get_ads_activity_log test' do
|
|
76
|
+
it 'should work' do
|
|
77
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# unit tests for get_dsa_defaults
|
|
82
|
+
# Get ad account DSA defaults
|
|
83
|
+
# Returns the default DSA beneficiary and payor currently set on a Meta ad account, whether they were set via `PATCH /v1/ads/accounts` or in Meta Ads Manager. Fields are omitted when no default is configured. Meta accounts only.
|
|
84
|
+
# @param account_id Social account ID (metaads, or a facebook/instagram posting account)
|
|
85
|
+
# @param ad_account_id Meta ad account ID (act_...)
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [UpdateAdAccount200Response]
|
|
88
|
+
describe 'get_dsa_defaults test' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# unit tests for get_dsa_recommendations
|
|
95
|
+
# List DSA beneficiary/payor suggestions
|
|
96
|
+
# Returns Meta's suggested beneficiary/payor names for an ad account, derived by Meta from the account's recent activity. Useful for prefilling `dsaBeneficiary`/`dsaPayor` inputs, or the defaults sent to `PATCH /v1/ads/accounts`, in your own UI. Meta returns a single flat list. Entries are not labeled as beneficiary or payor, and since these are legal disclosures Zernio never applies them automatically: let your user pick the right entity. The list may be empty for accounts with little activity. Meta accounts only.
|
|
97
|
+
# @param account_id Social account ID (metaads, or a facebook/instagram posting account)
|
|
98
|
+
# @param ad_account_id Meta ad account ID (act_...)
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @return [GetDsaRecommendations200Response]
|
|
101
|
+
describe 'get_dsa_recommendations test' do
|
|
102
|
+
it 'should work' do
|
|
103
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# unit tests for list_ad_accounts
|
|
108
|
+
# List ad accounts
|
|
109
|
+
# Returns the platform ad accounts available for the given social account (e.g. Meta ad accounts, TikTok advertiser IDs, Google Ads customer IDs). For TikTok agencies: enumerates every advertiser under every Business Center the token can read (paginated server-side), then chunks the lookup against TikTok's `/advertiser/info/` endpoint (which has a per-call cap of ≤100 IDs). Solo advertisers without a BC fall back to the OAuth-time `advertiser_ids` list. Cached for 1h on the SocialAccount; lazy-refreshed on first call after expiry.
|
|
110
|
+
# @param account_id Social account ID
|
|
111
|
+
# @param [Hash] opts the optional parameters
|
|
112
|
+
# @option opts [String] :ad_account_id Filter response to a single platform ad account ID (e.g. `act_123` for Meta, advertiser_id for TikTok). Returns at most one item.
|
|
113
|
+
# @option opts [Integer] :limit Clamp the returned `accounts[]` length. Useful for typeahead pickers on agency tokens with hundreds of advertisers.
|
|
114
|
+
# @return [ListAdAccounts200Response]
|
|
115
|
+
describe 'list_ad_accounts test' do
|
|
116
|
+
it 'should work' do
|
|
117
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# unit tests for list_ad_labels
|
|
122
|
+
# Ad labels
|
|
123
|
+
# Lists the ad account's organizational labels (Meta's `/act_X/adlabels`), rows returned verbatim (id, name, created/updated time).
|
|
124
|
+
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
125
|
+
# @param ad_account_id Meta ad account id (act_<n>).
|
|
126
|
+
# @param [Hash] opts the optional parameters
|
|
127
|
+
# @option opts [Integer] :limit Rows per page
|
|
128
|
+
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
129
|
+
# @return [ListAdLabels200Response]
|
|
130
|
+
describe 'list_ad_labels test' do
|
|
131
|
+
it 'should work' do
|
|
132
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# unit tests for list_ad_studies
|
|
137
|
+
# A/B tests and lift studies
|
|
138
|
+
# 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.
|
|
139
|
+
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
140
|
+
# @param ad_account_id Meta ad account id (act_<n>).
|
|
141
|
+
# @param [Hash] opts the optional parameters
|
|
142
|
+
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
143
|
+
# @option opts [Integer] :limit Rows per page
|
|
144
|
+
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
145
|
+
# @return [ListAdStudies200Response]
|
|
146
|
+
describe 'list_ad_studies test' do
|
|
147
|
+
it 'should work' do
|
|
148
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# unit tests for list_ads_business_centers
|
|
153
|
+
# List TikTok Business Centers
|
|
154
|
+
# Returns the TikTok Business Centers (BCs) the connected `tiktokads` account can read. Each BC reports its advertiser count so callers can build agency-style pickers without re-walking `/v1/ads/accounts` per BC. TikTok-only. Solo advertisers (non-agency tokens) return an empty array.
|
|
155
|
+
# @param account_id ID of the `tiktokads` (or parent `tiktok` posting) SocialAccount
|
|
156
|
+
# @param [Hash] opts the optional parameters
|
|
157
|
+
# @return [ListAdsBusinessCenters200Response]
|
|
158
|
+
describe 'list_ads_business_centers test' do
|
|
159
|
+
it 'should work' do
|
|
160
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# unit tests for list_high_demand_periods
|
|
165
|
+
# High demand periods / budget schedules
|
|
166
|
+
# 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).
|
|
167
|
+
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
168
|
+
# @param [Hash] opts the optional parameters
|
|
169
|
+
# @option opts [String] :campaign_id Platform campaign id. Exactly one of campaignId / adSetId.
|
|
170
|
+
# @option opts [String] :ad_set_id Platform ad set id. Exactly one of campaignId / adSetId.
|
|
171
|
+
# @option opts [Integer] :limit Rows per page
|
|
172
|
+
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
173
|
+
# @return [ListHighDemandPeriods200Response]
|
|
174
|
+
describe 'list_high_demand_periods test' do
|
|
175
|
+
it 'should work' do
|
|
176
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# unit tests for list_meta_businesses
|
|
181
|
+
# Businesses list
|
|
182
|
+
# Business Manager portfolios the connected Meta user belongs to (Meta's `/me/businesses`), rows returned verbatim (id, name, verification_status, created_time). Token-scoped, so no `adAccountId` is needed. For TikTok Business Centers use `GET /v1/ads/business-centers`.
|
|
183
|
+
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
184
|
+
# @param [Hash] opts the optional parameters
|
|
185
|
+
# @option opts [Integer] :limit Rows per page
|
|
186
|
+
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
187
|
+
# @return [ListMetaBusinesses200Response]
|
|
188
|
+
describe 'list_meta_businesses test' do
|
|
189
|
+
it 'should work' do
|
|
190
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# unit tests for update_ad_account
|
|
195
|
+
# Update ad account settings
|
|
196
|
+
# Sets the default DSA beneficiary and payor on a Meta ad account (EU DSA, Article 26). Set them once and every EU-targeted call to `/v1/ads/create`, `/v1/ads/boost` and `/v1/ads/ctwa` on that ad account can omit `dsaBeneficiary`/`dsaPayor`: Meta applies the defaults automatically. The values are written to the ad account on Meta, the same setting Ads Manager edits. Nothing is stored in Zernio, and defaults already set in Ads Manager work identically. Zernio never guesses these values for you. Beneficiary and payor are legal disclosures shown to EU users, so you must provide the entity names explicitly. Use `GET /v1/ads/dsa-recommendations` to offer suggestions in your UI. If `defaultDsaPayor` is omitted, the beneficiary is also set as the payor, which covers the common case where the same entity benefits from and pays for the ads. Read the current values back with `GET /v1/ads/dsa-defaults`. Currently supported for Meta accounts only; other platforms return 400.
|
|
197
|
+
# @param update_ad_account_request
|
|
198
|
+
# @param [Hash] opts the optional parameters
|
|
199
|
+
# @return [UpdateAdAccount200Response]
|
|
200
|
+
describe 'update_ad_account test' do
|
|
201
|
+
it 'should work' do
|
|
202
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
end
|
|
@@ -32,6 +32,18 @@ describe 'AdCampaignsApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# unit tests for boost_post
|
|
36
|
+
# Boost post as ad
|
|
37
|
+
# Creates a paid ad campaign from an existing published post. Creates the full platform campaign hierarchy (campaign, ad set, ad).
|
|
38
|
+
# @param boost_post_request
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [UpdateAd200Response]
|
|
41
|
+
describe 'boost_post test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
35
47
|
# unit tests for bulk_update_ad_campaign_status
|
|
36
48
|
# Pause or resume many campaigns
|
|
37
49
|
# Process up to 50 campaigns in one call. Each campaign is updated concurrently and the response contains a per-campaign result so a single bad row does not fail the whole batch.
|
|
@@ -45,8 +57,8 @@ describe 'AdCampaignsApi' do
|
|
|
45
57
|
end
|
|
46
58
|
|
|
47
59
|
# unit tests for create_ad_campaign
|
|
48
|
-
# Create a standalone campaign
|
|
49
|
-
# Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it later via `existingCampaignId` on the create endpoints. A budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created `PAUSED` unless `status: ACTIVE`. The campaign materializes in `/v1/ads/tree` via the next sync discovery pass.
|
|
60
|
+
# Create a standalone campaign
|
|
61
|
+
# Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it later via `existingCampaignId` on the create endpoints. A budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created `PAUSED` unless `status: ACTIVE`. The campaign materializes in `/v1/ads/tree` via the next sync discovery pass.
|
|
50
62
|
# @param create_ad_campaign_request
|
|
51
63
|
# @param [Hash] opts the optional parameters
|
|
52
64
|
# @return [CreateAdCampaign201Response]
|
|
@@ -56,6 +68,31 @@ describe 'AdCampaignsApi' do
|
|
|
56
68
|
end
|
|
57
69
|
end
|
|
58
70
|
|
|
71
|
+
# unit tests for create_standalone_ad
|
|
72
|
+
# Create standalone ad
|
|
73
|
+
# Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X/Twitter, and LinkedIn. Supports three mutually-exclusive request shapes selected by the body, a legacy single-creative shape (all platforms, default), a Meta-only multi-creative shape via the creatives array (one ad set with N ads sharing budget and targeting), and a Meta-only attach shape via adSetId (adds one new ad to an existing ad set). Per-platform required fields, budget minimums, and video-ad rules are documented on each property below. LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content \"dark post\" authored by a Company Page (see `organizationId`); supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`. **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
|
|
74
|
+
# @param create_standalone_ad_request
|
|
75
|
+
# @param [Hash] opts the optional parameters
|
|
76
|
+
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes create retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
77
|
+
# @return [CreateStandaloneAd200Response]
|
|
78
|
+
describe 'create_standalone_ad test' do
|
|
79
|
+
it 'should work' do
|
|
80
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# unit tests for delete_ad
|
|
85
|
+
# Cancel an ad
|
|
86
|
+
# Cancels the ad on the platform and marks it as cancelled in the database. The ad is preserved for history.
|
|
87
|
+
# @param ad_id
|
|
88
|
+
# @param [Hash] opts the optional parameters
|
|
89
|
+
# @return [DeleteAccountGroup200Response]
|
|
90
|
+
describe 'delete_ad test' do
|
|
91
|
+
it 'should work' do
|
|
92
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
59
96
|
# unit tests for delete_ad_campaign
|
|
60
97
|
# Delete a campaign
|
|
61
98
|
# Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime.
|
|
@@ -69,6 +106,19 @@ describe 'AdCampaignsApi' do
|
|
|
69
106
|
end
|
|
70
107
|
end
|
|
71
108
|
|
|
109
|
+
# unit tests for duplicate_ad
|
|
110
|
+
# Duplicate an ad
|
|
111
|
+
# 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).
|
|
112
|
+
# @param ad_id Zernio ad ID or platform ad ID
|
|
113
|
+
# @param [Hash] opts the optional parameters
|
|
114
|
+
# @option opts [DuplicateAdRequest] :duplicate_ad_request
|
|
115
|
+
# @return [DuplicateAd200Response]
|
|
116
|
+
describe 'duplicate_ad test' do
|
|
117
|
+
it 'should work' do
|
|
118
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
72
122
|
# unit tests for duplicate_ad_campaign
|
|
73
123
|
# Duplicate a campaign
|
|
74
124
|
# Duplicates a campaign, including its ad sets, ads, creatives, and targeting by default (`deepCopy: true`). The copy is created paused so callers can review before launching. Per-platform implementation: - **Meta** uses the native `POST /{campaign-id}/copies` endpoint. - **TikTok** has no native copy primitive; Zernio walks the source graph (`/v2/campaign/get/`, `/v2/adgroup/get/`, `/v2/ad/get/`) and recreates each entity via the corresponding `/create/` endpoints, carrying over budget / targeting / bid_type / bid_price / deep_bid_type / creative fields. Spark Ad linkage (`tiktok_item_id`) is preserved. - **LinkedIn** has no native copy primitive; Zernio walks the source CampaignGroup → Campaigns → Creatives and recreates each entity, carrying over `type` / `costType` / `unitCost` / `optimizationTargetType` / `creativeSelection` / `objectiveType` / `format` / `dailyBudget` / `totalBudget` / `targetingCriteria` / `runSchedule` and every Creative's `content` object verbatim. `statusOption: INHERITED_FROM_SOURCE` is evaluated **per entity**: any Group / Campaign / Creative whose source is `ACTIVE` gets its clone activated too. Duplicating an ACTIVE campaign with `INHERITED_FROM_SOURCE` starts a second front of spend the moment the clone activates — the safe default is `PAUSED`. The new hierarchy is asynchronous to materialize in our DB — we trigger sync discovery automatically. Set `syncAfter: false` to skip and poll `/v1/ads/tree` on your own cadence. Other platforms return 501 Not Implemented.
|
|
@@ -83,8 +133,8 @@ describe 'AdCampaignsApi' do
|
|
|
83
133
|
end
|
|
84
134
|
|
|
85
135
|
# unit tests for duplicate_ad_set
|
|
86
|
-
# Duplicate an ad set
|
|
87
|
-
# Duplicates an ad set, including its ads and creatives by default (`deepCopy: true`), via Meta's native `POST /{adset-id}/copies`. The copy is created paused so callers can review before launching. `campaignId` retargets the copy into another campaign; omitted = the source's own campaign. The new hierarchy materializes asynchronously — sync discovery is triggered automatically (`syncAfter: false` to skip).
|
|
136
|
+
# Duplicate an ad set
|
|
137
|
+
# Duplicates an ad set, including its ads and creatives by default (`deepCopy: true`), via Meta's native `POST /{adset-id}/copies`. The copy is created paused so callers can review before launching. `campaignId` retargets the copy into another campaign; omitted = the source's own campaign. The new hierarchy materializes asynchronously — sync discovery is triggered automatically (`syncAfter: false` to skip).
|
|
88
138
|
# @param ad_set_id Source platform ad set ID
|
|
89
139
|
# @param duplicate_ad_set_request
|
|
90
140
|
# @param [Hash] opts the optional parameters
|
|
@@ -95,9 +145,21 @@ describe 'AdCampaignsApi' do
|
|
|
95
145
|
end
|
|
96
146
|
end
|
|
97
147
|
|
|
148
|
+
# unit tests for get_ad
|
|
149
|
+
# Get ad details
|
|
150
|
+
# Returns an ad with its creative, targeting, status, and performance metrics. The `{adId}` path segment accepts any identifier dialect Zernio indexes for the ad: - the Zernio internal `_id` (24-char hex) - Meta's numeric `platformAdId` (the value shipped in `comment.received` webhooks as `comment.ad.id`) - the creative's `effective_object_story_id` (`{pageId}_{postId}` shape, Facebook side) - the creative's `effective_instagram_media_id` (Instagram side) Any of the four resolve to the same ad. Caller doesn't need a translation step.
|
|
151
|
+
# @param ad_id Zernio `_id` (hex), Meta `platformAdId` (numeric), or one of the creative's effective story/media IDs. See description for details.
|
|
152
|
+
# @param [Hash] opts the optional parameters
|
|
153
|
+
# @return [GetAd200Response]
|
|
154
|
+
describe 'get_ad test' do
|
|
155
|
+
it 'should work' do
|
|
156
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
98
160
|
# unit tests for get_ad_set_details
|
|
99
|
-
# Live ad-set details incl. learning phase
|
|
100
|
-
# Reads the ad set live from Meta, returned verbatim. The default projection includes `learning_stage_info` (learning-phase status: LEARNING / SUCCESS / FAIL / WAIVING — Meta omits its `status` key on paused ad sets), delivery settings, budgets, schedule and targeting. `fields` is a raw-passthrough override; unknown fields return Meta's 400 verbatim.
|
|
161
|
+
# Live ad-set details incl. learning phase
|
|
162
|
+
# Reads the ad set live from Meta, returned verbatim. The default projection includes `learning_stage_info` (learning-phase status: LEARNING / SUCCESS / FAIL / WAIVING — Meta omits its `status` key on paused ad sets), delivery settings, budgets, schedule and targeting. `fields` is a raw-passthrough override; unknown fields return Meta's 400 verbatim.
|
|
101
163
|
# @param ad_set_id Meta ad set id (platformAdSetId).
|
|
102
164
|
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
103
165
|
# @param [Hash] opts the optional parameters
|
|
@@ -171,6 +233,44 @@ describe 'AdCampaignsApi' do
|
|
|
171
233
|
end
|
|
172
234
|
end
|
|
173
235
|
|
|
236
|
+
# unit tests for list_ads
|
|
237
|
+
# List ads
|
|
238
|
+
# 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.
|
|
239
|
+
# @param [Hash] opts the optional parameters
|
|
240
|
+
# @option opts [Integer] :page Page number (1-based)
|
|
241
|
+
# @option opts [Integer] :limit
|
|
242
|
+
# @option opts [String] :source all (default) = Zernio-created + platform-discovered ads. zernio = restrict to Zernio-created only.
|
|
243
|
+
# @option opts [AdStatus] :status
|
|
244
|
+
# @option opts [String] :platform
|
|
245
|
+
# @option opts [String] :account_id Social account ID
|
|
246
|
+
# @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.
|
|
247
|
+
# @option opts [String] :profile_id Profile ID
|
|
248
|
+
# @option opts [String] :campaign_id Platform campaign ID (filter ads within a campaign)
|
|
249
|
+
# @option opts [String] :platform_ad_id Meta ad ID. Returns the ad with this platform-side ad ID.
|
|
250
|
+
# @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.
|
|
251
|
+
# @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.
|
|
252
|
+
# @option opts [Date] :from_date Start of metrics date range (YYYY-MM-DD). Defaults to 90 days ago.
|
|
253
|
+
# @option opts [Date] :to_date End of metrics date range (YYYY-MM-DD). Defaults to today. Max 730-day range.
|
|
254
|
+
# @return [ListAds200Response]
|
|
255
|
+
describe 'list_ads test' do
|
|
256
|
+
it 'should work' do
|
|
257
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
258
|
+
end
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
# unit tests for update_ad
|
|
262
|
+
# Update ad
|
|
263
|
+
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style — `headline` is ignored, `body` becomes `ad_text`). - **Pinterest / X / LinkedIn / Google**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`.
|
|
264
|
+
# @param ad_id
|
|
265
|
+
# @param update_ad_request
|
|
266
|
+
# @param [Hash] opts the optional parameters
|
|
267
|
+
# @return [UpdateAd200Response]
|
|
268
|
+
describe 'update_ad test' do
|
|
269
|
+
it 'should work' do
|
|
270
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
|
|
174
274
|
# unit tests for update_ad_campaign
|
|
175
275
|
# Update a campaign
|
|
176
276
|
# Campaign-level edits. At least one of `budget`, `bidStrategy`, `name` or `platformSpecificData` is required. - `budget` updates the CBO (Campaign Budget Optimization) budget. For ABO campaigns (where the budget lives on the ad set), use PUT /v1/ads/ad-sets/{adSetId} instead — this endpoint will return 409 with code BUDGET_LEVEL_MISMATCH. - `bidStrategy` sets the campaign-level default bid strategy. Per Meta's spec, `bid_amount` and `bid_constraints` do NOT exist at the campaign level — pass them via PUT /v1/ads/ad-sets/{adSetId}. - `platformSpecificData.spendCap` (Meta only) sets the campaign's lifetime spend cap, in the ad account's currency. Meta-only for now. Other platforms return 501 Not Implemented.
|
|
@@ -223,4 +323,17 @@ describe 'AdCampaignsApi' do
|
|
|
223
323
|
end
|
|
224
324
|
end
|
|
225
325
|
|
|
326
|
+
# unit tests for update_ad_status
|
|
327
|
+
# Pause or resume a single ad
|
|
328
|
+
# 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.
|
|
329
|
+
# @param ad_id Zernio `_id` (hex), Meta `platformAdId` (numeric), or one of the creative's effective story/media IDs.
|
|
330
|
+
# @param update_ad_status_request
|
|
331
|
+
# @param [Hash] opts the optional parameters
|
|
332
|
+
# @return [UpdateAdStatus200Response]
|
|
333
|
+
describe 'update_ad_status test' do
|
|
334
|
+
it 'should work' do
|
|
335
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
336
|
+
end
|
|
337
|
+
end
|
|
338
|
+
|
|
226
339
|
end
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for Zernio::AdCreativesApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'AdCreativesApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = Zernio::AdCreativesApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of AdCreativesApi' do
|
|
30
|
+
it 'should create an instance of AdCreativesApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(Zernio::AdCreativesApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for create_ad_creative
|
|
36
|
+
# Create a standalone creative
|
|
37
|
+
# 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.
|
|
38
|
+
# @param create_ad_creative_request
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [CreateAdCreative201Response]
|
|
41
|
+
describe 'create_ad_creative test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# unit tests for delete_ad_creative
|
|
48
|
+
# Delete a creative
|
|
49
|
+
# Deletes a creative from the library. Meta only allows deleting creatives not referenced by any ad — otherwise its 400 surfaces verbatim.
|
|
50
|
+
# @param creative_id Platform creative id
|
|
51
|
+
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
52
|
+
# @param [Hash] opts the optional parameters
|
|
53
|
+
# @return [DeleteAdCreative200Response]
|
|
54
|
+
describe 'delete_ad_creative test' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# unit tests for generate_ad_previews
|
|
61
|
+
# Render pre-create ad previews
|
|
62
|
+
# Renders how a creative would look per placement BEFORE any ad exists, via Meta's `/generatepreviews`. Provide exactly one creative source: `existingCreativeId` or `creativeSpec`. Each preview is an HTML `<iframe>` snippet embeddable directly. Unknown `formats` values return Meta's 400 verbatim.
|
|
63
|
+
# @param generate_ad_previews_request
|
|
64
|
+
# @param [Hash] opts the optional parameters
|
|
65
|
+
# @return [GenerateAdPreviews200Response]
|
|
66
|
+
describe 'generate_ad_previews test' do
|
|
67
|
+
it 'should work' do
|
|
68
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# unit tests for get_ad_creative
|
|
73
|
+
# Creative details
|
|
74
|
+
# One creative's details, verbatim from Meta. `fields` is a raw-passthrough override of the default projection.
|
|
75
|
+
# @param creative_id Platform creative id
|
|
76
|
+
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
77
|
+
# @param [Hash] opts the optional parameters
|
|
78
|
+
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
79
|
+
# @return [GetAdCreative200Response]
|
|
80
|
+
describe 'get_ad_creative test' do
|
|
81
|
+
it 'should work' do
|
|
82
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# unit tests for get_ad_previews
|
|
87
|
+
# Render previews of an existing ad
|
|
88
|
+
# Renders an EXISTING ad per placement via Meta's `/{ad_id}/previews`. Each preview is an HTML `<iframe>` snippet embeddable directly. Unknown `formats` values return Meta's 400 verbatim.
|
|
89
|
+
# @param ad_id Zernio ad id (24-char hex).
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @option opts [String] :formats Comma-separated Meta ad_format values (max 10), one preview per format. Defaults to DESKTOP_FEED_STANDARD.
|
|
92
|
+
# @return [GetAdPreviews200Response]
|
|
93
|
+
describe 'get_ad_previews test' do
|
|
94
|
+
it 'should work' do
|
|
95
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# unit tests for list_ad_catalog_product_sets
|
|
100
|
+
# List a catalog's product sets
|
|
101
|
+
# Lists a Meta product catalog's product sets — the unit a catalog ad promotes. Pass the chosen set as `promotedObject.productSetId` on POST /v1/ads/create with `goal: catalog_sales`.
|
|
102
|
+
# @param catalog_id Meta product catalog ID (from GET /v1/ads/catalogs)
|
|
103
|
+
# @param account_id A facebook, instagram, or metaads social account ID
|
|
104
|
+
# @param [Hash] opts the optional parameters
|
|
105
|
+
# @return [ListAdCatalogProductSets200Response]
|
|
106
|
+
describe 'list_ad_catalog_product_sets test' do
|
|
107
|
+
it 'should work' do
|
|
108
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# unit tests for list_ad_catalogs
|
|
113
|
+
# List Meta product catalogs
|
|
114
|
+
# Lists the Meta product catalogs reachable from an ad account (owned + agency-shared catalogs of the ad account's business), for Advantage+ catalog ads (`goal: catalog_sales` on POST /v1/ads/create — e.g. vehicle inventory catalogs). Read-only; uses scopes customers already granted (no reconnect needed). Catalog contents (items, feeds) are managed in Meta Commerce Manager, not through this API.
|
|
115
|
+
# @param account_id A facebook, instagram, or metaads social account ID
|
|
116
|
+
# @param ad_account_id Meta ad account ID (act_...)
|
|
117
|
+
# @param [Hash] opts the optional parameters
|
|
118
|
+
# @return [ListAdCatalogs200Response]
|
|
119
|
+
describe 'list_ad_catalogs test' do
|
|
120
|
+
it 'should work' do
|
|
121
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# unit tests for list_ad_creatives
|
|
126
|
+
# Creative library
|
|
127
|
+
# 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`.
|
|
128
|
+
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
129
|
+
# @param ad_account_id Meta ad account id (act_<n>).
|
|
130
|
+
# @param [Hash] opts the optional parameters
|
|
131
|
+
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
132
|
+
# @option opts [Integer] :limit Rows per page
|
|
133
|
+
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
134
|
+
# @return [ListAdCreatives200Response]
|
|
135
|
+
describe 'list_ad_creatives test' do
|
|
136
|
+
it 'should work' do
|
|
137
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# unit tests for list_ad_images
|
|
142
|
+
# Ad image library
|
|
143
|
+
# 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).
|
|
144
|
+
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
145
|
+
# @param ad_account_id Meta ad account id (act_<n>).
|
|
146
|
+
# @param [Hash] opts the optional parameters
|
|
147
|
+
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
148
|
+
# @option opts [Integer] :limit Rows per page
|
|
149
|
+
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
150
|
+
# @return [ListAdImages200Response]
|
|
151
|
+
describe 'list_ad_images test' do
|
|
152
|
+
it 'should work' do
|
|
153
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# unit tests for update_ad_creative
|
|
158
|
+
# Rename a creative
|
|
159
|
+
# 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`).
|
|
160
|
+
# @param creative_id Platform creative id
|
|
161
|
+
# @param update_ad_creative_request
|
|
162
|
+
# @param [Hash] opts the optional parameters
|
|
163
|
+
# @return [UpdateAdCreative200Response]
|
|
164
|
+
describe 'update_ad_creative test' do
|
|
165
|
+
it 'should work' do
|
|
166
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# unit tests for upload_ad_image
|
|
171
|
+
# Upload an ad image from base64
|
|
172
|
+
# Uploads raw image bytes to the Meta ad account's image library — for callers whose creatives aren't hosted at a public URL. Returns the image `hash` (Meta's identifier for the asset) and the Meta-hosted `url`, which can be used directly as `imageUrl` on the create endpoints. Max 30 MB decoded.
|
|
173
|
+
# @param upload_ad_image_request
|
|
174
|
+
# @param [Hash] opts the optional parameters
|
|
175
|
+
# @return [UploadAdImage201Response]
|
|
176
|
+
describe 'upload_ad_image test' do
|
|
177
|
+
it 'should work' do
|
|
178
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
end
|