late-sdk 0.0.664 → 0.0.666

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -4
  3. data/docs/CreateInboxConversationRequest.md +1 -1
  4. data/docs/ListSlackMembers200Response.md +18 -0
  5. data/docs/ListSlackMembers200ResponseMembersInner.md +24 -0
  6. data/docs/MessagesApi.md +1 -1
  7. data/docs/SendInboxMessageRequestInteractiveAction.md +3 -1
  8. data/docs/SendInboxMessageRequestInteractiveActionOneOf5.md +2 -4
  9. data/docs/SendInboxMessageRequestInteractiveActionOneOf6.md +2 -2
  10. data/docs/SendInboxMessageRequestInteractiveActionOneOf7.md +4 -4
  11. data/docs/{SendInboxMessageRequestInteractiveActionOneOf6SectionsInner.md → SendInboxMessageRequestInteractiveActionOneOf7SectionsInner.md} +3 -3
  12. data/docs/{SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner.md → SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner.md} +2 -2
  13. data/docs/SendInboxMessageRequestInteractiveActionOneOf8.md +4 -2
  14. data/docs/{SendInboxMessageRequestInteractiveActionOneOf7Parameters.md → SendInboxMessageRequestInteractiveActionOneOf8Parameters.md} +2 -2
  15. data/docs/SendInboxMessageRequestInteractiveActionOneOf9.md +18 -0
  16. data/docs/{SendInboxMessageRequestInteractiveActionOneOf8CardsInner.md → SendInboxMessageRequestInteractiveActionOneOf9CardsInner.md} +2 -2
  17. data/docs/SlackApi.md +83 -0
  18. data/docs/WebhookPayloadMessageMetadata.md +4 -0
  19. data/lib/zernio-sdk/api/messages_api.rb +2 -2
  20. data/lib/zernio-sdk/api/slack_api.rb +103 -0
  21. data/lib/zernio-sdk/models/create_inbox_conversation_request.rb +1 -1
  22. data/lib/zernio-sdk/models/list_slack_members200_response.rb +149 -0
  23. data/lib/zernio-sdk/models/list_slack_members200_response_members_inner.rb +180 -0
  24. data/lib/zernio-sdk/models/send_inbox_message_request_interactive.rb +3 -3
  25. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action.rb +2 -1
  26. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action_one_of5.rb +42 -46
  27. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action_one_of6.rb +18 -38
  28. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action_one_of7.rb +64 -49
  29. data/lib/zernio-sdk/models/{send_inbox_message_request_interactive_action_one_of6_sections_inner.rb → send_inbox_message_request_interactive_action_one_of7_sections_inner.rb} +4 -4
  30. data/lib/zernio-sdk/models/{send_inbox_message_request_interactive_action_one_of6_sections_inner_product_items_inner.rb → send_inbox_message_request_interactive_action_one_of7_sections_inner_product_items_inner.rb} +3 -3
  31. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action_one_of8.rb +52 -39
  32. data/lib/zernio-sdk/models/{send_inbox_message_request_interactive_action_one_of7_parameters.rb → send_inbox_message_request_interactive_action_one_of8_parameters.rb} +3 -3
  33. data/lib/zernio-sdk/models/send_inbox_message_request_interactive_action_one_of9.rb +185 -0
  34. data/lib/zernio-sdk/models/{send_inbox_message_request_interactive_action_one_of8_cards_inner.rb → send_inbox_message_request_interactive_action_one_of9_cards_inner.rb} +3 -3
  35. data/lib/zernio-sdk/models/webhook_payload_message_metadata.rb +35 -1
  36. data/lib/zernio-sdk/version.rb +1 -1
  37. data/lib/zernio-sdk.rb +8 -4
  38. data/openapi.yaml +87 -3
  39. data/spec/api/messages_api_spec.rb +1 -1
  40. data/spec/api/slack_api_spec.rb +49 -0
  41. data/spec/models/list_slack_members200_response_members_inner_spec.rb +54 -0
  42. data/spec/models/list_slack_members200_response_spec.rb +36 -0
  43. data/spec/models/send_inbox_message_request_interactive_action_one_of5_spec.rb +5 -7
  44. data/spec/models/send_inbox_message_request_interactive_action_one_of6_spec.rb +1 -1
  45. data/spec/models/{send_inbox_message_request_interactive_action_one_of6_sections_inner_product_items_inner_spec.rb → send_inbox_message_request_interactive_action_one_of7_sections_inner_product_items_inner_spec.rb} +6 -6
  46. data/spec/models/{send_inbox_message_request_interactive_action_one_of6_sections_inner_spec.rb → send_inbox_message_request_interactive_action_one_of7_sections_inner_spec.rb} +6 -6
  47. data/spec/models/send_inbox_message_request_interactive_action_one_of7_spec.rb +2 -6
  48. data/spec/models/{send_inbox_message_request_interactive_action_one_of7_parameters_spec.rb → send_inbox_message_request_interactive_action_one_of8_parameters_spec.rb} +6 -6
  49. data/spec/models/send_inbox_message_request_interactive_action_one_of8_spec.rb +11 -1
  50. data/spec/models/{send_inbox_message_request_interactive_action_one_of8_cards_inner_spec.rb → send_inbox_message_request_interactive_action_one_of9_cards_inner_spec.rb} +6 -6
  51. data/spec/models/send_inbox_message_request_interactive_action_one_of9_spec.rb +36 -0
  52. data/spec/models/send_inbox_message_request_interactive_spec.rb +1 -1
  53. data/spec/models/webhook_payload_message_metadata_spec.rb +16 -0
  54. data/zernio-sdk-0.0.666.gem +0 -0
  55. metadata +34 -18
  56. data/zernio-sdk-0.0.664.gem +0 -0
