late-sdk 0.0.766 → 0.0.768
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/ListUsers200ResponseUsersInner.md +3 -1
- data/docs/WebhookEventsApi.md +1 -1
- data/docs/WebhookPayloadMessageMetadata.md +1 -1
- data/docs/WebhookPayloadMessageSent.md +2 -0
- data/docs/WebhookPayloadMessageSentMessage.md +1 -1
- data/docs/WebhookPayloadMessageSentMetadata.md +20 -0
- data/lib/zernio-sdk/api/webhook_events_api.rb +2 -2
- data/lib/zernio-sdk/models/list_users200_response_users_inner.rb +14 -4
- data/lib/zernio-sdk/models/webhook_payload_message_metadata.rb +1 -1
- data/lib/zernio-sdk/models/webhook_payload_message_sent.rb +10 -1
- data/lib/zernio-sdk/models/webhook_payload_message_sent_message.rb +3 -2
- data/lib/zernio-sdk/models/webhook_payload_message_sent_metadata.rb +159 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +34 -4
- data/spec/models/list_users200_response_users_inner_spec.rb +6 -0
- data/spec/models/webhook_payload_message_sent_message_spec.rb +1 -1
- data/spec/models/webhook_payload_message_sent_metadata_spec.rb +42 -0
- data/spec/models/webhook_payload_message_sent_spec.rb +6 -0
- data/zernio-sdk-0.0.768.gem +0 -0
- metadata +6 -2
- data/zernio-sdk-0.0.766.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: e94f9974d6131f44f791483e26a4db043d98ee85fabfa5c90f072adf04d74031
|
|
4
|
+
data.tar.gz: 4b50679bf32de30aa83ee7b2ad2f7bab2a2499ea2d378899ef80a0e1ca050b7b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2267a71ee03e232066195448cd701d47bb0145d5fc2a43b7a86e3afd8896a69c6a0deef5d169679942c51b6d3d78e4eb234cb7fecbabc0e9ef7bc7cce64d46ca
|
|
7
|
+
data.tar.gz: 4fa47ccefccdd3c2f4c769e6de2a3481be7940094d8fd9276b01eb8690f88083e53ca6ac9131692d6a34362f320a30126bba198d579b93be1bad76baf0db7fe7
|
data/README.md
CHANGED
|
@@ -2301,6 +2301,7 @@ Class | Method | HTTP request | Description
|
|
|
2301
2301
|
- [Zernio::WebhookPayloadMessageSentMessage](docs/WebhookPayloadMessageSentMessage.md)
|
|
2302
2302
|
- [Zernio::WebhookPayloadMessageSentMessageAttachmentsInner](docs/WebhookPayloadMessageSentMessageAttachmentsInner.md)
|
|
2303
2303
|
- [Zernio::WebhookPayloadMessageSentMessageSender](docs/WebhookPayloadMessageSentMessageSender.md)
|
|
2304
|
+
- [Zernio::WebhookPayloadMessageSentMetadata](docs/WebhookPayloadMessageSentMetadata.md)
|
|
2304
2305
|
- [Zernio::WebhookPayloadPost](docs/WebhookPayloadPost.md)
|
|
2305
2306
|
- [Zernio::WebhookPayloadPostPlatform](docs/WebhookPayloadPostPlatform.md)
|
|
2306
2307
|
- [Zernio::WebhookPayloadPostPlatformAccount](docs/WebhookPayloadPostPlatformAccount.md)
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| **is_root** | **Boolean** | | [optional] |
|
|
12
12
|
| **profile_access** | **Array<String>** | | [optional] |
|
|
13
13
|
| **created_at** | **Time** | | [optional] |
|
|
14
|
+
| **last_login_at** | **Time** | Last sign-in, stamped at most once an hour, so it is accurate to within an hour rather than to the exact session. Omitted for members with no recorded sign-in since the field shipped, which does not mean they never signed in. | [optional] |
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -24,7 +25,8 @@ instance = Zernio::ListUsers200ResponseUsersInner.new(
|
|
|
24
25
|
role: null,
|
|
25
26
|
is_root: null,
|
|
26
27
|
profile_access: null,
|
|
27
|
-
created_at: null
|
|
28
|
+
created_at: null,
|
|
29
|
+
last_login_at: null
|
|
28
30
|
)
|
|
29
31
|
```
|
|
30
32
|
|
data/docs/WebhookEventsApi.md
CHANGED
|
@@ -1218,7 +1218,7 @@ nil (empty response body)
|
|
|
1218
1218
|
|
|
1219
1219
|
Message sent event
|
|
1220
1220
|
|
|
1221
|
-
Fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers.
|
|
1221
|
+
Fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers. Sends that carry platform-specific context deliver it under `metadata`, so a quote-reply arrives with `metadata.quotedMessageId` and mirroring CRMs can thread it without a lookup.
|
|
1222
1222
|
|
|
1223
1223
|
### Examples
|
|
1224
1224
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **quoted_message_id** | **String** | platformMessageId of the message this one is a quote-reply to. WhatsApp (`context.id`), Instagram and Facebook Messenger (`reply_to.mid`).
|
|
7
|
+
| **quoted_message_id** | **String** | platformMessageId of the message this one is a quote-reply to. WhatsApp (`context.id`), Instagram and Facebook Messenger (`reply_to.mid`). Outgoing quote-replies carry the same field on `message.sent`; see WebhookPayloadMessageSent.metadata. | [optional] |
|
|
8
8
|
| **quick_reply_payload** | **String** | Payload from a quick reply tap (Facebook/Instagram Messenger). | [optional] |
|
|
9
9
|
| **postback_payload** | **String** | Payload from a postback button tap (Facebook/Instagram Messenger). | [optional] |
|
|
10
10
|
| **postback_title** | **String** | Title of the tapped postback button (Facebook/Instagram Messenger). | [optional] |
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| **message** | [**WebhookPayloadMessageSentMessage**](WebhookPayloadMessageSentMessage.md) | | |
|
|
10
10
|
| **conversation** | [**InboxWebhookConversation**](InboxWebhookConversation.md) | | |
|
|
11
11
|
| **account** | [**InboxWebhookAccount**](InboxWebhookAccount.md) | | |
|
|
12
|
+
| **metadata** | [**WebhookPayloadMessageSentMetadata**](WebhookPayloadMessageSentMetadata.md) | | [optional] |
|
|
12
13
|
| **timestamp** | **Time** | UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt. | |
|
|
13
14
|
|
|
14
15
|
## Example
|
|
@@ -22,6 +23,7 @@ instance = Zernio::WebhookPayloadMessageSent.new(
|
|
|
22
23
|
message: null,
|
|
23
24
|
conversation: null,
|
|
24
25
|
account: null,
|
|
26
|
+
metadata: null,
|
|
25
27
|
timestamp: null
|
|
26
28
|
)
|
|
27
29
|
```
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **id** | **String** | Internal message ID | |
|
|
8
8
|
| **conversation_id** | **String** | Internal conversation ID | |
|
|
9
|
-
| **platform** | **String** |
|
|
9
|
+
| **platform** | **String** | Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent. | |
|
|
10
10
|
| **platform_message_id** | **String** | Platform's message ID | |
|
|
11
11
|
| **direction** | **String** | | |
|
|
12
12
|
| **text** | **String** | Message text content | |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::WebhookPayloadMessageSentMetadata
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **quoted_message_id** | **String** | platformMessageId of the message this send is a quote-reply to. Set when the reply was sent through Zernio with `replyTo` on the inbox send API (WhatsApp and Telegram), and when the operator replied from the native WhatsApp Business, Instagram or Messenger app. WhatsApp API sends carry it on the event fired from the delivery status, so it arrives on the same `message.sent` as any other WhatsApp send. | [optional] |
|
|
8
|
+
| **thread_ts** | **String** | Slack only. Parent thread ts of the sent message. Pass it back as `replyTo` on the inbox send API to keep replying inside the thread. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::WebhookPayloadMessageSentMetadata.new(
|
|
16
|
+
quoted_message_id: null,
|
|
17
|
+
thread_ts: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -1142,7 +1142,7 @@ module Zernio
|
|
|
1142
1142
|
end
|
|
1143
1143
|
|
|
1144
1144
|
# Message sent event
|
|
1145
|
-
# Fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers.
|
|
1145
|
+
# Fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers. Sends that carry platform-specific context deliver it under `metadata`, so a quote-reply arrives with `metadata.quotedMessageId` and mirroring CRMs can thread it without a lookup.
|
|
1146
1146
|
# @param webhook_payload_message_sent [WebhookPayloadMessageSent]
|
|
1147
1147
|
# @param [Hash] opts the optional parameters
|
|
1148
1148
|
# @return [nil]
|
|
@@ -1152,7 +1152,7 @@ module Zernio
|
|
|
1152
1152
|
end
|
|
1153
1153
|
|
|
1154
1154
|
# Message sent event
|
|
1155
|
-
# Fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers.
|
|
1155
|
+
# Fired when a message is sent via the API, or from the WhatsApp Business app on Coexistence numbers. Sends that carry platform-specific context deliver it under `metadata`, so a quote-reply arrives with `metadata.quotedMessageId` and mirroring CRMs can thread it without a lookup.
|
|
1156
1156
|
# @param webhook_payload_message_sent [WebhookPayloadMessageSent]
|
|
1157
1157
|
# @param [Hash] opts the optional parameters
|
|
1158
1158
|
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
@@ -29,6 +29,9 @@ module Zernio
|
|
|
29
29
|
|
|
30
30
|
attr_accessor :created_at
|
|
31
31
|
|
|
32
|
+
# Last sign-in, stamped at most once an hour, so it is accurate to within an hour rather than to the exact session. Omitted for members with no recorded sign-in since the field shipped, which does not mean they never signed in.
|
|
33
|
+
attr_accessor :last_login_at
|
|
34
|
+
|
|
32
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
33
36
|
def self.attribute_map
|
|
34
37
|
{
|
|
@@ -38,7 +41,8 @@ module Zernio
|
|
|
38
41
|
:'role' => :'role',
|
|
39
42
|
:'is_root' => :'isRoot',
|
|
40
43
|
:'profile_access' => :'profileAccess',
|
|
41
|
-
:'created_at' => :'createdAt'
|
|
44
|
+
:'created_at' => :'createdAt',
|
|
45
|
+
:'last_login_at' => :'lastLoginAt'
|
|
42
46
|
}
|
|
43
47
|
end
|
|
44
48
|
|
|
@@ -61,7 +65,8 @@ module Zernio
|
|
|
61
65
|
:'role' => :'String',
|
|
62
66
|
:'is_root' => :'Boolean',
|
|
63
67
|
:'profile_access' => :'Array<String>',
|
|
64
|
-
:'created_at' => :'Time'
|
|
68
|
+
:'created_at' => :'Time',
|
|
69
|
+
:'last_login_at' => :'Time'
|
|
65
70
|
}
|
|
66
71
|
end
|
|
67
72
|
|
|
@@ -116,6 +121,10 @@ module Zernio
|
|
|
116
121
|
if attributes.key?(:'created_at')
|
|
117
122
|
self.created_at = attributes[:'created_at']
|
|
118
123
|
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'last_login_at')
|
|
126
|
+
self.last_login_at = attributes[:'last_login_at']
|
|
127
|
+
end
|
|
119
128
|
end
|
|
120
129
|
|
|
121
130
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -144,7 +153,8 @@ module Zernio
|
|
|
144
153
|
role == o.role &&
|
|
145
154
|
is_root == o.is_root &&
|
|
146
155
|
profile_access == o.profile_access &&
|
|
147
|
-
created_at == o.created_at
|
|
156
|
+
created_at == o.created_at &&
|
|
157
|
+
last_login_at == o.last_login_at
|
|
148
158
|
end
|
|
149
159
|
|
|
150
160
|
# @see the `==` method
|
|
@@ -156,7 +166,7 @@ module Zernio
|
|
|
156
166
|
# Calculates hash code according to all attributes.
|
|
157
167
|
# @return [Integer] Hash code
|
|
158
168
|
def hash
|
|
159
|
-
[_id, name, email, role, is_root, profile_access, created_at].hash
|
|
169
|
+
[_id, name, email, role, is_root, profile_access, created_at, last_login_at].hash
|
|
160
170
|
end
|
|
161
171
|
|
|
162
172
|
# Builds the object from hash
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Zernio
|
|
17
17
|
# Platform-specific message context (present when the message is a quick reply tap, postback button tap, inline keyboard callback, or a quote-reply to an earlier message)
|
|
18
18
|
class WebhookPayloadMessageMetadata < ApiModelBase
|
|
19
|
-
# platformMessageId of the message this one is a quote-reply to. WhatsApp (`context.id`), Instagram and Facebook Messenger (`reply_to.mid`).
|
|
19
|
+
# platformMessageId of the message this one is a quote-reply to. WhatsApp (`context.id`), Instagram and Facebook Messenger (`reply_to.mid`). Outgoing quote-replies carry the same field on `message.sent`; see WebhookPayloadMessageSent.metadata.
|
|
20
20
|
attr_accessor :quoted_message_id
|
|
21
21
|
|
|
22
22
|
# Payload from a quick reply tap (Facebook/Instagram Messenger).
|
|
@@ -27,6 +27,8 @@ module Zernio
|
|
|
27
27
|
|
|
28
28
|
attr_accessor :account
|
|
29
29
|
|
|
30
|
+
attr_accessor :metadata
|
|
31
|
+
|
|
30
32
|
# UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt.
|
|
31
33
|
attr_accessor :timestamp
|
|
32
34
|
|
|
@@ -60,6 +62,7 @@ module Zernio
|
|
|
60
62
|
:'message' => :'message',
|
|
61
63
|
:'conversation' => :'conversation',
|
|
62
64
|
:'account' => :'account',
|
|
65
|
+
:'metadata' => :'metadata',
|
|
63
66
|
:'timestamp' => :'timestamp'
|
|
64
67
|
}
|
|
65
68
|
end
|
|
@@ -82,6 +85,7 @@ module Zernio
|
|
|
82
85
|
:'message' => :'WebhookPayloadMessageSentMessage',
|
|
83
86
|
:'conversation' => :'InboxWebhookConversation',
|
|
84
87
|
:'account' => :'InboxWebhookAccount',
|
|
88
|
+
:'metadata' => :'WebhookPayloadMessageSentMetadata',
|
|
85
89
|
:'timestamp' => :'Time'
|
|
86
90
|
}
|
|
87
91
|
end
|
|
@@ -138,6 +142,10 @@ module Zernio
|
|
|
138
142
|
self.account = nil
|
|
139
143
|
end
|
|
140
144
|
|
|
145
|
+
if attributes.key?(:'metadata')
|
|
146
|
+
self.metadata = attributes[:'metadata']
|
|
147
|
+
end
|
|
148
|
+
|
|
141
149
|
if attributes.key?(:'timestamp')
|
|
142
150
|
self.timestamp = attributes[:'timestamp']
|
|
143
151
|
else
|
|
@@ -262,6 +270,7 @@ module Zernio
|
|
|
262
270
|
message == o.message &&
|
|
263
271
|
conversation == o.conversation &&
|
|
264
272
|
account == o.account &&
|
|
273
|
+
metadata == o.metadata &&
|
|
265
274
|
timestamp == o.timestamp
|
|
266
275
|
end
|
|
267
276
|
|
|
@@ -274,7 +283,7 @@ module Zernio
|
|
|
274
283
|
# Calculates hash code according to all attributes.
|
|
275
284
|
# @return [Integer] Hash code
|
|
276
285
|
def hash
|
|
277
|
-
[id, event, message, conversation, account, timestamp].hash
|
|
286
|
+
[id, event, message, conversation, account, metadata, timestamp].hash
|
|
278
287
|
end
|
|
279
288
|
|
|
280
289
|
# Builds the object from hash
|
|
@@ -21,6 +21,7 @@ module Zernio
|
|
|
21
21
|
# Internal conversation ID
|
|
22
22
|
attr_accessor :conversation_id
|
|
23
23
|
|
|
24
|
+
# Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.
|
|
24
25
|
attr_accessor :platform
|
|
25
26
|
|
|
26
27
|
# Platform's message ID
|
|
@@ -250,7 +251,7 @@ module Zernio
|
|
|
250
251
|
return false if @id.nil?
|
|
251
252
|
return false if @conversation_id.nil?
|
|
252
253
|
return false if @platform.nil?
|
|
253
|
-
platform_validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "telegram", "whatsapp"])
|
|
254
|
+
platform_validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "telegram", "whatsapp", "twitter", "reddit", "bluesky", "slack"])
|
|
254
255
|
return false unless platform_validator.valid?(@platform)
|
|
255
256
|
return false if @platform_message_id.nil?
|
|
256
257
|
return false if @direction.nil?
|
|
@@ -288,7 +289,7 @@ module Zernio
|
|
|
288
289
|
# Custom attribute writer method checking allowed values (enum).
|
|
289
290
|
# @param [Object] platform Object to be assigned
|
|
290
291
|
def platform=(platform)
|
|
291
|
-
validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "telegram", "whatsapp"])
|
|
292
|
+
validator = EnumAttributeValidator.new('String', ["instagram", "facebook", "telegram", "whatsapp", "twitter", "reddit", "bluesky", "slack"])
|
|
292
293
|
unless validator.valid?(platform)
|
|
293
294
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
294
295
|
end
|
|
@@ -0,0 +1,159 @@
|
|
|
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 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
# Platform-specific context for the sent message. The key is present only when the send carried some context, and absent otherwise: it is never null and never an empty object.
|
|
18
|
+
class WebhookPayloadMessageSentMetadata < ApiModelBase
|
|
19
|
+
# platformMessageId of the message this send is a quote-reply to. Set when the reply was sent through Zernio with `replyTo` on the inbox send API (WhatsApp and Telegram), and when the operator replied from the native WhatsApp Business, Instagram or Messenger app. WhatsApp API sends carry it on the event fired from the delivery status, so it arrives on the same `message.sent` as any other WhatsApp send.
|
|
20
|
+
attr_accessor :quoted_message_id
|
|
21
|
+
|
|
22
|
+
# Slack only. Parent thread ts of the sent message. Pass it back as `replyTo` on the inbox send API to keep replying inside the thread.
|
|
23
|
+
attr_accessor :thread_ts
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'quoted_message_id' => :'quotedMessageId',
|
|
29
|
+
:'thread_ts' => :'threadTs'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'quoted_message_id' => :'String',
|
|
47
|
+
:'thread_ts' => :'String'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::WebhookPayloadMessageSentMetadata` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::WebhookPayloadMessageSentMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'quoted_message_id')
|
|
74
|
+
self.quoted_message_id = attributes[:'quoted_message_id']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'thread_ts')
|
|
78
|
+
self.thread_ts = attributes[:'thread_ts']
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
83
|
+
# @return Array for valid properties with the reasons
|
|
84
|
+
def list_invalid_properties
|
|
85
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
86
|
+
invalid_properties = Array.new
|
|
87
|
+
invalid_properties
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Check to see if the all the properties in the model are valid
|
|
91
|
+
# @return true if the model is valid
|
|
92
|
+
def valid?
|
|
93
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def ==(o)
|
|
100
|
+
return true if self.equal?(o)
|
|
101
|
+
self.class == o.class &&
|
|
102
|
+
quoted_message_id == o.quoted_message_id &&
|
|
103
|
+
thread_ts == o.thread_ts
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @see the `==` method
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def eql?(o)
|
|
109
|
+
self == o
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Calculates hash code according to all attributes.
|
|
113
|
+
# @return [Integer] Hash code
|
|
114
|
+
def hash
|
|
115
|
+
[quoted_message_id, thread_ts].hash
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def self.build_from_hash(attributes)
|
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
124
|
+
transformed_hash = {}
|
|
125
|
+
openapi_types.each_pair do |key, type|
|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
127
|
+
transformed_hash["#{key}"] = nil
|
|
128
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
129
|
+
# check to ensure the input is an array given that the attribute
|
|
130
|
+
# is documented as an array but the input is not
|
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
133
|
+
end
|
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
new(transformed_hash)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Returns the object in the form of hash
|
|
142
|
+
# @return [Hash] Returns the object in the form of hash
|
|
143
|
+
def to_hash
|
|
144
|
+
hash = {}
|
|
145
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
146
|
+
value = self.send(attr)
|
|
147
|
+
if value.nil?
|
|
148
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
149
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
hash[param] = _to_hash(value)
|
|
153
|
+
end
|
|
154
|
+
hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -1653,6 +1653,7 @@ require 'zernio-sdk/models/webhook_payload_message_sent'
|
|
|
1653
1653
|
require 'zernio-sdk/models/webhook_payload_message_sent_message'
|
|
1654
1654
|
require 'zernio-sdk/models/webhook_payload_message_sent_message_attachments_inner'
|
|
1655
1655
|
require 'zernio-sdk/models/webhook_payload_message_sent_message_sender'
|
|
1656
|
+
require 'zernio-sdk/models/webhook_payload_message_sent_metadata'
|
|
1656
1657
|
require 'zernio-sdk/models/webhook_payload_post'
|
|
1657
1658
|
require 'zernio-sdk/models/webhook_payload_post_platform'
|
|
1658
1659
|
require 'zernio-sdk/models/webhook_payload_post_platform_account'
|
data/openapi.yaml
CHANGED
|
@@ -3676,8 +3676,8 @@ components:
|
|
|
3676
3676
|
description: |
|
|
3677
3677
|
platformMessageId of the message this one is a quote-reply to.
|
|
3678
3678
|
WhatsApp (`context.id`), Instagram and Facebook Messenger
|
|
3679
|
-
(`reply_to.mid`).
|
|
3680
|
-
|
|
3679
|
+
(`reply_to.mid`). Outgoing quote-replies carry the same field on
|
|
3680
|
+
`message.sent`; see WebhookPayloadMessageSent.metadata.
|
|
3681
3681
|
quickReplyPayload:
|
|
3682
3682
|
type: string
|
|
3683
3683
|
description: Payload from a quick reply tap (Facebook/Instagram Messenger).
|
|
@@ -3964,7 +3964,8 @@ components:
|
|
|
3964
3964
|
description: Internal conversation ID
|
|
3965
3965
|
platform:
|
|
3966
3966
|
type: string
|
|
3967
|
-
enum: [instagram, facebook, telegram, whatsapp]
|
|
3967
|
+
enum: [instagram, facebook, telegram, whatsapp, twitter, reddit, bluesky, slack]
|
|
3968
|
+
description: 'Every platform whose outgoing messages Zernio observes. sms is absent on purpose: its carrier receipts update delivery status and never raise message.sent.'
|
|
3968
3969
|
platformMessageId:
|
|
3969
3970
|
type: string
|
|
3970
3971
|
description: Platform's message ID
|
|
@@ -4024,6 +4025,25 @@ components:
|
|
|
4024
4025
|
$ref: '#/components/schemas/InboxWebhookConversation'
|
|
4025
4026
|
account:
|
|
4026
4027
|
$ref: '#/components/schemas/InboxWebhookAccount'
|
|
4028
|
+
metadata:
|
|
4029
|
+
type: object
|
|
4030
|
+
description: 'Platform-specific context for the sent message. The key is present only when the send carried some context, and absent otherwise: it is never null and never an empty object.'
|
|
4031
|
+
properties:
|
|
4032
|
+
quotedMessageId:
|
|
4033
|
+
type: string
|
|
4034
|
+
description: |
|
|
4035
|
+
platformMessageId of the message this send is a quote-reply to.
|
|
4036
|
+
Set when the reply was sent through Zernio with `replyTo` on the
|
|
4037
|
+
inbox send API (WhatsApp and Telegram), and when the operator
|
|
4038
|
+
replied from the native WhatsApp Business, Instagram or Messenger
|
|
4039
|
+
app. WhatsApp API sends carry it on the event fired from the
|
|
4040
|
+
delivery status, so it arrives on the same `message.sent` as any
|
|
4041
|
+
other WhatsApp send.
|
|
4042
|
+
threadTs:
|
|
4043
|
+
type: string
|
|
4044
|
+
description: |
|
|
4045
|
+
Slack only. Parent thread ts of the sent message. Pass it back as
|
|
4046
|
+
`replyTo` on the inbox send API to keep replying inside the thread.
|
|
4027
4047
|
timestamp:
|
|
4028
4048
|
type: string
|
|
4029
4049
|
format: date-time
|
|
@@ -9267,7 +9287,11 @@ webhooks:
|
|
|
9267
9287
|
post:
|
|
9268
9288
|
operationId: onMessageSent
|
|
9269
9289
|
summary: Message sent event
|
|
9270
|
-
description:
|
|
9290
|
+
description: |
|
|
9291
|
+
Fired when a message is sent via the API, or from the WhatsApp Business app on
|
|
9292
|
+
Coexistence numbers. Sends that carry platform-specific context deliver it under
|
|
9293
|
+
`metadata`, so a quote-reply arrives with `metadata.quotedMessageId` and mirroring
|
|
9294
|
+
CRMs can thread it without a lookup.
|
|
9271
9295
|
tags: [Webhook Events]
|
|
9272
9296
|
requestBody:
|
|
9273
9297
|
required: true
|
|
@@ -15605,6 +15629,10 @@ paths:
|
|
|
15605
15629
|
type: array
|
|
15606
15630
|
items: { type: string }
|
|
15607
15631
|
createdAt: { type: string, format: date-time }
|
|
15632
|
+
lastLoginAt:
|
|
15633
|
+
type: string
|
|
15634
|
+
format: date-time
|
|
15635
|
+
description: 'Last sign-in, stamped at most once an hour, so it is accurate to within an hour rather than to the exact session. Omitted for members with no recorded sign-in since the field shipped, which does not mean they never signed in.'
|
|
15608
15636
|
example:
|
|
15609
15637
|
currentUserId: "6507a1b2c3d4e5f6a7b8c9d0"
|
|
15610
15638
|
users:
|
|
@@ -15615,6 +15643,7 @@ paths:
|
|
|
15615
15643
|
isRoot: true
|
|
15616
15644
|
profileAccess: ["all"]
|
|
15617
15645
|
createdAt: "2024-01-15T10:30:00Z"
|
|
15646
|
+
lastLoginAt: "2024-06-02T09:12:00Z"
|
|
15618
15647
|
- _id: "6507a1b2c3d4e5f6a7b8c9d1"
|
|
15619
15648
|
name: "Jane Smith"
|
|
15620
15649
|
email: "jane@example.com"
|
|
@@ -15624,6 +15653,7 @@ paths:
|
|
|
15624
15653
|
- "64f0a1b2c3d4e5f6a7b8c9d0"
|
|
15625
15654
|
- "64f0a1b2c3d4e5f6a7b8c9d1"
|
|
15626
15655
|
createdAt: "2024-03-20T14:45:00Z"
|
|
15656
|
+
lastLoginAt: "2024-05-28T16:03:00Z"
|
|
15627
15657
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
15628
15658
|
/v1/users/{userId}:
|
|
15629
15659
|
get:
|
|
@@ -69,4 +69,10 @@ describe Zernio::ListUsers200ResponseUsersInner do
|
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
describe 'test attribute "last_login_at"' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
72
78
|
end
|
|
@@ -42,7 +42,7 @@ describe Zernio::WebhookPayloadMessageSentMessage do
|
|
|
42
42
|
describe 'test attribute "platform"' do
|
|
43
43
|
it 'should work' do
|
|
44
44
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["instagram", "facebook", "telegram", "whatsapp"])
|
|
45
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["instagram", "facebook", "telegram", "whatsapp", "twitter", "reddit", "bluesky", "slack"])
|
|
46
46
|
# validator.allowable_values.each do |value|
|
|
47
47
|
# expect { instance.platform = value }.not_to raise_error
|
|
48
48
|
# end
|
|
@@ -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 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::WebhookPayloadMessageSentMetadata
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::WebhookPayloadMessageSentMetadata do
|
|
21
|
+
#let(:instance) { Zernio::WebhookPayloadMessageSentMetadata.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of WebhookPayloadMessageSentMetadata' do
|
|
24
|
+
it 'should create an instance of WebhookPayloadMessageSentMetadata' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::WebhookPayloadMessageSentMetadata)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "quoted_message_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 "thread_ts"' 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
|
|
@@ -61,6 +61,12 @@ describe Zernio::WebhookPayloadMessageSent do
|
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
+
describe 'test attribute "metadata"' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
64
70
|
describe 'test attribute "timestamp"' do
|
|
65
71
|
it 'should work' do
|
|
66
72
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
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.768
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -1761,6 +1761,7 @@ files:
|
|
|
1761
1761
|
- docs/WebhookPayloadMessageSentMessage.md
|
|
1762
1762
|
- docs/WebhookPayloadMessageSentMessageAttachmentsInner.md
|
|
1763
1763
|
- docs/WebhookPayloadMessageSentMessageSender.md
|
|
1764
|
+
- docs/WebhookPayloadMessageSentMetadata.md
|
|
1764
1765
|
- docs/WebhookPayloadPost.md
|
|
1765
1766
|
- docs/WebhookPayloadPostPlatform.md
|
|
1766
1767
|
- docs/WebhookPayloadPostPlatformAccount.md
|
|
@@ -3565,6 +3566,7 @@ files:
|
|
|
3565
3566
|
- lib/zernio-sdk/models/webhook_payload_message_sent_message.rb
|
|
3566
3567
|
- lib/zernio-sdk/models/webhook_payload_message_sent_message_attachments_inner.rb
|
|
3567
3568
|
- lib/zernio-sdk/models/webhook_payload_message_sent_message_sender.rb
|
|
3569
|
+
- lib/zernio-sdk/models/webhook_payload_message_sent_metadata.rb
|
|
3568
3570
|
- lib/zernio-sdk/models/webhook_payload_post.rb
|
|
3569
3571
|
- lib/zernio-sdk/models/webhook_payload_post_platform.rb
|
|
3570
3572
|
- lib/zernio-sdk/models/webhook_payload_post_platform_account.rb
|
|
@@ -5352,6 +5354,7 @@ files:
|
|
|
5352
5354
|
- spec/models/webhook_payload_message_sent_message_attachments_inner_spec.rb
|
|
5353
5355
|
- spec/models/webhook_payload_message_sent_message_sender_spec.rb
|
|
5354
5356
|
- spec/models/webhook_payload_message_sent_message_spec.rb
|
|
5357
|
+
- spec/models/webhook_payload_message_sent_metadata_spec.rb
|
|
5355
5358
|
- spec/models/webhook_payload_message_sent_spec.rb
|
|
5356
5359
|
- spec/models/webhook_payload_message_spec.rb
|
|
5357
5360
|
- spec/models/webhook_payload_post_platform_account_spec.rb
|
|
@@ -5443,7 +5446,7 @@ files:
|
|
|
5443
5446
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
5444
5447
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
5445
5448
|
- spec/spec_helper.rb
|
|
5446
|
-
- zernio-sdk-0.0.
|
|
5449
|
+
- zernio-sdk-0.0.768.gem
|
|
5447
5450
|
- zernio-sdk.gemspec
|
|
5448
5451
|
homepage: https://openapi-generator.tech
|
|
5449
5452
|
licenses:
|
|
@@ -6877,6 +6880,7 @@ test_files:
|
|
|
6877
6880
|
- spec/models/archive_lead_form200_response_spec.rb
|
|
6878
6881
|
- spec/models/boost_post_request_tracking_url_tags_inner_spec.rb
|
|
6879
6882
|
- spec/models/replace_ad_audience_companies200_response_spec.rb
|
|
6883
|
+
- spec/models/webhook_payload_message_sent_metadata_spec.rb
|
|
6880
6884
|
- spec/models/enable_whats_app_calling_legacy200_response_spec.rb
|
|
6881
6885
|
- spec/models/posts_list_response_spec.rb
|
|
6882
6886
|
- spec/models/create_queue_slot_request_spec.rb
|
data/zernio-sdk-0.0.766.gem
DELETED
|
Binary file
|