late-sdk 0.0.948 → 0.0.950
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 +10 -0
- data/docs/CreateInboxConversation400Response.md +11 -3
- data/docs/CreateInboxConversation400ResponseAnyOf.md +20 -0
- data/docs/CreateInboxConversation404Response.md +11 -3
- data/docs/CreateInboxConversation404ResponseAnyOf.md +20 -0
- data/docs/CreateInboxConversation422Response.md +11 -3
- data/docs/CreateInboxConversation422ResponseAnyOf.md +20 -0
- data/docs/CreateInboxConversation429Response.md +11 -3
- data/docs/CreateInboxConversation429ResponseAnyOf.md +20 -0
- data/docs/ListTikTokCommercialMusic200ResponseTracksInner.md +3 -1
- data/docs/ListTikTokCommercialMusic200ResponseTracksInnerClip.md +2 -0
- data/docs/MessagesApi.md +2 -2
- data/docs/SendInboxMessage400Response.md +1 -1
- data/docs/SendInboxMessage502Response.md +30 -0
- data/docs/TikTokPlatformDataMusicSoundInfo.md +1 -1
- data/docs/WhatsAppTemplateLookupError.md +28 -0
- data/docs/WhatsAppTemplateLookupErrorDetails.md +24 -0
- data/docs/WhatsAppTemplateLookupErrorDetailsProviderHeaders.md +22 -0
- data/docs/WhatsAppTemplateLookupErrorPlatformError.md +22 -0
- data/docs/WhatsAppTemplateLookupErrorPlatformErrorErrorData.md +18 -0
- data/lib/zernio-sdk/api/messages_api.rb +4 -4
- data/lib/zernio-sdk/models/create_inbox_conversation400_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation400_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/create_inbox_conversation404_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation404_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/create_inbox_conversation422_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation422_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/create_inbox_conversation429_response.rb +73 -160
- data/lib/zernio-sdk/models/create_inbox_conversation429_response_any_of.rb +190 -0
- data/lib/zernio-sdk/models/list_tik_tok_commercial_music200_response_tracks_inner.rb +12 -2
- data/lib/zernio-sdk/models/list_tik_tok_commercial_music200_response_tracks_inner_clip.rb +11 -2
- data/lib/zernio-sdk/models/send_inbox_message400_response.rb +3 -3
- data/lib/zernio-sdk/models/send_inbox_message400_response_platform_error.rb +1 -1
- data/lib/zernio-sdk/models/send_inbox_message502_response.rb +103 -0
- data/lib/zernio-sdk/models/tik_tok_platform_data_music_sound_info.rb +1 -1
- data/lib/zernio-sdk/models/whats_app_template_lookup_error.rb +305 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_details.rb +233 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_details_provider_headers.rb +166 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_platform_error.rb +166 -0
- data/lib/zernio-sdk/models/whats_app_template_lookup_error_platform_error_error_data.rb +147 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +10 -0
- data/openapi.yaml +105 -25
- data/spec/api/messages_api_spec.rb +2 -2
- data/spec/models/create_inbox_conversation400_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation400_response_spec.rb +0 -25
- data/spec/models/create_inbox_conversation404_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation404_response_spec.rb +0 -25
- data/spec/models/create_inbox_conversation422_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation422_response_spec.rb +0 -25
- data/spec/models/create_inbox_conversation429_response_any_of_spec.rb +46 -0
- data/spec/models/create_inbox_conversation429_response_spec.rb +0 -25
- data/spec/models/list_tik_tok_commercial_music200_response_tracks_inner_clip_spec.rb +6 -0
- data/spec/models/list_tik_tok_commercial_music200_response_tracks_inner_spec.rb +6 -0
- data/spec/models/send_inbox_message400_response_spec.rb +1 -1
- data/spec/models/send_inbox_message502_response_spec.rb +21 -0
- data/spec/models/whats_app_template_lookup_error_details_provider_headers_spec.rb +48 -0
- data/spec/models/whats_app_template_lookup_error_details_spec.rb +58 -0
- data/spec/models/whats_app_template_lookup_error_platform_error_error_data_spec.rb +36 -0
- data/spec/models/whats_app_template_lookup_error_platform_error_spec.rb +48 -0
- data/spec/models/whats_app_template_lookup_error_spec.rb +78 -0
- data/zernio-sdk-0.0.950.gem +0 -0
- metadata +42 -2
- data/zernio-sdk-0.0.948.gem +0 -0
data/openapi.yaml
CHANGED
|
@@ -852,6 +852,39 @@ components:
|
|
|
852
852
|
effective_account_limit: 2000
|
|
853
853
|
current_account_count: 2000
|
|
854
854
|
schemas:
|
|
855
|
+
WhatsAppTemplateLookupError:
|
|
856
|
+
type: object
|
|
857
|
+
required: [error, type, code, platform, details]
|
|
858
|
+
properties:
|
|
859
|
+
error: { type: string }
|
|
860
|
+
type: { type: string, enum: [platform_error] }
|
|
861
|
+
code: { type: string, enum: [platform_api_error] }
|
|
862
|
+
platform: { type: string, enum: [whatsapp] }
|
|
863
|
+
platformError:
|
|
864
|
+
type: object
|
|
865
|
+
description: Sanitized Meta lookup error fields, present when Meta returned them.
|
|
866
|
+
properties:
|
|
867
|
+
code: { type: integer }
|
|
868
|
+
message: { type: string }
|
|
869
|
+
error_data:
|
|
870
|
+
type: object
|
|
871
|
+
properties:
|
|
872
|
+
details: { type: string }
|
|
873
|
+
details:
|
|
874
|
+
type: object
|
|
875
|
+
required: [phase, endpoint]
|
|
876
|
+
properties:
|
|
877
|
+
phase: { type: string, enum: [template_lookup] }
|
|
878
|
+
endpoint: { type: string, description: Meta endpoint path without query parameters or access tokens }
|
|
879
|
+
upstreamStatus: { type: integer }
|
|
880
|
+
providerHeaders:
|
|
881
|
+
type: object
|
|
882
|
+
description: Safe provider headers retained from the lookup response.
|
|
883
|
+
properties:
|
|
884
|
+
retry-after: { type: string }
|
|
885
|
+
x-app-usage: { type: string }
|
|
886
|
+
x-business-use-case-usage: { type: string }
|
|
887
|
+
additionalProperties: false
|
|
855
888
|
AdTracking:
|
|
856
889
|
type: object
|
|
857
890
|
description: "Meta only. Attaches pixel measurement to the ad regardless of the optimization goal (the \"Website events\" tracking row in Ads Manager). `pixelId` becomes the ad's `tracking_specs` (offsite_conversion + fb_pixel); `urlTags` is stored on the new creative as `url_tags` and retained on the ad for compatibility. Applied on the legacy single-creative shape, every ad of the multi-creative shape, and the attach shape. NOTE: tracking lives on the AD object and is not inherited from the ad set, so pass it on EVERY attach call that should carry the pixel."
|
|
@@ -6937,7 +6970,7 @@ components:
|
|
|
6937
6970
|
properties:
|
|
6938
6971
|
musicSoundId:
|
|
6939
6972
|
type: string
|
|
6940
|
-
description: 'The
|
|
6973
|
+
description: 'The id field of a track from GET /v1/accounts/{accountId}/tiktok/commercial-music (a song clip id). TikTok fails the publish with a generic 51065 when given the commercial music id instead.'
|
|
6941
6974
|
musicSoundVolume:
|
|
6942
6975
|
type: integer
|
|
6943
6976
|
minimum: 0
|
|
@@ -19142,7 +19175,8 @@ paths:
|
|
|
19142
19175
|
items:
|
|
19143
19176
|
type: object
|
|
19144
19177
|
properties:
|
|
19145
|
-
id: { type: string, description: 'The
|
|
19178
|
+
id: { type: string, description: 'The id to send as musicSoundId (the full track''s song clip id). TikTok rejects the commercial music id itself at publish time.' }
|
|
19179
|
+
commercialMusicId: { type: string, description: 'TikTok''s commercial_music_id, for reference only' }
|
|
19146
19180
|
name: { type: string }
|
|
19147
19181
|
artist: { type: string }
|
|
19148
19182
|
durationSec: { type: integer }
|
|
@@ -19152,8 +19186,9 @@ paths:
|
|
|
19152
19186
|
rank: { type: integer, description: 'Position in the trending chart, 1 first' }
|
|
19153
19187
|
clip:
|
|
19154
19188
|
type: object
|
|
19155
|
-
description: 'The trending excerpt of the track, when TikTok provides one'
|
|
19189
|
+
description: 'The trending excerpt of the track, when TikTok provides one. Its id is also accepted as musicSoundId.'
|
|
19156
19190
|
properties:
|
|
19191
|
+
id: { type: string }
|
|
19157
19192
|
durationSec: { type: integer }
|
|
19158
19193
|
previewUrl: { type: string }
|
|
19159
19194
|
'400':
|
|
@@ -29051,6 +29086,8 @@ paths:
|
|
|
29051
29086
|
|
|
29052
29087
|
**WhatsApp.** This is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED.
|
|
29053
29088
|
|
|
29089
|
+
Before sending, Zernio must resolve an exact APPROVED template definition matching both templateName and templateLanguage. If Meta rejects that lookup, or the exact approved definition is absent, Zernio sends no message and returns the canonical platform error instead. Lookup errors use code `platform_api_error`, type `platform_error`, and platform `whatsapp`. Sanitized Meta code, message, and `error_data.details` are returned in `platformError`; `details` identifies `phase: template_lookup`, the query-free endpoint, upstream status, and only safe provider usage or retry headers.
|
|
29090
|
+
|
|
29054
29091
|
- Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send.
|
|
29055
29092
|
- A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied.
|
|
29056
29093
|
- A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only.
|
|
@@ -29332,14 +29369,16 @@ paths:
|
|
|
29332
29369
|
type: [string, "null"]
|
|
29333
29370
|
description: X username of the recipient
|
|
29334
29371
|
'400':
|
|
29335
|
-
description: 'Validation error, platform not supported, an attachment the platform does not accept (PLATFORM_LIMITATION), template required to start a WhatsApp conversation (TEMPLATE_REQUIRED), template variables that do not match the approved definition (INVALID_TEMPLATE_PARAMS, INVALID_TEMPLATE_BUTTON_PARAM), templateCards that do not match the approved carousel definition (INVALID_TEMPLATE_CARD_PARAM), category combined with templateName or used on a non-WhatsApp account, or the WhatsApp Business Account is not eligible for Direct Send: DIRECT_SEND_NOT_ELIGIBLE and DIRECT_SEND_BLOCKED require Meta to grant or restore Direct Send access, while DIRECT_SEND_LIMITED is temporary and lifts on its own'
|
|
29372
|
+
description: 'Validation error, platform not supported, an attachment the platform does not accept (PLATFORM_LIMITATION), template required to start a WhatsApp conversation (TEMPLATE_REQUIRED), template variables that do not match the approved definition (INVALID_TEMPLATE_PARAMS, INVALID_TEMPLATE_BUTTON_PARAM), a missing or incompatible required template header (INVALID_TEMPLATE_HEADER), templateCards that do not match the approved carousel definition (INVALID_TEMPLATE_CARD_PARAM), category combined with templateName or used on a non-WhatsApp account, or the WhatsApp Business Account is not eligible for Direct Send: DIRECT_SEND_NOT_ELIGIBLE and DIRECT_SEND_BLOCKED require Meta to grant or restore Direct Send access, while DIRECT_SEND_LIMITED is temporary and lifts on its own'
|
|
29336
29373
|
content:
|
|
29337
29374
|
application/json:
|
|
29338
29375
|
schema:
|
|
29339
|
-
|
|
29340
|
-
|
|
29341
|
-
|
|
29342
|
-
|
|
29376
|
+
anyOf:
|
|
29377
|
+
- type: object
|
|
29378
|
+
properties:
|
|
29379
|
+
error: { type: string }
|
|
29380
|
+
code: { type: string, enum: [PLATFORM_NOT_SUPPORTED, PLATFORM_LIMITATION, TEMPLATE_REQUIRED, INVALID_TEMPLATE_PARAMS, INVALID_TEMPLATE_BUTTON_PARAM, INVALID_TEMPLATE_HEADER, INVALID_TEMPLATE_CARD_PARAM, DIRECT_SEND_NOT_ELIGIBLE, DIRECT_SEND_LIMITED, DIRECT_SEND_BLOCKED] }
|
|
29381
|
+
- { $ref: '#/components/schemas/WhatsAppTemplateLookupError' }
|
|
29343
29382
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
29344
29383
|
'403':
|
|
29345
29384
|
description: Inbox addon required or profile limit reached
|
|
@@ -29348,28 +29387,44 @@ paths:
|
|
|
29348
29387
|
content:
|
|
29349
29388
|
application/json:
|
|
29350
29389
|
schema:
|
|
29351
|
-
|
|
29352
|
-
|
|
29353
|
-
|
|
29354
|
-
|
|
29390
|
+
anyOf:
|
|
29391
|
+
- type: object
|
|
29392
|
+
properties:
|
|
29393
|
+
error: { type: string }
|
|
29394
|
+
code: { type: string, enum: [account_not_found, PARTICIPANT_NOT_FOUND] }
|
|
29395
|
+
- { $ref: '#/components/schemas/WhatsAppTemplateLookupError' }
|
|
29355
29396
|
'422':
|
|
29356
29397
|
description: 'Recipient does not accept DMs from this account (X), or does not accept direct messages from you (Reddit)'
|
|
29357
29398
|
content:
|
|
29358
29399
|
application/json:
|
|
29359
29400
|
schema:
|
|
29360
|
-
|
|
29361
|
-
|
|
29362
|
-
|
|
29363
|
-
|
|
29401
|
+
anyOf:
|
|
29402
|
+
- type: object
|
|
29403
|
+
properties:
|
|
29404
|
+
error: { type: string }
|
|
29405
|
+
code: { type: string, enum: [DM_NOT_ALLOWED] }
|
|
29406
|
+
- { $ref: '#/components/schemas/WhatsAppTemplateLookupError' }
|
|
29364
29407
|
'429':
|
|
29365
|
-
description: 'X API rate limit exceeded,
|
|
29408
|
+
description: 'X API rate limit exceeded, Reddit rate limit reached, or Meta rejected the WhatsApp template-definition lookup. A lookup failure sends no message.'
|
|
29366
29409
|
content:
|
|
29367
29410
|
application/json:
|
|
29368
29411
|
schema:
|
|
29369
|
-
|
|
29370
|
-
|
|
29371
|
-
|
|
29372
|
-
|
|
29412
|
+
anyOf:
|
|
29413
|
+
- type: object
|
|
29414
|
+
properties:
|
|
29415
|
+
error: { type: string }
|
|
29416
|
+
code: { type: string, enum: [rate_limited] }
|
|
29417
|
+
- { $ref: '#/components/schemas/WhatsAppTemplateLookupError' }
|
|
29418
|
+
'502':
|
|
29419
|
+
description: The exact approved WhatsApp template definition is unavailable. No message was sent.
|
|
29420
|
+
content:
|
|
29421
|
+
application/json:
|
|
29422
|
+
schema: { $ref: '#/components/schemas/WhatsAppTemplateLookupError' }
|
|
29423
|
+
default:
|
|
29424
|
+
description: Meta rejected the WhatsApp template-definition lookup with another upstream status. No message was sent.
|
|
29425
|
+
content:
|
|
29426
|
+
application/json:
|
|
29427
|
+
schema: { $ref: '#/components/schemas/WhatsAppTemplateLookupError' }
|
|
29373
29428
|
/v1/inbox/conversations/search:
|
|
29374
29429
|
get:
|
|
29375
29430
|
x-resource-group: "messages"
|
|
@@ -29941,6 +29996,14 @@ paths:
|
|
|
29941
29996
|
to a phone number you have no conversation with yet, use the
|
|
29942
29997
|
create-conversation endpoint (POST /v1/inbox/conversations) instead.
|
|
29943
29998
|
|
|
29999
|
+
Zernio resolves the exact APPROVED template name and language before any
|
|
30000
|
+
WhatsApp template send. A failed lookup or missing exact definition sends
|
|
30001
|
+
no message and returns code `platform_api_error`, type `platform_error`,
|
|
30002
|
+
and platform `whatsapp`. Sanitized Meta code, message, and
|
|
30003
|
+
`error_data.details` are returned in `platformError`; `details` identifies
|
|
30004
|
+
`phase: template_lookup`, the query-free endpoint, upstream status, and
|
|
30005
|
+
only safe provider usage or retry headers.
|
|
30006
|
+
|
|
29944
30007
|
WhatsApp rich interactive messages (list, CTA URL, Flow, location request)
|
|
29945
30008
|
are available via the `interactive` field. Tap events are delivered through
|
|
29946
30009
|
the `message.received` webhook with WhatsApp-specific `metadata` fields
|
|
@@ -30592,13 +30655,13 @@ paths:
|
|
|
30592
30655
|
code:
|
|
30593
30656
|
type: string
|
|
30594
30657
|
description: "Stable machine-readable reason. PLATFORM_LIMITATION covers a capability the platform does not offer (e.g. Bluesky and Reddit DMs reject media); MISSING_PARTICIPANT means the stored conversation has no recipient to send to; DIRECT_SEND_NOT_ELIGIBLE and DIRECT_SEND_BLOCKED mean the WhatsApp Business Account needs Meta to grant or restore Direct Send access; DIRECT_SEND_LIMITED is temporary, Meta lifts it on its own; platform_api_error means Meta itself rejected the send (see platformError)."
|
|
30595
|
-
enum: [PLATFORM_LIMITATION, MISSING_PARTICIPANT, DIRECT_SEND_NOT_ELIGIBLE, DIRECT_SEND_LIMITED, DIRECT_SEND_BLOCKED, platform_api_error]
|
|
30658
|
+
enum: [PLATFORM_LIMITATION, MISSING_PARTICIPANT, INVALID_TEMPLATE_HEADER, DIRECT_SEND_NOT_ELIGIBLE, DIRECT_SEND_LIMITED, DIRECT_SEND_BLOCKED, platform_api_error]
|
|
30596
30659
|
platform:
|
|
30597
30660
|
type: string
|
|
30598
|
-
description: "Present alongside code platform_api_error. The platform that rejected the send (e.g. instagram, facebook)."
|
|
30661
|
+
description: "Present alongside code platform_api_error. The platform that rejected the send (e.g. instagram, facebook, whatsapp)."
|
|
30599
30662
|
platformError:
|
|
30600
30663
|
type: object
|
|
30601
|
-
description: "Instagram
|
|
30664
|
+
description: "Instagram, Facebook, or WhatsApp. Meta's diagnostic fields for the rejected send or template lookup. WhatsApp lookup errors retain only code, message, and error_data.details. Absent when the failure did not come from Meta."
|
|
30602
30665
|
properties:
|
|
30603
30666
|
code: { type: integer, description: "Meta error code" }
|
|
30604
30667
|
subcode: { type: integer, description: "Meta error_subcode" }
|
|
@@ -30621,8 +30684,25 @@ paths:
|
|
|
30621
30684
|
schema: { $ref: '#/components/schemas/ErrorResponse' }
|
|
30622
30685
|
'409': { $ref: '#/components/responses/IdempotencyKeyInFlight' }
|
|
30623
30686
|
'422': { $ref: '#/components/responses/IdempotencyKeyReused' }
|
|
30687
|
+
'429':
|
|
30688
|
+
description: Meta rejected the WhatsApp template-definition lookup. No message was sent.
|
|
30689
|
+
content:
|
|
30690
|
+
application/json:
|
|
30691
|
+
schema: { $ref: '#/components/schemas/WhatsAppTemplateLookupError' }
|
|
30624
30692
|
'503': { $ref: '#/components/responses/TemporarilyUnavailable' }
|
|
30625
|
-
'502':
|
|
30693
|
+
'502':
|
|
30694
|
+
description: The exact approved WhatsApp template definition is unavailable, or the platform returned an upstream failure. No WhatsApp template message is sent when definition lookup fails.
|
|
30695
|
+
content:
|
|
30696
|
+
application/json:
|
|
30697
|
+
schema:
|
|
30698
|
+
anyOf:
|
|
30699
|
+
- { $ref: '#/components/schemas/ErrorResponse' }
|
|
30700
|
+
- { $ref: '#/components/schemas/WhatsAppTemplateLookupError' }
|
|
30701
|
+
default:
|
|
30702
|
+
description: Meta rejected the WhatsApp template-definition lookup with another upstream status. No message was sent.
|
|
30703
|
+
content:
|
|
30704
|
+
application/json:
|
|
30705
|
+
schema: { $ref: '#/components/schemas/WhatsAppTemplateLookupError' }
|
|
30626
30706
|
|
|
30627
30707
|
/v1/whatsapp/media/{mediaId}:
|
|
30628
30708
|
get:
|
|
@@ -48,7 +48,7 @@ describe 'MessagesApi' do
|
|
|
48
48
|
|
|
49
49
|
# unit tests for create_inbox_conversation
|
|
50
50
|
# Create conversation
|
|
51
|
-
# Start a direct message conversation with a user. If a conversation with that recipient already exists, the message is added to the existing thread. Supported platforms: X, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. **Slack.** Pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. **WhatsApp.** This is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. - Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. - A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. - A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. - CAROUSEL templates take per-card overrides via templateCards, each addressed by the card's card_index, because card body variables restart at {{1}} per card and cannot be expressed in the flat templateParams order. - Template fields are accepted on the JSON body only, not on multipart requests. For a number you already have a thread with, this sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. **DM eligibility (X).** Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. **X API tier requirement.** DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. **Rate limits (X only).** X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
51
|
+
# Start a direct message conversation with a user. If a conversation with that recipient already exists, the message is added to the existing thread. Supported platforms: X, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED. **Slack.** Pass a workspace member id as participantId (list them with GET /v1/accounts/{accountId}/slack-members). Zernio opens the DM channel with that member and sends the message; the thread then behaves like any other Slack conversation in the inbox. The member must belong to the connected workspace. **WhatsApp.** This is the endpoint for sending an approved template message to a phone number. Provide templateName, templateLanguage, and templateParams (variable values for the text header, body and dynamic URL buttons, in that order), with the recipient phone in participantId. A template is required because WhatsApp does not permit freeform messages to open a conversation; a missing template returns TEMPLATE_REQUIRED. Before sending, Zernio must resolve an exact APPROVED template definition matching both templateName and templateLanguage. If Meta rejects that lookup, or the exact approved definition is absent, Zernio sends no message and returns the canonical platform error instead. Lookup errors use code `platform_api_error`, type `platform_error`, and platform `whatsapp`. Sanitized Meta code, message, and `error_data.details` are returned in `platformError`; `details` identifies `phase: template_lookup`, the query-free endpoint, upstream status, and only safe provider usage or retry headers. - Templates with media headers (image, video, document) are handled automatically: Zernio reads the approved template definition and fills the header at send time with the template's approved sample asset. To send a DIFFERENT asset per message (e.g. a distinct invoice PDF for each recipient), pass the headerMedia field with a public link (or a Meta media id); it overrides the sample for that send. - A template whose approved header format is LOCATION has no header asset to reconstruct at all: Meta only accepts the location at send time, so pass headerLocation (latitude and longitude required) whenever such a template is sent; headerMedia and headerLocation cannot both be supplied. - A button that carries its own value at send time (a copy-code button holding a Pix payment code or a coupon, a flow token) is sent with templateButtonParams, addressed by the button's index; templateParams covers text variables and dynamic URL buttons only. - CAROUSEL templates take per-card overrides via templateCards, each addressed by the card's card_index, because card body variables restart at {{1}} per card and cannot be expressed in the flat templateParams order. - Template fields are accepted on the JSON body only, not on multipart requests. For a number you already have a thread with, this sends the template into that thread, which also makes it the way to re-engage a contact after the 24-hour customer-service window has closed. Once the recipient replies (opening the 24h window), send freeform messages with the send-message endpoint (POST /v1/inbox/conversations/{conversationId}/messages). Alternatively, WhatsApp Business Accounts eligible for Meta Direct Send can open a conversation with a business-initiated utility text message and no template: pass category: 'utility' together with message (and no templateName). See the category field below. **DM eligibility (X).** Before sending, the endpoint checks if the recipient accepts DMs from your account (via the receives_your_dm field). If not, a 422 error with code DM_NOT_ALLOWED is returned. You can skip this check with skipDmCheck: true if you have already verified eligibility. **X API tier requirement.** DM write endpoints require X API Pro tier ($5,000/month) or Enterprise access. This applies to BYOK (Bring Your Own Key) users who provide their own X API credentials. **Rate limits (X only).** X's DM API enforces 200 requests per 15 minutes, 1,000 per 24 hours per connected X account, and 15,000 per 24 hours per X developer app (shared across all DM endpoints). These limits do NOT apply to other platforms. WhatsApp sends are governed by Meta's per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
|
|
52
52
|
# @param create_inbox_conversation_request
|
|
53
53
|
# @param [Hash] opts the optional parameters
|
|
54
54
|
# @return [CreateInboxConversation201Response]
|
|
@@ -196,7 +196,7 @@ describe 'MessagesApi' do
|
|
|
196
196
|
|
|
197
197
|
# unit tests for send_inbox_message
|
|
198
198
|
# Send message
|
|
199
|
-
# Send a message in a conversation. Supports text, attachments, quick replies, buttons, templates, and message tags. Attachment and interactive message support varies by platform. WhatsApp per-recipient rate limit: WhatsApp caps how many messages you may send to the same recipient in a short window and rejects the excess with error code `131056` (\"Too many messages sent to this recipient\"). Pace sends to a single recipient at roughly 10 per minute; bursts above that return a `400` with code `131056`. Sends to other recipients are unaffected, so parallelise across recipients rather than flooding one. WhatsApp template messages: to send an approved template into this conversation (required when the 24-hour customer-service window is closed), use the `template` field with a single element carrying the template reference: `{ \"elements\": [{ \"name\": ..., \"language\": ..., \"components\": [...] }] }`. See the `template` field below for the exact shape. To send a template to a phone number you have no conversation with yet, use the create-conversation endpoint (POST /v1/inbox/conversations) instead. WhatsApp rich interactive messages (list, CTA URL, Flow, location request) are available via the `interactive` field. Tap events are delivered through the `message.received` webhook with WhatsApp-specific `metadata` fields (`interactiveType`, `interactiveId`, `flowResponseJson`, `flowResponseData`). **Idempotency:** send an `Idempotency-Key` header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with `Idempotent-Replayed: true`) instead of sending the message a second time; same key + different body returns 422; a key still in flight returns 409. Works for JSON and multipart (file upload) requests alike. Keys are retained for 24 hours. Only successful (2xx) responses are stored for replay: if the request throws or returns a non-2xx status, the key is released so the same key can be retried once the problem is fixed. The header therefore protects the \"request succeeded but the response was lost\" case. For an ambiguous failure (a 5xx or a network timeout), reconcile before retrying: a failure after the platform already accepted the message also releases the key, and a blind retry could send it twice. List the conversation's messages first, and treat an empty result as inconclusive rather than as proof nothing was sent, since a send that failed while being recorded leaves no trace on our side.
|
|
199
|
+
# Send a message in a conversation. Supports text, attachments, quick replies, buttons, templates, and message tags. Attachment and interactive message support varies by platform. WhatsApp per-recipient rate limit: WhatsApp caps how many messages you may send to the same recipient in a short window and rejects the excess with error code `131056` (\"Too many messages sent to this recipient\"). Pace sends to a single recipient at roughly 10 per minute; bursts above that return a `400` with code `131056`. Sends to other recipients are unaffected, so parallelise across recipients rather than flooding one. WhatsApp template messages: to send an approved template into this conversation (required when the 24-hour customer-service window is closed), use the `template` field with a single element carrying the template reference: `{ \"elements\": [{ \"name\": ..., \"language\": ..., \"components\": [...] }] }`. See the `template` field below for the exact shape. To send a template to a phone number you have no conversation with yet, use the create-conversation endpoint (POST /v1/inbox/conversations) instead. Zernio resolves the exact APPROVED template name and language before any WhatsApp template send. A failed lookup or missing exact definition sends no message and returns code `platform_api_error`, type `platform_error`, and platform `whatsapp`. Sanitized Meta code, message, and `error_data.details` are returned in `platformError`; `details` identifies `phase: template_lookup`, the query-free endpoint, upstream status, and only safe provider usage or retry headers. WhatsApp rich interactive messages (list, CTA URL, Flow, location request) are available via the `interactive` field. Tap events are delivered through the `message.received` webhook with WhatsApp-specific `metadata` fields (`interactiveType`, `interactiveId`, `flowResponseJson`, `flowResponseData`). **Idempotency:** send an `Idempotency-Key` header to make retries safe (e.g. after a client-side timeout where delivery is unknown): same key + same body replays the original response (with `Idempotent-Replayed: true`) instead of sending the message a second time; same key + different body returns 422; a key still in flight returns 409. Works for JSON and multipart (file upload) requests alike. Keys are retained for 24 hours. Only successful (2xx) responses are stored for replay: if the request throws or returns a non-2xx status, the key is released so the same key can be retried once the problem is fixed. The header therefore protects the \"request succeeded but the response was lost\" case. For an ambiguous failure (a 5xx or a network timeout), reconcile before retrying: a failure after the platform already accepted the message also releases the key, and a blind retry could send it twice. List the conversation's messages first, and treat an empty result as inconclusive rather than as proof nothing was sent, since a send that failed while being recorded leaves no trace on our side.
|
|
200
200
|
# @param conversation_id Opaque conversation identifier, accepted verbatim from the list endpoint or from the conversationId on inbox webhooks. Format not to be assumed.
|
|
201
201
|
# @param send_inbox_message_request
|
|
202
202
|
# @param [Hash] opts the optional parameters
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
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
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::CreateInboxConversation400ResponseAnyOf
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CreateInboxConversation400ResponseAnyOf do
|
|
21
|
+
#let(:instance) { Zernio::CreateInboxConversation400ResponseAnyOf.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateInboxConversation400ResponseAnyOf' do
|
|
24
|
+
it 'should create an instance of CreateInboxConversation400ResponseAnyOf' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CreateInboxConversation400ResponseAnyOf)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "error"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "code"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PLATFORM_NOT_SUPPORTED", "PLATFORM_LIMITATION", "TEMPLATE_REQUIRED", "INVALID_TEMPLATE_PARAMS", "INVALID_TEMPLATE_BUTTON_PARAM", "INVALID_TEMPLATE_HEADER", "INVALID_TEMPLATE_CARD_PARAM", "DIRECT_SEND_NOT_ELIGIBLE", "DIRECT_SEND_LIMITED", "DIRECT_SEND_BLOCKED"])
|
|
40
|
+
# validator.allowable_values.each do |value|
|
|
41
|
+
# expect { instance.code = value }.not_to raise_error
|
|
42
|
+
# end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -18,29 +18,4 @@ require 'date'
|
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
20
|
describe Zernio::CreateInboxConversation400Response do
|
|
21
|
-
#let(:instance) { Zernio::CreateInboxConversation400Response.new }
|
|
22
|
-
|
|
23
|
-
describe 'test an instance of CreateInboxConversation400Response' do
|
|
24
|
-
it 'should create an instance of CreateInboxConversation400Response' do
|
|
25
|
-
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Zernio::CreateInboxConversation400Response)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
describe 'test attribute "error"' do
|
|
31
|
-
it 'should work' do
|
|
32
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
describe 'test attribute "code"' do
|
|
37
|
-
it 'should work' do
|
|
38
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PLATFORM_NOT_SUPPORTED", "PLATFORM_LIMITATION", "TEMPLATE_REQUIRED", "INVALID_TEMPLATE_PARAMS", "INVALID_TEMPLATE_BUTTON_PARAM", "INVALID_TEMPLATE_CARD_PARAM", "DIRECT_SEND_NOT_ELIGIBLE", "DIRECT_SEND_LIMITED", "DIRECT_SEND_BLOCKED"])
|
|
40
|
-
# validator.allowable_values.each do |value|
|
|
41
|
-
# expect { instance.code = value }.not_to raise_error
|
|
42
|
-
# end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
21
|
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
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
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::CreateInboxConversation404ResponseAnyOf
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CreateInboxConversation404ResponseAnyOf do
|
|
21
|
+
#let(:instance) { Zernio::CreateInboxConversation404ResponseAnyOf.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateInboxConversation404ResponseAnyOf' do
|
|
24
|
+
it 'should create an instance of CreateInboxConversation404ResponseAnyOf' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CreateInboxConversation404ResponseAnyOf)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "error"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "code"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["account_not_found", "PARTICIPANT_NOT_FOUND"])
|
|
40
|
+
# validator.allowable_values.each do |value|
|
|
41
|
+
# expect { instance.code = value }.not_to raise_error
|
|
42
|
+
# end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -18,29 +18,4 @@ require 'date'
|
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
20
|
describe Zernio::CreateInboxConversation404Response do
|
|
21
|
-
#let(:instance) { Zernio::CreateInboxConversation404Response.new }
|
|
22
|
-
|
|
23
|
-
describe 'test an instance of CreateInboxConversation404Response' do
|
|
24
|
-
it 'should create an instance of CreateInboxConversation404Response' do
|
|
25
|
-
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Zernio::CreateInboxConversation404Response)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
describe 'test attribute "error"' do
|
|
31
|
-
it 'should work' do
|
|
32
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
describe 'test attribute "code"' do
|
|
37
|
-
it 'should work' do
|
|
38
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["account_not_found", "PARTICIPANT_NOT_FOUND"])
|
|
40
|
-
# validator.allowable_values.each do |value|
|
|
41
|
-
# expect { instance.code = value }.not_to raise_error
|
|
42
|
-
# end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
21
|
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
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
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::CreateInboxConversation422ResponseAnyOf
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CreateInboxConversation422ResponseAnyOf do
|
|
21
|
+
#let(:instance) { Zernio::CreateInboxConversation422ResponseAnyOf.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateInboxConversation422ResponseAnyOf' do
|
|
24
|
+
it 'should create an instance of CreateInboxConversation422ResponseAnyOf' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CreateInboxConversation422ResponseAnyOf)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "error"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "code"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DM_NOT_ALLOWED"])
|
|
40
|
+
# validator.allowable_values.each do |value|
|
|
41
|
+
# expect { instance.code = value }.not_to raise_error
|
|
42
|
+
# end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -18,29 +18,4 @@ require 'date'
|
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
20
|
describe Zernio::CreateInboxConversation422Response do
|
|
21
|
-
#let(:instance) { Zernio::CreateInboxConversation422Response.new }
|
|
22
|
-
|
|
23
|
-
describe 'test an instance of CreateInboxConversation422Response' do
|
|
24
|
-
it 'should create an instance of CreateInboxConversation422Response' do
|
|
25
|
-
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Zernio::CreateInboxConversation422Response)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
describe 'test attribute "error"' do
|
|
31
|
-
it 'should work' do
|
|
32
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
describe 'test attribute "code"' do
|
|
37
|
-
it 'should work' do
|
|
38
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["DM_NOT_ALLOWED"])
|
|
40
|
-
# validator.allowable_values.each do |value|
|
|
41
|
-
# expect { instance.code = value }.not_to raise_error
|
|
42
|
-
# end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
21
|
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
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
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::CreateInboxConversation429ResponseAnyOf
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CreateInboxConversation429ResponseAnyOf do
|
|
21
|
+
#let(:instance) { Zernio::CreateInboxConversation429ResponseAnyOf.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateInboxConversation429ResponseAnyOf' do
|
|
24
|
+
it 'should create an instance of CreateInboxConversation429ResponseAnyOf' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CreateInboxConversation429ResponseAnyOf)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "error"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "code"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["rate_limited"])
|
|
40
|
+
# validator.allowable_values.each do |value|
|
|
41
|
+
# expect { instance.code = value }.not_to raise_error
|
|
42
|
+
# end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -18,29 +18,4 @@ require 'date'
|
|
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
19
|
# Please update as you see appropriate
|
|
20
20
|
describe Zernio::CreateInboxConversation429Response do
|
|
21
|
-
#let(:instance) { Zernio::CreateInboxConversation429Response.new }
|
|
22
|
-
|
|
23
|
-
describe 'test an instance of CreateInboxConversation429Response' do
|
|
24
|
-
it 'should create an instance of CreateInboxConversation429Response' do
|
|
25
|
-
# uncomment below to test the instance creation
|
|
26
|
-
#expect(instance).to be_instance_of(Zernio::CreateInboxConversation429Response)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
describe 'test attribute "error"' do
|
|
31
|
-
it 'should work' do
|
|
32
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
describe 'test attribute "code"' do
|
|
37
|
-
it 'should work' do
|
|
38
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["rate_limited"])
|
|
40
|
-
# validator.allowable_values.each do |value|
|
|
41
|
-
# expect { instance.code = value }.not_to raise_error
|
|
42
|
-
# end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
21
|
end
|
|
@@ -27,6 +27,12 @@ describe Zernio::ListTikTokCommercialMusic200ResponseTracksInnerClip do
|
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
describe 'test attribute "id"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
30
36
|
describe 'test attribute "duration_sec"' do
|
|
31
37
|
it 'should work' do
|
|
32
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -33,6 +33,12 @@ describe Zernio::ListTikTokCommercialMusic200ResponseTracksInner do
|
|
|
33
33
|
end
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
describe 'test attribute "commercial_music_id"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
36
42
|
describe 'test attribute "name"' do
|
|
37
43
|
it 'should work' do
|
|
38
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -46,7 +46,7 @@ describe Zernio::SendInboxMessage400Response do
|
|
|
46
46
|
describe 'test attribute "code"' do
|
|
47
47
|
it 'should work' do
|
|
48
48
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
49
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PLATFORM_LIMITATION", "MISSING_PARTICIPANT", "DIRECT_SEND_NOT_ELIGIBLE", "DIRECT_SEND_LIMITED", "DIRECT_SEND_BLOCKED", "platform_api_error"])
|
|
49
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PLATFORM_LIMITATION", "MISSING_PARTICIPANT", "INVALID_TEMPLATE_HEADER", "DIRECT_SEND_NOT_ELIGIBLE", "DIRECT_SEND_LIMITED", "DIRECT_SEND_BLOCKED", "platform_api_error"])
|
|
50
50
|
# validator.allowable_values.each do |value|
|
|
51
51
|
# expect { instance.code = value }.not_to raise_error
|
|
52
52
|
# end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
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
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::SendInboxMessage502Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::SendInboxMessage502Response do
|
|
21
|
+
end
|