@@ -47,6 +47,12 @@ module Zernio
47
47
 
48
48
  attr_accessor :referred_product
49
49
 
50
+ # WhatsApp only. Contact cards the user shared, forwarded verbatim from Meta. Read `contactsOrigin` before treating any number here as the sender's own.
51
+ attr_accessor :contacts
52
+
53
+ # WhatsApp only. How the contact card was shared. `contact_request` means the user tapped a `request_contact_info` button, so the number is their own and consented. `other` means they picked a card from their address book: it may be anyone's, and must NOT be stored as the sender's identity. Omitted when Meta sends no origin.
54
+ attr_accessor :contacts_origin
55
+
50
56
  attr_accessor :story_reply
51
57
 
52
58
  # Instagram only. True when the message was generated by an IG user mentioning the account in their own story (`story_mention` attachment type). Mutually exclusive in practice with `storyReply`.
@@ -90,6 +96,8 @@ module Zernio
90
96
  :'flow_response_data' => :'flowResponseData',
91
97
  :'order' => :'order',
92
98
  :'referred_product' => :'referredProduct',
99
+ :'contacts' => :'contacts',
100
+ :'contacts_origin' => :'contactsOrigin',
93
101
  :'story_reply' => :'storyReply',
94
102
  :'is_story_mention' => :'isStoryMention',
95
103
  :'referral' => :'referral'
@@ -120,6 +128,8 @@ module Zernio
120
128
  :'flow_response_data' => :'Hash<String, Object>',
121
129
  :'order' => :'WebhookPayloadMessageMetadataOrder',
122
130
  :'referred_product' => :'WebhookPayloadMessageMetadataReferredProduct',
131
+ :'contacts' => :'Array<Hash<String, Object>>',
132
+ :'contacts_origin' => :'String',
123
133
  :'story_reply' => :'WebhookPayloadMessageMetadataStoryReply',
124
134
  :'is_story_mention' => :'Boolean',
125
135
  :'referral' => :'WebhookPayloadMessageMetadataReferral'
@@ -194,6 +204,16 @@ module Zernio
194
204
  self.referred_product = attributes[:'referred_product']
195
205
  end
196
206
 
207
+ if attributes.key?(:'contacts')
208
+ if (value = attributes[:'contacts']).is_a?(Array)
209
+ self.contacts = value
210
+ end
211
+ end
212
+
213
+ if attributes.key?(:'contacts_origin')
214
+ self.contacts_origin = attributes[:'contacts_origin']
215
+ end
216
+
197
217
  if attributes.key?(:'story_reply')
198
218
  self.story_reply = attributes[:'story_reply']
199
219
  end
@@ -221,6 +241,8 @@ module Zernio
221
241
  warn '[DEPRECATED] the `valid?` method is obsolete'
222
242
  interactive_type_validator = EnumAttributeValidator.new('String', ["button_reply", "list_reply", "nfm_reply"])
