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
|
@@ -97,8 +97,8 @@ describe 'AdAudiencesApi' do
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
# unit tests for update_ad_audience
|
|
100
|
-
# Update
|
|
101
|
-
# Update
|
|
100
|
+
# Update saved targeting audience
|
|
101
|
+
# Update a `saved_targeting` audience's name, description, or spec. Only `saved_targeting` audiences are updatable (they exist only on Zernio); uploaded/derived audiences return 422, delete and recreate those instead. `spec` replaces the stored spec wholesale (no merge). Ads already created from this audience are unaffected, they snapshot the targeting at creation.
|
|
102
102
|
# @param audience_id
|
|
103
103
|
# @param update_ad_audience_request
|
|
104
104
|
# @param [Hash] opts the optional parameters
|
|
@@ -44,18 +44,6 @@ describe 'AdCampaignsApi' do
|
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
-
# unit tests for create_ad_campaign
|
|
48
|
-
# Create a standalone campaign (Meta)
|
|
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. Meta only.
|
|
50
|
-
# @param create_ad_campaign_request
|
|
51
|
-
# @param [Hash] opts the optional parameters
|
|
52
|
-
# @return [CreateAdCampaign201Response]
|
|
53
|
-
describe 'create_ad_campaign test' do
|
|
54
|
-
it 'should work' do
|
|
55
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
47
|
# unit tests for delete_ad_campaign
|
|
60
48
|
# Delete a campaign
|
|
61
49
|
# 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.
|
|
@@ -82,19 +70,6 @@ describe 'AdCampaignsApi' do
|
|
|
82
70
|
end
|
|
83
71
|
end
|
|
84
72
|
|
|
85
|
-
# unit tests for duplicate_ad_set
|
|
86
|
-
# Duplicate an ad set (Meta)
|
|
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). Meta only.
|
|
88
|
-
# @param ad_set_id Source platform ad set ID
|
|
89
|
-
# @param duplicate_ad_set_request
|
|
90
|
-
# @param [Hash] opts the optional parameters
|
|
91
|
-
# @return [DuplicateAdSet200Response]
|
|
92
|
-
describe 'duplicate_ad_set test' do
|
|
93
|
-
it 'should work' do
|
|
94
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
95
|
-
end
|
|
96
|
-
end
|
|
97
|
-
|
|
98
73
|
# unit tests for get_ad_set_details
|
|
99
74
|
# Live ad-set details incl. learning phase (Meta)
|
|
100
75
|
# 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. Meta only.
|
data/spec/api/ads_api_spec.rb
CHANGED
|
@@ -97,18 +97,6 @@ describe 'AdsApi' do
|
|
|
97
97
|
end
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
# unit tests for create_ad_creative
|
|
101
|
-
# Create a standalone creative (Meta)
|
|
102
|
-
# 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.
|
|
103
|
-
# @param create_ad_creative_request
|
|
104
|
-
# @param [Hash] opts the optional parameters
|
|
105
|
-
# @return [CreateAdCreative201Response]
|
|
106
|
-
describe 'create_ad_creative 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
100
|
# unit tests for create_ad_insights_report
|
|
113
101
|
# Submit an async insights report run (Meta)
|
|
114
102
|
# 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.
|
|
@@ -232,19 +220,6 @@ describe 'AdsApi' do
|
|
|
232
220
|
end
|
|
233
221
|
end
|
|
234
222
|
|
|
235
|
-
# unit tests for delete_ad_creative
|
|
236
|
-
# Delete a creative (Meta)
|
|
237
|
-
# Deletes a creative from the library. Meta only allows deleting creatives not referenced by any ad — otherwise its 400 surfaces verbatim.
|
|
238
|
-
# @param creative_id Platform creative id
|
|
239
|
-
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
240
|
-
# @param [Hash] opts the optional parameters
|
|
241
|
-
# @return [DeleteAdCreative200Response]
|
|
242
|
-
describe 'delete_ad_creative test' do
|
|
243
|
-
it 'should work' do
|
|
244
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
245
|
-
end
|
|
246
|
-
end
|
|
247
|
-
|
|
248
223
|
# unit tests for delete_conversion_destination
|
|
249
224
|
# Delete a conversion destination
|
|
250
225
|
# 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.
|
|
@@ -259,19 +234,6 @@ describe 'AdsApi' do
|
|
|
259
234
|
end
|
|
260
235
|
end
|
|
261
236
|
|
|
262
|
-
# unit tests for duplicate_ad
|
|
263
|
-
# Duplicate an ad (Meta)
|
|
264
|
-
# 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.
|
|
265
|
-
# @param ad_id Zernio ad ID or platform ad ID
|
|
266
|
-
# @param [Hash] opts the optional parameters
|
|
267
|
-
# @option opts [DuplicateAdRequest] :duplicate_ad_request
|
|
268
|
-
# @return [DuplicateAd200Response]
|
|
269
|
-
describe 'duplicate_ad test' do
|
|
270
|
-
it 'should work' do
|
|
271
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
272
|
-
end
|
|
273
|
-
end
|
|
274
|
-
|
|
275
237
|
# unit tests for estimate_ad_reach
|
|
276
238
|
# Estimate audience reach
|
|
277
239
|
# 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.
|
|
@@ -351,20 +313,6 @@ describe 'AdsApi' do
|
|
|
351
313
|
end
|
|
352
314
|
end
|
|
353
315
|
|
|
354
|
-
# unit tests for get_ad_creative
|
|
355
|
-
# Creative details (Meta)
|
|
356
|
-
# One creative's details, verbatim from Meta. `fields` is a raw-passthrough override of the default projection. Meta only.
|
|
357
|
-
# @param creative_id Platform creative id
|
|
358
|
-
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
359
|
-
# @param [Hash] opts the optional parameters
|
|
360
|
-
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
361
|
-
# @return [GetAdCreative200Response]
|
|
362
|
-
describe 'get_ad_creative test' do
|
|
363
|
-
it 'should work' do
|
|
364
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
365
|
-
end
|
|
366
|
-
end
|
|
367
|
-
|
|
368
316
|
# unit tests for get_ad_insights_report
|
|
369
317
|
# Poll an async insights report run (Meta)
|
|
370
318
|
# 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`.
|
|
@@ -598,53 +546,6 @@ describe 'AdsApi' do
|
|
|
598
546
|
end
|
|
599
547
|
end
|
|
600
548
|
|
|
601
|
-
# unit tests for list_ad_creatives
|
|
602
|
-
# Creative library (Meta)
|
|
603
|
-
# Lists the ad account's creative library (Meta's `/act_X/adcreatives`), rows returned verbatim. The default projection covers id, name, status, object type, thumbnail, object_story_spec / asset_feed_spec and url_tags; `fields` is a raw-passthrough override. Any creative id here is reusable on the create endpoints via `existingCreativeId`. Meta only.
|
|
604
|
-
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
605
|
-
# @param ad_account_id Meta ad account id (act_<n>).
|
|
606
|
-
# @param [Hash] opts the optional parameters
|
|
607
|
-
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
608
|
-
# @option opts [Integer] :limit Rows per page
|
|
609
|
-
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
610
|
-
# @return [ListAdCreatives200Response]
|
|
611
|
-
describe 'list_ad_creatives test' do
|
|
612
|
-
it 'should work' do
|
|
613
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
614
|
-
end
|
|
615
|
-
end
|
|
616
|
-
|
|
617
|
-
# unit tests for list_ad_images
|
|
618
|
-
# Ad image library (Meta)
|
|
619
|
-
# Lists the ad account's image library (Meta's `/act_X/adimages`), rows returned verbatim. The default projection covers hash, url, name, dimensions and status; `fields` is a raw-passthrough override. Any `hash` here is reusable wherever Meta accepts `image_hash` (e.g. `imageHash` on POST /v1/ads/creatives). Meta only.
|
|
620
|
-
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
621
|
-
# @param ad_account_id Meta ad account id (act_<n>).
|
|
622
|
-
# @param [Hash] opts the optional parameters
|
|
623
|
-
# @option opts [String] :fields Comma-separated Graph field override (supports nested {} projections).
|
|
624
|
-
# @option opts [Integer] :limit Rows per page
|
|
625
|
-
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
626
|
-
# @return [ListAdImages200Response]
|
|
627
|
-
describe 'list_ad_images test' do
|
|
628
|
-
it 'should work' do
|
|
629
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
630
|
-
end
|
|
631
|
-
end
|
|
632
|
-
|
|
633
|
-
# unit tests for list_ad_labels
|
|
634
|
-
# Ad labels (Meta)
|
|
635
|
-
# Lists the ad account's organizational labels (Meta's `/act_X/adlabels`), rows returned verbatim (id, name, created/updated time). Meta only.
|
|
636
|
-
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
637
|
-
# @param ad_account_id Meta ad account id (act_<n>).
|
|
638
|
-
# @param [Hash] opts the optional parameters
|
|
639
|
-
# @option opts [Integer] :limit Rows per page
|
|
640
|
-
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
641
|
-
# @return [ListAdLabels200Response]
|
|
642
|
-
describe 'list_ad_labels test' do
|
|
643
|
-
it 'should work' do
|
|
644
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
645
|
-
end
|
|
646
|
-
end
|
|
647
|
-
|
|
648
549
|
# unit tests for list_ad_studies
|
|
649
550
|
# A/B tests and lift studies (Meta)
|
|
650
551
|
# 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.
|
|
@@ -740,22 +641,6 @@ describe 'AdsApi' do
|
|
|
740
641
|
end
|
|
741
642
|
end
|
|
742
643
|
|
|
743
|
-
# unit tests for list_high_demand_periods
|
|
744
|
-
# High demand periods / budget schedules (Meta)
|
|
745
|
-
# 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.
|
|
746
|
-
# @param account_id Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
|
|
747
|
-
# @param [Hash] opts the optional parameters
|
|
748
|
-
# @option opts [String] :campaign_id Platform campaign id. Exactly one of campaignId / adSetId.
|
|
749
|
-
# @option opts [String] :ad_set_id Platform ad set id. Exactly one of campaignId / adSetId.
|
|
750
|
-
# @option opts [Integer] :limit Rows per page
|
|
751
|
-
# @option opts [String] :after Cursor from paging.after of the previous page.
|
|
752
|
-
# @return [ListHighDemandPeriods200Response]
|
|
753
|
-
describe 'list_high_demand_periods test' do
|
|
754
|
-
it 'should work' do
|
|
755
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
756
|
-
end
|
|
757
|
-
end
|
|
758
|
-
|
|
759
644
|
# unit tests for list_lead_forms
|
|
760
645
|
# List lead forms
|
|
761
646
|
# Lists the Lead Gen forms owned by the connected Facebook Page. Requires the Ads add-on.
|
|
@@ -933,19 +818,6 @@ describe 'AdsApi' do
|
|
|
933
818
|
end
|
|
934
819
|
end
|
|
935
820
|
|
|
936
|
-
# unit tests for update_ad_creative
|
|
937
|
-
# Rename a creative (Meta)
|
|
938
|
-
# 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.
|
|
939
|
-
# @param creative_id Platform creative id
|
|
940
|
-
# @param update_ad_creative_request
|
|
941
|
-
# @param [Hash] opts the optional parameters
|
|
942
|
-
# @return [UpdateAdCreative200Response]
|
|
943
|
-
describe 'update_ad_creative test' do
|
|
944
|
-
it 'should work' do
|
|
945
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
946
|
-
end
|
|
947
|
-
end
|
|
948
|
-
|
|
949
821
|
# unit tests for update_ad_status
|
|
950
822
|
# Pause or resume a single ad
|
|
951
823
|
# 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.
|
|
@@ -0,0 +1,48 @@
|
|
|
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::InboxApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'InboxApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = Zernio::InboxApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of InboxApi' do
|
|
30
|
+
it 'should create an instance of InboxApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(Zernio::InboxApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_whats_app_media
|
|
36
|
+
# Download WhatsApp media
|
|
37
|
+
# Streams the binary for a WhatsApp attachment. This is the endpoint the `url` on a WhatsApp `attachments[]` entry points at, in both the `message.received` webhook and the List messages response. **This is an authenticated endpoint, not a public link.** Send `Authorization: Bearer <your API key>` exactly as you would for any other call. Passing the URL straight to a browser, an LLM vision API, or a no-code \"download file\" step without the header returns `401`. This is the most common integration mistake on this endpoint, and it differs from Instagram, Facebook and Telegram, whose `attachments[].url` is a direct CDN link that needs no header. **Fetch on receipt, not lazily.** WhatsApp media lives in Meta's media store, not ours, and it is removed after a limited retention window (currently 7 days, and Meta has been dropping some inbound media sooner). Once Meta drops it the media is unrecoverable and this endpoint answers `400` permanently, so retrying will never succeed. Download and store the bytes when the webhook arrives.
|
|
38
|
+
# @param media_id The media id from `attachments[].payload.id`.
|
|
39
|
+
# @param account_id The WhatsApp account that received the media.
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @return [File]
|
|
42
|
+
describe 'get_whats_app_media 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
|
+
end
|
data/spec/api/sms_api_spec.rb
CHANGED
|
@@ -45,18 +45,6 @@ describe 'SMSApi' do
|
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
|
|
48
|
-
# unit tests for create_sms_sender_id
|
|
49
|
-
# Create an alphanumeric sender ID
|
|
50
|
-
# Registers an alphanumeric sender ID (e.g. `ZERNIO`) — a branded `from` for one-way international SMS. No phone number purchase or carrier registration is needed; once created, pass it as `from` on `POST /v1/sms/messages`. Constraints: 3-11 characters (letters, digits, spaces; at least one letter). Sends cannot reach the US, Canada, or Puerto Rico, are text-only, and recipients cannot reply. Sender IDs that impersonate well-known brands or institutions are rejected, and an ID already registered by another workspace returns 409 (active sender IDs are globally unique, first-come-first-served). Creating the same sender ID again is a no-op (re-activates it after a delete).
|
|
51
|
-
# @param create_sms_sender_id_request
|
|
52
|
-
# @param [Hash] opts the optional parameters
|
|
53
|
-
# @return [CreateSmsSenderId200Response]
|
|
54
|
-
describe 'create_sms_sender_id 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
48
|
# unit tests for deactivate_sms_registration
|
|
61
49
|
# Deactivate a brand/campaign registration
|
|
62
50
|
# Terminates the campaign with the carrier registry so the recurring monthly campaign fee stops (carriers bill the first 3 months of a campaign regardless). Numbers covered by it can no longer SEND texts — receiving is unaffected — until they're registered under a new brand. Irreversible: a deactivated campaign cannot be restored; texting again later requires a new registration (new one-time and review fees). Idempotent.
|
|
@@ -69,18 +57,6 @@ describe 'SMSApi' do
|
|
|
69
57
|
end
|
|
70
58
|
end
|
|
71
59
|
|
|
72
|
-
# unit tests for delete_sms_sender_id
|
|
73
|
-
# Delete an alphanumeric sender ID
|
|
74
|
-
# Deactivates the sender ID so it can no longer send. Re-creating the same sender ID via `POST /v1/sms/sender-ids` re-activates it.
|
|
75
|
-
# @param id Sender ID resource id.
|
|
76
|
-
# @param [Hash] opts the optional parameters
|
|
77
|
-
# @return [DeleteSmsSenderId200Response]
|
|
78
|
-
describe 'delete_sms_sender_id 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
60
|
# unit tests for disable_sms_on_number
|
|
85
61
|
# Disable SMS on a number
|
|
86
62
|
# Turns off SMS for the number (deactivates its SMS account). The carrier registration is untouched, so re-enabling later just reactivates it, with no re-registration.
|
|
@@ -141,16 +117,6 @@ describe 'SMSApi' do
|
|
|
141
117
|
end
|
|
142
118
|
end
|
|
143
119
|
|
|
144
|
-
# unit tests for list_sms_sender_ids
|
|
145
|
-
# List alphanumeric sender IDs
|
|
146
|
-
# @param [Hash] opts the optional parameters
|
|
147
|
-
# @return [ListSmsSenderIds200Response]
|
|
148
|
-
describe 'list_sms_sender_ids test' do
|
|
149
|
-
it 'should work' do
|
|
150
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
151
|
-
end
|
|
152
|
-
end
|
|
153
|
-
|
|
154
120
|
# unit tests for lookup_sms_number
|
|
155
121
|
# Look up carrier + line type
|
|
156
122
|
# Carrier name and line type (mobile / landline / voip / toll-free) for a number, plus `smsReachable` (landlines can't receive SMS). Use it to validate recipients before sending. Each lookup is billed by the carrier-data provider, so call it explicitly (e.g. pre-validating an opt-in list), not on every send.
|
|
@@ -163,18 +129,6 @@ describe 'SMSApi' do
|
|
|
163
129
|
end
|
|
164
130
|
end
|
|
165
131
|
|
|
166
|
-
# unit tests for request_sms_sender_id_limit_increase
|
|
167
|
-
# Request a higher sender ID daily limit
|
|
168
|
-
# Asks support to raise the workspace's daily sender-ID message cap. There is no self-serve raise: the request (desired cap + use case) is reviewed manually, usually within a business day.
|
|
169
|
-
# @param request_sms_sender_id_limit_increase_request
|
|
170
|
-
# @param [Hash] opts the optional parameters
|
|
171
|
-
# @return [RequestSmsSenderIdLimitIncrease200Response]
|
|
172
|
-
describe 'request_sms_sender_id_limit_increase test' do
|
|
173
|
-
it 'should work' do
|
|
174
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
175
|
-
end
|
|
176
|
-
end
|
|
177
|
-
|
|
178
132
|
# unit tests for resend_sms_registration_otp
|
|
179
133
|
# Re-send the sole-prop OTP
|
|
180
134
|
# Re-sends the sole-proprietor verification PIN to the brand's mobile number — use it when the original code expired or never arrived. Only valid while the registration is pending and awaiting its OTP; rate limited to one send per minute.
|
|
@@ -201,7 +155,7 @@ describe 'SMSApi' do
|
|
|
201
155
|
|
|
202
156
|
# unit tests for send_sms
|
|
203
157
|
# Send an SMS/MMS
|
|
204
|
-
# Sends an SMS (or MMS when `mediaUrls` is set) from one of your SMS-enabled numbers
|
|
158
|
+
# Sends an SMS (or MMS when `mediaUrls` is set) from one of your SMS-enabled numbers. At least one of `text` / `mediaUrls` is required. Both numbers are normalized to E.164, so `from` matches regardless of formatting and replies thread into the same inbox conversation. US numbers must have an approved carrier registration (`/v1/sms/registrations`) before messages deliver. **Idempotency:** send an `Idempotency-Key` header to make retries safe: same key + same body replays the original response instead of sending a second message; same key + different body returns 422; a key still in flight returns 409.
|
|
205
159
|
# @param send_sms_request
|
|
206
160
|
# @param [Hash] opts the optional parameters
|
|
207
161
|
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes send retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
@@ -14,32 +14,32 @@ require 'spec_helper'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'date'
|
|
16
16
|
|
|
17
|
-
# Unit tests for Zernio::
|
|
17
|
+
# Unit tests for Zernio::WebhookPayloadMessageMessageAttachmentsInner
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
|
-
describe Zernio::
|
|
21
|
-
#let(:instance) { Zernio::
|
|
20
|
+
describe Zernio::WebhookPayloadMessageMessageAttachmentsInner do
|
|
21
|
+
#let(:instance) { Zernio::WebhookPayloadMessageMessageAttachmentsInner.new }
|
|
22
22
|
|
|
23
|
-
describe 'test an instance of
|
|
24
|
-
it 'should create an instance of
|
|
23
|
+
describe 'test an instance of WebhookPayloadMessageMessageAttachmentsInner' do
|
|
24
|
+
it 'should create an instance of WebhookPayloadMessageMessageAttachmentsInner' do
|
|
25
25
|
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Zernio::
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::WebhookPayloadMessageMessageAttachmentsInner)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe 'test attribute "
|
|
30
|
+
describe 'test attribute "type"' do
|
|
31
31
|
it 'should work' do
|
|
32
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
describe 'test attribute "
|
|
36
|
+
describe 'test attribute "url"' do
|
|
37
37
|
it 'should work' do
|
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
describe 'test attribute "
|
|
42
|
+
describe 'test attribute "payload"' do
|
|
43
43
|
it 'should work' do
|
|
44
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
45
|
end
|
|
@@ -14,32 +14,32 @@ require 'spec_helper'
|
|
|
14
14
|
require 'json'
|
|
15
15
|
require 'date'
|
|
16
16
|
|
|
17
|
-
# Unit tests for Zernio::
|
|
17
|
+
# Unit tests for Zernio::WebhookPayloadMessageSentMessageAttachmentsInner
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
|
-
describe Zernio::
|
|
21
|
-
#let(:instance) { Zernio::
|
|
20
|
+
describe Zernio::WebhookPayloadMessageSentMessageAttachmentsInner do
|
|
21
|
+
#let(:instance) { Zernio::WebhookPayloadMessageSentMessageAttachmentsInner.new }
|
|
22
22
|
|
|
23
|
-
describe 'test an instance of
|
|
24
|
-
it 'should create an instance of
|
|
23
|
+
describe 'test an instance of WebhookPayloadMessageSentMessageAttachmentsInner' do
|
|
24
|
+
it 'should create an instance of WebhookPayloadMessageSentMessageAttachmentsInner' do
|
|
25
25
|
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Zernio::
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::WebhookPayloadMessageSentMessageAttachmentsInner)
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe 'test attribute "
|
|
30
|
+
describe 'test attribute "type"' do
|
|
31
31
|
it 'should work' do
|
|
32
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
-
describe 'test attribute "
|
|
36
|
+
describe 'test attribute "url"' do
|
|
37
37
|
it 'should work' do
|
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
describe 'test attribute "
|
|
42
|
+
describe 'test attribute "payload"' do
|
|
43
43
|
it 'should work' do
|
|
44
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
45
|
end
|