prelude-sdk 0.1.0 → 0.2.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 +13 -0
- data/README.md +9 -9
- data/lib/prelude_sdk/client.rb +4 -0
- data/lib/prelude_sdk/models/notify_get_subscription_config_params.rb +14 -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 +20 -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 +37 -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 +49 -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 +110 -0
- data/lib/prelude_sdk/models/notify_send_batch_response.rb +201 -0
- data/lib/prelude_sdk/models/notify_send_params.rb +118 -0
- data/lib/prelude_sdk/models/notify_send_response.rb +94 -0
- data/lib/prelude_sdk/models.rb +15 -0
- data/lib/prelude_sdk/resources/notify.rb +247 -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 +3 -0
- data/rbi/prelude_sdk/models/notify_get_subscription_config_params.rbi +30 -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 +38 -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 +66 -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 +119 -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 +191 -0
- data/rbi/prelude_sdk/models/notify_send_batch_response.rbi +360 -0
- data/rbi/prelude_sdk/models/notify_send_params.rbi +201 -0
- data/rbi/prelude_sdk/models/notify_send_response.rbi +128 -0
- data/rbi/prelude_sdk/models.rbi +19 -0
- data/rbi/prelude_sdk/resources/notify.rbi +218 -0
- data/sig/prelude_sdk/client.rbs +2 -0
- data/sig/prelude_sdk/models/notify_get_subscription_config_params.rbs +15 -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 +23 -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 +36 -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 +55 -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 +100 -0
- data/sig/prelude_sdk/models/notify_send_batch_response.rbs +187 -0
- data/sig/prelude_sdk/models/notify_send_params.rbs +100 -0
- data/sig/prelude_sdk/models/notify_send_response.rbs +73 -0
- data/sig/prelude_sdk/models.rbs +14 -0
- data/sig/prelude_sdk/resources/notify.rbs +68 -0
- metadata +47 -2
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Models
|
|
5
|
+
class NotifyListSubscriptionConfigsResponse < PreludeSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse,
|
|
10
|
+
PreludeSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# A list of subscription management configurations.
|
|
15
|
+
sig do
|
|
16
|
+
returns(
|
|
17
|
+
T::Array[
|
|
18
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config
|
|
19
|
+
]
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
attr_accessor :configs
|
|
23
|
+
|
|
24
|
+
# Pagination cursor for the next page of results. Omitted if there are no more
|
|
25
|
+
# pages.
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :next_cursor
|
|
28
|
+
|
|
29
|
+
sig { params(next_cursor: String).void }
|
|
30
|
+
attr_writer :next_cursor
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
params(
|
|
34
|
+
configs:
|
|
35
|
+
T::Array[
|
|
36
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::OrHash
|
|
37
|
+
],
|
|
38
|
+
next_cursor: String
|
|
39
|
+
).returns(T.attached_class)
|
|
40
|
+
end
|
|
41
|
+
def self.new(
|
|
42
|
+
# A list of subscription management configurations.
|
|
43
|
+
configs:,
|
|
44
|
+
# Pagination cursor for the next page of results. Omitted if there are no more
|
|
45
|
+
# pages.
|
|
46
|
+
next_cursor: nil
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{
|
|
53
|
+
configs:
|
|
54
|
+
T::Array[
|
|
55
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config
|
|
56
|
+
],
|
|
57
|
+
next_cursor: String
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
def to_hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
class Config < PreludeSDK::Internal::Type::BaseModel
|
|
65
|
+
OrHash =
|
|
66
|
+
T.type_alias do
|
|
67
|
+
T.any(
|
|
68
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config,
|
|
69
|
+
PreludeSDK::Internal::AnyHash
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# The subscription configuration ID.
|
|
74
|
+
sig { returns(String) }
|
|
75
|
+
attr_accessor :id
|
|
76
|
+
|
|
77
|
+
# The URL to call when subscription status changes.
|
|
78
|
+
sig { returns(String) }
|
|
79
|
+
attr_accessor :callback_url
|
|
80
|
+
|
|
81
|
+
# The date and time when the configuration was created.
|
|
82
|
+
sig { returns(Time) }
|
|
83
|
+
attr_accessor :created_at
|
|
84
|
+
|
|
85
|
+
# The subscription messages configuration.
|
|
86
|
+
sig do
|
|
87
|
+
returns(
|
|
88
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::Messages
|
|
89
|
+
)
|
|
90
|
+
end
|
|
91
|
+
attr_reader :messages
|
|
92
|
+
|
|
93
|
+
sig do
|
|
94
|
+
params(
|
|
95
|
+
messages:
|
|
96
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::Messages::OrHash
|
|
97
|
+
).void
|
|
98
|
+
end
|
|
99
|
+
attr_writer :messages
|
|
100
|
+
|
|
101
|
+
# The human-readable name for the subscription configuration.
|
|
102
|
+
sig { returns(String) }
|
|
103
|
+
attr_accessor :name
|
|
104
|
+
|
|
105
|
+
# The date and time when the configuration was last updated.
|
|
106
|
+
sig { returns(Time) }
|
|
107
|
+
attr_accessor :updated_at
|
|
108
|
+
|
|
109
|
+
# A list of phone numbers for receiving inbound messages.
|
|
110
|
+
sig do
|
|
111
|
+
returns(
|
|
112
|
+
T.nilable(
|
|
113
|
+
T::Array[
|
|
114
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::MoPhoneNumber
|
|
115
|
+
]
|
|
116
|
+
)
|
|
117
|
+
)
|
|
118
|
+
end
|
|
119
|
+
attr_reader :mo_phone_numbers
|
|
120
|
+
|
|
121
|
+
sig do
|
|
122
|
+
params(
|
|
123
|
+
mo_phone_numbers:
|
|
124
|
+
T::Array[
|
|
125
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::MoPhoneNumber::OrHash
|
|
126
|
+
]
|
|
127
|
+
).void
|
|
128
|
+
end
|
|
129
|
+
attr_writer :mo_phone_numbers
|
|
130
|
+
|
|
131
|
+
sig do
|
|
132
|
+
params(
|
|
133
|
+
id: String,
|
|
134
|
+
callback_url: String,
|
|
135
|
+
created_at: Time,
|
|
136
|
+
messages:
|
|
137
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::Messages::OrHash,
|
|
138
|
+
name: String,
|
|
139
|
+
updated_at: Time,
|
|
140
|
+
mo_phone_numbers:
|
|
141
|
+
T::Array[
|
|
142
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::MoPhoneNumber::OrHash
|
|
143
|
+
]
|
|
144
|
+
).returns(T.attached_class)
|
|
145
|
+
end
|
|
146
|
+
def self.new(
|
|
147
|
+
# The subscription configuration ID.
|
|
148
|
+
id:,
|
|
149
|
+
# The URL to call when subscription status changes.
|
|
150
|
+
callback_url:,
|
|
151
|
+
# The date and time when the configuration was created.
|
|
152
|
+
created_at:,
|
|
153
|
+
# The subscription messages configuration.
|
|
154
|
+
messages:,
|
|
155
|
+
# The human-readable name for the subscription configuration.
|
|
156
|
+
name:,
|
|
157
|
+
# The date and time when the configuration was last updated.
|
|
158
|
+
updated_at:,
|
|
159
|
+
# A list of phone numbers for receiving inbound messages.
|
|
160
|
+
mo_phone_numbers: nil
|
|
161
|
+
)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
sig do
|
|
165
|
+
override.returns(
|
|
166
|
+
{
|
|
167
|
+
id: String,
|
|
168
|
+
callback_url: String,
|
|
169
|
+
created_at: Time,
|
|
170
|
+
messages:
|
|
171
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::Messages,
|
|
172
|
+
name: String,
|
|
173
|
+
updated_at: Time,
|
|
174
|
+
mo_phone_numbers:
|
|
175
|
+
T::Array[
|
|
176
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::MoPhoneNumber
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
end
|
|
181
|
+
def to_hash
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
class Messages < PreludeSDK::Internal::Type::BaseModel
|
|
185
|
+
OrHash =
|
|
186
|
+
T.type_alias do
|
|
187
|
+
T.any(
|
|
188
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::Messages,
|
|
189
|
+
PreludeSDK::Internal::AnyHash
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Message sent when user requests help.
|
|
194
|
+
sig { returns(T.nilable(String)) }
|
|
195
|
+
attr_reader :help_message
|
|
196
|
+
|
|
197
|
+
sig { params(help_message: String).void }
|
|
198
|
+
attr_writer :help_message
|
|
199
|
+
|
|
200
|
+
# Message sent when user subscribes.
|
|
201
|
+
sig { returns(T.nilable(String)) }
|
|
202
|
+
attr_reader :start_message
|
|
203
|
+
|
|
204
|
+
sig { params(start_message: String).void }
|
|
205
|
+
attr_writer :start_message
|
|
206
|
+
|
|
207
|
+
# Message sent when user unsubscribes.
|
|
208
|
+
sig { returns(T.nilable(String)) }
|
|
209
|
+
attr_reader :stop_message
|
|
210
|
+
|
|
211
|
+
sig { params(stop_message: String).void }
|
|
212
|
+
attr_writer :stop_message
|
|
213
|
+
|
|
214
|
+
# The subscription messages configuration.
|
|
215
|
+
sig do
|
|
216
|
+
params(
|
|
217
|
+
help_message: String,
|
|
218
|
+
start_message: String,
|
|
219
|
+
stop_message: String
|
|
220
|
+
).returns(T.attached_class)
|
|
221
|
+
end
|
|
222
|
+
def self.new(
|
|
223
|
+
# Message sent when user requests help.
|
|
224
|
+
help_message: nil,
|
|
225
|
+
# Message sent when user subscribes.
|
|
226
|
+
start_message: nil,
|
|
227
|
+
# Message sent when user unsubscribes.
|
|
228
|
+
stop_message: nil
|
|
229
|
+
)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
sig do
|
|
233
|
+
override.returns(
|
|
234
|
+
{
|
|
235
|
+
help_message: String,
|
|
236
|
+
start_message: String,
|
|
237
|
+
stop_message: String
|
|
238
|
+
}
|
|
239
|
+
)
|
|
240
|
+
end
|
|
241
|
+
def to_hash
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
class MoPhoneNumber < PreludeSDK::Internal::Type::BaseModel
|
|
246
|
+
OrHash =
|
|
247
|
+
T.type_alias do
|
|
248
|
+
T.any(
|
|
249
|
+
PreludeSDK::Models::NotifyListSubscriptionConfigsResponse::Config::MoPhoneNumber,
|
|
250
|
+
PreludeSDK::Internal::AnyHash
|
|
251
|
+
)
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
# The ISO 3166-1 alpha-2 country code.
|
|
255
|
+
sig { returns(String) }
|
|
256
|
+
attr_accessor :country_code
|
|
257
|
+
|
|
258
|
+
# The phone number in E.164 format for long codes, or short code format for short
|
|
259
|
+
# codes.
|
|
260
|
+
sig { returns(String) }
|
|
261
|
+
attr_accessor :phone_number
|
|
262
|
+
|
|
263
|
+
sig do
|
|
264
|
+
params(country_code: String, phone_number: String).returns(
|
|
265
|
+
T.attached_class
|
|
266
|
+
)
|
|
267
|
+
end
|
|
268
|
+
def self.new(
|
|
269
|
+
# The ISO 3166-1 alpha-2 country code.
|
|
270
|
+
country_code:,
|
|
271
|
+
# The phone number in E.164 format for long codes, or short code format for short
|
|
272
|
+
# codes.
|
|
273
|
+
phone_number:
|
|
274
|
+
)
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
sig do
|
|
278
|
+
override.returns({ country_code: String, phone_number: String })
|
|
279
|
+
end
|
|
280
|
+
def to_hash
|
|
281
|
+
end
|
|
282
|
+
end
|
|
283
|
+
end
|
|
284
|
+
end
|
|
285
|
+
end
|
|
286
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Models
|
|
5
|
+
class NotifyListSubscriptionPhoneNumberEventsParams < PreludeSDK::Internal::Type::BaseModel
|
|
6
|
+
extend PreludeSDK::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include PreludeSDK::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(
|
|
12
|
+
PreludeSDK::NotifyListSubscriptionPhoneNumberEventsParams,
|
|
13
|
+
PreludeSDK::Internal::AnyHash
|
|
14
|
+
)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :config_id
|
|
19
|
+
|
|
20
|
+
# Pagination cursor from the previous response
|
|
21
|
+
sig { returns(T.nilable(String)) }
|
|
22
|
+
attr_reader :cursor
|
|
23
|
+
|
|
24
|
+
sig { params(cursor: String).void }
|
|
25
|
+
attr_writer :cursor
|
|
26
|
+
|
|
27
|
+
# Maximum number of events to return per page
|
|
28
|
+
sig { returns(T.nilable(Integer)) }
|
|
29
|
+
attr_reader :limit
|
|
30
|
+
|
|
31
|
+
sig { params(limit: Integer).void }
|
|
32
|
+
attr_writer :limit
|
|
33
|
+
|
|
34
|
+
sig do
|
|
35
|
+
params(
|
|
36
|
+
config_id: String,
|
|
37
|
+
cursor: String,
|
|
38
|
+
limit: Integer,
|
|
39
|
+
request_options: PreludeSDK::RequestOptions::OrHash
|
|
40
|
+
).returns(T.attached_class)
|
|
41
|
+
end
|
|
42
|
+
def self.new(
|
|
43
|
+
config_id:,
|
|
44
|
+
# Pagination cursor from the previous response
|
|
45
|
+
cursor: nil,
|
|
46
|
+
# Maximum number of events to return per page
|
|
47
|
+
limit: nil,
|
|
48
|
+
request_options: {}
|
|
49
|
+
)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
sig do
|
|
53
|
+
override.returns(
|
|
54
|
+
{
|
|
55
|
+
config_id: String,
|
|
56
|
+
cursor: String,
|
|
57
|
+
limit: Integer,
|
|
58
|
+
request_options: PreludeSDK::RequestOptions
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
end
|
|
62
|
+
def to_hash
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module PreludeSDK
|
|
4
|
+
module Models
|
|
5
|
+
class NotifyListSubscriptionPhoneNumberEventsResponse < PreludeSDK::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse,
|
|
10
|
+
PreludeSDK::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# A list of subscription events (status changes) ordered by timestamp descending.
|
|
15
|
+
sig do
|
|
16
|
+
returns(
|
|
17
|
+
T::Array[
|
|
18
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event
|
|
19
|
+
]
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
attr_accessor :events
|
|
23
|
+
|
|
24
|
+
# Pagination cursor for the next page of results. Omitted if there are no more
|
|
25
|
+
# pages.
|
|
26
|
+
sig { returns(T.nilable(String)) }
|
|
27
|
+
attr_reader :next_cursor
|
|
28
|
+
|
|
29
|
+
sig { params(next_cursor: String).void }
|
|
30
|
+
attr_writer :next_cursor
|
|
31
|
+
|
|
32
|
+
sig do
|
|
33
|
+
params(
|
|
34
|
+
events:
|
|
35
|
+
T::Array[
|
|
36
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::OrHash
|
|
37
|
+
],
|
|
38
|
+
next_cursor: String
|
|
39
|
+
).returns(T.attached_class)
|
|
40
|
+
end
|
|
41
|
+
def self.new(
|
|
42
|
+
# A list of subscription events (status changes) ordered by timestamp descending.
|
|
43
|
+
events:,
|
|
44
|
+
# Pagination cursor for the next page of results. Omitted if there are no more
|
|
45
|
+
# pages.
|
|
46
|
+
next_cursor: nil
|
|
47
|
+
)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
sig do
|
|
51
|
+
override.returns(
|
|
52
|
+
{
|
|
53
|
+
events:
|
|
54
|
+
T::Array[
|
|
55
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event
|
|
56
|
+
],
|
|
57
|
+
next_cursor: String
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
end
|
|
61
|
+
def to_hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
class Event < PreludeSDK::Internal::Type::BaseModel
|
|
65
|
+
OrHash =
|
|
66
|
+
T.type_alias do
|
|
67
|
+
T.any(
|
|
68
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event,
|
|
69
|
+
PreludeSDK::Internal::AnyHash
|
|
70
|
+
)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# The subscription configuration ID.
|
|
74
|
+
sig { returns(String) }
|
|
75
|
+
attr_accessor :config_id
|
|
76
|
+
|
|
77
|
+
# The phone number in E.164 format.
|
|
78
|
+
sig { returns(String) }
|
|
79
|
+
attr_accessor :phone_number
|
|
80
|
+
|
|
81
|
+
# How the subscription state was changed:
|
|
82
|
+
#
|
|
83
|
+
# - `MO_KEYWORD` - User sent a keyword (STOP/START)
|
|
84
|
+
# - `API` - Changed via API
|
|
85
|
+
# - `CSV_IMPORT` - Imported from CSV
|
|
86
|
+
# - `CARRIER_DISCONNECT` - Automatically unsubscribed due to carrier disconnect
|
|
87
|
+
sig do
|
|
88
|
+
returns(
|
|
89
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source::TaggedSymbol
|
|
90
|
+
)
|
|
91
|
+
end
|
|
92
|
+
attr_accessor :source
|
|
93
|
+
|
|
94
|
+
# The subscription state after this event:
|
|
95
|
+
#
|
|
96
|
+
# - `SUB` - Subscribed (user can receive marketing messages)
|
|
97
|
+
# - `UNSUB` - Unsubscribed (user has opted out)
|
|
98
|
+
sig do
|
|
99
|
+
returns(
|
|
100
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::State::TaggedSymbol
|
|
101
|
+
)
|
|
102
|
+
end
|
|
103
|
+
attr_accessor :state
|
|
104
|
+
|
|
105
|
+
# The date and time when the event occurred.
|
|
106
|
+
sig { returns(Time) }
|
|
107
|
+
attr_accessor :timestamp
|
|
108
|
+
|
|
109
|
+
# Additional context about the state change (e.g., the keyword that was sent).
|
|
110
|
+
sig { returns(T.nilable(String)) }
|
|
111
|
+
attr_reader :reason
|
|
112
|
+
|
|
113
|
+
sig { params(reason: String).void }
|
|
114
|
+
attr_writer :reason
|
|
115
|
+
|
|
116
|
+
sig do
|
|
117
|
+
params(
|
|
118
|
+
config_id: String,
|
|
119
|
+
phone_number: String,
|
|
120
|
+
source:
|
|
121
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source::OrSymbol,
|
|
122
|
+
state:
|
|
123
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::State::OrSymbol,
|
|
124
|
+
timestamp: Time,
|
|
125
|
+
reason: String
|
|
126
|
+
).returns(T.attached_class)
|
|
127
|
+
end
|
|
128
|
+
def self.new(
|
|
129
|
+
# The subscription configuration ID.
|
|
130
|
+
config_id:,
|
|
131
|
+
# The phone number in E.164 format.
|
|
132
|
+
phone_number:,
|
|
133
|
+
# How the subscription state was changed:
|
|
134
|
+
#
|
|
135
|
+
# - `MO_KEYWORD` - User sent a keyword (STOP/START)
|
|
136
|
+
# - `API` - Changed via API
|
|
137
|
+
# - `CSV_IMPORT` - Imported from CSV
|
|
138
|
+
# - `CARRIER_DISCONNECT` - Automatically unsubscribed due to carrier disconnect
|
|
139
|
+
source:,
|
|
140
|
+
# The subscription state after this event:
|
|
141
|
+
#
|
|
142
|
+
# - `SUB` - Subscribed (user can receive marketing messages)
|
|
143
|
+
# - `UNSUB` - Unsubscribed (user has opted out)
|
|
144
|
+
state:,
|
|
145
|
+
# The date and time when the event occurred.
|
|
146
|
+
timestamp:,
|
|
147
|
+
# Additional context about the state change (e.g., the keyword that was sent).
|
|
148
|
+
reason: nil
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
sig do
|
|
153
|
+
override.returns(
|
|
154
|
+
{
|
|
155
|
+
config_id: String,
|
|
156
|
+
phone_number: String,
|
|
157
|
+
source:
|
|
158
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source::TaggedSymbol,
|
|
159
|
+
state:
|
|
160
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::State::TaggedSymbol,
|
|
161
|
+
timestamp: Time,
|
|
162
|
+
reason: String
|
|
163
|
+
}
|
|
164
|
+
)
|
|
165
|
+
end
|
|
166
|
+
def to_hash
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# How the subscription state was changed:
|
|
170
|
+
#
|
|
171
|
+
# - `MO_KEYWORD` - User sent a keyword (STOP/START)
|
|
172
|
+
# - `API` - Changed via API
|
|
173
|
+
# - `CSV_IMPORT` - Imported from CSV
|
|
174
|
+
# - `CARRIER_DISCONNECT` - Automatically unsubscribed due to carrier disconnect
|
|
175
|
+
module Source
|
|
176
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
177
|
+
|
|
178
|
+
TaggedSymbol =
|
|
179
|
+
T.type_alias do
|
|
180
|
+
T.all(
|
|
181
|
+
Symbol,
|
|
182
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source
|
|
183
|
+
)
|
|
184
|
+
end
|
|
185
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
186
|
+
|
|
187
|
+
MO_KEYWORD =
|
|
188
|
+
T.let(
|
|
189
|
+
:MO_KEYWORD,
|
|
190
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source::TaggedSymbol
|
|
191
|
+
)
|
|
192
|
+
API =
|
|
193
|
+
T.let(
|
|
194
|
+
:API,
|
|
195
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source::TaggedSymbol
|
|
196
|
+
)
|
|
197
|
+
CSV_IMPORT =
|
|
198
|
+
T.let(
|
|
199
|
+
:CSV_IMPORT,
|
|
200
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source::TaggedSymbol
|
|
201
|
+
)
|
|
202
|
+
CARRIER_DISCONNECT =
|
|
203
|
+
T.let(
|
|
204
|
+
:CARRIER_DISCONNECT,
|
|
205
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source::TaggedSymbol
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
sig do
|
|
209
|
+
override.returns(
|
|
210
|
+
T::Array[
|
|
211
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::Source::TaggedSymbol
|
|
212
|
+
]
|
|
213
|
+
)
|
|
214
|
+
end
|
|
215
|
+
def self.values
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# The subscription state after this event:
|
|
220
|
+
#
|
|
221
|
+
# - `SUB` - Subscribed (user can receive marketing messages)
|
|
222
|
+
# - `UNSUB` - Unsubscribed (user has opted out)
|
|
223
|
+
module State
|
|
224
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
225
|
+
|
|
226
|
+
TaggedSymbol =
|
|
227
|
+
T.type_alias do
|
|
228
|
+
T.all(
|
|
229
|
+
Symbol,
|
|
230
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::State
|
|
231
|
+
)
|
|
232
|
+
end
|
|
233
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
234
|
+
|
|
235
|
+
SUB =
|
|
236
|
+
T.let(
|
|
237
|
+
:SUB,
|
|
238
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::State::TaggedSymbol
|
|
239
|
+
)
|
|
240
|
+
UNSUB =
|
|
241
|
+
T.let(
|
|
242
|
+
:UNSUB,
|
|
243
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::State::TaggedSymbol
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
sig do
|
|
247
|
+
override.returns(
|
|
248
|
+
T::Array[
|
|
249
|
+
PreludeSDK::Models::NotifyListSubscriptionPhoneNumberEventsResponse::Event::State::TaggedSymbol
|
|
250
|
+
]
|
|
251
|
+
)
|
|
252
|
+
end
|
|
253
|
+
def self.values
|
|
254
|
+
end
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
end
|