sentdm 0.32.0 → 0.34.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_payload.rb +154 -7
- data/lib/sentdm/models/contact_event.rb +15 -7
- data/lib/sentdm/models/contact_event_payload.rb +77 -16
- data/lib/sentdm/models/conversation_messages_list.rb +214 -6
- data/lib/sentdm/models/inbound_message_event_payload.rb +70 -3
- data/lib/sentdm/models/me_retrieve_response.rb +21 -1
- data/lib/sentdm/models/message_event_payload.rb +42 -1
- data/lib/sentdm/models/message_retrieve_activities_response.rb +42 -5
- data/lib/sentdm/models/message_retrieve_status_response.rb +222 -8
- 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_body.rb +82 -1
- data/lib/sentdm/models/template_create_params.rb +11 -1
- data/lib/sentdm/models/template_header.rb +91 -3
- data/lib/sentdm/models/template_variable.rb +15 -1
- data/lib/sentdm/models/webhook_create_params.rb +31 -1
- data/lib/sentdm/models/webhook_list_events_response.rb +497 -9
- data/lib/sentdm/models/webhook_update_params.rb +31 -1
- data/lib/sentdm/resources/me.rb +5 -0
- data/lib/sentdm/resources/messages.rb +33 -5
- data/lib/sentdm/resources/templates.rb +3 -1
- data/lib/sentdm/resources/webhooks.rb +9 -3
- data/lib/sentdm/version.rb +1 -1
- data/lib/sentdm.rb +1 -1
- data/rbi/sentdm/client.rbi +6 -0
- data/rbi/sentdm/models/channel_event_payload.rbi +273 -10
- data/rbi/sentdm/models/contact_event.rbi +28 -12
- data/rbi/sentdm/models/contact_event_payload.rbi +118 -28
- data/rbi/sentdm/models/conversation_messages_list.rbi +308 -10
- data/rbi/sentdm/models/inbound_message_event_payload.rbi +110 -2
- data/rbi/sentdm/models/me_retrieve_response.rbi +35 -0
- data/rbi/sentdm/models/message_event_payload.rbi +50 -0
- data/rbi/sentdm/models/message_retrieve_activities_response.rbi +49 -5
- data/rbi/sentdm/models/message_retrieve_status_response.rbi +320 -12
- 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_body.rbi +133 -0
- data/rbi/sentdm/models/template_create_params.rbi +15 -0
- data/rbi/sentdm/models/template_header.rbi +143 -2
- data/rbi/sentdm/models/template_variable.rbi +10 -0
- data/rbi/sentdm/models/webhook_create_params.rbi +61 -0
- data/rbi/sentdm/models/webhook_list_events_response.rbi +747 -12
- data/rbi/sentdm/models/webhook_update_params.rbi +61 -0
- data/rbi/sentdm/resources/me.rbi +5 -0
- data/rbi/sentdm/resources/messages.rbi +58 -3
- data/rbi/sentdm/resources/templates.rbi +6 -0
- data/rbi/sentdm/resources/webhooks.rbi +15 -1
- data/sig/sentdm/models/channel_event_payload.rbs +62 -0
- data/sig/sentdm/models/contact_event_payload.rbs +24 -9
- data/sig/sentdm/models/conversation_messages_list.rbs +99 -6
- data/sig/sentdm/models/inbound_message_event_payload.rbs +37 -0
- data/sig/sentdm/models/me_retrieve_response.rbs +7 -0
- data/sig/sentdm/models/message_event_payload.rbs +20 -0
- data/sig/sentdm/models/message_retrieve_activities_response.rbs +15 -0
- data/sig/sentdm/models/message_retrieve_status_response.rbs +99 -6
- data/sig/sentdm/models/message_send_params.rbs +15 -0
- data/sig/sentdm/models/template_body.rbs +44 -0
- data/sig/sentdm/models/template_create_params.rbs +7 -0
- data/sig/sentdm/models/template_header.rbs +44 -0
- data/sig/sentdm/models/webhook_create_params.rbs +29 -0
- data/sig/sentdm/models/webhook_list_events_response.rbs +252 -0
- data/sig/sentdm/models/webhook_update_params.rbs +29 -0
- data/sig/sentdm/resources/messages.rbs +3 -0
- data/sig/sentdm/resources/templates.rbs +1 -0
- data/sig/sentdm/resources/webhooks.rbs +2 -0
- metadata +2 -2
|
@@ -49,6 +49,19 @@ module Sentdm
|
|
|
49
49
|
sig { params(sandbox: T::Boolean).void }
|
|
50
50
|
attr_writer :sandbox
|
|
51
51
|
|
|
52
|
+
# Request-only: the events an organization webhook's sender profile clones
|
|
53
|
+
# receive, one clone per existing and future profile. Responses never return it.
|
|
54
|
+
sig { returns(T.nilable(Sentdm::WebhookUpdateParams::SenderProfile)) }
|
|
55
|
+
attr_reader :sender_profile
|
|
56
|
+
|
|
57
|
+
sig do
|
|
58
|
+
params(
|
|
59
|
+
sender_profile:
|
|
60
|
+
T.nilable(Sentdm::WebhookUpdateParams::SenderProfile::OrHash)
|
|
61
|
+
).void
|
|
62
|
+
end
|
|
63
|
+
attr_writer :sender_profile
|
|
64
|
+
|
|
52
65
|
sig { returns(T.nilable(Integer)) }
|
|
53
66
|
attr_reader :timeout_seconds
|
|
54
67
|
|
|
@@ -76,6 +89,8 @@ module Sentdm
|
|
|
76
89
|
event_types: T::Array[String],
|
|
77
90
|
retry_count: Integer,
|
|
78
91
|
sandbox: T::Boolean,
|
|
92
|
+
sender_profile:
|
|
93
|
+
T.nilable(Sentdm::WebhookUpdateParams::SenderProfile::OrHash),
|
|
79
94
|
timeout_seconds: Integer,
|
|
80
95
|
idempotency_key: String,
|
|
81
96
|
x_profile_id: String,
|
|
@@ -92,6 +107,9 @@ module Sentdm
|
|
|
92
107
|
# Sandbox flag - when true, the operation is simulated without side effects Useful
|
|
93
108
|
# for testing integrations without actual execution
|
|
94
109
|
sandbox: nil,
|
|
110
|
+
# Request-only: the events an organization webhook's sender profile clones
|
|
111
|
+
# receive, one clone per existing and future profile. Responses never return it.
|
|
112
|
+
sender_profile: nil,
|
|
95
113
|
timeout_seconds: nil,
|
|
96
114
|
idempotency_key: nil,
|
|
97
115
|
x_profile_id: nil,
|
|
@@ -109,6 +127,8 @@ module Sentdm
|
|
|
109
127
|
event_types: T::Array[String],
|
|
110
128
|
retry_count: Integer,
|
|
111
129
|
sandbox: T::Boolean,
|
|
130
|
+
sender_profile:
|
|
131
|
+
T.nilable(Sentdm::WebhookUpdateParams::SenderProfile),
|
|
112
132
|
timeout_seconds: Integer,
|
|
113
133
|
idempotency_key: String,
|
|
114
134
|
x_profile_id: String,
|
|
@@ -118,6 +138,47 @@ module Sentdm
|
|
|
118
138
|
end
|
|
119
139
|
def to_hash
|
|
120
140
|
end
|
|
141
|
+
|
|
142
|
+
class SenderProfile < Sentdm::Internal::Type::BaseModel
|
|
143
|
+
OrHash =
|
|
144
|
+
T.type_alias do
|
|
145
|
+
T.any(
|
|
146
|
+
Sentdm::WebhookUpdateParams::SenderProfile,
|
|
147
|
+
Sentdm::Internal::AnyHash
|
|
148
|
+
)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
sig { returns(T.nilable(T::Hash[Symbol, T::Array[String]])) }
|
|
152
|
+
attr_accessor :event_filters
|
|
153
|
+
|
|
154
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
155
|
+
attr_reader :event_types
|
|
156
|
+
|
|
157
|
+
sig { params(event_types: T::Array[String]).void }
|
|
158
|
+
attr_writer :event_types
|
|
159
|
+
|
|
160
|
+
# Request-only: the events an organization webhook's sender profile clones
|
|
161
|
+
# receive, one clone per existing and future profile. Responses never return it.
|
|
162
|
+
sig do
|
|
163
|
+
params(
|
|
164
|
+
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
165
|
+
event_types: T::Array[String]
|
|
166
|
+
).returns(T.attached_class)
|
|
167
|
+
end
|
|
168
|
+
def self.new(event_filters: nil, event_types: nil)
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
sig do
|
|
172
|
+
override.returns(
|
|
173
|
+
{
|
|
174
|
+
event_filters: T.nilable(T::Hash[Symbol, T::Array[String]]),
|
|
175
|
+
event_types: T::Array[String]
|
|
176
|
+
}
|
|
177
|
+
)
|
|
178
|
+
end
|
|
179
|
+
def to_hash
|
|
180
|
+
end
|
|
181
|
+
end
|
|
121
182
|
end
|
|
122
183
|
end
|
|
123
184
|
end
|
data/rbi/sentdm/resources/me.rbi
CHANGED
|
@@ -35,6 +35,11 @@ module Sentdm
|
|
|
35
35
|
# `sending_phone_number_profile_id` names the account that holds that number in
|
|
36
36
|
# inventory — normally this account, and a different one where a number is shared.
|
|
37
37
|
# Both are `null` when the account has no US SMS sender.
|
|
38
|
+
#
|
|
39
|
+
# **Template auto-creation:** `enable_template_auto_creation_for_sp` reports
|
|
40
|
+
# whether this account may mark a template for automatic creation on its sender
|
|
41
|
+
# profiles. It is granted by Sent and off by default. A `profile` reports `false`,
|
|
42
|
+
# having no sender profiles of its own to create anything on.
|
|
38
43
|
sig do
|
|
39
44
|
params(
|
|
40
45
|
x_profile_id: String,
|
|
@@ -13,9 +13,17 @@ module Sentdm
|
|
|
13
13
|
# **A message needs a sender.** What you can send, where, and at what cost is
|
|
14
14
|
# decided by the markets under **Channels** — so a recipient in a country you hold
|
|
15
15
|
# no sender for is refused here rather than queued.
|
|
16
|
+
#
|
|
17
|
+
# **A message can be resent on its id.** `POST /v3/messages/{id}/resend` puts a
|
|
18
|
+
# finished message — typically one BLOCKED for insufficient balance — back through
|
|
19
|
+
# the send pipeline. It is a new attempt, not a free retry: every policy runs
|
|
20
|
+
# again, the message is billed again, and its status webhooks fire again. A
|
|
21
|
+
# FILTERED message is never resendable.
|
|
16
22
|
class Messages
|
|
17
23
|
# Retrieves the activity log for a specific message. Activities track the message
|
|
18
|
-
# lifecycle including acceptance, processing, sending, delivery, and any errors.
|
|
24
|
+
# lifecycle including acceptance, processing, sending, delivery, and any errors. A
|
|
25
|
+
# SCHEDULED entry carries scheduled_at, the release instant in UTC as it stood at
|
|
26
|
+
# that moment. Other entries have no scheduled_at key.
|
|
19
27
|
sig do
|
|
20
28
|
params(
|
|
21
29
|
id: String,
|
|
@@ -34,7 +42,11 @@ module Sentdm
|
|
|
34
42
|
end
|
|
35
43
|
|
|
36
44
|
# Retrieves the current status and details of a message by ID. Includes delivery
|
|
37
|
-
# status, timestamps, and error information if applicable.
|
|
45
|
+
# status, timestamps, and error information if applicable. A message that is or
|
|
46
|
+
# was held for a later time (a send you scheduled with scheduled_at, or a
|
|
47
|
+
# quiet-hours hold) is returned as a ScheduledMessageResponse: the same fields
|
|
48
|
+
# plus scheduled_at, the release instant in UTC. A message sent immediately has no
|
|
49
|
+
# scheduled_at key.
|
|
38
50
|
sig do
|
|
39
51
|
params(
|
|
40
52
|
id: String,
|
|
@@ -61,11 +73,24 @@ module Sentdm
|
|
|
61
73
|
# insufficient balance, a template not approved for sending, or free-form content
|
|
62
74
|
# with no open conversation with the contact. The send is accepted with 202 and
|
|
63
75
|
# the affected messages are reported as BLOCKED on GET /messages/{id} and the
|
|
64
|
-
# message.blocked webhook.
|
|
76
|
+
# message.blocked webhook. To send later, set scheduled_at (ISO-8601 with an
|
|
77
|
+
# explicit UTC offset; a value without one is rejected) between 1 minute and 30
|
|
78
|
+
# days ahead: the response is a ScheduledSendMessageResponse (the same fields plus
|
|
79
|
+
# scheduled_at; status is still QUEUED), each message then moves to SCHEDULED, is
|
|
80
|
+
# held and released at that time (within a few minutes), and a message.scheduled
|
|
81
|
+
# webhook fires once it is held. Balance and template approval are evaluated at
|
|
82
|
+
# release, not at acceptance. Quiet hours are not checked when the request is
|
|
83
|
+
# accepted: if the time falls inside a legally protected quiet-hours window for a
|
|
84
|
+
# recipient, that message is moved to the next allowed time at release and a
|
|
85
|
+
# second message.scheduled webhook reports the new scheduled_at. An account may
|
|
86
|
+
# hold at most 1,000,000 scheduled messages at once (429 LIMIT_001).
|
|
65
87
|
sig do
|
|
66
88
|
params(
|
|
67
89
|
channel: T.nilable(T::Array[String]),
|
|
90
|
+
media_urls: T.nilable(T::Array[String]),
|
|
68
91
|
sandbox: T::Boolean,
|
|
92
|
+
scheduled_at: T.nilable(Time),
|
|
93
|
+
subject: T.nilable(String),
|
|
69
94
|
template: T.nilable(Sentdm::MessageSendParams::Template::OrHash),
|
|
70
95
|
text: T.nilable(String),
|
|
71
96
|
to: T::Array[String],
|
|
@@ -79,9 +104,39 @@ module Sentdm
|
|
|
79
104
|
# produces a separate message per recipient. "sent" = auto-detect. Defaults to
|
|
80
105
|
# ["sent"] (auto-detect) if omitted.
|
|
81
106
|
channel: nil,
|
|
107
|
+
# Body param: Attachments for this send, as publicly fetchable https URLs. Used by
|
|
108
|
+
# the MMS channel and ignored by every other one.
|
|
109
|
+
#
|
|
110
|
+
# Supplying these replaces the media on the template's mms body rather than adding
|
|
111
|
+
# to it, so a template can hold a default creative while a caller still sends
|
|
112
|
+
# something recipient-specific.
|
|
113
|
+
#
|
|
114
|
+
# Their presence is also what makes a message eligible for MMS on an auto-detect
|
|
115
|
+
# send: a message with nothing attached is delivered as SMS, because an MMS with
|
|
116
|
+
# no media is a more expensive text message.
|
|
117
|
+
#
|
|
118
|
+
# The recipient's carrier fetches each URL after the send is accepted, so it must
|
|
119
|
+
# stay publicly reachable — a link that expires, or one behind auth, arrives as a
|
|
120
|
+
# failed message.
|
|
121
|
+
media_urls: nil,
|
|
82
122
|
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
83
123
|
# effects Useful for testing integrations without actual execution
|
|
84
124
|
sandbox: nil,
|
|
125
|
+
# Body param: Optional future send time as an ISO-8601 timestamp with an explicit
|
|
126
|
+
# UTC offset, e.g. 2026-10-01T09:00:00+02:00 or 2026-10-01T07:00:00Z. A value
|
|
127
|
+
# without an offset is rejected (400) rather than read in the server's zone. The
|
|
128
|
+
# offset only fixes the instant: it is stored and echoed in UTC as scheduled_at.
|
|
129
|
+
# Omit to send now. Must be at least one minute ahead and at most 30 days ahead.
|
|
130
|
+
# Accepted messages report SCHEDULED and are released for delivery at this time.
|
|
131
|
+
# Quiet hours, balance and template approval are evaluated at release, not at
|
|
132
|
+
# acceptance: a message whose time falls inside a recipient's protected
|
|
133
|
+
# quiet-hours window is moved to the next allowed time and a second
|
|
134
|
+
# message.scheduled webhook reports the new scheduled_at.
|
|
135
|
+
scheduled_at: nil,
|
|
136
|
+
# Body param: Subject line for this send, overriding the template's. MMS only;
|
|
137
|
+
# ignored on every other channel. Most handsets render it above the body, some
|
|
138
|
+
# ignore it entirely.
|
|
139
|
+
subject: nil,
|
|
85
140
|
# Body param: SDK-style template reference: resolve by ID or by name, with
|
|
86
141
|
# optional parameters.
|
|
87
142
|
template: nil,
|
|
@@ -17,6 +17,7 @@ module Sentdm
|
|
|
17
17
|
# `PUT /v3/templates/{id}`.
|
|
18
18
|
sig do
|
|
19
19
|
params(
|
|
20
|
+
auto_create_for_sp: T::Boolean,
|
|
20
21
|
category: T.nilable(String),
|
|
21
22
|
creation_source: T.nilable(String),
|
|
22
23
|
definition: Sentdm::TemplateDefinition::OrHash,
|
|
@@ -29,6 +30,11 @@ module Sentdm
|
|
|
29
30
|
).returns(Sentdm::APIResponseTemplate)
|
|
30
31
|
end
|
|
31
32
|
def create(
|
|
33
|
+
# Body param: Create this template automatically on every sender profile of the
|
|
34
|
+
# organization, now and in future (default: false). Accepted only from an
|
|
35
|
+
# organization that has been enabled for it, and only at creation — it cannot be
|
|
36
|
+
# changed afterwards.
|
|
37
|
+
auto_create_for_sp: nil,
|
|
32
38
|
# Body param: Template category: MARKETING, UTILITY, AUTHENTICATION (optional,
|
|
33
39
|
# auto-detected if not provided)
|
|
34
40
|
category: nil,
|
|
@@ -23,6 +23,8 @@ module Sentdm
|
|
|
23
23
|
event_types: T::Array[String],
|
|
24
24
|
retry_count: Integer,
|
|
25
25
|
sandbox: T::Boolean,
|
|
26
|
+
sender_profile:
|
|
27
|
+
T.nilable(Sentdm::WebhookCreateParams::SenderProfile::OrHash),
|
|
26
28
|
timeout_seconds: Integer,
|
|
27
29
|
idempotency_key: String,
|
|
28
30
|
x_profile_id: String,
|
|
@@ -43,6 +45,10 @@ module Sentdm
|
|
|
43
45
|
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
44
46
|
# effects Useful for testing integrations without actual execution
|
|
45
47
|
sandbox: nil,
|
|
48
|
+
# Body param: Request-only: the events an organization webhook's sender profile
|
|
49
|
+
# clones receive, one clone per existing and future profile. Responses never
|
|
50
|
+
# return it.
|
|
51
|
+
sender_profile: nil,
|
|
46
52
|
# Body param
|
|
47
53
|
timeout_seconds: nil,
|
|
48
54
|
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
@@ -84,6 +90,8 @@ module Sentdm
|
|
|
84
90
|
event_types: T::Array[String],
|
|
85
91
|
retry_count: Integer,
|
|
86
92
|
sandbox: T::Boolean,
|
|
93
|
+
sender_profile:
|
|
94
|
+
T.nilable(Sentdm::WebhookUpdateParams::SenderProfile::OrHash),
|
|
87
95
|
timeout_seconds: Integer,
|
|
88
96
|
idempotency_key: String,
|
|
89
97
|
x_profile_id: String,
|
|
@@ -106,6 +114,10 @@ module Sentdm
|
|
|
106
114
|
# Body param: Sandbox flag - when true, the operation is simulated without side
|
|
107
115
|
# effects Useful for testing integrations without actual execution
|
|
108
116
|
sandbox: nil,
|
|
117
|
+
# Body param: Request-only: the events an organization webhook's sender profile
|
|
118
|
+
# clones receive, one clone per existing and future profile. Responses never
|
|
119
|
+
# return it.
|
|
120
|
+
sender_profile: nil,
|
|
109
121
|
# Body param
|
|
110
122
|
timeout_seconds: nil,
|
|
111
123
|
# Header param: Unique key to ensure idempotent request processing. Must be 1-255
|
|
@@ -180,7 +192,9 @@ module Sentdm
|
|
|
180
192
|
)
|
|
181
193
|
end
|
|
182
194
|
|
|
183
|
-
# Retrieves a paginated list of delivery events for the specified webhook.
|
|
195
|
+
# Retrieves a paginated list of delivery events for the specified webhook. If the
|
|
196
|
+
# webhook is cloned onto your sender profiles, the list includes what those clones
|
|
197
|
+
# received; read payload.account_id to tell whose event it is.
|
|
184
198
|
sig do
|
|
185
199
|
params(
|
|
186
200
|
id: String,
|
|
@@ -5,8 +5,10 @@ module Sentdm
|
|
|
5
5
|
country: String,
|
|
6
6
|
account_id: String,
|
|
7
7
|
channel: String,
|
|
8
|
+
compliance: Sentdm::ChannelEventPayload::Compliance?,
|
|
8
9
|
number_type: String?,
|
|
9
10
|
reason: String?,
|
|
11
|
+
reason_code: String?,
|
|
10
12
|
sender_value: String?,
|
|
11
13
|
status: String,
|
|
12
14
|
updated_at: String
|
|
@@ -23,10 +25,14 @@ module Sentdm
|
|
|
23
25
|
|
|
24
26
|
def channel=: (String) -> String
|
|
25
27
|
|
|
28
|
+
attr_accessor compliance: Sentdm::ChannelEventPayload::Compliance?
|
|
29
|
+
|
|
26
30
|
attr_accessor number_type: String?
|
|
27
31
|
|
|
28
32
|
attr_accessor reason: String?
|
|
29
33
|
|
|
34
|
+
attr_accessor reason_code: String?
|
|
35
|
+
|
|
30
36
|
attr_accessor sender_value: String?
|
|
31
37
|
|
|
32
38
|
attr_reader status: String?
|
|
@@ -41,8 +47,10 @@ module Sentdm
|
|
|
41
47
|
country: String,
|
|
42
48
|
?account_id: String,
|
|
43
49
|
?channel: String,
|
|
50
|
+
?compliance: Sentdm::ChannelEventPayload::Compliance?,
|
|
44
51
|
?number_type: String?,
|
|
45
52
|
?reason: String?,
|
|
53
|
+
?reason_code: String?,
|
|
46
54
|
?sender_value: String?,
|
|
47
55
|
?status: String,
|
|
48
56
|
?updated_at: String
|
|
@@ -52,12 +60,66 @@ module Sentdm
|
|
|
52
60
|
country: String,
|
|
53
61
|
account_id: String,
|
|
54
62
|
channel: String,
|
|
63
|
+
compliance: Sentdm::ChannelEventPayload::Compliance?,
|
|
55
64
|
number_type: String?,
|
|
56
65
|
reason: String?,
|
|
66
|
+
reason_code: String?,
|
|
57
67
|
sender_value: String?,
|
|
58
68
|
status: String,
|
|
59
69
|
updated_at: String
|
|
60
70
|
}
|
|
71
|
+
|
|
72
|
+
type compliance =
|
|
73
|
+
{
|
|
74
|
+
brand: ::Hash[Symbol, top]?,
|
|
75
|
+
campaign: ::Hash[Symbol, top]?,
|
|
76
|
+
documents: ::Array[Sentdm::ChannelEventPayload::Compliance::Document]?
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
class Compliance < Sentdm::Internal::Type::BaseModel
|
|
80
|
+
attr_accessor brand: ::Hash[Symbol, top]?
|
|
81
|
+
|
|
82
|
+
attr_accessor campaign: ::Hash[Symbol, top]?
|
|
83
|
+
|
|
84
|
+
attr_accessor documents: ::Array[Sentdm::ChannelEventPayload::Compliance::Document]?
|
|
85
|
+
|
|
86
|
+
def initialize: (
|
|
87
|
+
?brand: ::Hash[Symbol, top]?,
|
|
88
|
+
?campaign: ::Hash[Symbol, top]?,
|
|
89
|
+
?documents: ::Array[Sentdm::ChannelEventPayload::Compliance::Document]?
|
|
90
|
+
) -> void
|
|
91
|
+
|
|
92
|
+
def to_hash: -> {
|
|
93
|
+
brand: ::Hash[Symbol, top]?,
|
|
94
|
+
campaign: ::Hash[Symbol, top]?,
|
|
95
|
+
documents: ::Array[Sentdm::ChannelEventPayload::Compliance::Document]?
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
type document =
|
|
99
|
+
{ document_id: String?, file_name: String?, key: String }
|
|
100
|
+
|
|
101
|
+
class Document < Sentdm::Internal::Type::BaseModel
|
|
102
|
+
attr_accessor document_id: String?
|
|
103
|
+
|
|
104
|
+
attr_accessor file_name: String?
|
|
105
|
+
|
|
106
|
+
attr_reader key: String?
|
|
107
|
+
|
|
108
|
+
def key=: (String) -> String
|
|
109
|
+
|
|
110
|
+
def initialize: (
|
|
111
|
+
?document_id: String?,
|
|
112
|
+
?file_name: String?,
|
|
113
|
+
?key: String
|
|
114
|
+
) -> void
|
|
115
|
+
|
|
116
|
+
def to_hash: -> {
|
|
117
|
+
document_id: String?,
|
|
118
|
+
file_name: String?,
|
|
119
|
+
key: String
|
|
120
|
+
}
|
|
121
|
+
end
|
|
122
|
+
end
|
|
61
123
|
end
|
|
62
124
|
end
|
|
63
125
|
end
|
|
@@ -5,11 +5,14 @@ module Sentdm
|
|
|
5
5
|
opt_out: bool,
|
|
6
6
|
source: String,
|
|
7
7
|
account_id: String,
|
|
8
|
+
agent_id: String?,
|
|
8
9
|
channel: String,
|
|
9
10
|
contact_id: String,
|
|
11
|
+
from: String,
|
|
10
12
|
message_id: String?,
|
|
11
|
-
|
|
12
|
-
text: String
|
|
13
|
+
template_id: String?,
|
|
14
|
+
text: String?,
|
|
15
|
+
to: String?
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
class ContactEventPayload < Sentdm::Internal::Type::BaseModel
|
|
@@ -21,6 +24,8 @@ module Sentdm
|
|
|
21
24
|
|
|
22
25
|
def account_id=: (String) -> String
|
|
23
26
|
|
|
27
|
+
attr_accessor agent_id: String?
|
|
28
|
+
|
|
24
29
|
attr_reader channel: String?
|
|
25
30
|
|
|
26
31
|
def channel=: (String) -> String
|
|
@@ -29,34 +34,44 @@ module Sentdm
|
|
|
29
34
|
|
|
30
35
|
def contact_id=: (String) -> String
|
|
31
36
|
|
|
32
|
-
|
|
37
|
+
attr_reader from: String?
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
def from=: (String) -> String
|
|
35
40
|
|
|
36
|
-
|
|
41
|
+
attr_accessor message_id: String?
|
|
42
|
+
|
|
43
|
+
attr_accessor template_id: String?
|
|
37
44
|
|
|
38
45
|
attr_accessor text: String?
|
|
39
46
|
|
|
47
|
+
attr_accessor to: String?
|
|
48
|
+
|
|
40
49
|
def initialize: (
|
|
41
50
|
opt_out: bool,
|
|
42
51
|
source: String,
|
|
43
52
|
?account_id: String,
|
|
53
|
+
?agent_id: String?,
|
|
44
54
|
?channel: String,
|
|
45
55
|
?contact_id: String,
|
|
56
|
+
?from: String,
|
|
46
57
|
?message_id: String?,
|
|
47
|
-
?
|
|
48
|
-
?text: String
|
|
58
|
+
?template_id: String?,
|
|
59
|
+
?text: String?,
|
|
60
|
+
?to: String?
|
|
49
61
|
) -> void
|
|
50
62
|
|
|
51
63
|
def to_hash: -> {
|
|
52
64
|
opt_out: bool,
|
|
53
65
|
source: String,
|
|
54
66
|
account_id: String,
|
|
67
|
+
agent_id: String?,
|
|
55
68
|
channel: String,
|
|
56
69
|
contact_id: String,
|
|
70
|
+
from: String,
|
|
57
71
|
message_id: String?,
|
|
58
|
-
|
|
59
|
-
text: String
|
|
72
|
+
template_id: String?,
|
|
73
|
+
text: String?,
|
|
74
|
+
to: String?
|
|
60
75
|
}
|
|
61
76
|
end
|
|
62
77
|
end
|
|
@@ -41,6 +41,8 @@ module Sentdm
|
|
|
41
41
|
phone: String,
|
|
42
42
|
phone_international: String,
|
|
43
43
|
price: Float?,
|
|
44
|
+
reason: String?,
|
|
45
|
+
reason_code: String?,
|
|
44
46
|
region_code: String,
|
|
45
47
|
status: String,
|
|
46
48
|
template_category: String?,
|
|
@@ -89,6 +91,10 @@ module Sentdm
|
|
|
89
91
|
|
|
90
92
|
attr_accessor price: Float?
|
|
91
93
|
|
|
94
|
+
attr_accessor reason: String?
|
|
95
|
+
|
|
96
|
+
attr_accessor reason_code: String?
|
|
97
|
+
|
|
92
98
|
attr_reader region_code: String?
|
|
93
99
|
|
|
94
100
|
def region_code=: (String) -> String
|
|
@@ -116,6 +122,8 @@ module Sentdm
|
|
|
116
122
|
?phone: String,
|
|
117
123
|
?phone_international: String,
|
|
118
124
|
?price: Float?,
|
|
125
|
+
?reason: String?,
|
|
126
|
+
?reason_code: String?,
|
|
119
127
|
?region_code: String,
|
|
120
128
|
?status: String,
|
|
121
129
|
?template_category: String?,
|
|
@@ -136,6 +144,8 @@ module Sentdm
|
|
|
136
144
|
phone: String,
|
|
137
145
|
phone_international: String,
|
|
138
146
|
price: Float?,
|
|
147
|
+
reason: String?,
|
|
148
|
+
reason_code: String?,
|
|
139
149
|
region_code: String,
|
|
140
150
|
status: String,
|
|
141
151
|
template_category: String?,
|
|
@@ -143,7 +153,14 @@ module Sentdm
|
|
|
143
153
|
template_name: String?
|
|
144
154
|
}
|
|
145
155
|
|
|
146
|
-
type event =
|
|
156
|
+
type event =
|
|
157
|
+
{
|
|
158
|
+
status: String,
|
|
159
|
+
timestamp: Time,
|
|
160
|
+
description: String?,
|
|
161
|
+
reason: String?,
|
|
162
|
+
reason_code: String?
|
|
163
|
+
}
|
|
147
164
|
|
|
148
165
|
class Event < Sentdm::Internal::Type::BaseModel
|
|
149
166
|
attr_accessor status: String
|
|
@@ -152,16 +169,24 @@ module Sentdm
|
|
|
152
169
|
|
|
153
170
|
attr_accessor description: String?
|
|
154
171
|
|
|
172
|
+
attr_accessor reason: String?
|
|
173
|
+
|
|
174
|
+
attr_accessor reason_code: String?
|
|
175
|
+
|
|
155
176
|
def initialize: (
|
|
156
177
|
status: String,
|
|
157
178
|
timestamp: Time,
|
|
158
|
-
?description: String
|
|
179
|
+
?description: String?,
|
|
180
|
+
?reason: String?,
|
|
181
|
+
?reason_code: String?
|
|
159
182
|
) -> void
|
|
160
183
|
|
|
161
184
|
def to_hash: -> {
|
|
162
185
|
status: String,
|
|
163
186
|
timestamp: Time,
|
|
164
|
-
description: String
|
|
187
|
+
description: String?,
|
|
188
|
+
reason: String?,
|
|
189
|
+
reason_code: String?
|
|
165
190
|
}
|
|
166
191
|
end
|
|
167
192
|
|
|
@@ -170,7 +195,10 @@ module Sentdm
|
|
|
170
195
|
buttons: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Button]?,
|
|
171
196
|
content: String,
|
|
172
197
|
footer: String?,
|
|
173
|
-
header: String
|
|
198
|
+
header: String?,
|
|
199
|
+
header_media: Sentdm::ConversationMessagesList::Message::MessageBody::HeaderMedia?,
|
|
200
|
+
media: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Media]?,
|
|
201
|
+
subject: String?
|
|
174
202
|
}
|
|
175
203
|
|
|
176
204
|
class MessageBody < Sentdm::Internal::Type::BaseModel
|
|
@@ -184,18 +212,30 @@ module Sentdm
|
|
|
184
212
|
|
|
185
213
|
attr_accessor header: String?
|
|
186
214
|
|
|
215
|
+
attr_accessor header_media: Sentdm::ConversationMessagesList::Message::MessageBody::HeaderMedia?
|
|
216
|
+
|
|
217
|
+
attr_accessor media: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Media]?
|
|
218
|
+
|
|
219
|
+
attr_accessor subject: String?
|
|
220
|
+
|
|
187
221
|
def initialize: (
|
|
188
222
|
?buttons: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Button]?,
|
|
189
223
|
?content: String,
|
|
190
224
|
?footer: String?,
|
|
191
|
-
?header: String
|
|
225
|
+
?header: String?,
|
|
226
|
+
?header_media: Sentdm::ConversationMessagesList::Message::MessageBody::HeaderMedia?,
|
|
227
|
+
?media: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Media]?,
|
|
228
|
+
?subject: String?
|
|
192
229
|
) -> void
|
|
193
230
|
|
|
194
231
|
def to_hash: -> {
|
|
195
232
|
buttons: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Button]?,
|
|
196
233
|
content: String,
|
|
197
234
|
footer: String?,
|
|
198
|
-
header: String
|
|
235
|
+
header: String?,
|
|
236
|
+
header_media: Sentdm::ConversationMessagesList::Message::MessageBody::HeaderMedia?,
|
|
237
|
+
media: ::Array[Sentdm::ConversationMessagesList::Message::MessageBody::Media]?,
|
|
238
|
+
subject: String?
|
|
199
239
|
}
|
|
200
240
|
|
|
201
241
|
type button =
|
|
@@ -233,6 +273,59 @@ module Sentdm
|
|
|
233
273
|
value: String
|
|
234
274
|
}
|
|
235
275
|
end
|
|
276
|
+
|
|
277
|
+
type header_media = { type: String, url: String }
|
|
278
|
+
|
|
279
|
+
class HeaderMedia < Sentdm::Internal::Type::BaseModel
|
|
280
|
+
attr_reader type: String?
|
|
281
|
+
|
|
282
|
+
def type=: (String) -> String
|
|
283
|
+
|
|
284
|
+
attr_reader url: String?
|
|
285
|
+
|
|
286
|
+
def url=: (String) -> String
|
|
287
|
+
|
|
288
|
+
def initialize: (?type: String, ?url: String) -> void
|
|
289
|
+
|
|
290
|
+
def to_hash: -> { type: String, url: String }
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
type media =
|
|
294
|
+
{
|
|
295
|
+
media_type: String?,
|
|
296
|
+
mime_type: String?,
|
|
297
|
+
size_bytes: Integer?,
|
|
298
|
+
:source_hash_sha256 => String?,
|
|
299
|
+
url: String?
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
class Media < Sentdm::Internal::Type::BaseModel
|
|
303
|
+
attr_accessor media_type: String?
|
|
304
|
+
|
|
305
|
+
attr_accessor mime_type: String?
|
|
306
|
+
|
|
307
|
+
attr_accessor size_bytes: Integer?
|
|
308
|
+
|
|
309
|
+
attr_accessor source_hash_sha256: String?
|
|
310
|
+
|
|
311
|
+
attr_accessor url: String?
|
|
312
|
+
|
|
313
|
+
def initialize: (
|
|
314
|
+
?media_type: String?,
|
|
315
|
+
?mime_type: String?,
|
|
316
|
+
?size_bytes: Integer?,
|
|
317
|
+
?source_hash_sha256: String?,
|
|
318
|
+
?url: String?
|
|
319
|
+
) -> void
|
|
320
|
+
|
|
321
|
+
def to_hash: -> {
|
|
322
|
+
media_type: String?,
|
|
323
|
+
mime_type: String?,
|
|
324
|
+
size_bytes: Integer?,
|
|
325
|
+
:source_hash_sha256 => String?,
|
|
326
|
+
url: String?
|
|
327
|
+
}
|
|
328
|
+
end
|
|
236
329
|
end
|
|
237
330
|
end
|
|
238
331
|
end
|