223
243
  return false unless interactive_type_validator.valid?(@interactive_type)
244
+ contacts_origin_validator = EnumAttributeValidator.new('String', ["contact_request", "other"])
245
+ return false unless contacts_origin_validator.valid?(@contacts_origin)
224
246
  true
225
247
  end
226
248
 
@@ -234,6 +256,16 @@ module Zernio
234
256
  @interactive_type = interactive_type
235
257
  end
236
258
 
259
+ # Custom attribute writer method checking allowed values (enum).
260
+ # @param [Object] contacts_origin Object to be assigned
261
+ def contacts_origin=(contacts_origin)
262
+ validator = EnumAttributeValidator.new('String', ["contact_request", "other"])
263
+ unless validator.valid?(contacts_origin)
264
+ fail ArgumentError, "invalid value for \"contacts_origin\", must be one of #{validator.allowable_values}."
265
+ end
266
+ @contacts_origin = contacts_origin
267
+ end
268
+
237
269
  # Checks equality by comparing each attribute.
238
270
  # @param [Object] Object to be compared
239
271
  def ==(o)
@@ -250,6 +282,8 @@ module Zernio
250
282
  flow_response_data == o.flow_response_data &&
251
283
  order == o.order &&
252
284
  referred_product == o.referred_product &&
285
+ contacts == o.contacts &&
286
+ contacts_origin == o.contacts_origin &&
253
287
  story_reply == o.story_reply &&
254
288
  is_story_mention == o.is_story_mention &&
255
289
  referral == o.referral
@@ -264,7 +298,7 @@ module Zernio
264
298
  # Calculates hash code according to all attributes.
265
299
  # @return [Integer] Hash code
266
300
  def hash
267
- [quick_reply_payload, postback_payload, postback_title, callback_data, interactive_type, interactive_id, button_payload, flow_response_json, flow_response_data, order, referred_product, story_reply, is_story_mention, referral].hash
301
+ [quick_reply_payload, postback_payload, postback_title, callback_data, interactive_type, interactive_id, button_payload, flow_response_json, flow_response_data, order, referred_product, contacts, contacts_origin, story_reply, is_story_mention, referral].hash
268
302
  end
269
303
 
270
304
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.664'
14
+ VERSION = '0.0.666'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -921,6 +921,8 @@ require 'zernio-sdk/models/list_sequence_enrollments200_response'
921
921
  require 'zernio-sdk/models/list_sequence_enrollments200_response_enrollments_inner'
922
922
  require 'zernio-sdk/models/list_sequences200_response'
923
923
  require 'zernio-sdk/models/list_sequences200_response_sequences_inner'
924
+ require 'zernio-sdk/models/list_slack_members200_response'
925
+ require 'zernio-sdk/models/list_slack_members200_response_members_inner'
924
926
  require 'zernio-sdk/models/list_sms_opt_outs200_response'
925
927
  require 'zernio-sdk/models/list_sms_opt_outs200_response_opt_outs_inner'
926
928
  require 'zernio-sdk/models/list_sms_registrations200_response'
@@ -1179,12 +1181,13 @@ require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of3
1179
1181
  require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of4'
1180
1182
  require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of5'
1181
1183
  require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of6'
1182
- require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of6_sections_inner'
1183
- require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of6_sections_inner_product_items_inner'
1184
1184
  require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of7'
1185
- require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of7_parameters'
1185
+ require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of7_sections_inner'
1186
+ require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of7_sections_inner_product_items_inner'
1186
1187
  require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of8'
1187
- require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of8_cards_inner'
1188
+ require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of8_parameters'
1189
+ require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of9'
1190
+ require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of9_cards_inner'
1188
1191
  require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of_sections_inner'
1189
1192
  require 'zernio-sdk/models/send_inbox_message_request_interactive_action_one_of_sections_inner_rows_inner'
1190
1193
  require 'zernio-sdk/models/send_inbox_message_request_interactive_body'
@@ -1636,6 +1639,7 @@ require 'zernio-sdk/api/reddit_search_api'
1636
1639
  require 'zernio-sdk/api/reviews_api'
1637
1640
  require 'zernio-sdk/api/sms_api'
1638
1641
  require 'zernio-sdk/api/sequences_api'
1642
+ require 'zernio-sdk/api/slack_api'
1639
1643
  require 'zernio-sdk/api/tracking_tags_api'
