late-sdk 0.0.725 → 0.0.726
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 +1 -0
- data/docs/MessagesApi.md +1 -1
- data/docs/SendInboxMessage200ResponseData.md +4 -6
- data/docs/SendInboxMessage200ResponseDataAttachmentsInner.md +20 -0
- data/lib/zernio-sdk/api/messages_api.rb +2 -2
- data/lib/zernio-sdk/models/send_inbox_message200_response_data.rb +12 -23
- data/lib/zernio-sdk/models/send_inbox_message200_response_data_attachments_inner.rb +156 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +25 -4
- data/spec/api/messages_api_spec.rb +1 -1
- data/spec/models/send_inbox_message200_response_data_attachments_inner_spec.rb +42 -0
- data/spec/models/send_inbox_message200_response_data_spec.rb +1 -7
- data/zernio-sdk-0.0.726.gem +0 -0
- metadata +6 -2
- data/zernio-sdk-0.0.725.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 389c2a6db9bcb1e1bfe4682df90c5ef3f73f8b23ee2bbb4a418ff43737c991c6
|
|
4
|
+
data.tar.gz: 6a98465ee15e882eda3f4a8ce86d943f0792388649bed0683535bd2610940128
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94468de2ca9483929a9a94a401ea2dadb816e47fbc6517901a1f9d566be02d4d3b2313ec219bb7cb763f6262e13749b11a668f7f8d027a4cb72122e0903c640c
|
|
7
|
+
data.tar.gz: 80f6f893e201edb178ced529fb411564b0740fd0256024e777bcb481f065cdd7fe653f86b95c827e7eeb674614fa1b2b24ff42a854f614944cbb212f2c24220f
|
data/README.md
CHANGED
|
@@ -1862,6 +1862,7 @@ Class | Method | HTTP request | Description
|
|
|
1862
1862
|
- [Zernio::SendDiscordDirectMessageRequestAttachmentsInner](docs/SendDiscordDirectMessageRequestAttachmentsInner.md)
|
|
1863
1863
|
- [Zernio::SendInboxMessage200Response](docs/SendInboxMessage200Response.md)
|
|
1864
1864
|
- [Zernio::SendInboxMessage200ResponseData](docs/SendInboxMessage200ResponseData.md)
|
|
1865
|
+
- [Zernio::SendInboxMessage200ResponseDataAttachmentsInner](docs/SendInboxMessage200ResponseDataAttachmentsInner.md)
|
|
1865
1866
|
- [Zernio::SendInboxMessage400Response](docs/SendInboxMessage400Response.md)
|
|
1866
1867
|
- [Zernio::SendInboxMessage400ResponsePlatformError](docs/SendInboxMessage400ResponsePlatformError.md)
|
|
1867
1868
|
- [Zernio::SendInboxMessageRequest](docs/SendInboxMessageRequest.md)
|
data/docs/MessagesApi.md
CHANGED
|
@@ -854,7 +854,7 @@ end
|
|
|
854
854
|
|
|
855
855
|
Send message
|
|
856
856
|
|
|
857
|
-
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 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.
|
|
857
|
+
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 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.
|
|
858
858
|
|
|
859
859
|
### Examples
|
|
860
860
|
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **message_id** | **String** |
|
|
8
|
-
| **conversation_id** | **String** | Twitter conversation
|
|
9
|
-
| **
|
|
10
|
-
| **message** | **String** | Success message (Reddit only) | [optional] |
|
|
7
|
+
| **message_id** | **String** | Platform id of the sent message (not returned for Reddit). For WhatsApp this is the raw Meta wamid, the same id delivered as message.platformMessageId on webhooks and delivery-status updates, and the value to pass as replyTo to quote-reply. | [optional] |
|
|
8
|
+
| **conversation_id** | **String** | Zernio conversation id, echoed so the thread can be read back or replied to. It equals the id the list-conversations endpoint returns for Telegram, WhatsApp, SMS and Slack; for Facebook, Instagram, Bluesky and Reddit that endpoint returns the platform thread id instead, so do not correlate the two by equality. For X (Twitter), when the request addressed the conversation by its Twitter dm_conversation_id, that platform id is echoed back instead. Omitted when the send succeeded but the conversation could not be resolved to a stored record. | [optional] |
|
|
9
|
+
| **attachments** | [**Array<SendInboxMessage200ResponseDataAttachmentsInner>**](SendInboxMessage200ResponseDataAttachmentsInner.md) | Echo of the sent attachment with its resolved public URL, when one is available (Facebook, Instagram, Telegram, WhatsApp). | [optional] |
|
|
11
10
|
|
|
12
11
|
## Example
|
|
13
12
|
|
|
@@ -17,8 +16,7 @@ require 'zernio-sdk'
|
|
|
17
16
|
instance = Zernio::SendInboxMessage200ResponseData.new(
|
|
18
17
|
message_id: null,
|
|
19
18
|
conversation_id: null,
|
|
20
|
-
|
|
21
|
-
message: null
|
|
19
|
+
attachments: null
|
|
22
20
|
)
|
|
23
21
|
```
|
|
24
22
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::SendInboxMessage200ResponseDataAttachmentsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **type** | **String** | | [optional] |
|
|
8
|
+
| **url** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::SendInboxMessage200ResponseDataAttachmentsInner.new(
|
|
16
|
+
type: null,
|
|
17
|
+
url: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -932,7 +932,7 @@ module Zernio
|
|
|
932
932
|
end
|
|
933
933
|
|
|
934
934
|
# Send message
|
|
935
|
-
# 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 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.
|
|
935
|
+
# 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 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.
|
|
936
936
|
# @param conversation_id [String] Opaque conversation identifier, accepted verbatim from the list endpoint or from the conversationId on inbox webhooks. Format not to be assumed.
|
|
937
937
|
# @param send_inbox_message_request [SendInboxMessageRequest]
|
|
938
938
|
# @param [Hash] opts the optional parameters
|
|
@@ -944,7 +944,7 @@ module Zernio
|
|
|
944
944
|
end
|
|
945
945
|
|
|
946
946
|
# Send message
|
|
947
|
-
# 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 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.
|
|
947
|
+
# 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 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.
|
|
948
948
|
# @param conversation_id [String] Opaque conversation identifier, accepted verbatim from the list endpoint or from the conversationId on inbox webhooks. Format not to be assumed.
|
|
949
949
|
# @param send_inbox_message_request [SendInboxMessageRequest]
|
|
950
950
|
# @param [Hash] opts the optional parameters
|
|
@@ -15,25 +15,21 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class SendInboxMessage200ResponseData < ApiModelBase
|
|
18
|
-
#
|
|
18
|
+
# Platform id of the sent message (not returned for Reddit). For WhatsApp this is the raw Meta wamid, the same id delivered as message.platformMessageId on webhooks and delivery-status updates, and the value to pass as replyTo to quote-reply.
|
|
19
19
|
attr_accessor :message_id
|
|
20
20
|
|
|
21
|
-
# Twitter conversation
|
|
21
|
+
# Zernio conversation id, echoed so the thread can be read back or replied to. It equals the id the list-conversations endpoint returns for Telegram, WhatsApp, SMS and Slack; for Facebook, Instagram, Bluesky and Reddit that endpoint returns the platform thread id instead, so do not correlate the two by equality. For X (Twitter), when the request addressed the conversation by its Twitter dm_conversation_id, that platform id is echoed back instead. Omitted when the send succeeded but the conversation could not be resolved to a stored record.
|
|
22
22
|
attr_accessor :conversation_id
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
attr_accessor :
|
|
26
|
-
|
|
27
|
-
# Success message (Reddit only)
|
|
28
|
-
attr_accessor :message
|
|
24
|
+
# Echo of the sent attachment with its resolved public URL, when one is available (Facebook, Instagram, Telegram, WhatsApp).
|
|
25
|
+
attr_accessor :attachments
|
|
29
26
|
|
|
30
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
28
|
def self.attribute_map
|
|
32
29
|
{
|
|
33
30
|
:'message_id' => :'messageId',
|
|
34
31
|
:'conversation_id' => :'conversationId',
|
|
35
|
-
:'
|
|
36
|
-
:'message' => :'message'
|
|
32
|
+
:'attachments' => :'attachments'
|
|
37
33
|
}
|
|
38
34
|
end
|
|
39
35
|
|
|
@@ -52,17 +48,13 @@ module Zernio
|
|
|
52
48
|
{
|
|
53
49
|
:'message_id' => :'String',
|
|
54
50
|
:'conversation_id' => :'String',
|
|
55
|
-
:'
|
|
56
|
-
:'message' => :'String'
|
|
51
|
+
:'attachments' => :'Array<SendInboxMessage200ResponseDataAttachmentsInner>'
|
|
57
52
|
}
|
|
58
53
|
end
|
|
59
54
|
|
|
60
55
|
# List of attributes with nullable: true
|
|
61
56
|
def self.openapi_nullable
|
|
62
57
|
Set.new([
|
|
63
|
-
:'conversation_id',
|
|
64
|
-
:'sent_at',
|
|
65
|
-
:'message'
|
|
66
58
|
])
|
|
67
59
|
end
|
|
68
60
|
|
|
@@ -90,12 +82,10 @@ module Zernio
|
|
|
90
82
|
self.conversation_id = attributes[:'conversation_id']
|
|
91
83
|
end
|
|
92
84
|
|
|
93
|
-
if attributes.key?(:'
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if attributes.key?(:'message')
|
|
98
|
-
self.message = attributes[:'message']
|
|
85
|
+
if attributes.key?(:'attachments')
|
|
86
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
|
87
|
+
self.attachments = value
|
|
88
|
+
end
|
|
99
89
|
end
|
|
100
90
|
end
|
|
101
91
|
|
|
@@ -121,8 +111,7 @@ module Zernio
|
|
|
121
111
|
self.class == o.class &&
|
|
122
112
|
message_id == o.message_id &&
|
|
123
113
|
conversation_id == o.conversation_id &&
|
|
124
|
-
|
|
125
|
-
message == o.message
|
|
114
|
+
attachments == o.attachments
|
|
126
115
|
end
|
|
127
116
|
|
|
128
117
|
# @see the `==` method
|
|
@@ -134,7 +123,7 @@ module Zernio
|
|
|
134
123
|
# Calculates hash code according to all attributes.
|
|
135
124
|
# @return [Integer] Hash code
|
|
136
125
|
def hash
|
|
137
|
-
[message_id, conversation_id,
|
|
126
|
+
[message_id, conversation_id, attachments].hash
|
|
138
127
|
end
|
|
139
128
|
|
|
140
129
|
# Builds the object from hash
|
|
@@ -0,0 +1,156 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class SendInboxMessage200ResponseDataAttachmentsInner < ApiModelBase
|
|
18
|
+
attr_accessor :type
|
|
19
|
+
|
|
20
|
+
attr_accessor :url
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'type' => :'type',
|
|
26
|
+
:'url' => :'url'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'type' => :'String',
|
|
44
|
+
:'url' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::SendInboxMessage200ResponseDataAttachmentsInner` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::SendInboxMessage200ResponseDataAttachmentsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'type')
|
|
71
|
+
self.type = attributes[:'type']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'url')
|
|
75
|
+
self.url = attributes[:'url']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
type == o.type &&
|
|
100
|
+
url == o.url
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Integer] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[type, url].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def self.build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
121
|
+
transformed_hash = {}
|
|
122
|
+
openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = nil
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
new(transformed_hash)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the object in the form of hash
|
|
139
|
+
# @return [Hash] Returns the object in the form of hash
|
|
140
|
+
def to_hash
|
|
141
|
+
hash = {}
|
|
142
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
143
|
+
value = self.send(attr)
|
|
144
|
+
if value.nil?
|
|
145
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
146
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
hash[param] = _to_hash(value)
|
|
150
|
+
end
|
|
151
|
+
hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -1237,6 +1237,7 @@ require 'zernio-sdk/models/send_discord_direct_message_request'
|
|
|
1237
1237
|
require 'zernio-sdk/models/send_discord_direct_message_request_attachments_inner'
|
|
1238
1238
|
require 'zernio-sdk/models/send_inbox_message200_response'
|
|
1239
1239
|
require 'zernio-sdk/models/send_inbox_message200_response_data'
|
|
1240
|
+
require 'zernio-sdk/models/send_inbox_message200_response_data_attachments_inner'
|
|
1240
1241
|
require 'zernio-sdk/models/send_inbox_message400_response'
|
|
1241
1242
|
require 'zernio-sdk/models/send_inbox_message400_response_platform_error'
|
|
1242
1243
|
require 'zernio-sdk/models/send_inbox_message_request'
|
data/openapi.yaml
CHANGED
|
@@ -25894,6 +25894,17 @@ paths:
|
|
|
25894
25894
|
instead of sending the message a second time; same key + different body
|
|
25895
25895
|
returns 422; a key still in flight returns 409. Works for JSON and
|
|
25896
25896
|
multipart (file upload) requests alike. Keys are retained for 24 hours.
|
|
25897
|
+
|
|
25898
|
+
Only successful (2xx) responses are stored for replay: if the request
|
|
25899
|
+
throws or returns a non-2xx status, the key is released so the same key
|
|
25900
|
+
can be retried once the problem is fixed. The header therefore protects
|
|
25901
|
+
the "request succeeded but the response was lost" case. For an ambiguous
|
|
25902
|
+
failure (a 5xx or a network timeout), reconcile before retrying: a
|
|
25903
|
+
failure after the platform already accepted the message also releases
|
|
25904
|
+
the key, and a blind retry could send it twice. List the conversation's
|
|
25905
|
+
messages first, and treat an empty result as inconclusive rather than
|
|
25906
|
+
as proof nothing was sent, since a send that failed while being recorded
|
|
25907
|
+
leaves no trace on our side.
|
|
25897
25908
|
tags: [Messages]
|
|
25898
25909
|
security: [{ bearerAuth: [] }]
|
|
25899
25910
|
parameters:
|
|
@@ -26434,10 +26445,20 @@ paths:
|
|
|
26434
26445
|
data:
|
|
26435
26446
|
type: object
|
|
26436
26447
|
properties:
|
|
26437
|
-
messageId:
|
|
26438
|
-
|
|
26439
|
-
|
|
26440
|
-
|
|
26448
|
+
messageId:
|
|
26449
|
+
type: string
|
|
26450
|
+
description: 'Platform id of the sent message (not returned for Reddit). For WhatsApp this is the raw Meta wamid, the same id delivered as message.platformMessageId on webhooks and delivery-status updates, and the value to pass as replyTo to quote-reply.'
|
|
26451
|
+
conversationId:
|
|
26452
|
+
type: string
|
|
26453
|
+
description: 'Zernio conversation id, echoed so the thread can be read back or replied to. It equals the id the list-conversations endpoint returns for Telegram, WhatsApp, SMS and Slack; for Facebook, Instagram, Bluesky and Reddit that endpoint returns the platform thread id instead, so do not correlate the two by equality. For X (Twitter), when the request addressed the conversation by its Twitter dm_conversation_id, that platform id is echoed back instead. Omitted when the send succeeded but the conversation could not be resolved to a stored record.'
|
|
26454
|
+
attachments:
|
|
26455
|
+
type: array
|
|
26456
|
+
description: 'Echo of the sent attachment with its resolved public URL, when one is available (Facebook, Instagram, Telegram, WhatsApp).'
|
|
26457
|
+
items:
|
|
26458
|
+
type: object
|
|
26459
|
+
properties:
|
|
26460
|
+
type: { type: string }
|
|
26461
|
+
url: { type: string }
|
|
26441
26462
|
'400':
|
|
26442
26463
|
description: 'Bad request (e.g., attachment not supported for platform, validation error, category combined with a template or attachment, category used on a non-WhatsApp account, or the WhatsApp Business Account is not eligible for Direct Send)'
|
|
26443
26464
|
content:
|
|
@@ -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 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.
|
|
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 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.
|
|
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,42 @@
|
|
|
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::SendInboxMessage200ResponseDataAttachmentsInner
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::SendInboxMessage200ResponseDataAttachmentsInner do
|
|
21
|
+
#let(:instance) { Zernio::SendInboxMessage200ResponseDataAttachmentsInner.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of SendInboxMessage200ResponseDataAttachmentsInner' do
|
|
24
|
+
it 'should create an instance of SendInboxMessage200ResponseDataAttachmentsInner' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::SendInboxMessage200ResponseDataAttachmentsInner)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "type"' 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 "url"' 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
|
+
end
|
|
@@ -39,13 +39,7 @@ describe Zernio::SendInboxMessage200ResponseData do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
describe 'test attribute "
|
|
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 "message"' do
|
|
42
|
+
describe 'test attribute "attachments"' do
|
|
49
43
|
it 'should work' do
|
|
50
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
45
|
end
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: late-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.726
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -1330,6 +1330,7 @@ files:
|
|
|
1330
1330
|
- docs/SendDiscordDirectMessageRequestAttachmentsInner.md
|
|
1331
1331
|
- docs/SendInboxMessage200Response.md
|
|
1332
1332
|
- docs/SendInboxMessage200ResponseData.md
|
|
1333
|
+
- docs/SendInboxMessage200ResponseDataAttachmentsInner.md
|
|
1333
1334
|
- docs/SendInboxMessage400Response.md
|
|
1334
1335
|
- docs/SendInboxMessage400ResponsePlatformError.md
|
|
1335
1336
|
- docs/SendInboxMessageRequest.md
|
|
@@ -3110,6 +3111,7 @@ files:
|
|
|
3110
3111
|
- lib/zernio-sdk/models/send_discord_direct_message_request_attachments_inner.rb
|
|
3111
3112
|
- lib/zernio-sdk/models/send_inbox_message200_response.rb
|
|
3112
3113
|
- lib/zernio-sdk/models/send_inbox_message200_response_data.rb
|
|
3114
|
+
- lib/zernio-sdk/models/send_inbox_message200_response_data_attachments_inner.rb
|
|
3113
3115
|
- lib/zernio-sdk/models/send_inbox_message400_response.rb
|
|
3114
3116
|
- lib/zernio-sdk/models/send_inbox_message400_response_platform_error.rb
|
|
3115
3117
|
- lib/zernio-sdk/models/send_inbox_message_request.rb
|
|
@@ -4864,6 +4866,7 @@ files:
|
|
|
4864
4866
|
- spec/models/send_discord_direct_message200_response_spec.rb
|
|
4865
4867
|
- spec/models/send_discord_direct_message_request_attachments_inner_spec.rb
|
|
4866
4868
|
- spec/models/send_discord_direct_message_request_spec.rb
|
|
4869
|
+
- spec/models/send_inbox_message200_response_data_attachments_inner_spec.rb
|
|
4867
4870
|
- spec/models/send_inbox_message200_response_data_spec.rb
|
|
4868
4871
|
- spec/models/send_inbox_message200_response_spec.rb
|
|
4869
4872
|
- spec/models/send_inbox_message400_response_platform_error_spec.rb
|
|
@@ -5336,7 +5339,7 @@ files:
|
|
|
5336
5339
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
5337
5340
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
5338
5341
|
- spec/spec_helper.rb
|
|
5339
|
-
- zernio-sdk-0.0.
|
|
5342
|
+
- zernio-sdk-0.0.726.gem
|
|
5340
5343
|
- zernio-sdk.gemspec
|
|
5341
5344
|
homepage: https://openapi-generator.tech
|
|
5342
5345
|
licenses:
|
|
@@ -6639,6 +6642,7 @@ test_files:
|
|
|
6639
6642
|
- spec/models/ad_tree_campaign_budget_spec.rb
|
|
6640
6643
|
- spec/models/add_message_reaction_request_spec.rb
|
|
6641
6644
|
- spec/models/add_users_to_ad_audience_request_users_inner_spec.rb
|
|
6645
|
+
- spec/models/send_inbox_message200_response_data_attachments_inner_spec.rb
|
|
6642
6646
|
- spec/models/create_sequence200_response_sequence_spec.rb
|
|
6643
6647
|
- spec/models/get_linked_in_organizations200_response_organizations_inner_spec.rb
|
|
6644
6648
|
- spec/models/instagram_account_insights_response_metrics_value_values_inner_spec.rb
|
data/zernio-sdk-0.0.725.gem
DELETED
|
Binary file
|