sentdm 0.31.0 → 0.33.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 +16 -0
- data/README.md +1 -1
- data/lib/sentdm/client.rb +6 -0
- data/lib/sentdm/models/channel_event.rb +78 -0
- data/lib/sentdm/models/channel_event_payload.rb +265 -0
- data/lib/sentdm/models/contact_event.rb +77 -0
- data/lib/sentdm/models/contact_event_payload.rb +172 -0
- data/lib/sentdm/models/conversation_messages_list.rb +125 -4
- data/lib/sentdm/models/inbound_message_event.rb +16 -8
- data/lib/sentdm/models/message_event.rb +16 -8
- data/lib/sentdm/models/message_event_payload.rb +30 -1
- data/lib/sentdm/models/message_retrieve_activities_response.rb +20 -5
- data/lib/sentdm/models/message_retrieve_status_response.rb +133 -6
- data/lib/sentdm/models/message_send_params.rb +67 -3
- data/lib/sentdm/models/message_send_response.rb +13 -4
- data/lib/sentdm/models/template.rb +36 -5
- data/lib/sentdm/models/template_body.rb +102 -12
- data/lib/sentdm/models/template_body_content.rb +35 -3
- data/lib/sentdm/models/template_button.rb +8 -2
- data/lib/sentdm/models/template_button_props.rb +12 -1
- data/lib/sentdm/models/template_definition.rb +14 -2
- data/lib/sentdm/models/template_event.rb +16 -8
- data/lib/sentdm/models/template_event_payload.rb +31 -4
- data/lib/sentdm/models/template_header.rb +91 -3
- data/lib/sentdm/models/template_variable.rb +35 -4
- data/lib/sentdm/models/webhook_list_events_response.rb +332 -9
- data/lib/sentdm/models.rb +8 -0
- data/lib/sentdm/resources/messages.rb +33 -5
- data/lib/sentdm/resources/templates.rb +28 -2
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +5 -1
- data/rbi/sentdm/client.rbi +6 -0
- data/rbi/sentdm/models/channel_event.rbi +128 -0
- data/rbi/sentdm/models/channel_event_payload.rbi +440 -0
- data/rbi/sentdm/models/contact_event.rbi +126 -0
- data/rbi/sentdm/models/contact_event_payload.rbi +254 -0
- data/rbi/sentdm/models/conversation_messages_list.rbi +202 -7
- data/rbi/sentdm/models/inbound_message_event.rbi +18 -10
- data/rbi/sentdm/models/message_event.rbi +18 -10
- data/rbi/sentdm/models/message_event_payload.rbi +34 -0
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +23 -5
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +214 -9
- data/rbi/sentdm/models/message_send_params.rbi +100 -2
- data/rbi/sentdm/models/message_send_response.rbi +15 -5
- data/rbi/sentdm/models/template.rbi +58 -4
- data/rbi/sentdm/models/template_body.rbi +155 -13
- data/rbi/sentdm/models/template_body_content.rbi +59 -1
- data/rbi/sentdm/models/template_button.rbi +14 -2
- data/rbi/sentdm/models/template_button_props.rbi +22 -0
- data/rbi/sentdm/models/template_definition.rbi +20 -2
- data/rbi/sentdm/models/template_event.rbi +18 -10
- data/rbi/sentdm/models/template_event_payload.rbi +51 -8
- data/rbi/sentdm/models/template_header.rbi +143 -2
- data/rbi/sentdm/models/template_variable.rbi +38 -1
- data/rbi/sentdm/models/webhook_list_events_response.rbi +484 -12
- data/rbi/sentdm/models.rbi +8 -0
- data/rbi/sentdm/resources/messages.rbi +58 -3
- data/rbi/sentdm/resources/templates.rbi +28 -2
- data/sig/sentdm/models/channel_event.rbs +44 -0
- data/sig/sentdm/models/channel_event_payload.rbs +120 -0
- data/sig/sentdm/models/contact_event.rbs +44 -0
- data/sig/sentdm/models/contact_event_payload.rbs +78 -0
- data/sig/sentdm/models/conversation_messages_list.rbs +48 -3
- data/sig/sentdm/models/inbound_message_event.rbs +5 -0
- data/sig/sentdm/models/message_event.rbs +5 -0
- data/sig/sentdm/models/message_event_payload.rbs +15 -0
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +5 -0
- data/sig/sentdm/models/message_retrieve_status_response.rbs +48 -3
- data/sig/sentdm/models/message_send_params.rbs +15 -0
- data/sig/sentdm/models/template.rbs +5 -0
- data/sig/sentdm/models/template_body.rbs +44 -0
- data/sig/sentdm/models/template_event.rbs +5 -0
- data/sig/sentdm/models/template_event_payload.rbs +9 -6
- data/sig/sentdm/models/template_header.rbs +44 -0
- data/sig/sentdm/models/webhook_list_events_response.rbs +147 -0
- data/sig/sentdm/models.rbs +8 -0
- data/sig/sentdm/resources/messages.rbs +3 -0
- metadata +14 -2
|
@@ -12,7 +12,9 @@ module Sentdm
|
|
|
12
12
|
class Templates
|
|
13
13
|
# Creates a new message template with header, body, footer, and buttons. The
|
|
14
14
|
# template can be submitted for review immediately or saved as draft for later
|
|
15
|
-
# submission.
|
|
15
|
+
# submission. There is no `name` field on create — the display name is derived
|
|
16
|
+
# from the template's content and can be changed afterwards with
|
|
17
|
+
# `PUT /v3/templates/{id}`.
|
|
16
18
|
sig do
|
|
17
19
|
params(
|
|
18
20
|
category: T.nilable(String),
|
|
@@ -76,7 +78,31 @@ module Sentdm
|
|
|
76
78
|
end
|
|
77
79
|
|
|
78
80
|
# Updates an existing template's name, category, language, definition, or submits
|
|
79
|
-
# it for review.
|
|
81
|
+
# it for review. While the template is in review (status PENDING, or any channel
|
|
82
|
+
# awaiting a verdict) its definition, category and language are frozen and a
|
|
83
|
+
# resubmission is refused — those requests answer 409 CONFLICT_006. The display
|
|
84
|
+
# name stays editable throughout.
|
|
85
|
+
#
|
|
86
|
+
# `definition`, `category` and `language` are editable only from status DRAFT,
|
|
87
|
+
# REJECTED or APPROVED. An edit to any of them on a template in another state
|
|
88
|
+
# (PAUSED, DISABLED or REVOKED) is refused with 400 VALIDATION_001 and the detail
|
|
89
|
+
# "Template (except display name) cannot be updated unless it is in draft or
|
|
90
|
+
# rejected status"; `name` stays editable in every state. `submit_for_review` on a
|
|
91
|
+
# PAUSED, DISABLED or REVOKED template is accepted and answers 200, but opens no
|
|
92
|
+
# review and does not move the status — only the reviewer can reinstate it.
|
|
93
|
+
#
|
|
94
|
+
# Editing an APPROVED template is a live edit: the new content is stored
|
|
95
|
+
# immediately, and sending `submit_for_review: true` re-opens review, which
|
|
96
|
+
# returns the affected channels to PENDING so they stop sending until they are
|
|
97
|
+
# approved again. The previously approved content is never sent during re-review.
|
|
98
|
+
# Watch the per-channel `templates` webhook events rather than assuming the
|
|
99
|
+
# template-level status.
|
|
100
|
+
#
|
|
101
|
+
# Templates provisioned by Sent (light-onboarding templates, whose names carry the
|
|
102
|
+
# reserved `sent_` prefix) are read-only: every field is refused with 400
|
|
103
|
+
# VALIDATION*001 and the detail "This template is read-only. Only 'submit for
|
|
104
|
+
# review' is allowed.", and only `submit_for_review` is accepted. A `name`
|
|
105
|
+
# starting with `sent*` is refused for the same reason — the prefix is reserved.
|
|
80
106
|
sig do
|
|
81
107
|
params(
|
|
82
108
|
id: String,
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type channel_event =
|
|
4
|
+
{
|
|
5
|
+
event: String?,
|
|
6
|
+
field: String,
|
|
7
|
+
payload: Sentdm::ChannelEventPayload?,
|
|
8
|
+
request_id: String?,
|
|
9
|
+
timestamp: String
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class ChannelEvent < Sentdm::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor event: String?
|
|
14
|
+
|
|
15
|
+
attr_reader field: String?
|
|
16
|
+
|
|
17
|
+
def field=: (String) -> String
|
|
18
|
+
|
|
19
|
+
attr_accessor payload: Sentdm::ChannelEventPayload?
|
|
20
|
+
|
|
21
|
+
attr_accessor request_id: String?
|
|
22
|
+
|
|
23
|
+
attr_reader timestamp: String?
|
|
24
|
+
|
|
25
|
+
def timestamp=: (String) -> String
|
|
26
|
+
|
|
27
|
+
def initialize: (
|
|
28
|
+
?event: String?,
|
|
29
|
+
?field: String,
|
|
30
|
+
?payload: Sentdm::ChannelEventPayload?,
|
|
31
|
+
?request_id: String?,
|
|
32
|
+
?timestamp: String
|
|
33
|
+
) -> void
|
|
34
|
+
|
|
35
|
+
def to_hash: -> {
|
|
36
|
+
event: String?,
|
|
37
|
+
field: String,
|
|
38
|
+
payload: Sentdm::ChannelEventPayload?,
|
|
39
|
+
request_id: String?,
|
|
40
|
+
timestamp: String
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type channel_event_payload =
|
|
4
|
+
{
|
|
5
|
+
country: String,
|
|
6
|
+
account_id: String,
|
|
7
|
+
channel: String,
|
|
8
|
+
compliance: Sentdm::ChannelEventPayload::Compliance?,
|
|
9
|
+
number_type: String?,
|
|
10
|
+
reason: String?,
|
|
11
|
+
sender_value: String?,
|
|
12
|
+
status: String,
|
|
13
|
+
updated_at: String
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
class ChannelEventPayload < Sentdm::Internal::Type::BaseModel
|
|
17
|
+
attr_accessor country: String
|
|
18
|
+
|
|
19
|
+
attr_reader account_id: String?
|
|
20
|
+
|
|
21
|
+
def account_id=: (String) -> String
|
|
22
|
+
|
|
23
|
+
attr_reader channel: String?
|
|
24
|
+
|
|
25
|
+
def channel=: (String) -> String
|
|
26
|
+
|
|
27
|
+
attr_accessor compliance: Sentdm::ChannelEventPayload::Compliance?
|
|
28
|
+
|
|
29
|
+
attr_accessor number_type: String?
|
|
30
|
+
|
|
31
|
+
attr_accessor reason: String?
|
|
32
|
+
|
|
33
|
+
attr_accessor sender_value: String?
|
|
34
|
+
|
|
35
|
+
attr_reader status: String?
|
|
36
|
+
|
|
37
|
+
def status=: (String) -> String
|
|
38
|
+
|
|
39
|
+
attr_reader updated_at: String?
|
|
40
|
+
|
|
41
|
+
def updated_at=: (String) -> String
|
|
42
|
+
|
|
43
|
+
def initialize: (
|
|
44
|
+
country: String,
|
|
45
|
+
?account_id: String,
|
|
46
|
+
?channel: String,
|
|
47
|
+
?compliance: Sentdm::ChannelEventPayload::Compliance?,
|
|
48
|
+
?number_type: String?,
|
|
49
|
+
?reason: String?,
|
|
50
|
+
?sender_value: String?,
|
|
51
|
+
?status: String,
|
|
52
|
+
?updated_at: String
|
|
53
|
+
) -> void
|
|
54
|
+
|
|
55
|
+
def to_hash: -> {
|
|
56
|
+
country: String,
|
|
57
|
+
account_id: String,
|
|
58
|
+
channel: String,
|
|
59
|
+
compliance: Sentdm::ChannelEventPayload::Compliance?,
|
|
60
|
+
number_type: String?,
|
|
61
|
+
reason: String?,
|
|
62
|
+
sender_value: String?,
|
|
63
|
+
status: String,
|
|
64
|
+
updated_at: String
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
type compliance =
|
|
68
|
+
{
|
|
69
|
+
brand: ::Hash[Symbol, top]?,
|
|
70
|
+
campaign: ::Hash[Symbol, top]?,
|
|
71
|
+
documents: ::Array[Sentdm::ChannelEventPayload::Compliance::Document]?
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
class Compliance < Sentdm::Internal::Type::BaseModel
|
|
75
|
+
attr_accessor brand: ::Hash[Symbol, top]?
|
|
76
|
+
|
|
77
|
+
attr_accessor campaign: ::Hash[Symbol, top]?
|
|
78
|
+
|
|
79
|
+
attr_accessor documents: ::Array[Sentdm::ChannelEventPayload::Compliance::Document]?
|
|
80
|
+
|
|
81
|
+
def initialize: (
|
|
82
|
+
?brand: ::Hash[Symbol, top]?,
|
|
83
|
+
?campaign: ::Hash[Symbol, top]?,
|
|
84
|
+
?documents: ::Array[Sentdm::ChannelEventPayload::Compliance::Document]?
|
|
85
|
+
) -> void
|
|
86
|
+
|
|
87
|
+
def to_hash: -> {
|
|
88
|
+
brand: ::Hash[Symbol, top]?,
|
|
89
|
+
campaign: ::Hash[Symbol, top]?,
|
|
90
|
+
documents: ::Array[Sentdm::ChannelEventPayload::Compliance::Document]?
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
type document =
|
|
94
|
+
{ document_id: String?, file_name: String?, key: String }
|
|
95
|
+
|
|
96
|
+
class Document < Sentdm::Internal::Type::BaseModel
|
|
97
|
+
attr_accessor document_id: String?
|
|
98
|
+
|
|
99
|
+
attr_accessor file_name: String?
|
|
100
|
+
|
|
101
|
+
attr_reader key: String?
|
|
102
|
+
|
|
103
|
+
def key=: (String) -> String
|
|
104
|
+
|
|
105
|
+
def initialize: (
|
|
106
|
+
?document_id: String?,
|
|
107
|
+
?file_name: String?,
|
|
108
|
+
?key: String
|
|
109
|
+
) -> void
|
|
110
|
+
|
|
111
|
+
def to_hash: -> {
|
|
112
|
+
document_id: String?,
|
|
113
|
+
file_name: String?,
|
|
114
|
+
key: String
|
|
115
|
+
}
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type contact_event =
|
|
4
|
+
{
|
|
5
|
+
event: String?,
|
|
6
|
+
field: String,
|
|
7
|
+
payload: Sentdm::ContactEventPayload?,
|
|
8
|
+
request_id: String?,
|
|
9
|
+
timestamp: String
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class ContactEvent < Sentdm::Internal::Type::BaseModel
|
|
13
|
+
attr_accessor event: String?
|
|
14
|
+
|
|
15
|
+
attr_reader field: String?
|
|
16
|
+
|
|
17
|
+
def field=: (String) -> String
|
|
18
|
+
|
|
19
|
+
attr_accessor payload: Sentdm::ContactEventPayload?
|
|
20
|
+
|
|
21
|
+
attr_accessor request_id: String?
|
|
22
|
+
|
|
23
|
+
attr_reader timestamp: String?
|
|
24
|
+
|
|
25
|
+
def timestamp=: (String) -> String
|
|
26
|
+
|
|
27
|
+
def initialize: (
|
|
28
|
+
?event: String?,
|
|
29
|
+
?field: String,
|
|
30
|
+
?payload: Sentdm::ContactEventPayload?,
|
|
31
|
+
?request_id: String?,
|
|
32
|
+
?timestamp: String
|
|
33
|
+
) -> void
|
|
34
|
+
|
|
35
|
+
def to_hash: -> {
|
|
36
|
+
event: String?,
|
|
37
|
+
field: String,
|
|
38
|
+
payload: Sentdm::ContactEventPayload?,
|
|
39
|
+
request_id: String?,
|
|
40
|
+
timestamp: String
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
module Sentdm
|
|
2
|
+
module Models
|
|
3
|
+
type contact_event_payload =
|
|
4
|
+
{
|
|
5
|
+
opt_out: bool,
|
|
6
|
+
source: String,
|
|
7
|
+
account_id: String,
|
|
8
|
+
agent_id: String?,
|
|
9
|
+
channel: String,
|
|
10
|
+
contact_id: String,
|
|
11
|
+
from: String,
|
|
12
|
+
message_id: String?,
|
|
13
|
+
template_id: String?,
|
|
14
|
+
text: String?,
|
|
15
|
+
to: String?
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
class ContactEventPayload < Sentdm::Internal::Type::BaseModel
|
|
19
|
+
attr_accessor opt_out: bool
|
|
20
|
+
|
|
21
|
+
attr_accessor source: String
|
|
22
|
+
|
|
23
|
+
attr_reader account_id: String?
|
|
24
|
+
|
|
25
|
+
def account_id=: (String) -> String
|
|
26
|
+
|
|
27
|
+
attr_accessor agent_id: String?
|
|
28
|
+
|
|
29
|
+
attr_reader channel: String?
|
|
30
|
+
|
|
31
|
+
def channel=: (String) -> String
|
|
32
|
+
|
|
33
|
+
attr_reader contact_id: String?
|
|
34
|
+
|
|
35
|
+
def contact_id=: (String) -> String
|
|
36
|
+
|
|
37
|
+
attr_reader from: String?
|
|
38
|
+
|
|
39
|
+
def from=: (String) -> String
|
|
40
|
+
|
|
41
|
+
attr_accessor message_id: String?
|
|
42
|
+
|
|
43
|
+
attr_accessor template_id: String?
|
|
44
|
+
|
|
45
|
+
attr_accessor text: String?
|
|
46
|
+
|
|
47
|
+
attr_accessor to: String?
|
|
48
|
+
|
|
49
|
+
def initialize: (
|
|
50
|
+
opt_out: bool,
|
|
51
|
+
source: String,
|
|
52
|
+
?account_id: String,
|
|
53
|
+
?agent_id: String?,
|
|
54
|
+
?channel: String,
|
|
55
|
+
?contact_id: String,
|
|
56
|
+
?from: String,
|
|
57
|
+
?message_id: String?,
|
|
58
|
+
?template_id: String?,
|
|
59
|
+
?text: String?,
|
|
60
|
+
?to: String?
|
|
61
|
+
) -> void
|
|
62
|
+
|
|
63
|
+
def to_hash: -> {
|
|
64
|
+
opt_out: bool,
|
|
65
|
+
source: String,
|
|
66
|
+
account_id: String,
|
|
67
|
+
agent_id: String?,
|
|
68
|
+
channel: String,
|
|
69
|
+
contact_id: String,
|
|
70
|
+
from: String,
|
|
71
|
+
message_id: String?,
|
|
72
|
+
template_id: String?,
|
|
73
|
+
text: String?,
|
|
74
|
+
to: String?
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
@@ -170,7 +170,10 @@ module Sentdm
|
|
|
170
170
|
buttons: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Button]?,
|
|
171
171
|
content: String,
|
|
172
172
|
footer: String?,
|
|
173
|
-
header: String
|
|
173
|
+
header: String?,
|
|
174
|
+
header_media: Sentdm::ConversationMessagesList::Message::MessageBody::HeaderMedia?,
|
|
175
|
+
media: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Media]?,
|
|
176
|
+
subject: String?
|
|
174
177
|
}
|
|
175
178
|
|
|
176
179
|
class MessageBody < Sentdm::Internal::Type::BaseModel
|
|
@@ -184,18 +187,30 @@ module Sentdm
|
|
|
184
187
|
|
|
185
188
|
attr_accessor header: String?
|
|
186
189
|
|
|
190
|
+
attr_accessor header_media: Sentdm::ConversationMessagesList::Message::MessageBody::HeaderMedia?
|
|
191
|
+
|
|
192
|
+
attr_accessor media: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Media]?
|
|
193
|
+
|
|
194
|
+
attr_accessor subject: String?
|
|
195
|
+
|
|
187
196
|
def initialize: (
|
|
188
197
|
?buttons: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Button]?,
|
|
189
198
|
?content: String,
|
|
190
199
|
?footer: String?,
|
|
191
|
-
?header: String
|
|
200
|
+
?header: String?,
|
|
201
|
+
?header_media: Sentdm::ConversationMessagesList::Message::MessageBody::HeaderMedia?,
|
|
202
|
+
?media: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Media]?,
|
|
203
|
+
?subject: String?
|
|
192
204
|
) -> void
|
|
193
205
|
|
|
194
206
|
def to_hash: -> {
|
|
195
207
|
buttons: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Button]?,
|
|
196
208
|
content: String,
|
|
197
209
|
footer: String?,
|
|
198
|
-
header: String
|
|
210
|
+
header: String?,
|
|
211
|
+
header_media: Sentdm::ConversationMessagesList::Message::MessageBody::HeaderMedia?,
|
|
212
|
+
media: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Media]?,
|
|
213
|
+
subject: String?
|
|
199
214
|
}
|
|
200
215
|
|
|
201
216
|
type button =
|
|
@@ -233,6 +248,36 @@ module Sentdm
|
|
|
233
248
|
value: String
|
|
234
249
|
}
|
|
235
250
|
end
|
|
251
|
+
|
|
252
|
+
type header_media = { type: String, url: String }
|
|
253
|
+
|
|
254
|
+
class HeaderMedia < Sentdm::Internal::Type::BaseModel
|
|
255
|
+
attr_reader type: String?
|
|
256
|
+
|
|
257
|
+
def type=: (String) -> String
|
|
258
|
+
|
|
259
|
+
attr_reader url: String?
|
|
260
|
+
|
|
261
|
+
def url=: (String) -> String
|
|
262
|
+
|
|
263
|
+
def initialize: (?type: String, ?url: String) -> void
|
|
264
|
+
|
|
265
|
+
def to_hash: -> { type: String, url: String }
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
type media = { media_type: String?, url: String }
|
|
269
|
+
|
|
270
|
+
class Media < Sentdm::Internal::Type::BaseModel
|
|
271
|
+
attr_accessor media_type: String?
|
|
272
|
+
|
|
273
|
+
attr_reader url: String?
|
|
274
|
+
|
|
275
|
+
def url=: (String) -> String
|
|
276
|
+
|
|
277
|
+
def initialize: (?media_type: String?, ?url: String) -> void
|
|
278
|
+
|
|
279
|
+
def to_hash: -> { media_type: String?, url: String }
|
|
280
|
+
end
|
|
236
281
|
end
|
|
237
282
|
end
|
|
238
283
|
end
|
|
@@ -5,6 +5,7 @@ module Sentdm
|
|
|
5
5
|
event: String?,
|
|
6
6
|
field: String,
|
|
7
7
|
payload: Sentdm::InboundMessageEventPayload?,
|
|
8
|
+
request_id: String?,
|
|
8
9
|
timestamp: String
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -17,6 +18,8 @@ module Sentdm
|
|
|
17
18
|
|
|
18
19
|
attr_accessor payload: Sentdm::InboundMessageEventPayload?
|
|
19
20
|
|
|
21
|
+
attr_accessor request_id: String?
|
|
22
|
+
|
|
20
23
|
attr_reader timestamp: String?
|
|
21
24
|
|
|
22
25
|
def timestamp=: (String) -> String
|
|
@@ -25,6 +28,7 @@ module Sentdm
|
|
|
25
28
|
?event: String?,
|
|
26
29
|
?field: String,
|
|
27
30
|
?payload: Sentdm::InboundMessageEventPayload?,
|
|
31
|
+
?request_id: String?,
|
|
28
32
|
?timestamp: String
|
|
29
33
|
) -> void
|
|
30
34
|
|
|
@@ -32,6 +36,7 @@ module Sentdm
|
|
|
32
36
|
event: String?,
|
|
33
37
|
field: String,
|
|
34
38
|
payload: Sentdm::InboundMessageEventPayload?,
|
|
39
|
+
request_id: String?,
|
|
35
40
|
timestamp: String
|
|
36
41
|
}
|
|
37
42
|
end
|
|
@@ -5,6 +5,7 @@ module Sentdm
|
|
|
5
5
|
event: String?,
|
|
6
6
|
field: String,
|
|
7
7
|
payload: Sentdm::MessageEventPayload?,
|
|
8
|
+
request_id: String?,
|
|
8
9
|
timestamp: String
|
|
9
10
|
}
|
|
10
11
|
|
|
@@ -17,6 +18,8 @@ module Sentdm
|
|
|
17
18
|
|
|
18
19
|
attr_accessor payload: Sentdm::MessageEventPayload?
|
|
19
20
|
|
|
21
|
+
attr_accessor request_id: String?
|
|
22
|
+
|
|
20
23
|
attr_reader timestamp: String?
|
|
21
24
|
|
|
22
25
|
def timestamp=: (String) -> String
|
|
@@ -25,6 +28,7 @@ module Sentdm
|
|
|
25
28
|
?event: String?,
|
|
26
29
|
?field: String,
|
|
27
30
|
?payload: Sentdm::MessageEventPayload?,
|
|
31
|
+
?request_id: String?,
|
|
28
32
|
?timestamp: String
|
|
29
33
|
) -> void
|
|
30
34
|
|
|
@@ -32,6 +36,7 @@ module Sentdm
|
|
|
32
36
|
event: String?,
|
|
33
37
|
field: String,
|
|
34
38
|
payload: Sentdm::MessageEventPayload?,
|
|
39
|
+
request_id: String?,
|
|
35
40
|
timestamp: String
|
|
36
41
|
}
|
|
37
42
|
end
|
|
@@ -5,9 +5,12 @@ module Sentdm
|
|
|
5
5
|
message_status: String,
|
|
6
6
|
account_id: String,
|
|
7
7
|
agent_id: String?,
|
|
8
|
+
body: String?,
|
|
8
9
|
channel: String,
|
|
9
10
|
message_id: String,
|
|
10
11
|
outbound_number: String,
|
|
12
|
+
schedule_reason: String?,
|
|
13
|
+
scheduled_at: String?,
|
|
11
14
|
template_id: String?,
|
|
12
15
|
template_name: String?,
|
|
13
16
|
updated_at: String
|
|
@@ -22,6 +25,8 @@ module Sentdm
|
|
|
22
25
|
|
|
23
26
|
attr_accessor agent_id: String?
|
|
24
27
|
|
|
28
|
+
attr_accessor body: String?
|
|
29
|
+
|
|
25
30
|
attr_reader channel: String?
|
|
26
31
|
|
|
27
32
|
def channel=: (String) -> String
|
|
@@ -34,6 +39,10 @@ module Sentdm
|
|
|
34
39
|
|
|
35
40
|
def outbound_number=: (String) -> String
|
|
36
41
|
|
|
42
|
+
attr_accessor schedule_reason: String?
|
|
43
|
+
|
|
44
|
+
attr_accessor scheduled_at: String?
|
|
45
|
+
|
|
37
46
|
attr_accessor template_id: String?
|
|
38
47
|
|
|
39
48
|
attr_accessor template_name: String?
|
|
@@ -46,9 +55,12 @@ module Sentdm
|
|
|
46
55
|
message_status: String,
|
|
47
56
|
?account_id: String,
|
|
48
57
|
?agent_id: String?,
|
|
58
|
+
?body: String?,
|
|
49
59
|
?channel: String,
|
|
50
60
|
?message_id: String,
|
|
51
61
|
?outbound_number: String,
|
|
62
|
+
?schedule_reason: String?,
|
|
63
|
+
?scheduled_at: String?,
|
|
52
64
|
?template_id: String?,
|
|
53
65
|
?template_name: String?,
|
|
54
66
|
?updated_at: String
|
|
@@ -58,9 +70,12 @@ module Sentdm
|
|
|
58
70
|
message_status: String,
|
|
59
71
|
account_id: String,
|
|
60
72
|
agent_id: String?,
|
|
73
|
+
body: String?,
|
|
61
74
|
channel: String,
|
|
62
75
|
message_id: String,
|
|
63
76
|
outbound_number: String,
|
|
77
|
+
schedule_reason: String?,
|
|
78
|
+
scheduled_at: String?,
|
|
64
79
|
template_id: String?,
|
|
65
80
|
template_name: String?,
|
|
66
81
|
updated_at: String
|
|
@@ -75,6 +75,7 @@ module Sentdm
|
|
|
75
75
|
description: String,
|
|
76
76
|
from: String?,
|
|
77
77
|
price: String?,
|
|
78
|
+
scheduled_at: Time?,
|
|
78
79
|
status: String,
|
|
79
80
|
timestamp: Time
|
|
80
81
|
}
|
|
@@ -90,6 +91,8 @@ module Sentdm
|
|
|
90
91
|
|
|
91
92
|
attr_accessor price: String?
|
|
92
93
|
|
|
94
|
+
attr_accessor scheduled_at: Time?
|
|
95
|
+
|
|
93
96
|
attr_reader status: String?
|
|
94
97
|
|
|
95
98
|
def status=: (String) -> String
|
|
@@ -103,6 +106,7 @@ module Sentdm
|
|
|
103
106
|
?description: String,
|
|
104
107
|
?from: String?,
|
|
105
108
|
?price: String?,
|
|
109
|
+
?scheduled_at: Time?,
|
|
106
110
|
?status: String,
|
|
107
111
|
?timestamp: Time
|
|
108
112
|
) -> void
|
|
@@ -112,6 +116,7 @@ module Sentdm
|
|
|
112
116
|
description: String,
|
|
113
117
|
from: String?,
|
|
114
118
|
price: String?,
|
|
119
|
+
scheduled_at: Time?,
|
|
115
120
|
status: String,
|
|
116
121
|
timestamp: Time
|
|
117
122
|
}
|
|
@@ -178,7 +178,10 @@ module Sentdm
|
|
|
178
178
|
buttons: ::Array[Sentdm::Models::MessageRetrieveStatusResponse::Data::MessageBody::Button]?,
|
|
179
179
|
content: String,
|
|
180
180
|
footer: String?,
|
|
181
|
-
header: String
|
|
181
|
+
header: String?,
|
|
182
|
+
header_media: Sentdm::Models::MessageRetrieveStatusResponse::Data::MessageBody::HeaderMedia?,
|
|
183
|
+
media: ::Array[Sentdm::Models::MessageRetrieveStatusResponse::Data::MessageBody::Media]?,
|
|
184
|
+
subject: String?
|
|
182
185
|
}
|
|
183
186
|
|
|
184
187
|
class MessageBody < Sentdm::Internal::Type::BaseModel
|
|
@@ -192,18 +195,30 @@ module Sentdm
|
|
|
192
195
|
|
|
193
196
|
attr_accessor header: String?
|
|
194
197
|
|
|
198
|
+
attr_accessor header_media: Sentdm::Models::MessageRetrieveStatusResponse::Data::MessageBody::HeaderMedia?
|
|
199
|
+
|
|
200
|
+
attr_accessor media: ::Array[Sentdm::Models::MessageRetrieveStatusResponse::Data::MessageBody::Media]?
|
|
201
|
+
|
|
202
|
+
attr_accessor subject: String?
|
|
203
|
+
|
|
195
204
|
def initialize: (
|
|
196
205
|
?buttons: ::Array[Sentdm::Models::MessageRetrieveStatusResponse::Data::MessageBody::Button]?,
|
|
197
206
|
?content: String,
|
|
198
207
|
?footer: String?,
|
|
199
|
-
?header: String
|
|
208
|
+
?header: String?,
|
|
209
|
+
?header_media: Sentdm::Models::MessageRetrieveStatusResponse::Data::MessageBody::HeaderMedia?,
|
|
210
|
+
?media: ::Array[Sentdm::Models::MessageRetrieveStatusResponse::Data::MessageBody::Media]?,
|
|
211
|
+
?subject: String?
|
|
200
212
|
) -> void
|
|
201
213
|
|
|
202
214
|
def to_hash: -> {
|
|
203
215
|
buttons: ::Array[Sentdm::Models::MessageRetrieveStatusResponse::Data::MessageBody::Button]?,
|
|
204
216
|
content: String,
|
|
205
217
|
footer: String?,
|
|
206
|
-
header: String
|
|
218
|
+
header: String?,
|
|
219
|
+
header_media: Sentdm::Models::MessageRetrieveStatusResponse::Data::MessageBody::HeaderMedia?,
|
|
220
|
+
media: ::Array[Sentdm::Models::MessageRetrieveStatusResponse::Data::MessageBody::Media]?,
|
|
221
|
+
subject: String?
|
|
207
222
|
}
|
|
208
223
|
|
|
209
224
|
type button =
|
|
@@ -241,6 +256,36 @@ module Sentdm
|
|
|
241
256
|
value: String
|
|
242
257
|
}
|
|
243
258
|
end
|
|
259
|
+
|
|
260
|
+
type header_media = { type: String, url: String }
|
|
261
|
+
|
|
262
|
+
class HeaderMedia < Sentdm::Internal::Type::BaseModel
|
|
263
|
+
attr_reader type: String?
|
|
264
|
+
|
|
265
|
+
def type=: (String) -> String
|
|
266
|
+
|
|
267
|
+
attr_reader url: String?
|
|
268
|
+
|
|
269
|
+
def url=: (String) -> String
|
|
270
|
+
|
|
271
|
+
def initialize: (?type: String, ?url: String) -> void
|
|
272
|
+
|
|
273
|
+
def to_hash: -> { type: String, url: String }
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
type media = { media_type: String?, url: String }
|
|
277
|
+
|
|
278
|
+
class Media < Sentdm::Internal::Type::BaseModel
|
|
279
|
+
attr_accessor media_type: String?
|
|
280
|
+
|
|
281
|
+
attr_reader url: String?
|
|
282
|
+
|
|
283
|
+
def url=: (String) -> String
|
|
284
|
+
|
|
285
|
+
def initialize: (?media_type: String?, ?url: String) -> void
|
|
286
|
+
|
|
287
|
+
def to_hash: -> { media_type: String?, url: String }
|
|
288
|
+
end
|
|
244
289
|
end
|
|
245
290
|
end
|
|
246
291
|
end
|
|
@@ -3,7 +3,10 @@ module Sentdm
|
|
|
3
3
|
type message_send_params =
|
|
4
4
|
{
|
|
5
5
|
channel: ::Array[String]?,
|
|
6
|
+
media_urls: ::Array[String]?,
|
|
6
7
|
sandbox: bool,
|
|
8
|
+
scheduled_at: Time?,
|
|
9
|
+
subject: String?,
|
|
7
10
|
template: Sentdm::MessageSendParams::Template?,
|
|
8
11
|
text: String?,
|
|
9
12
|
to: ::Array[String],
|
|
@@ -18,10 +21,16 @@ module Sentdm
|
|
|
18
21
|
|
|
19
22
|
attr_accessor channel: ::Array[String]?
|
|
20
23
|
|
|
24
|
+
attr_accessor media_urls: ::Array[String]?
|
|
25
|
+
|
|
21
26
|
attr_reader sandbox: bool?
|
|
22
27
|
|
|
23
28
|
def sandbox=: (bool) -> bool
|
|
24
29
|
|
|
30
|
+
attr_accessor scheduled_at: Time?
|
|
31
|
+
|
|
32
|
+
attr_accessor subject: String?
|
|
33
|
+
|
|
25
34
|
attr_accessor template: Sentdm::MessageSendParams::Template?
|
|
26
35
|
|
|
27
36
|
attr_accessor text: String?
|
|
@@ -40,7 +49,10 @@ module Sentdm
|
|
|
40
49
|
|
|
41
50
|
def initialize: (
|
|
42
51
|
?channel: ::Array[String]?,
|
|
52
|
+
?media_urls: ::Array[String]?,
|
|
43
53
|
?sandbox: bool,
|
|
54
|
+
?scheduled_at: Time?,
|
|
55
|
+
?subject: String?,
|
|
44
56
|
?template: Sentdm::MessageSendParams::Template?,
|
|
45
57
|
?text: String?,
|
|
46
58
|
?to: ::Array[String],
|
|
@@ -51,7 +63,10 @@ module Sentdm
|
|
|
51
63
|
|
|
52
64
|
def to_hash: -> {
|
|
53
65
|
channel: ::Array[String]?,
|
|
66
|
+
media_urls: ::Array[String]?,
|
|
54
67
|
sandbox: bool,
|
|
68
|
+
scheduled_at: Time?,
|
|
69
|
+
subject: String?,
|
|
55
70
|
template: Sentdm::MessageSendParams::Template?,
|
|
56
71
|
text: String?,
|
|
57
72
|
to: ::Array[String],
|