1640
1644
  require 'zernio-sdk/api/twitter_engagement_api'
1641
1645
  require 'zernio-sdk/api/usage_api'
data/openapi.yaml CHANGED
@@ -3376,6 +3376,25 @@ components:
3376
3376
  product_retailer_id:
3377
3377
  type: string
3378
3378
  description: Retailer ID (SKU) of the product being asked about.
3379
+ contacts:
3380
+ type: array
3381
+ description: |
3382
+ WhatsApp only. Contact cards the user shared, forwarded verbatim
3383
+ from Meta. Read `contactsOrigin` before treating any number here
3384
+ as the sender's own.
3385
+ items:
3386
+ type: object
3387
+ additionalProperties: true
3388
+ contactsOrigin:
3389
+ type: string
3390
+ enum: [contact_request, other]
3391
+ description: |
3392
+ WhatsApp only. How the contact card was shared.
3393
+ `contact_request` means the user tapped a `request_contact_info`
3394
+ button, so the number is their own and consented. `other` means
3395
+ they picked a card from their address book: it may be anyone's,
3396
+ and must NOT be stored as the sender's identity. Omitted when
3397
+ Meta sends no origin.
3379
3398
  storyReply:
3380
3399
  type: object
3381
3400
  description: |
@@ -20948,6 +20967,53 @@ paths:
20948
20967
  '401': { $ref: '#/components/responses/Unauthorized' }
20949
20968
  '404': { description: Account not found }
20950
20969
 
20970
+ /v1/accounts/{accountId}/slack-members:
20971
+ get:
20972
+ operationId: listSlackMembers
20973
+ tags: [Slack]
20974
+ summary: List Slack workspace members
20975
+ description: 'Members of the connected Slack workspace that can receive a direct message, for populating a recipient picker. Bots, deactivated members and Slackbot are excluded. Start a DM by passing a member id as `participantId` to POST /v1/inbox/conversations.'
20976
+ parameters:
20977
+ - name: accountId
20978
+ in: path
20979
+ required: true
20980
+ schema: { type: string }
20981
+ - name: query
20982
+ in: query
20983
+ required: false
20984
+ description: 'Case-insensitive filter over display name and handle.'
20985
+ schema: { type: string, maxLength: 100 }
20986
+ - name: limit
20987
+ in: query
20988
+ required: false
20989
+ schema: { type: integer, minimum: 1, maximum: 2000, default: 50 }
20990
+ responses:
20991
+ '200':
20992
+ description: Workspace members
20993
+ content:
20994
+ application/json:
20995
+ schema:
20996
+ type: object
20997
+ properties:
20998
+ members:
20999
+ type: array
21000
+ items:
21001
+ type: object
21002
+ properties:
21003
+ id: { type: string, description: 'Slack member id (pass as participantId to start a DM).' }
21004
+ name: { type: string, description: Display name }
21005
+ username: { type: [string, "null"], description: Slack handle }
21006
+ picture: { type: [string, "null"], description: Avatar URL }
21007
+ example:
21008
+ members:
21009
+ - id: "U01ABCDEF"
21010
+ name: "Maria García"
21011
+ username: "maria"
21012
+ picture: "https://avatars.slack-edge.com/maria.png"
21013
+ '400': { $ref: '#/components/responses/BadRequest' }
21014
+ '401': { $ref: '#/components/responses/Unauthorized' }
21015
+ '404': { description: Slack account not found }
21016
+
20951
21017
  /v1/discord/dms:
20952
21018
  post:
20953
21019
  operationId: sendDiscordDirectMessage
@@ -22900,7 +22966,9 @@ paths:
22900
22966
  description: |
22901
22967
  Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread.
22902
22968
 
22903
- Supported platforms: X/Twitter, Bluesky, Reddit, and WhatsApp. Other platforms return PLATFORM_NOT_SUPPORTED.
22969
+ Supported platforms: X/Twitter, Bluesky, Reddit, WhatsApp, SMS, and Slack. Other platforms return PLATFORM_NOT_SUPPORTED.
22970
+
22971
+ 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.
22904
22972
 
22905
22973
  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. Calling this for a number you already have a thread with simply 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). Template fields are accepted on the JSON body only, not on multipart requests. 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.
22906
22974
 
