prelude-sdk 0.3.0 → 0.4.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 +33 -0
- data/README.md +1 -1
- data/lib/prelude_sdk/client.rb +15 -1
- data/lib/prelude_sdk/internal/util.rb +22 -7
- data/lib/prelude_sdk/models/notify_send_batch_params.rb +38 -15
- data/lib/prelude_sdk/models/notify_send_params.rb +74 -14
- data/lib/prelude_sdk/models/transactional_send_params.rb +37 -15
- data/lib/prelude_sdk/models/verification_create_response.rb +51 -1
- data/lib/prelude_sdk/models/watch_send_events_params.rb +6 -2
- data/lib/prelude_sdk/models/watch_send_feedbacks_params.rb +6 -2
- data/lib/prelude_sdk/resources/notify.rb +9 -5
- data/lib/prelude_sdk/resources/transactional.rb +1 -1
- data/lib/prelude_sdk/resources/watch.rb +8 -2
- data/lib/prelude_sdk/version.rb +1 -1
- data/rbi/prelude_sdk/internal/util.rbi +8 -0
- data/rbi/prelude_sdk/models/notify_send_batch_params.rbi +55 -17
- data/rbi/prelude_sdk/models/notify_send_params.rbi +114 -17
- data/rbi/prelude_sdk/models/transactional_send_params.rbi +50 -17
- data/rbi/prelude_sdk/models/verification_create_response.rbi +152 -0
- data/rbi/prelude_sdk/models/watch_send_events_params.rbi +4 -2
- data/rbi/prelude_sdk/models/watch_send_feedbacks_params.rbi +4 -2
- data/rbi/prelude_sdk/resources/notify.rbi +31 -6
- data/rbi/prelude_sdk/resources/transactional.rbi +10 -2
- data/rbi/prelude_sdk/resources/watch.rbi +4 -2
- data/sig/prelude_sdk/internal/util.rbs +4 -0
- data/sig/prelude_sdk/models/notify_send_batch_params.rbs +9 -6
- data/sig/prelude_sdk/models/notify_send_params.rbs +35 -6
- data/sig/prelude_sdk/models/transactional_send_params.rbs +7 -5
- data/sig/prelude_sdk/models/verification_create_response.rbs +38 -0
- data/sig/prelude_sdk/resources/notify.rbs +2 -0
- metadata +2 -2
|
@@ -114,6 +114,51 @@ module PreludeSDK
|
|
|
114
114
|
sig { params(request_id: String).void }
|
|
115
115
|
attr_writer :request_id
|
|
116
116
|
|
|
117
|
+
# The risk factors that contributed to the verification being blocked. Only
|
|
118
|
+
# present when status is "blocked" and the anti-fraud system detected specific
|
|
119
|
+
# risk signals.
|
|
120
|
+
#
|
|
121
|
+
# - `behavioral_pattern` - The phone number past behavior during verification
|
|
122
|
+
# flows exhibits suspicious patterns.
|
|
123
|
+
# - `device_attribute` - The device exhibits characteristics associated with
|
|
124
|
+
# suspicious activity patterns.
|
|
125
|
+
# - `fraud_database` - The phone number has been flagged as suspicious in one or
|
|
126
|
+
# more of our fraud databases.
|
|
127
|
+
# - `location_discrepancy` - The phone number prefix and IP address discrepancy
|
|
128
|
+
# indicates potential fraud.
|
|
129
|
+
# - `network_fingerprint` - The network connection exhibits characteristics
|
|
130
|
+
# associated with suspicious activity patterns.
|
|
131
|
+
# - `poor_conversion_history` - The phone number has a history of poorly
|
|
132
|
+
# converting to a verified phone number.
|
|
133
|
+
# - `prefix_concentration` - The phone number is part of a range known to be
|
|
134
|
+
# associated with suspicious activity patterns.
|
|
135
|
+
# - `suspected_request_tampering` - The SDK signature is invalid and the request
|
|
136
|
+
# is considered to be tampered with.
|
|
137
|
+
# - `suspicious_ip_address` - The IP address is deemed to be associated with
|
|
138
|
+
# suspicious activity patterns.
|
|
139
|
+
# - `temporary_phone_number` - The phone number is known to be a temporary or
|
|
140
|
+
# disposable number.
|
|
141
|
+
sig do
|
|
142
|
+
returns(
|
|
143
|
+
T.nilable(
|
|
144
|
+
T::Array[
|
|
145
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
146
|
+
]
|
|
147
|
+
)
|
|
148
|
+
)
|
|
149
|
+
end
|
|
150
|
+
attr_reader :risk_factors
|
|
151
|
+
|
|
152
|
+
sig do
|
|
153
|
+
params(
|
|
154
|
+
risk_factors:
|
|
155
|
+
T::Array[
|
|
156
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::OrSymbol
|
|
157
|
+
]
|
|
158
|
+
).void
|
|
159
|
+
end
|
|
160
|
+
attr_writer :risk_factors
|
|
161
|
+
|
|
117
162
|
# The silent verification specific properties.
|
|
118
163
|
sig do
|
|
119
164
|
returns(
|
|
@@ -145,6 +190,10 @@ module PreludeSDK
|
|
|
145
190
|
reason:
|
|
146
191
|
PreludeSDK::Models::VerificationCreateResponse::Reason::OrSymbol,
|
|
147
192
|
request_id: String,
|
|
193
|
+
risk_factors:
|
|
194
|
+
T::Array[
|
|
195
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::OrSymbol
|
|
196
|
+
],
|
|
148
197
|
silent: PreludeSDK::Models::VerificationCreateResponse::Silent::OrHash
|
|
149
198
|
).returns(T.attached_class)
|
|
150
199
|
end
|
|
@@ -183,6 +232,31 @@ module PreludeSDK
|
|
|
183
232
|
# anti-fraud system.
|
|
184
233
|
reason: nil,
|
|
185
234
|
request_id: nil,
|
|
235
|
+
# The risk factors that contributed to the verification being blocked. Only
|
|
236
|
+
# present when status is "blocked" and the anti-fraud system detected specific
|
|
237
|
+
# risk signals.
|
|
238
|
+
#
|
|
239
|
+
# - `behavioral_pattern` - The phone number past behavior during verification
|
|
240
|
+
# flows exhibits suspicious patterns.
|
|
241
|
+
# - `device_attribute` - The device exhibits characteristics associated with
|
|
242
|
+
# suspicious activity patterns.
|
|
243
|
+
# - `fraud_database` - The phone number has been flagged as suspicious in one or
|
|
244
|
+
# more of our fraud databases.
|
|
245
|
+
# - `location_discrepancy` - The phone number prefix and IP address discrepancy
|
|
246
|
+
# indicates potential fraud.
|
|
247
|
+
# - `network_fingerprint` - The network connection exhibits characteristics
|
|
248
|
+
# associated with suspicious activity patterns.
|
|
249
|
+
# - `poor_conversion_history` - The phone number has a history of poorly
|
|
250
|
+
# converting to a verified phone number.
|
|
251
|
+
# - `prefix_concentration` - The phone number is part of a range known to be
|
|
252
|
+
# associated with suspicious activity patterns.
|
|
253
|
+
# - `suspected_request_tampering` - The SDK signature is invalid and the request
|
|
254
|
+
# is considered to be tampered with.
|
|
255
|
+
# - `suspicious_ip_address` - The IP address is deemed to be associated with
|
|
256
|
+
# suspicious activity patterns.
|
|
257
|
+
# - `temporary_phone_number` - The phone number is known to be a temporary or
|
|
258
|
+
# disposable number.
|
|
259
|
+
risk_factors: nil,
|
|
186
260
|
# The silent verification specific properties.
|
|
187
261
|
silent: nil
|
|
188
262
|
)
|
|
@@ -204,6 +278,10 @@ module PreludeSDK
|
|
|
204
278
|
reason:
|
|
205
279
|
PreludeSDK::Models::VerificationCreateResponse::Reason::TaggedSymbol,
|
|
206
280
|
request_id: String,
|
|
281
|
+
risk_factors:
|
|
282
|
+
T::Array[
|
|
283
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
284
|
+
],
|
|
207
285
|
silent: PreludeSDK::Models::VerificationCreateResponse::Silent
|
|
208
286
|
}
|
|
209
287
|
)
|
|
@@ -477,6 +555,80 @@ module PreludeSDK
|
|
|
477
555
|
end
|
|
478
556
|
end
|
|
479
557
|
|
|
558
|
+
module RiskFactor
|
|
559
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
560
|
+
|
|
561
|
+
TaggedSymbol =
|
|
562
|
+
T.type_alias do
|
|
563
|
+
T.all(
|
|
564
|
+
Symbol,
|
|
565
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor
|
|
566
|
+
)
|
|
567
|
+
end
|
|
568
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
569
|
+
|
|
570
|
+
BEHAVIORAL_PATTERN =
|
|
571
|
+
T.let(
|
|
572
|
+
:behavioral_pattern,
|
|
573
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
574
|
+
)
|
|
575
|
+
DEVICE_ATTRIBUTE =
|
|
576
|
+
T.let(
|
|
577
|
+
:device_attribute,
|
|
578
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
579
|
+
)
|
|
580
|
+
FRAUD_DATABASE =
|
|
581
|
+
T.let(
|
|
582
|
+
:fraud_database,
|
|
583
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
584
|
+
)
|
|
585
|
+
LOCATION_DISCREPANCY =
|
|
586
|
+
T.let(
|
|
587
|
+
:location_discrepancy,
|
|
588
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
589
|
+
)
|
|
590
|
+
NETWORK_FINGERPRINT =
|
|
591
|
+
T.let(
|
|
592
|
+
:network_fingerprint,
|
|
593
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
594
|
+
)
|
|
595
|
+
POOR_CONVERSION_HISTORY =
|
|
596
|
+
T.let(
|
|
597
|
+
:poor_conversion_history,
|
|
598
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
599
|
+
)
|
|
600
|
+
PREFIX_CONCENTRATION =
|
|
601
|
+
T.let(
|
|
602
|
+
:prefix_concentration,
|
|
603
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
604
|
+
)
|
|
605
|
+
SUSPECTED_REQUEST_TAMPERING =
|
|
606
|
+
T.let(
|
|
607
|
+
:suspected_request_tampering,
|
|
608
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
609
|
+
)
|
|
610
|
+
SUSPICIOUS_IP_ADDRESS =
|
|
611
|
+
T.let(
|
|
612
|
+
:suspicious_ip_address,
|
|
613
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
614
|
+
)
|
|
615
|
+
TEMPORARY_PHONE_NUMBER =
|
|
616
|
+
T.let(
|
|
617
|
+
:temporary_phone_number,
|
|
618
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
619
|
+
)
|
|
620
|
+
|
|
621
|
+
sig do
|
|
622
|
+
override.returns(
|
|
623
|
+
T::Array[
|
|
624
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
625
|
+
]
|
|
626
|
+
)
|
|
627
|
+
end
|
|
628
|
+
def self.values
|
|
629
|
+
end
|
|
630
|
+
end
|
|
631
|
+
|
|
480
632
|
class Silent < PreludeSDK::Internal::Type::BaseModel
|
|
481
633
|
OrHash =
|
|
482
634
|
T.type_alias do
|
|
@@ -14,7 +14,8 @@ module PreludeSDK
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
# A list of events to dispatch.
|
|
17
|
+
# A list of events to dispatch. A maximum of 100 events can be sent in a single
|
|
18
|
+
# request.
|
|
18
19
|
sig { returns(T::Array[PreludeSDK::WatchSendEventsParams::Event]) }
|
|
19
20
|
attr_accessor :events
|
|
20
21
|
|
|
@@ -25,7 +26,8 @@ module PreludeSDK
|
|
|
25
26
|
).returns(T.attached_class)
|
|
26
27
|
end
|
|
27
28
|
def self.new(
|
|
28
|
-
# A list of events to dispatch.
|
|
29
|
+
# A list of events to dispatch. A maximum of 100 events can be sent in a single
|
|
30
|
+
# request.
|
|
29
31
|
events:,
|
|
30
32
|
request_options: {}
|
|
31
33
|
)
|
|
@@ -14,7 +14,8 @@ module PreludeSDK
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
# A list of feedbacks to send.
|
|
17
|
+
# A list of feedbacks to send. A maximum of 100 feedbacks can be sent in a single
|
|
18
|
+
# request.
|
|
18
19
|
sig { returns(T::Array[PreludeSDK::WatchSendFeedbacksParams::Feedback]) }
|
|
19
20
|
attr_accessor :feedbacks
|
|
20
21
|
|
|
@@ -26,7 +27,8 @@ module PreludeSDK
|
|
|
26
27
|
).returns(T.attached_class)
|
|
27
28
|
end
|
|
28
29
|
def self.new(
|
|
29
|
-
# A list of feedbacks to send.
|
|
30
|
+
# A list of feedbacks to send. A maximum of 100 feedbacks can be sent in a single
|
|
31
|
+
# request.
|
|
30
32
|
feedbacks:,
|
|
31
33
|
request_options: {}
|
|
32
34
|
)
|
|
@@ -114,13 +114,14 @@ module PreludeSDK
|
|
|
114
114
|
)
|
|
115
115
|
end
|
|
116
116
|
|
|
117
|
-
# Send transactional and marketing messages to your users via SMS and
|
|
118
|
-
# with automatic compliance enforcement.
|
|
117
|
+
# Send transactional and marketing messages to your users via SMS, RCS and
|
|
118
|
+
# WhatsApp with automatic compliance enforcement.
|
|
119
119
|
sig do
|
|
120
120
|
params(
|
|
121
121
|
template_id: String,
|
|
122
122
|
to: String,
|
|
123
123
|
callback_url: String,
|
|
124
|
+
context: PreludeSDK::NotifySendParams::Context::OrHash,
|
|
124
125
|
correlation_id: String,
|
|
125
126
|
document: PreludeSDK::NotifySendParams::Document::OrHash,
|
|
126
127
|
expires_at: Time,
|
|
@@ -129,6 +130,7 @@ module PreludeSDK
|
|
|
129
130
|
preferred_channel:
|
|
130
131
|
PreludeSDK::NotifySendParams::PreferredChannel::OrSymbol,
|
|
131
132
|
schedule_at: Time,
|
|
133
|
+
text: String,
|
|
132
134
|
variables: T::Hash[Symbol, String],
|
|
133
135
|
request_options: PreludeSDK::RequestOptions::OrHash
|
|
134
136
|
).returns(PreludeSDK::Models::NotifySendResponse)
|
|
@@ -140,12 +142,23 @@ module PreludeSDK
|
|
|
140
142
|
to:,
|
|
141
143
|
# The URL where webhooks will be sent for message delivery events.
|
|
142
144
|
callback_url: nil,
|
|
145
|
+
# Context for replying to an inbound message. When provided, the message is sent
|
|
146
|
+
# as a WhatsApp reply within the 24-hour conversation window.
|
|
147
|
+
context: nil,
|
|
143
148
|
# A user-defined identifier to correlate this message with your internal systems.
|
|
144
149
|
# It is returned in the response and any webhook events that refer to this
|
|
145
150
|
# message.
|
|
146
151
|
correlation_id: nil,
|
|
147
|
-
# A
|
|
148
|
-
#
|
|
152
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
153
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
154
|
+
# type is determined by the template's registered header format; send the matching
|
|
155
|
+
# file type for each.
|
|
156
|
+
#
|
|
157
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
158
|
+
# required and displayed to the recipient.
|
|
159
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
160
|
+
# is ignored.
|
|
161
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
149
162
|
document: nil,
|
|
150
163
|
# The message expiration date in RFC3339 format. The message will not be sent if
|
|
151
164
|
# this time is reached.
|
|
@@ -164,6 +177,10 @@ module PreludeSDK
|
|
|
164
177
|
# can be scheduled up to 90 days in advance and will be automatically adjusted for
|
|
165
178
|
# compliance with local time window restrictions.
|
|
166
179
|
schedule_at: nil,
|
|
180
|
+
# The reply message body. Required when `context.reply_to` is provided. Used for
|
|
181
|
+
# 2-way WhatsApp messaging to send free-form text replies within a conversation
|
|
182
|
+
# window.
|
|
183
|
+
text: nil,
|
|
167
184
|
# The variables to be replaced in the template.
|
|
168
185
|
variables: nil,
|
|
169
186
|
request_options: {}
|
|
@@ -197,8 +214,16 @@ module PreludeSDK
|
|
|
197
214
|
callback_url: nil,
|
|
198
215
|
# A user-defined identifier to correlate this request with your internal systems.
|
|
199
216
|
correlation_id: nil,
|
|
200
|
-
# A
|
|
201
|
-
#
|
|
217
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
218
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
219
|
+
# type is determined by the template's registered header format; send the matching
|
|
220
|
+
# file type for each.
|
|
221
|
+
#
|
|
222
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
223
|
+
# required and displayed to the recipient.
|
|
224
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
225
|
+
# is ignored.
|
|
226
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
202
227
|
document: nil,
|
|
203
228
|
# The message expiration date in RFC3339 format. Messages will not be sent after
|
|
204
229
|
# this time.
|
|
@@ -33,8 +33,16 @@ module PreludeSDK
|
|
|
33
33
|
# returned in the response and any webhook events that refer to this
|
|
34
34
|
# transactionalmessage.
|
|
35
35
|
correlation_id: nil,
|
|
36
|
-
# A
|
|
37
|
-
#
|
|
36
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
37
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
38
|
+
# type is determined by the template's registered header format; send the matching
|
|
39
|
+
# file type for each.
|
|
40
|
+
#
|
|
41
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
42
|
+
# required and displayed to the recipient.
|
|
43
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
44
|
+
# is ignored.
|
|
45
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
38
46
|
document: nil,
|
|
39
47
|
# The message expiration date.
|
|
40
48
|
expires_at: nil,
|
|
@@ -37,7 +37,8 @@ module PreludeSDK
|
|
|
37
37
|
).returns(PreludeSDK::Models::WatchSendEventsResponse)
|
|
38
38
|
end
|
|
39
39
|
def send_events(
|
|
40
|
-
# A list of events to dispatch.
|
|
40
|
+
# A list of events to dispatch. A maximum of 100 events can be sent in a single
|
|
41
|
+
# request.
|
|
41
42
|
events:,
|
|
42
43
|
request_options: {}
|
|
43
44
|
)
|
|
@@ -53,7 +54,8 @@ module PreludeSDK
|
|
|
53
54
|
).returns(PreludeSDK::Models::WatchSendFeedbacksResponse)
|
|
54
55
|
end
|
|
55
56
|
def send_feedbacks(
|
|
56
|
-
# A list of feedbacks to send.
|
|
57
|
+
# A list of feedbacks to send. A maximum of 100 feedbacks can be sent in a single
|
|
58
|
+
# request.
|
|
57
59
|
feedbacks:,
|
|
58
60
|
request_options: {}
|
|
59
61
|
)
|
|
@@ -45,8 +45,12 @@ module PreludeSDK
|
|
|
45
45
|
-> top?
|
|
46
46
|
} -> top?
|
|
47
47
|
|
|
48
|
+
RFC_3986_NOT_PCHARS: Regexp
|
|
49
|
+
|
|
48
50
|
def self?.uri_origin: (URI::Generic uri) -> String
|
|
49
51
|
|
|
52
|
+
def self?.encode_path: (String | Integer path) -> String
|
|
53
|
+
|
|
50
54
|
def self?.interpolate_path: (String | ::Array[String] path) -> String
|
|
51
55
|
|
|
52
56
|
def self?.decode_query: (String? query) -> ::Hash[String, ::Array[String]]
|
|
@@ -94,24 +94,27 @@ module PreludeSDK
|
|
|
94
94
|
request_options: PreludeSDK::RequestOptions
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
type document = {
|
|
97
|
+
type document = { url: String, filename: String }
|
|
98
98
|
|
|
99
99
|
class Document < PreludeSDK::Internal::Type::BaseModel
|
|
100
|
-
attr_accessor filename: String
|
|
101
|
-
|
|
102
100
|
attr_accessor url: String
|
|
103
101
|
|
|
104
|
-
|
|
102
|
+
attr_reader filename: String?
|
|
103
|
+
|
|
104
|
+
def filename=: (String) -> String
|
|
105
|
+
|
|
106
|
+
def initialize: (url: String, ?filename: String) -> void
|
|
105
107
|
|
|
106
|
-
def to_hash: -> {
|
|
108
|
+
def to_hash: -> { url: String, filename: String }
|
|
107
109
|
end
|
|
108
110
|
|
|
109
|
-
type preferred_channel = :sms | :whatsapp
|
|
111
|
+
type preferred_channel = :sms | :rcs | :whatsapp
|
|
110
112
|
|
|
111
113
|
module PreferredChannel
|
|
112
114
|
extend PreludeSDK::Internal::Type::Enum
|
|
113
115
|
|
|
114
116
|
SMS: :sms
|
|
117
|
+
RCS: :rcs
|
|
115
118
|
WHATSAPP: :whatsapp
|
|
116
119
|
|
|
117
120
|
def self?.values: -> ::Array[PreludeSDK::Models::NotifySendBatchParams::preferred_channel]
|
|
@@ -5,6 +5,7 @@ module PreludeSDK
|
|
|
5
5
|
template_id: String,
|
|
6
6
|
to: String,
|
|
7
7
|
callback_url: String,
|
|
8
|
+
context: PreludeSDK::NotifySendParams::Context,
|
|
8
9
|
correlation_id: String,
|
|
9
10
|
document: PreludeSDK::NotifySendParams::Document,
|
|
10
11
|
expires_at: Time,
|
|
@@ -12,6 +13,7 @@ module PreludeSDK
|
|
|
12
13
|
locale: String,
|
|
13
14
|
preferred_channel: PreludeSDK::Models::NotifySendParams::preferred_channel,
|
|
14
15
|
schedule_at: Time,
|
|
16
|
+
text: String,
|
|
15
17
|
variables: ::Hash[Symbol, String]
|
|
16
18
|
}
|
|
17
19
|
& PreludeSDK::Internal::Type::request_parameters
|
|
@@ -28,6 +30,12 @@ module PreludeSDK
|
|
|
28
30
|
|
|
29
31
|
def callback_url=: (String) -> String
|
|
30
32
|
|
|
33
|
+
attr_reader context: PreludeSDK::NotifySendParams::Context?
|
|
34
|
+
|
|
35
|
+
def context=: (
|
|
36
|
+
PreludeSDK::NotifySendParams::Context
|
|
37
|
+
) -> PreludeSDK::NotifySendParams::Context
|
|
38
|
+
|
|
31
39
|
attr_reader correlation_id: String?
|
|
32
40
|
|
|
33
41
|
def correlation_id=: (String) -> String
|
|
@@ -60,6 +68,10 @@ module PreludeSDK
|
|
|
60
68
|
|
|
61
69
|
def schedule_at=: (Time) -> Time
|
|
62
70
|
|
|
71
|
+
attr_reader text: String?
|
|
72
|
+
|
|
73
|
+
def text=: (String) -> String
|
|
74
|
+
|
|
63
75
|
attr_reader variables: ::Hash[Symbol, String]?
|
|
64
76
|
|
|
65
77
|
def variables=: (::Hash[Symbol, String]) -> ::Hash[Symbol, String]
|
|
@@ -68,6 +80,7 @@ module PreludeSDK
|
|
|
68
80
|
template_id: String,
|
|
69
81
|
to: String,
|
|
70
82
|
?callback_url: String,
|
|
83
|
+
?context: PreludeSDK::NotifySendParams::Context,
|
|
71
84
|
?correlation_id: String,
|
|
72
85
|
?document: PreludeSDK::NotifySendParams::Document,
|
|
73
86
|
?expires_at: Time,
|
|
@@ -75,6 +88,7 @@ module PreludeSDK
|
|
|
75
88
|
?locale: String,
|
|
76
89
|
?preferred_channel: PreludeSDK::Models::NotifySendParams::preferred_channel,
|
|
77
90
|
?schedule_at: Time,
|
|
91
|
+
?text: String,
|
|
78
92
|
?variables: ::Hash[Symbol, String],
|
|
79
93
|
?request_options: PreludeSDK::request_opts
|
|
80
94
|
) -> void
|
|
@@ -83,6 +97,7 @@ module PreludeSDK
|
|
|
83
97
|
template_id: String,
|
|
84
98
|
to: String,
|
|
85
99
|
callback_url: String,
|
|
100
|
+
context: PreludeSDK::NotifySendParams::Context,
|
|
86
101
|
correlation_id: String,
|
|
87
102
|
document: PreludeSDK::NotifySendParams::Document,
|
|
88
103
|
expires_at: Time,
|
|
@@ -90,28 +105,42 @@ module PreludeSDK
|
|
|
90
105
|
locale: String,
|
|
91
106
|
preferred_channel: PreludeSDK::Models::NotifySendParams::preferred_channel,
|
|
92
107
|
schedule_at: Time,
|
|
108
|
+
text: String,
|
|
93
109
|
variables: ::Hash[Symbol, String],
|
|
94
110
|
request_options: PreludeSDK::RequestOptions
|
|
95
111
|
}
|
|
96
112
|
|
|
97
|
-
type
|
|
113
|
+
type context = { reply_to: String }
|
|
98
114
|
|
|
99
|
-
class
|
|
100
|
-
attr_accessor
|
|
115
|
+
class Context < PreludeSDK::Internal::Type::BaseModel
|
|
116
|
+
attr_accessor reply_to: String
|
|
117
|
+
|
|
118
|
+
def initialize: (reply_to: String) -> void
|
|
101
119
|
|
|
120
|
+
def to_hash: -> { reply_to: String }
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
type document = { url: String, filename: String }
|
|
124
|
+
|
|
125
|
+
class Document < PreludeSDK::Internal::Type::BaseModel
|
|
102
126
|
attr_accessor url: String
|
|
103
127
|
|
|
104
|
-
|
|
128
|
+
attr_reader filename: String?
|
|
129
|
+
|
|
130
|
+
def filename=: (String) -> String
|
|
131
|
+
|
|
132
|
+
def initialize: (url: String, ?filename: String) -> void
|
|
105
133
|
|
|
106
|
-
def to_hash: -> {
|
|
134
|
+
def to_hash: -> { url: String, filename: String }
|
|
107
135
|
end
|
|
108
136
|
|
|
109
|
-
type preferred_channel = :sms | :whatsapp
|
|
137
|
+
type preferred_channel = :sms | :rcs | :whatsapp
|
|
110
138
|
|
|
111
139
|
module PreferredChannel
|
|
112
140
|
extend PreludeSDK::Internal::Type::Enum
|
|
113
141
|
|
|
114
142
|
SMS: :sms
|
|
143
|
+
RCS: :rcs
|
|
115
144
|
WHATSAPP: :whatsapp
|
|
116
145
|
|
|
117
146
|
def self?.values: -> ::Array[PreludeSDK::Models::NotifySendParams::preferred_channel]
|
|
@@ -87,16 +87,18 @@ module PreludeSDK
|
|
|
87
87
|
request_options: PreludeSDK::RequestOptions
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
type document = {
|
|
90
|
+
type document = { url: String, filename: String }
|
|
91
91
|
|
|
92
92
|
class Document < PreludeSDK::Internal::Type::BaseModel
|
|
93
|
-
attr_accessor filename: String
|
|
94
|
-
|
|
95
93
|
attr_accessor url: String
|
|
96
94
|
|
|
97
|
-
|
|
95
|
+
attr_reader filename: String?
|
|
96
|
+
|
|
97
|
+
def filename=: (String) -> String
|
|
98
|
+
|
|
99
|
+
def initialize: (url: String, ?filename: String) -> void
|
|
98
100
|
|
|
99
|
-
def to_hash: -> {
|
|
101
|
+
def to_hash: -> { url: String, filename: String }
|
|
100
102
|
end
|
|
101
103
|
|
|
102
104
|
type preferred_channel = :sms | :rcs | :whatsapp
|
|
@@ -9,6 +9,7 @@ module PreludeSDK
|
|
|
9
9
|
metadata: PreludeSDK::Models::VerificationCreateResponse::Metadata,
|
|
10
10
|
reason: PreludeSDK::Models::VerificationCreateResponse::reason,
|
|
11
11
|
request_id: String,
|
|
12
|
+
risk_factors: ::Array[PreludeSDK::Models::VerificationCreateResponse::risk_factor],
|
|
12
13
|
silent: PreludeSDK::Models::VerificationCreateResponse::Silent
|
|
13
14
|
}
|
|
14
15
|
|
|
@@ -41,6 +42,12 @@ module PreludeSDK
|
|
|
41
42
|
|
|
42
43
|
def request_id=: (String) -> String
|
|
43
44
|
|
|
45
|
+
attr_reader risk_factors: ::Array[PreludeSDK::Models::VerificationCreateResponse::risk_factor]?
|
|
46
|
+
|
|
47
|
+
def risk_factors=: (
|
|
48
|
+
::Array[PreludeSDK::Models::VerificationCreateResponse::risk_factor]
|
|
49
|
+
) -> ::Array[PreludeSDK::Models::VerificationCreateResponse::risk_factor]
|
|
50
|
+
|
|
44
51
|
attr_reader silent: PreludeSDK::Models::VerificationCreateResponse::Silent?
|
|
45
52
|
|
|
46
53
|
def silent=: (
|
|
@@ -55,6 +62,7 @@ module PreludeSDK
|
|
|
55
62
|
?metadata: PreludeSDK::Models::VerificationCreateResponse::Metadata,
|
|
56
63
|
?reason: PreludeSDK::Models::VerificationCreateResponse::reason,
|
|
57
64
|
?request_id: String,
|
|
65
|
+
?risk_factors: ::Array[PreludeSDK::Models::VerificationCreateResponse::risk_factor],
|
|
58
66
|
?silent: PreludeSDK::Models::VerificationCreateResponse::Silent
|
|
59
67
|
) -> void
|
|
60
68
|
|
|
@@ -66,6 +74,7 @@ module PreludeSDK
|
|
|
66
74
|
metadata: PreludeSDK::Models::VerificationCreateResponse::Metadata,
|
|
67
75
|
reason: PreludeSDK::Models::VerificationCreateResponse::reason,
|
|
68
76
|
request_id: String,
|
|
77
|
+
risk_factors: ::Array[PreludeSDK::Models::VerificationCreateResponse::risk_factor],
|
|
69
78
|
silent: PreludeSDK::Models::VerificationCreateResponse::Silent
|
|
70
79
|
}
|
|
71
80
|
|
|
@@ -148,6 +157,35 @@ module PreludeSDK
|
|
|
148
157
|
def self?.values: -> ::Array[PreludeSDK::Models::VerificationCreateResponse::reason]
|
|
149
158
|
end
|
|
150
159
|
|
|
160
|
+
type risk_factor =
|
|
161
|
+
:behavioral_pattern
|
|
162
|
+
| :device_attribute
|
|
163
|
+
| :fraud_database
|
|
164
|
+
| :location_discrepancy
|
|
165
|
+
| :network_fingerprint
|
|
166
|
+
| :poor_conversion_history
|
|
167
|
+
| :prefix_concentration
|
|
168
|
+
| :suspected_request_tampering
|
|
169
|
+
| :suspicious_ip_address
|
|
170
|
+
| :temporary_phone_number
|
|
171
|
+
|
|
172
|
+
module RiskFactor
|
|
173
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
174
|
+
|
|
175
|
+
BEHAVIORAL_PATTERN: :behavioral_pattern
|
|
176
|
+
DEVICE_ATTRIBUTE: :device_attribute
|
|
177
|
+
FRAUD_DATABASE: :fraud_database
|
|
178
|
+
LOCATION_DISCREPANCY: :location_discrepancy
|
|
179
|
+
NETWORK_FINGERPRINT: :network_fingerprint
|
|
180
|
+
POOR_CONVERSION_HISTORY: :poor_conversion_history
|
|
181
|
+
PREFIX_CONCENTRATION: :prefix_concentration
|
|
182
|
+
SUSPECTED_REQUEST_TAMPERING: :suspected_request_tampering
|
|
183
|
+
SUSPICIOUS_IP_ADDRESS: :suspicious_ip_address
|
|
184
|
+
TEMPORARY_PHONE_NUMBER: :temporary_phone_number
|
|
185
|
+
|
|
186
|
+
def self?.values: -> ::Array[PreludeSDK::Models::VerificationCreateResponse::risk_factor]
|
|
187
|
+
end
|
|
188
|
+
|
|
151
189
|
type silent = { request_url: String }
|
|
152
190
|
|
|
153
191
|
class Silent < PreludeSDK::Internal::Type::BaseModel
|
|
@@ -38,6 +38,7 @@ module PreludeSDK
|
|
|
38
38
|
template_id: String,
|
|
39
39
|
to: String,
|
|
40
40
|
?callback_url: String,
|
|
41
|
+
?context: PreludeSDK::NotifySendParams::Context,
|
|
41
42
|
?correlation_id: String,
|
|
42
43
|
?document: PreludeSDK::NotifySendParams::Document,
|
|
43
44
|
?expires_at: Time,
|
|
@@ -45,6 +46,7 @@ module PreludeSDK
|
|
|
45
46
|
?locale: String,
|
|
46
47
|
?preferred_channel: PreludeSDK::Models::NotifySendParams::preferred_channel,
|
|
47
48
|
?schedule_at: Time,
|
|
49
|
+
?text: String,
|
|
48
50
|
?variables: ::Hash[Symbol, String],
|
|
49
51
|
?request_options: PreludeSDK::request_opts
|
|
50
52
|
) -> PreludeSDK::Models::NotifySendResponse
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prelude-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Prelude
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-05-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|