sentdm 0.26.0 → 0.27.0
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/CHANGELOG.md +27 -0
- data/README.md +1 -1
- data/lib/sentdm/models/inbound_message_event.rb +52 -0
- data/lib/sentdm/models/inbound_message_event_payload.rb +81 -0
- data/lib/sentdm/models/message_event.rb +53 -0
- data/lib/sentdm/models/message_event_payload.rb +92 -0
- data/lib/sentdm/models/profile_detail.rb +10 -2
- data/lib/sentdm/models/profiles/campaign_data.rb +1 -1
- data/lib/sentdm/models/template_event.rb +52 -0
- data/lib/sentdm/models/template_event_payload.rb +88 -0
- data/lib/sentdm/models/webhook_list_events_response.rb +45 -3
- data/lib/sentdm/models.rb +12 -0
- data/lib/sentdm/resources/messages.rb +6 -4
- data/lib/sentdm/resources/profiles.rb +3 -3
- data/lib/sentdm/resources/users.rb +3 -3
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +6 -0
- data/rbi/sentdm/models/inbound_message_event.rbi +88 -0
- data/rbi/sentdm/models/inbound_message_event_payload.rbi +122 -0
- data/rbi/sentdm/models/message_event.rbi +86 -0
- data/rbi/sentdm/models/message_event_payload.rbi +132 -0
- data/rbi/sentdm/models/profile_detail.rbi +8 -2
- data/rbi/sentdm/models/profiles/campaign_data.rbi +2 -2
- data/rbi/sentdm/models/template_event.rbi +84 -0
- data/rbi/sentdm/models/template_event_payload.rbi +131 -0
- data/rbi/sentdm/models/webhook_list_events_response.rbi +60 -4
- data/rbi/sentdm/models.rbi +12 -0
- data/rbi/sentdm/resources/messages.rbi +6 -4
- data/rbi/sentdm/resources/profiles.rbi +3 -2
- data/rbi/sentdm/resources/users.rbi +3 -2
- data/sig/sentdm/models/inbound_message_event.rbs +39 -0
- data/sig/sentdm/models/inbound_message_event_payload.rbs +69 -0
- data/sig/sentdm/models/message_event.rbs +39 -0
- data/sig/sentdm/models/message_event_payload.rbs +72 -0
- data/sig/sentdm/models/template_event.rbs +39 -0
- data/sig/sentdm/models/template_event_payload.rbs +76 -0
- data/sig/sentdm/models/webhook_list_events_response.rbs +18 -5
- data/sig/sentdm/models.rbs +12 -0
- metadata +20 -2
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Sentdm
|
|
4
|
+
module Models
|
|
5
|
+
class TemplateEventPayload < Sentdm::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(Sentdm::TemplateEventPayload, Sentdm::Internal::AnyHash)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# The account the template belongs to.
|
|
12
|
+
sig { returns(T.nilable(String)) }
|
|
13
|
+
attr_reader :account_id
|
|
14
|
+
|
|
15
|
+
sig { params(account_id: String).void }
|
|
16
|
+
attr_writer :account_id
|
|
17
|
+
|
|
18
|
+
# The template's category, for example UTILITY, MARKETING, or AUTHENTICATION.
|
|
19
|
+
sig { returns(T.nilable(String)) }
|
|
20
|
+
attr_reader :category
|
|
21
|
+
|
|
22
|
+
sig { params(category: String).void }
|
|
23
|
+
attr_writer :category
|
|
24
|
+
|
|
25
|
+
# The channel the template applies to.
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :channel
|
|
28
|
+
|
|
29
|
+
sig { params(channel: String).void }
|
|
30
|
+
attr_writer :channel
|
|
31
|
+
|
|
32
|
+
# The template's language code, for example en_US.
|
|
33
|
+
sig { returns(T.nilable(String)) }
|
|
34
|
+
attr_reader :language
|
|
35
|
+
|
|
36
|
+
sig { params(language: String).void }
|
|
37
|
+
attr_writer :language
|
|
38
|
+
|
|
39
|
+
# Why the template reached Status, when a reason was given. Populated on a
|
|
40
|
+
# rejection.
|
|
41
|
+
sig { returns(T.nilable(String)) }
|
|
42
|
+
attr_accessor :reason
|
|
43
|
+
|
|
44
|
+
# The review status the template just reached, for example APPROVED or REJECTED.
|
|
45
|
+
sig { returns(T.nilable(String)) }
|
|
46
|
+
attr_reader :status
|
|
47
|
+
|
|
48
|
+
sig { params(status: String).void }
|
|
49
|
+
attr_writer :status
|
|
50
|
+
|
|
51
|
+
# The template in Sent.
|
|
52
|
+
sig { returns(T.nilable(String)) }
|
|
53
|
+
attr_reader :template_id
|
|
54
|
+
|
|
55
|
+
sig { params(template_id: String).void }
|
|
56
|
+
attr_writer :template_id
|
|
57
|
+
|
|
58
|
+
# The template's display name.
|
|
59
|
+
sig { returns(T.nilable(String)) }
|
|
60
|
+
attr_reader :template_name
|
|
61
|
+
|
|
62
|
+
sig { params(template_name: String).void }
|
|
63
|
+
attr_writer :template_name
|
|
64
|
+
|
|
65
|
+
# The template's identifier with Meta, assigned when the template is submitted for
|
|
66
|
+
# review.
|
|
67
|
+
sig { returns(T.nilable(String)) }
|
|
68
|
+
attr_reader :whatsapp_template_id
|
|
69
|
+
|
|
70
|
+
sig { params(whatsapp_template_id: String).void }
|
|
71
|
+
attr_writer :whatsapp_template_id
|
|
72
|
+
|
|
73
|
+
# Body of a template status event. Delivered when a template's review outcome
|
|
74
|
+
# changes, so you can react without polling.
|
|
75
|
+
sig do
|
|
76
|
+
params(
|
|
77
|
+
account_id: String,
|
|
78
|
+
category: String,
|
|
79
|
+
channel: String,
|
|
80
|
+
language: String,
|
|
81
|
+
reason: T.nilable(String),
|
|
82
|
+
status: String,
|
|
83
|
+
template_id: String,
|
|
84
|
+
template_name: String,
|
|
85
|
+
whatsapp_template_id: String
|
|
86
|
+
).returns(T.attached_class)
|
|
87
|
+
end
|
|
88
|
+
def self.new(
|
|
89
|
+
# The account the template belongs to.
|
|
90
|
+
account_id: nil,
|
|
91
|
+
# The template's category, for example UTILITY, MARKETING, or AUTHENTICATION.
|
|
92
|
+
category: nil,
|
|
93
|
+
# The channel the template applies to.
|
|
94
|
+
channel: nil,
|
|
95
|
+
# The template's language code, for example en_US.
|
|
96
|
+
language: nil,
|
|
97
|
+
# Why the template reached Status, when a reason was given. Populated on a
|
|
98
|
+
# rejection.
|
|
99
|
+
reason: nil,
|
|
100
|
+
# The review status the template just reached, for example APPROVED or REJECTED.
|
|
101
|
+
status: nil,
|
|
102
|
+
# The template in Sent.
|
|
103
|
+
template_id: nil,
|
|
104
|
+
# The template's display name.
|
|
105
|
+
template_name: nil,
|
|
106
|
+
# The template's identifier with Meta, assigned when the template is submitted for
|
|
107
|
+
# review.
|
|
108
|
+
whatsapp_template_id: nil
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
sig do
|
|
113
|
+
override.returns(
|
|
114
|
+
{
|
|
115
|
+
account_id: String,
|
|
116
|
+
category: String,
|
|
117
|
+
channel: String,
|
|
118
|
+
language: String,
|
|
119
|
+
reason: T.nilable(String),
|
|
120
|
+
status: String,
|
|
121
|
+
template_id: String,
|
|
122
|
+
template_name: String,
|
|
123
|
+
whatsapp_template_id: String
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
end
|
|
127
|
+
def to_hash
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
@@ -183,10 +183,29 @@ module Sentdm
|
|
|
183
183
|
sig { returns(T.nilable(String)) }
|
|
184
184
|
attr_accessor :error_message
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
# The exact event body that was delivered, or attempted, for this record. One of
|
|
187
|
+
# the three webhook envelopes: a message status change, an inbound message, or a
|
|
188
|
+
# template status change. Read field and event to tell which, the same way your
|
|
189
|
+
# endpoint does.
|
|
190
|
+
sig do
|
|
191
|
+
returns(
|
|
192
|
+
T.nilable(
|
|
193
|
+
Sentdm::Models::WebhookListEventsResponse::Data::Event::EventData::Variants
|
|
194
|
+
)
|
|
195
|
+
)
|
|
196
|
+
end
|
|
187
197
|
attr_reader :event_data
|
|
188
198
|
|
|
189
|
-
sig
|
|
199
|
+
sig do
|
|
200
|
+
params(
|
|
201
|
+
event_data:
|
|
202
|
+
T.any(
|
|
203
|
+
Sentdm::MessageEvent::OrHash,
|
|
204
|
+
Sentdm::InboundMessageEvent::OrHash,
|
|
205
|
+
Sentdm::TemplateEvent::OrHash
|
|
206
|
+
)
|
|
207
|
+
).void
|
|
208
|
+
end
|
|
190
209
|
attr_writer :event_data
|
|
191
210
|
|
|
192
211
|
sig { returns(T.nilable(String)) }
|
|
@@ -214,7 +233,12 @@ module Sentdm
|
|
|
214
233
|
delivery_attempts: Integer,
|
|
215
234
|
delivery_status: String,
|
|
216
235
|
error_message: T.nilable(String),
|
|
217
|
-
event_data:
|
|
236
|
+
event_data:
|
|
237
|
+
T.any(
|
|
238
|
+
Sentdm::MessageEvent::OrHash,
|
|
239
|
+
Sentdm::InboundMessageEvent::OrHash,
|
|
240
|
+
Sentdm::TemplateEvent::OrHash
|
|
241
|
+
),
|
|
218
242
|
event_type: String,
|
|
219
243
|
http_status_code: T.nilable(Integer),
|
|
220
244
|
processing_completed_at: T.nilable(Time),
|
|
@@ -228,6 +252,10 @@ module Sentdm
|
|
|
228
252
|
delivery_attempts: nil,
|
|
229
253
|
delivery_status: nil,
|
|
230
254
|
error_message: nil,
|
|
255
|
+
# The exact event body that was delivered, or attempted, for this record. One of
|
|
256
|
+
# the three webhook envelopes: a message status change, an inbound message, or a
|
|
257
|
+
# template status change. Read field and event to tell which, the same way your
|
|
258
|
+
# endpoint does.
|
|
231
259
|
event_data: nil,
|
|
232
260
|
event_type: nil,
|
|
233
261
|
http_status_code: nil,
|
|
@@ -245,7 +273,8 @@ module Sentdm
|
|
|
245
273
|
delivery_attempts: Integer,
|
|
246
274
|
delivery_status: String,
|
|
247
275
|
error_message: T.nilable(String),
|
|
248
|
-
event_data:
|
|
276
|
+
event_data:
|
|
277
|
+
Sentdm::Models::WebhookListEventsResponse::Data::Event::EventData::Variants,
|
|
249
278
|
event_type: String,
|
|
250
279
|
http_status_code: T.nilable(Integer),
|
|
251
280
|
processing_completed_at: T.nilable(Time),
|
|
@@ -256,6 +285,33 @@ module Sentdm
|
|
|
256
285
|
end
|
|
257
286
|
def to_hash
|
|
258
287
|
end
|
|
288
|
+
|
|
289
|
+
# The exact event body that was delivered, or attempted, for this record. One of
|
|
290
|
+
# the three webhook envelopes: a message status change, an inbound message, or a
|
|
291
|
+
# template status change. Read field and event to tell which, the same way your
|
|
292
|
+
# endpoint does.
|
|
293
|
+
module EventData
|
|
294
|
+
extend Sentdm::Internal::Type::Union
|
|
295
|
+
|
|
296
|
+
Variants =
|
|
297
|
+
T.type_alias do
|
|
298
|
+
T.any(
|
|
299
|
+
Sentdm::MessageEvent,
|
|
300
|
+
Sentdm::InboundMessageEvent,
|
|
301
|
+
Sentdm::TemplateEvent
|
|
302
|
+
)
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
sig do
|
|
306
|
+
override.returns(
|
|
307
|
+
T::Array[
|
|
308
|
+
Sentdm::Models::WebhookListEventsResponse::Data::Event::EventData::Variants
|
|
309
|
+
]
|
|
310
|
+
)
|
|
311
|
+
end
|
|
312
|
+
def self.variants
|
|
313
|
+
end
|
|
314
|
+
end
|
|
259
315
|
end
|
|
260
316
|
end
|
|
261
317
|
end
|
data/rbi/sentdm/models.rbi
CHANGED
|
@@ -59,8 +59,16 @@ module Sentdm
|
|
|
59
59
|
|
|
60
60
|
ErrorDetail = Sentdm::Models::ErrorDetail
|
|
61
61
|
|
|
62
|
+
InboundMessageEvent = Sentdm::Models::InboundMessageEvent
|
|
63
|
+
|
|
64
|
+
InboundMessageEventPayload = Sentdm::Models::InboundMessageEventPayload
|
|
65
|
+
|
|
62
66
|
MeRetrieveParams = Sentdm::Models::MeRetrieveParams
|
|
63
67
|
|
|
68
|
+
MessageEvent = Sentdm::Models::MessageEvent
|
|
69
|
+
|
|
70
|
+
MessageEventPayload = Sentdm::Models::MessageEventPayload
|
|
71
|
+
|
|
64
72
|
MessageRetrieveActivitiesParams =
|
|
65
73
|
Sentdm::Models::MessageRetrieveActivitiesParams
|
|
66
74
|
|
|
@@ -114,6 +122,10 @@ module Sentdm
|
|
|
114
122
|
|
|
115
123
|
TemplateDeleteParams = Sentdm::Models::TemplateDeleteParams
|
|
116
124
|
|
|
125
|
+
TemplateEvent = Sentdm::Models::TemplateEvent
|
|
126
|
+
|
|
127
|
+
TemplateEventPayload = Sentdm::Models::TemplateEventPayload
|
|
128
|
+
|
|
117
129
|
TemplateFooter = Sentdm::Models::TemplateFooter
|
|
118
130
|
|
|
119
131
|
TemplateHeader = Sentdm::Models::TemplateHeader
|
|
@@ -46,10 +46,12 @@ module Sentdm
|
|
|
46
46
|
# multi-channel broadcast — when multiple channels are specified (e.g. ["sms",
|
|
47
47
|
# "whatsapp"]), a separate message is created for each (recipient, channel) pair.
|
|
48
48
|
# Returns immediately with per-recipient message IDs for async tracking via
|
|
49
|
-
# webhooks or the GET /messages/{id} endpoint.
|
|
50
|
-
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
49
|
+
# webhooks or the GET /messages/{id} endpoint. Sends gated before any delivery
|
|
50
|
+
# attempt do not reject the request — an account-level precondition such as
|
|
51
|
+
# insufficient balance, a template not approved for sending, or free-form content
|
|
52
|
+
# with no open conversation with the contact. The send is accepted with 202 and
|
|
53
|
+
# the affected messages are reported as BLOCKED on GET /messages/{id} and the
|
|
54
|
+
# message.blocked webhook.
|
|
53
55
|
sig do
|
|
54
56
|
params(
|
|
55
57
|
channel: T.nilable(T::Array[String]),
|
|
@@ -148,6 +148,7 @@ module Sentdm
|
|
|
148
148
|
).returns(Sentdm::APIResponseOfProfileDetail)
|
|
149
149
|
end
|
|
150
150
|
def retrieve(
|
|
151
|
+
# Profile ID from route parameter
|
|
151
152
|
profile_id,
|
|
152
153
|
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
153
154
|
# can use this header. The profile must belong to the calling organization.
|
|
@@ -203,7 +204,7 @@ module Sentdm
|
|
|
203
204
|
).returns(Sentdm::APIResponseOfProfileDetail)
|
|
204
205
|
end
|
|
205
206
|
def update(
|
|
206
|
-
# Path param
|
|
207
|
+
# Path param: Profile ID from route parameter
|
|
207
208
|
profile_id,
|
|
208
209
|
# Body param: Whether contacts are shared across profiles (optional)
|
|
209
210
|
allow_contact_sharing: nil,
|
|
@@ -302,7 +303,7 @@ module Sentdm
|
|
|
302
303
|
).void
|
|
303
304
|
end
|
|
304
305
|
def delete(
|
|
305
|
-
# Path param
|
|
306
|
+
# Path param: Profile ID from route parameter
|
|
306
307
|
profile_id,
|
|
307
308
|
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
308
309
|
# effects Useful for testing integrations without actual execution
|
|
@@ -14,6 +14,7 @@ module Sentdm
|
|
|
14
14
|
).returns(Sentdm::APIResponseOfUser)
|
|
15
15
|
end
|
|
16
16
|
def retrieve(
|
|
17
|
+
# User ID from route parameter
|
|
17
18
|
user_id,
|
|
18
19
|
# Profile UUID to scope the request to a child profile. Only organization API keys
|
|
19
20
|
# can use this header. The profile must belong to the calling organization.
|
|
@@ -86,7 +87,7 @@ module Sentdm
|
|
|
86
87
|
).void
|
|
87
88
|
end
|
|
88
89
|
def remove(
|
|
89
|
-
# Path param
|
|
90
|
+
# Path param: User ID from route parameter
|
|
90
91
|
user_id,
|
|
91
92
|
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
92
93
|
# effects Useful for testing integrations without actual execution
|
|
@@ -112,7 +113,7 @@ module Sentdm
|
|
|
112
113
|
).returns(Sentdm::APIResponseOfUser)
|
|
113
114
|
end
|
|
114
115
|
def update_role(
|
|
115
|
-
# Path param
|
|
116
|
+
# Path param: User ID from route parameter
|
|
116
117
|
user_id,
|
|
117
118
|
# Body param: User role: admin, billing, or developer (required)
|
|
118
119
|
role: nil,
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type inbound_message_event =
|
|
4
|
+
{
|
|
5
|
+
event: String?,
|
|
6
|
+
field: String,
|
|
7
|
+
payload: Sentdm::InboundMessageEventPayload?,
|
|
8
|
+
timestamp: String
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class InboundMessageEvent < Sentdm::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor event: String?
|
|
13
|
+
|
|
14
|
+
attr_reader field: String?
|
|
15
|
+
|
|
16
|
+
def field=: (String) -> String
|
|
17
|
+
|
|
18
|
+
attr_accessor payload: Sentdm::InboundMessageEventPayload?
|
|
19
|
+
|
|
20
|
+
attr_reader timestamp: String?
|
|
21
|
+
|
|
22
|
+
def timestamp=: (String) -> String
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
?event: String?,
|
|
26
|
+
?field: String,
|
|
27
|
+
?payload: Sentdm::InboundMessageEventPayload?,
|
|
28
|
+
?timestamp: String
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
event: String?,
|
|
33
|
+
field: String,
|
|
34
|
+
payload: Sentdm::InboundMessageEventPayload?,
|
|
35
|
+
timestamp: String
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type inbound_message_event_payload =
|
|
4
|
+
{
|
|
5
|
+
account_id: String,
|
|
6
|
+
channel: String,
|
|
7
|
+
inbound_number: String,
|
|
8
|
+
message_id: String,
|
|
9
|
+
outbound_number: String,
|
|
10
|
+
received_at: String,
|
|
11
|
+
text: String?,
|
|
12
|
+
updated_at: String
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
class InboundMessageEventPayload < Sentdm::Internal::Type::BaseModel
|
|
16
|
+
attr_reader account_id: String?
|
|
17
|
+
|
|
18
|
+
def account_id=: (String) -> String
|
|
19
|
+
|
|
20
|
+
attr_reader channel: String?
|
|
21
|
+
|
|
22
|
+
def channel=: (String) -> String
|
|
23
|
+
|
|
24
|
+
attr_reader inbound_number: String?
|
|
25
|
+
|
|
26
|
+
def inbound_number=: (String) -> String
|
|
27
|
+
|
|
28
|
+
attr_reader message_id: String?
|
|
29
|
+
|
|
30
|
+
def message_id=: (String) -> String
|
|
31
|
+
|
|
32
|
+
attr_reader outbound_number: String?
|
|
33
|
+
|
|
34
|
+
def outbound_number=: (String) -> String
|
|
35
|
+
|
|
36
|
+
attr_reader received_at: String?
|
|
37
|
+
|
|
38
|
+
def received_at=: (String) -> String
|
|
39
|
+
|
|
40
|
+
attr_accessor text: String?
|
|
41
|
+
|
|
42
|
+
attr_reader updated_at: String?
|
|
43
|
+
|
|
44
|
+
def updated_at=: (String) -> String
|
|
45
|
+
|
|
46
|
+
def initialize: (
|
|
47
|
+
?account_id: String,
|
|
48
|
+
?channel: String,
|
|
49
|
+
?inbound_number: String,
|
|
50
|
+
?message_id: String,
|
|
51
|
+
?outbound_number: String,
|
|
52
|
+
?received_at: String,
|
|
53
|
+
?text: String?,
|
|
54
|
+
?updated_at: String
|
|
55
|
+
) -> void
|
|
56
|
+
|
|
57
|
+
def to_hash: -> {
|
|
58
|
+
account_id: String,
|
|
59
|
+
channel: String,
|
|
60
|
+
inbound_number: String,
|
|
61
|
+
message_id: String,
|
|
62
|
+
outbound_number: String,
|
|
63
|
+
received_at: String,
|
|
64
|
+
text: String?,
|
|
65
|
+
updated_at: String
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type message_event =
|
|
4
|
+
{
|
|
5
|
+
event: String?,
|
|
6
|
+
field: String,
|
|
7
|
+
payload: Sentdm::MessageEventPayload?,
|
|
8
|
+
timestamp: String
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class MessageEvent < Sentdm::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor event: String?
|
|
13
|
+
|
|
14
|
+
attr_reader field: String?
|
|
15
|
+
|
|
16
|
+
def field=: (String) -> String
|
|
17
|
+
|
|
18
|
+
attr_accessor payload: Sentdm::MessageEventPayload?
|
|
19
|
+
|
|
20
|
+
attr_reader timestamp: String?
|
|
21
|
+
|
|
22
|
+
def timestamp=: (String) -> String
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
?event: String?,
|
|
26
|
+
?field: String,
|
|
27
|
+
?payload: Sentdm::MessageEventPayload?,
|
|
28
|
+
?timestamp: String
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
event: String?,
|
|
33
|
+
field: String,
|
|
34
|
+
payload: Sentdm::MessageEventPayload?,
|
|
35
|
+
timestamp: String
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type message_event_payload =
|
|
4
|
+
{
|
|
5
|
+
account_id: String,
|
|
6
|
+
agent_id: String?,
|
|
7
|
+
channel: String,
|
|
8
|
+
message_id: String,
|
|
9
|
+
message_status: String,
|
|
10
|
+
outbound_number: String,
|
|
11
|
+
template_id: String?,
|
|
12
|
+
template_name: String?,
|
|
13
|
+
updated_at: String
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class MessageEventPayload < Sentdm::Internal::Type::BaseModel
|
|
17
|
+
attr_reader account_id: String?
|
|
18
|
+
|
|
19
|
+
def account_id=: (String) -> String
|
|
20
|
+
|
|
21
|
+
attr_accessor agent_id: String?
|
|
22
|
+
|
|
23
|
+
attr_reader channel: String?
|
|
24
|
+
|
|
25
|
+
def channel=: (String) -> String
|
|
26
|
+
|
|
27
|
+
attr_reader message_id: String?
|
|
28
|
+
|
|
29
|
+
def message_id=: (String) -> String
|
|
30
|
+
|
|
31
|
+
attr_reader message_status: String?
|
|
32
|
+
|
|
33
|
+
def message_status=: (String) -> String
|
|
34
|
+
|
|
35
|
+
attr_reader outbound_number: String?
|
|
36
|
+
|
|
37
|
+
def outbound_number=: (String) -> String
|
|
38
|
+
|
|
39
|
+
attr_accessor template_id: String?
|
|
40
|
+
|
|
41
|
+
attr_accessor template_name: String?
|
|
42
|
+
|
|
43
|
+
attr_reader updated_at: String?
|
|
44
|
+
|
|
45
|
+
def updated_at=: (String) -> String
|
|
46
|
+
|
|
47
|
+
def initialize: (
|
|
48
|
+
?account_id: String,
|
|
49
|
+
?agent_id: String?,
|
|
50
|
+
?channel: String,
|
|
51
|
+
?message_id: String,
|
|
52
|
+
?message_status: String,
|
|
53
|
+
?outbound_number: String,
|
|
54
|
+
?template_id: String?,
|
|
55
|
+
?template_name: String?,
|
|
56
|
+
?updated_at: String
|
|
57
|
+
) -> void
|
|
58
|
+
|
|
59
|
+
def to_hash: -> {
|
|
60
|
+
account_id: String,
|
|
61
|
+
agent_id: String?,
|
|
62
|
+
channel: String,
|
|
63
|
+
message_id: String,
|
|
64
|
+
message_status: String,
|
|
65
|
+
outbound_number: String,
|
|
66
|
+
template_id: String?,
|
|
67
|
+
template_name: String?,
|
|
68
|
+
updated_at: String
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type template_event =
|
|
4
|
+
{
|
|
5
|
+
event: String?,
|
|
6
|
+
field: String,
|
|
7
|
+
payload: Sentdm::TemplateEventPayload?,
|
|
8
|
+
timestamp: String
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class TemplateEvent < Sentdm::Internal::Type::BaseModel
|
|
12
|
+
attr_accessor event: String?
|
|
13
|
+
|
|
14
|
+
attr_reader field: String?
|
|
15
|
+
|
|
16
|
+
def field=: (String) -> String
|
|
17
|
+
|
|
18
|
+
attr_accessor payload: Sentdm::TemplateEventPayload?
|
|
19
|
+
|
|
20
|
+
attr_reader timestamp: String?
|
|
21
|
+
|
|
22
|
+
def timestamp=: (String) -> String
|
|
23
|
+
|
|
24
|
+
def initialize: (
|
|
25
|
+
?event: String?,
|
|
26
|
+
?field: String,
|
|
27
|
+
?payload: Sentdm::TemplateEventPayload?,
|
|
28
|
+
?timestamp: String
|
|
29
|
+
) -> void
|
|
30
|
+
|
|
31
|
+
def to_hash: -> {
|
|
32
|
+
event: String?,
|
|
33
|
+
field: String,
|
|
34
|
+
payload: Sentdm::TemplateEventPayload?,
|
|
35
|
+
timestamp: String
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type template_event_payload =
|
|
4
|
+
{
|
|
5
|
+
account_id: String,
|
|
6
|
+
category: String,
|
|
7
|
+
channel: String,
|
|
8
|
+
language: String,
|
|
9
|
+
reason: String?,
|
|
10
|
+
status: String,
|
|
11
|
+
template_id: String,
|
|
12
|
+
template_name: String,
|
|
13
|
+
whatsapp_template_id: String
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class TemplateEventPayload < Sentdm::Internal::Type::BaseModel
|
|
17
|
+
attr_reader account_id: String?
|
|
18
|
+
|
|
19
|
+
def account_id=: (String) -> String
|
|
20
|
+
|
|
21
|
+
attr_reader category: String?
|
|
22
|
+
|
|
23
|
+
def category=: (String) -> String
|
|
24
|
+
|
|
25
|
+
attr_reader channel: String?
|
|
26
|
+
|
|
27
|
+
def channel=: (String) -> String
|
|
28
|
+
|
|
29
|
+
attr_reader language: String?
|
|
30
|
+
|
|
31
|
+
def language=: (String) -> String
|
|
32
|
+
|
|
33
|
+
attr_accessor reason: String?
|
|
34
|
+
|
|
35
|
+
attr_reader status: String?
|
|
36
|
+
|
|
37
|
+
def status=: (String) -> String
|
|
38
|
+
|
|
39
|
+
attr_reader template_id: String?
|
|
40
|
+
|
|
41
|
+
def template_id=: (String) -> String
|
|
42
|
+
|
|
43
|
+
attr_reader template_name: String?
|
|
44
|
+
|
|
45
|
+
def template_name=: (String) -> String
|
|
46
|
+
|
|
47
|
+
attr_reader whatsapp_template_id: String?
|
|
48
|
+
|
|
49
|
+
def whatsapp_template_id=: (String) -> String
|
|
50
|
+
|
|
51
|
+
def initialize: (
|
|
52
|
+
?account_id: String,
|
|
53
|
+
?category: String,
|
|
54
|
+
?channel: String,
|
|
55
|
+
?language: String,
|
|
56
|
+
?reason: String?,
|
|
57
|
+
?status: String,
|
|
58
|
+
?template_id: String,
|
|
59
|
+
?template_name: String,
|
|
60
|
+
?whatsapp_template_id: String
|
|
61
|
+
) -> void
|
|
62
|
+
|
|
63
|
+
def to_hash: -> {
|
|
64
|
+
account_id: String,
|
|
65
|
+
category: String,
|
|
66
|
+
channel: String,
|
|
67
|
+
language: String,
|
|
68
|
+
reason: String?,
|
|
69
|
+
status: String,
|
|
70
|
+
template_id: String,
|
|
71
|
+
template_name: String,
|
|
72
|
+
whatsapp_template_id: String
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|