@@ -22924,7 +22992,7 @@ paths:
22924
22992
  description: The social account ID to send from
22925
22993
  participantId:
22926
22994
  type: string
22927
- description: Recipient identifier. For X this is the numeric user ID; for WhatsApp, the recipient phone number in international format (digits, country code included). Provide either this or participantUsername.
22995
+ description: 'Recipient identifier. For X this is the numeric user ID; for WhatsApp and SMS, the recipient phone number in international format (digits, country code included); for Slack, the workspace member id (e.g. U01ABCDEF). Provide either this or participantUsername.'
22928
22996
  participantUsername:
22929
22997
  type: string
22930
22998
  description: Recipient handle/username — an X or Bluesky handle (with or without @) or a Reddit username (with or without u/). Resolved via lookup. Provide either this or participantId.
@@ -23772,6 +23840,16 @@ paths:
23772
23840
  "Send location" button; the user's reply arrives as a regular
23773
23841
  location message in the conversation.
23774
23842
 
23843
+ For `request_contact_info`, `action` may be omitted (we default it
23844
+ to `{ "name": "request_contact_info" }`). WhatsApp renders a
23845
+ localized share button that cannot be relabelled, so put the reason
23846
+ for asking in `body.text`: this is a consent prompt, and a bare
23847
+ request converts badly. The reply arrives as an inbound `contacts`
23848
+ message with `metadata.contactsOrigin` set to `contact_request`,
23849
+ and we fold the shared number back into the contact automatically.
23850
+ A `contacts` message with origin `other` is a card the user picked
23851
+ from their address book and is NOT proof of their own number.
23852
+
23775
23853
  For `catalog_message`, `action` may also be omitted (we default it
23776
23854
  to `{ "name": "catalog_message" }`).
23777
23855
 
@@ -23783,7 +23861,7 @@ paths:
23783
23861
  properties:
23784
23862
  type:
23785
23863
  type: string
23786
- enum: [list, cta_url, flow, location_request_message, voice_call, product, product_list, catalog_message, carousel]
23864
+ enum: [list, cta_url, flow, location_request_message, request_contact_info, voice_call, product, product_list, catalog_message, carousel]
23787
23865
  description: Which interactive layout to render.
23788
23866
  header:
23789
23867
  type: object
@@ -23887,6 +23965,11 @@ paths:
23887
23965
  required: [name]
23888
23966
  properties:
23889
23967
  name: { type: string, enum: [send_location] }
23968
+ - type: object
23969
+ description: 'Contact-info request action. `type` on the parent must be `request_contact_info`. May be omitted entirely; it is defaulted.'
23970
+ required: [name]
23971
+ properties:
23972
+ name: { type: string, enum: [request_contact_info] }
23890
23973
  - type: object
23891
23974
  description: |
23892
23975
  Single-product action. `type` on the parent must be
@@ -39588,6 +39671,7 @@ paths:
39588
39671
  '400': { $ref: '#/components/responses/BadRequest' }
39589
39672
  '401': { $ref: '#/components/responses/Unauthorized' }
39590
39673
  '403': { description: Ads add-on required. }
39674
+ '422': { description: "Meta rejected the lead form with error code 3. The Facebook Page normally needs a Page admin to accept the Lead Ads Terms of Service." }
39591
39675
 
39592
39676
  /v1/ads/lead-forms/{formId}:
39593
39677
  get:
@@ -48,7 +48,7 @@ describe 'MessagesApi' do
48
48
 
49
49
  # unit tests for create_inbox_conversation
50
50
  # Create conversation
