prelude-sdk 0.1.0 → 0.3.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 +61 -0
- data/README.md +9 -9
- data/lib/prelude_sdk/client.rb +11 -0
- data/lib/prelude_sdk/internal/transport/pooled_net_requester.rb +13 -11
- data/lib/prelude_sdk/internal/util.rb +39 -3
- data/lib/prelude_sdk/models/lookup_lookup_params.rb +9 -1
- data/lib/prelude_sdk/models/notify_get_subscription_config_params.rb +20 -0
- data/lib/prelude_sdk/models/notify_get_subscription_config_response.rb +120 -0
- data/lib/prelude_sdk/models/notify_get_subscription_phone_number_params.rb +26 -0
- data/lib/prelude_sdk/models/notify_get_subscription_phone_number_response.rb +104 -0
- data/lib/prelude_sdk/models/notify_list_subscription_configs_params.rb +30 -0
- data/lib/prelude_sdk/models/notify_list_subscription_configs_response.rb +144 -0
- data/lib/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rb +44 -0
- data/lib/prelude_sdk/models/notify_list_subscription_phone_number_events_response.rb +132 -0
- data/lib/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rb +56 -0
- data/lib/prelude_sdk/models/notify_list_subscription_phone_numbers_response.rb +132 -0
- data/lib/prelude_sdk/models/notify_send_batch_params.rb +141 -0
- data/lib/prelude_sdk/models/notify_send_batch_response.rb +239 -0
- data/lib/prelude_sdk/models/notify_send_params.rb +149 -0
- data/lib/prelude_sdk/models/notify_send_response.rb +129 -0
- data/lib/prelude_sdk/models/transactional_send_params.rb +32 -1
- data/lib/prelude_sdk/models/verification_create_params.rb +35 -48
- data/lib/prelude_sdk/models/verification_create_response.rb +15 -0
- data/lib/prelude_sdk/models/verification_management_delete_phone_number_params.rb +8 -1
- data/lib/prelude_sdk/models/verification_management_list_phone_numbers_params.rb +7 -1
- data/lib/prelude_sdk/models/verification_management_set_phone_number_params.rb +8 -1
- data/lib/prelude_sdk/models/watch_predict_params.rb +16 -12
- data/lib/prelude_sdk/models/watch_predict_response.rb +51 -1
- data/lib/prelude_sdk/models/watch_send_feedbacks_params.rb +1 -128
- data/lib/prelude_sdk/models.rb +15 -0
- data/lib/prelude_sdk/resources/lookup.rb +4 -1
- data/lib/prelude_sdk/resources/notify.rb +255 -0
- data/lib/prelude_sdk/resources/transactional.rb +4 -1
- data/lib/prelude_sdk/resources/verification.rb +1 -0
- data/lib/prelude_sdk/resources/verification_management.rb +1 -0
- data/lib/prelude_sdk/resources/watch.rb +1 -0
- data/lib/prelude_sdk/version.rb +1 -1
- data/lib/prelude_sdk.rb +16 -0
- data/manifest.yaml +1 -0
- data/rbi/prelude_sdk/client.rbi +10 -0
- data/rbi/prelude_sdk/internal/util.rbi +21 -1
- data/rbi/prelude_sdk/models/lookup_lookup_params.rbi +8 -0
- data/rbi/prelude_sdk/models/notify_get_subscription_config_params.rbi +38 -0
- data/rbi/prelude_sdk/models/notify_get_subscription_config_response.rbi +224 -0
- data/rbi/prelude_sdk/models/notify_get_subscription_phone_number_params.rbi +46 -0
- data/rbi/prelude_sdk/models/notify_get_subscription_phone_number_response.rbi +199 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_configs_params.rbi +60 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_configs_response.rbi +286 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbi +72 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_number_events_response.rbi +259 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbi +125 -0
- data/rbi/prelude_sdk/models/notify_list_subscription_phone_numbers_response.rbi +259 -0
- data/rbi/prelude_sdk/models/notify_send_batch_params.rbi +241 -0
- data/rbi/prelude_sdk/models/notify_send_batch_response.rbi +440 -0
- data/rbi/prelude_sdk/models/notify_send_params.rbi +249 -0
- data/rbi/prelude_sdk/models/notify_send_response.rbi +203 -0
- data/rbi/prelude_sdk/models/transactional_send_params.rbi +50 -0
- data/rbi/prelude_sdk/models/verification_create_params.rbi +53 -93
- data/rbi/prelude_sdk/models/verification_create_response.rbi +26 -0
- data/rbi/prelude_sdk/models/verification_management_delete_phone_number_params.rbi +16 -1
- data/rbi/prelude_sdk/models/verification_management_list_phone_numbers_params.rbi +21 -4
- data/rbi/prelude_sdk/models/verification_management_set_phone_number_params.rbi +16 -1
- data/rbi/prelude_sdk/models/watch_predict_params.rbi +24 -16
- data/rbi/prelude_sdk/models/watch_predict_response.rbi +152 -3
- data/rbi/prelude_sdk/models/watch_send_feedbacks_params.rbi +3 -243
- data/rbi/prelude_sdk/models.rbi +19 -0
- data/rbi/prelude_sdk/resources/lookup.rbi +2 -0
- data/rbi/prelude_sdk/resources/notify.rbi +227 -0
- data/rbi/prelude_sdk/resources/transactional.rbi +5 -0
- data/rbi/prelude_sdk/resources/verification.rbi +1 -0
- data/rbi/prelude_sdk/resources/verification_management.rbi +1 -0
- data/rbi/prelude_sdk/resources/watch.rbi +1 -0
- data/sig/prelude_sdk/client.rbs +2 -0
- data/sig/prelude_sdk/internal/util.rbs +10 -0
- data/sig/prelude_sdk/models/lookup_lookup_params.rbs +8 -1
- data/sig/prelude_sdk/models/notify_get_subscription_config_params.rbs +23 -0
- data/sig/prelude_sdk/models/notify_get_subscription_config_response.rbs +95 -0
- data/sig/prelude_sdk/models/notify_get_subscription_phone_number_params.rbs +28 -0
- data/sig/prelude_sdk/models/notify_get_subscription_phone_number_response.rbs +71 -0
- data/sig/prelude_sdk/models/notify_list_subscription_configs_params.rbs +32 -0
- data/sig/prelude_sdk/models/notify_list_subscription_configs_response.rbs +119 -0
- data/sig/prelude_sdk/models/notify_list_subscription_phone_number_events_params.rbs +45 -0
- data/sig/prelude_sdk/models/notify_list_subscription_phone_number_events_response.rbs +95 -0
- data/sig/prelude_sdk/models/notify_list_subscription_phone_numbers_params.rbs +60 -0
- data/sig/prelude_sdk/models/notify_list_subscription_phone_numbers_response.rbs +95 -0
- data/sig/prelude_sdk/models/notify_send_batch_params.rbs +121 -0
- data/sig/prelude_sdk/models/notify_send_batch_response.rbs +214 -0
- data/sig/prelude_sdk/models/notify_send_params.rbs +121 -0
- data/sig/prelude_sdk/models/notify_send_response.rbs +100 -0
- data/sig/prelude_sdk/models/transactional_send_params.rbs +21 -0
- data/sig/prelude_sdk/models/verification_create_params.rbs +2 -21
- data/sig/prelude_sdk/models/verification_create_response.rbs +2 -1
- data/sig/prelude_sdk/models/verification_management_delete_phone_number_params.rbs +9 -1
- data/sig/prelude_sdk/models/verification_management_list_phone_numbers_params.rbs +14 -3
- data/sig/prelude_sdk/models/verification_management_set_phone_number_params.rbs +9 -1
- data/sig/prelude_sdk/models/watch_predict_response.rbs +41 -3
- data/sig/prelude_sdk/models/watch_send_feedbacks_params.rbs +3 -110
- data/sig/prelude_sdk/models.rbs +14 -0
- data/sig/prelude_sdk/resources/notify.rbs +70 -0
- data/sig/prelude_sdk/resources/transactional.rbs +1 -0
- metadata +61 -2
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Resources
|
|
5
|
+
# Send transactional and marketing messages with compliance enforcement.
|
|
6
|
+
class Notify
|
|
7
|
+
# Retrieve a specific subscription management configuration by its ID.
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
config_id: String,
|
|
11
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
12
|
+
).returns(PreludeSDK::Models::NotifyGetSubscriptionConfigResponse)
|
|
13
|
+
end
|
|
14
|
+
def get_subscription_config(
|
|
15
|
+
# The subscription configuration ID
|
|
16
|
+
config_id,
|
|
17
|
+
request_options: {}
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# Retrieve the current subscription status for a specific phone number within a
|
|
22
|
+
# subscription configuration.
|
|
23
|
+
sig do
|
|
24
|
+
params(
|
|
25
|
+
phone_number: String,
|
|
26
|
+
config_id: String,
|
|
27
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
28
|
+
).returns(PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse)
|
|
29
|
+
end
|
|
30
|
+
def get_subscription_phone_number(
|
|
31
|
+
# The phone number in E.164 format (e.g., +33612345678)
|
|
32
|
+
phone_number,
|
|
33
|
+
# The subscription configuration ID
|
|
34
|
+
config_id:,
|
|
35
|
+
request_options: {}
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Retrieve a paginated list of subscription management configurations for your
|
|
40
|
+
# account.
|
|
41
|
+
#
|
|
42
|
+
# Each configuration represents a subscription management setup with phone numbers
|
|
43
|
+
# for receiving opt-out/opt-in requests and a callback URL for webhook events.
|
|
44
|
+
sig do
|
|
45
|
+
params(
|
|
46
|
+
cursor: String,
|
|
47
|
+
limit: Integer,
|
|
48
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
49
|
+
).returns(PreludeSDK::Models::NotifyListSubscriptionConfigsResponse)
|
|
50
|
+
end
|
|
51
|
+
def list_subscription_configs(
|
|
52
|
+
# Pagination cursor from the previous response
|
|
53
|
+
cursor: nil,
|
|
54
|
+
# Maximum number of configurations to return per page
|
|
55
|
+
limit: nil,
|
|
56
|
+
request_options: {}
|
|
57
|
+
)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Retrieve a paginated list of subscription events (status changes) for a specific
|
|
61
|
+
# phone number within a subscription configuration.
|
|
62
|
+
#
|
|
63
|
+
# Events are ordered by timestamp in descending order (most recent first).
|
|
64
|
+
sig do
|
|
65
|
+
params(
|
|
66
|
+
phone_number: String,
|
|
67
|
+
config_id: String,
|
|
68
|
+
cursor: String,
|
|
69
|
+
limit: Integer,
|
|
70
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
71
|
+
).returns(
|
|
72
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
def list_subscription_phone_number_events(
|
|
76
|
+
# Path param: The phone number in E.164 format (e.g., +33612345678)
|
|
77
|
+
phone_number,
|
|
78
|
+
# Path param: The subscription configuration ID
|
|
79
|
+
config_id:,
|
|
80
|
+
# Query param: Pagination cursor from the previous response
|
|
81
|
+
cursor: nil,
|
|
82
|
+
# Query param: Maximum number of events to return per page
|
|
83
|
+
limit: nil,
|
|
84
|
+
request_options: {}
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Retrieve a paginated list of phone numbers and their subscription statuses for a
|
|
89
|
+
# specific subscription configuration.
|
|
90
|
+
#
|
|
91
|
+
# You can optionally filter by subscription state (SUB or UNSUB).
|
|
92
|
+
sig do
|
|
93
|
+
params(
|
|
94
|
+
config_id: String,
|
|
95
|
+
cursor: String,
|
|
96
|
+
limit: Integer,
|
|
97
|
+
state:
|
|
98
|
+
PreludeSDK::NotifyListSubscriptionPhoneNumbersParams::State::OrSymbol,
|
|
99
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
100
|
+
).returns(
|
|
101
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumbersResponse
|
|
102
|
+
)
|
|
103
|
+
end
|
|
104
|
+
def list_subscription_phone_numbers(
|
|
105
|
+
# The subscription configuration ID
|
|
106
|
+
config_id,
|
|
107
|
+
# Pagination cursor from the previous response
|
|
108
|
+
cursor: nil,
|
|
109
|
+
# Maximum number of phone numbers to return per page
|
|
110
|
+
limit: nil,
|
|
111
|
+
# Filter by subscription state
|
|
112
|
+
state: nil,
|
|
113
|
+
request_options: {}
|
|
114
|
+
)
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Send transactional and marketing messages to your users via SMS and WhatsApp
|
|
118
|
+
# with automatic compliance enforcement.
|
|
119
|
+
sig do
|
|
120
|
+
params(
|
|
121
|
+
template_id: String,
|
|
122
|
+
to: String,
|
|
123
|
+
callback_url: String,
|
|
124
|
+
correlation_id: String,
|
|
125
|
+
document: PreludeSDK::NotifySendParams::Document::OrHash,
|
|
126
|
+
expires_at: Time,
|
|
127
|
+
from: String,
|
|
128
|
+
locale: String,
|
|
129
|
+
preferred_channel:
|
|
130
|
+
PreludeSDK::NotifySendParams::PreferredChannel::OrSymbol,
|
|
131
|
+
schedule_at: Time,
|
|
132
|
+
variables: T::Hash[Symbol, String],
|
|
133
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
134
|
+
).returns(PreludeSDK::Models::NotifySendResponse)
|
|
135
|
+
end
|
|
136
|
+
def send_(
|
|
137
|
+
# The template identifier configured by your Customer Success team.
|
|
138
|
+
template_id:,
|
|
139
|
+
# The recipient's phone number in E.164 format.
|
|
140
|
+
to:,
|
|
141
|
+
# The URL where webhooks will be sent for message delivery events.
|
|
142
|
+
callback_url: nil,
|
|
143
|
+
# A user-defined identifier to correlate this message with your internal systems.
|
|
144
|
+
# It is returned in the response and any webhook events that refer to this
|
|
145
|
+
# message.
|
|
146
|
+
correlation_id: nil,
|
|
147
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
148
|
+
# have a document header.
|
|
149
|
+
document: nil,
|
|
150
|
+
# The message expiration date in RFC3339 format. The message will not be sent if
|
|
151
|
+
# this time is reached.
|
|
152
|
+
expires_at: nil,
|
|
153
|
+
# The Sender ID. Must be approved for your account.
|
|
154
|
+
from: nil,
|
|
155
|
+
# A BCP-47 formatted locale string with the language the text message will be sent
|
|
156
|
+
# to. If there's no locale set, the language will be determined by the country
|
|
157
|
+
# code of the phone number. If the language specified doesn't exist, the default
|
|
158
|
+
# set on the template will be used.
|
|
159
|
+
locale: nil,
|
|
160
|
+
# The preferred channel to be used in priority for message delivery. If the
|
|
161
|
+
# channel is unavailable, the system will fallback to other available channels.
|
|
162
|
+
preferred_channel: nil,
|
|
163
|
+
# Schedule the message for future delivery in RFC3339 format. Marketing messages
|
|
164
|
+
# can be scheduled up to 90 days in advance and will be automatically adjusted for
|
|
165
|
+
# compliance with local time window restrictions.
|
|
166
|
+
schedule_at: nil,
|
|
167
|
+
# The variables to be replaced in the template.
|
|
168
|
+
variables: nil,
|
|
169
|
+
request_options: {}
|
|
170
|
+
)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Send the same message to multiple recipients in a single request.
|
|
174
|
+
sig do
|
|
175
|
+
params(
|
|
176
|
+
template_id: String,
|
|
177
|
+
to: T::Array[String],
|
|
178
|
+
callback_url: String,
|
|
179
|
+
correlation_id: String,
|
|
180
|
+
document: PreludeSDK::NotifySendBatchParams::Document::OrHash,
|
|
181
|
+
expires_at: Time,
|
|
182
|
+
from: String,
|
|
183
|
+
locale: String,
|
|
184
|
+
preferred_channel:
|
|
185
|
+
PreludeSDK::NotifySendBatchParams::PreferredChannel::OrSymbol,
|
|
186
|
+
schedule_at: Time,
|
|
187
|
+
variables: T::Hash[Symbol, String],
|
|
188
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
189
|
+
).returns(PreludeSDK::Models::NotifySendBatchResponse)
|
|
190
|
+
end
|
|
191
|
+
def send_batch(
|
|
192
|
+
# The template identifier configured by your Customer Success team.
|
|
193
|
+
template_id:,
|
|
194
|
+
# The list of recipients' phone numbers in E.164 format.
|
|
195
|
+
to:,
|
|
196
|
+
# The URL where webhooks will be sent for delivery events.
|
|
197
|
+
callback_url: nil,
|
|
198
|
+
# A user-defined identifier to correlate this request with your internal systems.
|
|
199
|
+
correlation_id: nil,
|
|
200
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
201
|
+
# have a document header.
|
|
202
|
+
document: nil,
|
|
203
|
+
# The message expiration date in RFC3339 format. Messages will not be sent after
|
|
204
|
+
# this time.
|
|
205
|
+
expires_at: nil,
|
|
206
|
+
# The Sender ID. Must be approved for your account.
|
|
207
|
+
from: nil,
|
|
208
|
+
# A BCP-47 formatted locale string.
|
|
209
|
+
locale: nil,
|
|
210
|
+
# Preferred channel for delivery. If unavailable, automatic fallback applies.
|
|
211
|
+
preferred_channel: nil,
|
|
212
|
+
# Schedule delivery in RFC3339 format. Marketing sends may be adjusted to comply
|
|
213
|
+
# with local time windows.
|
|
214
|
+
schedule_at: nil,
|
|
215
|
+
# The variables to be replaced in the template.
|
|
216
|
+
variables: nil,
|
|
217
|
+
request_options: {}
|
|
218
|
+
)
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# @api private
|
|
222
|
+
sig { params(client: PreludeSDK::Client).returns(T.attached_class) }
|
|
223
|
+
def self.new(client:)
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
end
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module PreludeSDK
|
|
4
4
|
module Resources
|
|
5
|
+
# Send transactional messages (deprecated - use Notify API instead).
|
|
5
6
|
class Transactional
|
|
6
7
|
# Legacy route maintained for backward compatibility. Migrate to `/v2/notify`
|
|
7
8
|
# instead.
|
|
@@ -11,6 +12,7 @@ module PreludeSDK
|
|
|
11
12
|
to: String,
|
|
12
13
|
callback_url: String,
|
|
13
14
|
correlation_id: String,
|
|
15
|
+
document: PreludeSDK::TransactionalSendParams::Document::OrHash,
|
|
14
16
|
expires_at: String,
|
|
15
17
|
from: String,
|
|
16
18
|
locale: String,
|
|
@@ -31,6 +33,9 @@ module PreludeSDK
|
|
|
31
33
|
# returned in the response and any webhook events that refer to this
|
|
32
34
|
# transactionalmessage.
|
|
33
35
|
correlation_id: nil,
|
|
36
|
+
# A document to attach to the message. Only supported on WhatsApp templates that
|
|
37
|
+
# have a document header.
|
|
38
|
+
document: nil,
|
|
34
39
|
# The message expiration date.
|
|
35
40
|
expires_at: nil,
|
|
36
41
|
# The Sender ID.
|
data/sig/prelude_sdk/client.rbs
CHANGED
|
@@ -12,6 +12,8 @@ module PreludeSDK
|
|
|
12
12
|
|
|
13
13
|
attr_reader lookup: PreludeSDK::Resources::Lookup
|
|
14
14
|
|
|
15
|
+
attr_reader notify: PreludeSDK::Resources::Notify
|
|
16
|
+
|
|
15
17
|
attr_reader transactional: PreludeSDK::Resources::Transactional
|
|
16
18
|
|
|
17
19
|
attr_reader verification: PreludeSDK::Resources::Verification
|
|
@@ -106,6 +106,16 @@ module PreludeSDK
|
|
|
106
106
|
JSON_CONTENT: Regexp
|
|
107
107
|
JSONL_CONTENT: Regexp
|
|
108
108
|
|
|
109
|
+
def encode_query_params: (
|
|
110
|
+
::Hash[Symbol, top] query
|
|
111
|
+
) -> ::Hash[Symbol, top]
|
|
112
|
+
|
|
113
|
+
private def write_query_param_element!: (
|
|
114
|
+
::Hash[Symbol, top] collection,
|
|
115
|
+
String key,
|
|
116
|
+
top element
|
|
117
|
+
) -> nil
|
|
118
|
+
|
|
109
119
|
def self?.write_multipart_content: (
|
|
110
120
|
Enumerator::Yielder y,
|
|
111
121
|
val: top,
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
module PreludeSDK
|
|
2
2
|
module Models
|
|
3
3
|
type lookup_lookup_params =
|
|
4
|
-
{
|
|
4
|
+
{
|
|
5
|
+
phone_number: String,
|
|
6
|
+
type: ::Array[PreludeSDK::Models::LookupLookupParams::type_]
|
|
7
|
+
}
|
|
5
8
|
& PreludeSDK::Internal::Type::request_parameters
|
|
6
9
|
|
|
7
10
|
class LookupLookupParams < PreludeSDK::Internal::Type::BaseModel
|
|
8
11
|
extend PreludeSDK::Internal::Type::RequestParameters::Converter
|
|
9
12
|
include PreludeSDK::Internal::Type::RequestParameters
|
|
10
13
|
|
|
14
|
+
attr_accessor phone_number: String
|
|
15
|
+
|
|
11
16
|
attr_reader type: ::Array[PreludeSDK::Models::LookupLookupParams::type_]?
|
|
12
17
|
|
|
13
18
|
def type=: (
|
|
@@ -15,11 +20,13 @@ module PreludeSDK
|
|
|
15
20
|
) -> ::Array[PreludeSDK::Models::LookupLookupParams::type_]
|
|
16
21
|
|
|
17
22
|
def initialize: (
|
|
23
|
+
phone_number: String,
|
|
18
24
|
?type: ::Array[PreludeSDK::Models::LookupLookupParams::type_],
|
|
19
25
|
?request_options: PreludeSDK::request_opts
|
|
20
26
|
) -> void
|
|
21
27
|
|
|
22
28
|
def to_hash: -> {
|
|
29
|
+
phone_number: String,
|
|
23
30
|
type: ::Array[PreludeSDK::Models::LookupLookupParams::type_],
|
|
24
31
|
request_options: PreludeSDK::RequestOptions
|
|
25
32
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module PreludeSDK
|
|
2
|
+
module Models
|
|
3
|
+
type notify_get_subscription_config_params =
|
|
4
|
+
{ config_id: String } & PreludeSDK::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class NotifyGetSubscriptionConfigParams < PreludeSDK::Internal::Type::BaseModel
|
|
7
|
+
extend PreludeSDK::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include PreludeSDK::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor config_id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
config_id: String,
|
|
14
|
+
?request_options: PreludeSDK::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> {
|
|
18
|
+
config_id: String,
|
|
19
|
+
request_options: PreludeSDK::RequestOptions
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
module PreludeSDK
|
|
2
|
+
module Models
|
|
3
|
+
type notify_get_subscription_config_response =
|
|
4
|
+
{
|
|
5
|
+
id: String,
|
|
6
|
+
callback_url: String,
|
|
7
|
+
created_at: Time,
|
|
8
|
+
messages: PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::Messages,
|
|
9
|
+
name: String,
|
|
10
|
+
updated_at: Time,
|
|
11
|
+
mo_phone_numbers: ::Array[PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::MoPhoneNumber]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class NotifyGetSubscriptionConfigResponse < PreludeSDK::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor id: String
|
|
16
|
+
|
|
17
|
+
attr_accessor callback_url: String
|
|
18
|
+
|
|
19
|
+
attr_accessor created_at: Time
|
|
20
|
+
|
|
21
|
+
attr_accessor messages: PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::Messages
|
|
22
|
+
|
|
23
|
+
attr_accessor name: String
|
|
24
|
+
|
|
25
|
+
attr_accessor updated_at: Time
|
|
26
|
+
|
|
27
|
+
attr_reader mo_phone_numbers: ::Array[PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::MoPhoneNumber]?
|
|
28
|
+
|
|
29
|
+
def mo_phone_numbers=: (
|
|
30
|
+
::Array[PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::MoPhoneNumber]
|
|
31
|
+
) -> ::Array[PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::MoPhoneNumber]
|
|
32
|
+
|
|
33
|
+
def initialize: (
|
|
34
|
+
id: String,
|
|
35
|
+
callback_url: String,
|
|
36
|
+
created_at: Time,
|
|
37
|
+
messages: PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::Messages,
|
|
38
|
+
name: String,
|
|
39
|
+
updated_at: Time,
|
|
40
|
+
?mo_phone_numbers: ::Array[PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::MoPhoneNumber]
|
|
41
|
+
) -> void
|
|
42
|
+
|
|
43
|
+
def to_hash: -> {
|
|
44
|
+
id: String,
|
|
45
|
+
callback_url: String,
|
|
46
|
+
created_at: Time,
|
|
47
|
+
messages: PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::Messages,
|
|
48
|
+
name: String,
|
|
49
|
+
updated_at: Time,
|
|
50
|
+
mo_phone_numbers: ::Array[PreludeSDK::Models::NotifyGetSubscriptionConfigResponse::MoPhoneNumber]
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
type messages =
|
|
54
|
+
{ help_message: String, start_message: String, stop_message: String }
|
|
55
|
+
|
|
56
|
+
class Messages < PreludeSDK::Internal::Type::BaseModel
|
|
57
|
+
attr_reader help_message: String?
|
|
58
|
+
|
|
59
|
+
def help_message=: (String) -> String
|
|
60
|
+
|
|
61
|
+
attr_reader start_message: String?
|
|
62
|
+
|
|
63
|
+
def start_message=: (String) -> String
|
|
64
|
+
|
|
65
|
+
attr_reader stop_message: String?
|
|
66
|
+
|
|
67
|
+
def stop_message=: (String) -> String
|
|
68
|
+
|
|
69
|
+
def initialize: (
|
|
70
|
+
?help_message: String,
|
|
71
|
+
?start_message: String,
|
|
72
|
+
?stop_message: String
|
|
73
|
+
) -> void
|
|
74
|
+
|
|
75
|
+
def to_hash: -> {
|
|
76
|
+
help_message: String,
|
|
77
|
+
start_message: String,
|
|
78
|
+
stop_message: String
|
|
79
|
+
}
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
type mo_phone_number = { country_code: String, phone_number: String }
|
|
83
|
+
|
|
84
|
+
class MoPhoneNumber < PreludeSDK::Internal::Type::BaseModel
|
|
85
|
+
attr_accessor country_code: String
|
|
86
|
+
|
|
87
|
+
attr_accessor phone_number: String
|
|
88
|
+
|
|
89
|
+
def initialize: (country_code: String, phone_number: String) -> void
|
|
90
|
+
|
|
91
|
+
def to_hash: -> { country_code: String, phone_number: String }
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module PreludeSDK
|
|
2
|
+
module Models
|
|
3
|
+
type notify_get_subscription_phone_number_params =
|
|
4
|
+
{ config_id: String, phone_number: String }
|
|
5
|
+
& PreludeSDK::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class NotifyGetSubscriptionPhoneNumberParams < PreludeSDK::Internal::Type::BaseModel
|
|
8
|
+
extend PreludeSDK::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include PreludeSDK::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_accessor config_id: String
|
|
12
|
+
|
|
13
|
+
attr_accessor phone_number: String
|
|
14
|
+
|
|
15
|
+
def initialize: (
|
|
16
|
+
config_id: String,
|
|
17
|
+
phone_number: String,
|
|
18
|
+
?request_options: PreludeSDK::request_opts
|
|
19
|
+
) -> void
|
|
20
|
+
|
|
21
|
+
def to_hash: -> {
|
|
22
|
+
config_id: String,
|
|
23
|
+
phone_number: String,
|
|
24
|
+
request_options: PreludeSDK::RequestOptions
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
module PreludeSDK
|
|
2
|
+
module Models
|
|
3
|
+
type notify_get_subscription_phone_number_response =
|
|
4
|
+
{
|
|
5
|
+
config_id: String,
|
|
6
|
+
phone_number: String,
|
|
7
|
+
source: PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::source,
|
|
8
|
+
state: PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::state,
|
|
9
|
+
updated_at: Time,
|
|
10
|
+
reason: String
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
class NotifyGetSubscriptionPhoneNumberResponse < PreludeSDK::Internal::Type::BaseModel
|
|
14
|
+
attr_accessor config_id: String
|
|
15
|
+
|
|
16
|
+
attr_accessor phone_number: String
|
|
17
|
+
|
|
18
|
+
attr_accessor source: PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::source
|
|
19
|
+
|
|
20
|
+
attr_accessor state: PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::state
|
|
21
|
+
|
|
22
|
+
attr_accessor updated_at: Time
|
|
23
|
+
|
|
24
|
+
attr_reader reason: String?
|
|
25
|
+
|
|
26
|
+
def reason=: (String) -> String
|
|
27
|
+
|
|
28
|
+
def initialize: (
|
|
29
|
+
config_id: String,
|
|
30
|
+
phone_number: String,
|
|
31
|
+
source: PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::source,
|
|
32
|
+
state: PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::state,
|
|
33
|
+
updated_at: Time,
|
|
34
|
+
?reason: String
|
|
35
|
+
) -> void
|
|
36
|
+
|
|
37
|
+
def to_hash: -> {
|
|
38
|
+
config_id: String,
|
|
39
|
+
phone_number: String,
|
|
40
|
+
source: PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::source,
|
|
41
|
+
state: PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::state,
|
|
42
|
+
updated_at: Time,
|
|
43
|
+
reason: String
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
type source = :MO_KEYWORD | :API | :CSV_IMPORT | :CARRIER_DISCONNECT
|
|
47
|
+
|
|
48
|
+
module Source
|
|
49
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
50
|
+
|
|
51
|
+
MO_KEYWORD: :MO_KEYWORD
|
|
52
|
+
API: :API
|
|
53
|
+
CSV_IMPORT: :CSV_IMPORT
|
|
54
|
+
CARRIER_DISCONNECT: :CARRIER_DISCONNECT
|
|
55
|
+
|
|
56
|
+
def self?.values: -> ::Array[PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::source]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
type state = :SUB | :UNSUB
|
|
60
|
+
|
|
61
|
+
module State
|
|
62
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
63
|
+
|
|
64
|
+
SUB: :SUB
|
|
65
|
+
UNSUB: :UNSUB
|
|
66
|
+
|
|
67
|
+
def self?.values: -> ::Array[PreludeSDK::Models::NotifyGetSubscriptionPhoneNumberResponse::state]
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module PreludeSDK
|
|
2
|
+
module Models
|
|
3
|
+
type notify_list_subscription_configs_params =
|
|
4
|
+
{ cursor: String, limit: Integer }
|
|
5
|
+
& PreludeSDK::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class NotifyListSubscriptionConfigsParams < PreludeSDK::Internal::Type::BaseModel
|
|
8
|
+
extend PreludeSDK::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include PreludeSDK::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
attr_reader cursor: String?
|
|
12
|
+
|
|
13
|
+
def cursor=: (String) -> String
|
|
14
|
+
|
|
15
|
+
attr_reader limit: Integer?
|
|
16
|
+
|
|
17
|
+
def limit=: (Integer) -> Integer
|
|
18
|
+
|
|
19
|
+
def initialize: (
|
|
20
|
+
?cursor: String,
|
|
21
|
+
?limit: Integer,
|
|
22
|
+
?request_options: PreludeSDK::request_opts
|
|
23
|
+
) -> void
|
|
24
|
+
|
|
25
|
+
def to_hash: -> {
|
|
26
|
+
cursor: String,
|
|
27
|
+
limit: Integer,
|
|
28
|
+
request_options: PreludeSDK::RequestOptions
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|