51
- # Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, Bluesky, Reddit, and WhatsApp. Other platforms return PLATFORM_NOT_SUPPORTED. 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&#39;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. Calling this for a number you already have a thread with simply 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). Template fields are accepted on the JSON body only, not on multipart requests. 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: &#39;utility&#39; together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): 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/Twitter only): X&#39;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&#39;s per-number messaging tiers (unique business-initiated conversations per 24 hours) and per-number throughput instead.
51
+ # Initiate a new direct message conversation with a specified user. If a conversation already exists with the recipient, the message is added to the existing thread. Supported platforms: X/Twitter, 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&#39;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. Calling this for a number you already have a thread with simply 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). Template fields are accepted on the JSON body only, not on multipart requests. 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: &#39;utility&#39; together with message (and no templateName). See the category field below. DM eligibility (X/Twitter): 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/Twitter only): X&#39;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&#39;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]
@@ -0,0 +1,49 @@
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::SlackApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'SlackApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = Zernio::SlackApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of SlackApi' do
30
+ it 'should create an instance of SlackApi' do
31
+ expect(@api_instance).to be_instance_of(Zernio::SlackApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for list_slack_members
36
+ # List Slack workspace members
37
+ # Members of the connected Slack workspace that can receive a direct message, for populating a recipient picker. Bots, deactivated members and Slackbot are excluded. Start a DM by passing a member id as &#x60;participantId&#x60; to POST /v1/inbox/conversations.
38
+ # @param account_id
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [String] :query Case-insensitive filter over display name and handle.
41
+ # @option opts [Integer] :limit
42
+ # @return [ListSlackMembers200Response]
43
+ describe 'list_slack_members test' do
44
+ it 'should work' do
45
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
46
+ end
47
+ end
48
+
49
+ end
@@ -0,0 +1,54 @@
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
+ require 'date'
16
+
17
+ # Unit tests for Zernio::ListSlackMembers200ResponseMembersInner
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::ListSlackMembers200ResponseMembersInner do
21
+ #let(:instance) { Zernio::ListSlackMembers200ResponseMembersInner.new }
22
+
23
+ describe 'test an instance of ListSlackMembers200ResponseMembersInner' do
24
+ it 'should create an instance of ListSlackMembers200ResponseMembersInner' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::ListSlackMembers200ResponseMembersInner)
27
+ end
28
+ end
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
+
36
+ describe 'test attribute "name"' 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
+
42
+ describe 'test attribute "username"' 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
+ describe 'test attribute "picture"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ end
@@ -0,0 +1,36 @@
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
+ require 'date'
16
+
17
+ # Unit tests for Zernio::ListSlackMembers200Response
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Zernio::ListSlackMembers200Response do
21
+ #let(:instance) { Zernio::ListSlackMembers200Response.new }
22
+
23
+ describe 'test an instance of ListSlackMembers200Response' do
24
+ it 'should create an instance of ListSlackMembers200Response' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Zernio::ListSlackMembers200Response)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "members"' 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
+ end
@@ -27,15 +27,13 @@ describe Zernio::SendInboxMessageRequestInteractiveActionOneOf5 do
27
27
  end
28
28
  end
29
29
 
30
- describe 'test attribute "catalog_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
-
36
- describe 'test attribute "product_retailer_id"' do
30
+ describe 'test attribute "name"' do
37
31
  it 'should work' do
38
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["request_contact_info"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.name = value }.not_to raise_error
36
+ # end
39
37
  end
40
38
  end
41
39
 
@@ -33,7 +33,7 @@ describe Zernio::SendInboxMessageRequestInteractiveActionOneOf6 do
33
33
  end
34
34
  end
35
35
 
36
- describe 'test attribute "sections"' do
36
+ describe 'test attribute "product_retailer_id"' 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
@@ -14,16 +14,16 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner
17
+ # Unit tests for Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner do
21
- #let(:instance) { Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner.new }
20
+ describe Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner do
21
+ #let(:instance) { Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner.new }
22
22
 
23
- describe 'test an instance of SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner' do
24
- it 'should create an instance of SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner' do
23
+ describe 'test an instance of SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner' do
24
+ it 'should create an instance of SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner' do
25
25
  # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInnerProductItemsInner)
26
+ #expect(instance).to be_instance_of(Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInnerProductItemsInner)
27
27
  end
28
28
  end
29
29
 
@@ -14,16 +14,16 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInner
17
+ # Unit tests for Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInner
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInner do
21
- #let(:instance) { Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInner.new }
20
+ describe Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInner do
21
+ #let(:instance) { Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInner.new }
22
22
 
23
- describe 'test an instance of SendInboxMessageRequestInteractiveActionOneOf6SectionsInner' do
24
- it 'should create an instance of SendInboxMessageRequestInteractiveActionOneOf6SectionsInner' do
23
+ describe 'test an instance of SendInboxMessageRequestInteractiveActionOneOf7SectionsInner' do
24
+ it 'should create an instance of SendInboxMessageRequestInteractiveActionOneOf7SectionsInner' do
25
25
  # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(Zernio::SendInboxMessageRequestInteractiveActionOneOf6SectionsInner)
26
+ #expect(instance).to be_instance_of(Zernio::SendInboxMessageRequestInteractiveActionOneOf7SectionsInner)
27
27
  end
28
28
  end
29
29
 
@@ -27,17 +27,13 @@ describe Zernio::SendInboxMessageRequestInteractiveActionOneOf7 do
27
27
  end
28
28
  end
29
29
 
30
- describe 'test attribute "name"' do
30
+ describe 'test attribute "catalog_id"' do
31
31
  it 'should work' do
32
32
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
- # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["catalog_message"])
34
- # validator.allowable_values.each do |value|
35
- # expect { instance.name = value }.not_to raise_error
36
- # end
37
33
  end
38
34
  end
39
35
 
40
- describe 'test attribute "parameters"' do
36
+ describe 'test attribute "sections"' do
41
37
  it 'should work' do
42
38
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
39
  end
@@ -14,16 +14,16 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for Zernio::SendInboxMessageRequestInteractiveActionOneOf7Parameters
17
+ # Unit tests for Zernio::SendInboxMessageRequestInteractiveActionOneOf8Parameters
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe Zernio::SendInboxMessageRequestInteractiveActionOneOf7Parameters do
21
- #let(:instance) { Zernio::SendInboxMessageRequestInteractiveActionOneOf7Parameters.new }
20
+ describe Zernio::SendInboxMessageRequestInteractiveActionOneOf8Parameters do
21
+ #let(:instance) { Zernio::SendInboxMessageRequestInteractiveActionOneOf8Parameters.new }
22
22
 
23
- describe 'test an instance of SendInboxMessageRequestInteractiveActionOneOf7Parameters' do
24
- it 'should create an instance of SendInboxMessageRequestInteractiveActionOneOf7Parameters' do
23
+ describe 'test an instance of SendInboxMessageRequestInteractiveActionOneOf8Parameters' do
24
+ it 'should create an instance of SendInboxMessageRequestInteractiveActionOneOf8Parameters' do
25
25
  # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(Zernio::SendInboxMessageRequestInteractiveActionOneOf7Parameters)
26
+ #expect(instance).to be_instance_of(Zernio::SendInboxMessageRequestInteractiveActionOneOf8Parameters)
27
27
  end
28
28
  end
29
29
 
@@ -27,7 +27,17 @@ describe Zernio::SendInboxMessageRequestInteractiveActionOneOf8 do
27
27
  end
28
28
  end
29
29
 
30
- describe 'test attribute "cards"' do
30
+ describe 'test attribute "name"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["catalog_message"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.name = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "parameters"' do
31
41
  it 'should work' do
32
42
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
43
  end
@@ -14,16 +14,16 @@ require 'spec_helper'
14
14
  require 'json'
15
15
  require 'date'
16
16
 
17
- # Unit tests for Zernio::SendInboxMessageRequestInteractiveActionOneOf8CardsInner
17
+ # Unit tests for Zernio::SendInboxMessageRequestInteractiveActionOneOf9CardsInner
18
18
  # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
19
  # Please update as you see appropriate
20
- describe Zernio::SendInboxMessageRequestInteractiveActionOneOf8CardsInner do
21
- #let(:instance) { Zernio::SendInboxMessageRequestInteractiveActionOneOf8CardsInner.new }
20
+ describe Zernio::SendInboxMessageRequestInteractiveActionOneOf9CardsInner do
21
+ #let(:instance) { Zernio::SendInboxMessageRequestInteractiveActionOneOf9CardsInner.new }
22
22
 
23
- describe 'test an instance of SendInboxMessageRequestInteractiveActionOneOf8CardsInner' do
24
- it 'should create an instance of SendInboxMessageRequestInteractiveActionOneOf8CardsInner' do
23
+ describe 'test an instance of SendInboxMessageRequestInteractiveActionOneOf9CardsInner' do
24
+ it 'should create an instance of SendInboxMessageRequestInteractiveActionOneOf9CardsInner' do
25
25
  # uncomment below to test the instance creation
26
- #expect(instance).to be_instance_of(Zernio::SendInboxMessageRequestInteractiveActionOneOf8CardsInner)
26
+ #expect(instance).to be_instance_of(Zernio::SendInboxMessageRequestInteractiveActionOneOf9CardsInner)
27
27
  end
28
28
  end
29
29