prelude-sdk 0.3.0 → 0.5.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 +42 -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 +38 -15
- data/lib/prelude_sdk/models/transactional_send_params.rb +37 -15
- data/lib/prelude_sdk/models/verification_create_response.rb +60 -3
- 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 +4 -4
- 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 +55 -17
- data/rbi/prelude_sdk/models/transactional_send_params.rbi +50 -17
- data/rbi/prelude_sdk/models/verification_create_response.rbi +169 -3
- 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 +22 -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 +9 -6
- data/sig/prelude_sdk/models/transactional_send_params.rbs +7 -5
- data/sig/prelude_sdk/models/verification_create_response.rbs +40 -1
- metadata +2 -2
|
@@ -35,12 +35,15 @@ module PreludeSDK
|
|
|
35
35
|
)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
# Some parameter documentations has been truncated, see
|
|
39
|
+
# {PreludeSDK::Models::WatchSendEventsParams} for more details.
|
|
40
|
+
#
|
|
38
41
|
# Send real-time event data from end-user interactions within your application.
|
|
39
42
|
# Events will be analyzed for proactive fraud prevention and risk scoring.
|
|
40
43
|
#
|
|
41
44
|
# @overload send_events(events:, request_options: {})
|
|
42
45
|
#
|
|
43
|
-
# @param events [Array<PreludeSDK::Models::WatchSendEventsParams::Event>] A list of events to dispatch.
|
|
46
|
+
# @param events [Array<PreludeSDK::Models::WatchSendEventsParams::Event>] A list of events to dispatch. A maximum of 100 events can be sent in a single re
|
|
44
47
|
#
|
|
45
48
|
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
46
49
|
#
|
|
@@ -58,12 +61,15 @@ module PreludeSDK
|
|
|
58
61
|
)
|
|
59
62
|
end
|
|
60
63
|
|
|
64
|
+
# Some parameter documentations has been truncated, see
|
|
65
|
+
# {PreludeSDK::Models::WatchSendFeedbacksParams} for more details.
|
|
66
|
+
#
|
|
61
67
|
# Send feedback regarding your end-users verification funnel. Events will be
|
|
62
68
|
# analyzed for proactive fraud prevention and risk scoring.
|
|
63
69
|
#
|
|
64
70
|
# @overload send_feedbacks(feedbacks:, request_options: {})
|
|
65
71
|
#
|
|
66
|
-
# @param feedbacks [Array<PreludeSDK::Models::WatchSendFeedbacksParams::Feedback>] A list of feedbacks to send.
|
|
72
|
+
# @param feedbacks [Array<PreludeSDK::Models::WatchSendFeedbacksParams::Feedback>] A list of feedbacks to send. A maximum of 100 feedbacks can be sent in a single
|
|
67
73
|
#
|
|
68
74
|
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
69
75
|
#
|
data/lib/prelude_sdk/version.rb
CHANGED
|
@@ -148,12 +148,20 @@ module PreludeSDK
|
|
|
148
148
|
end
|
|
149
149
|
end
|
|
150
150
|
|
|
151
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
152
|
+
RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp)
|
|
153
|
+
|
|
151
154
|
class << self
|
|
152
155
|
# @api private
|
|
153
156
|
sig { params(uri: URI::Generic).returns(String) }
|
|
154
157
|
def uri_origin(uri)
|
|
155
158
|
end
|
|
156
159
|
|
|
160
|
+
# @api private
|
|
161
|
+
sig { params(path: T.any(String, Integer)).returns(String) }
|
|
162
|
+
def encode_path(path)
|
|
163
|
+
end
|
|
164
|
+
|
|
157
165
|
# @api private
|
|
158
166
|
sig { params(path: T.any(String, T::Array[String])).returns(String) }
|
|
159
167
|
def interpolate_path(path)
|
|
@@ -36,8 +36,16 @@ module PreludeSDK
|
|
|
36
36
|
sig { params(correlation_id: String).void }
|
|
37
37
|
attr_writer :correlation_id
|
|
38
38
|
|
|
39
|
-
# A
|
|
40
|
-
#
|
|
39
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
40
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
41
|
+
# type is determined by the template's registered header format; send the matching
|
|
42
|
+
# file type for each.
|
|
43
|
+
#
|
|
44
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
45
|
+
# required and displayed to the recipient.
|
|
46
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
47
|
+
# is ignored.
|
|
48
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
41
49
|
sig { returns(T.nilable(PreludeSDK::NotifySendBatchParams::Document)) }
|
|
42
50
|
attr_reader :document
|
|
43
51
|
|
|
@@ -129,8 +137,16 @@ module PreludeSDK
|
|
|
129
137
|
callback_url: nil,
|
|
130
138
|
# A user-defined identifier to correlate this request with your internal systems.
|
|
131
139
|
correlation_id: nil,
|
|
132
|
-
# A
|
|
133
|
-
#
|
|
140
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
141
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
142
|
+
# type is determined by the template's registered header format; send the matching
|
|
143
|
+
# file type for each.
|
|
144
|
+
#
|
|
145
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
146
|
+
# required and displayed to the recipient.
|
|
147
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
148
|
+
# is ignored.
|
|
149
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
134
150
|
document: nil,
|
|
135
151
|
# The message expiration date in RFC3339 format. Messages will not be sent after
|
|
136
152
|
# this time.
|
|
@@ -181,26 +197,43 @@ module PreludeSDK
|
|
|
181
197
|
)
|
|
182
198
|
end
|
|
183
199
|
|
|
184
|
-
# The
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
# The URL of the document to attach. Must be a valid HTTP or HTTPS URL.
|
|
200
|
+
# HTTPS URL of the media file. The file extension must match the template's
|
|
201
|
+
# registered header format (PDF for DOCUMENT; PNG/JPG/JPEG/WEBP for IMAGE; MP4/3GP
|
|
202
|
+
# for VIDEO).
|
|
189
203
|
sig { returns(String) }
|
|
190
204
|
attr_accessor :url
|
|
191
205
|
|
|
192
|
-
#
|
|
193
|
-
#
|
|
194
|
-
sig {
|
|
206
|
+
# Filename displayed to the recipient. Required for templates with a `DOCUMENT`
|
|
207
|
+
# header; ignored for `IMAGE` and `VIDEO` headers.
|
|
208
|
+
sig { returns(T.nilable(String)) }
|
|
209
|
+
attr_reader :filename
|
|
210
|
+
|
|
211
|
+
sig { params(filename: String).void }
|
|
212
|
+
attr_writer :filename
|
|
213
|
+
|
|
214
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
215
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
216
|
+
# type is determined by the template's registered header format; send the matching
|
|
217
|
+
# file type for each.
|
|
218
|
+
#
|
|
219
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
220
|
+
# required and displayed to the recipient.
|
|
221
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
222
|
+
# is ignored.
|
|
223
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
224
|
+
sig { params(url: String, filename: String).returns(T.attached_class) }
|
|
195
225
|
def self.new(
|
|
196
|
-
# The
|
|
197
|
-
|
|
198
|
-
#
|
|
199
|
-
url
|
|
226
|
+
# HTTPS URL of the media file. The file extension must match the template's
|
|
227
|
+
# registered header format (PDF for DOCUMENT; PNG/JPG/JPEG/WEBP for IMAGE; MP4/3GP
|
|
228
|
+
# for VIDEO).
|
|
229
|
+
url:,
|
|
230
|
+
# Filename displayed to the recipient. Required for templates with a `DOCUMENT`
|
|
231
|
+
# header; ignored for `IMAGE` and `VIDEO` headers.
|
|
232
|
+
filename: nil
|
|
200
233
|
)
|
|
201
234
|
end
|
|
202
235
|
|
|
203
|
-
sig { override.returns({
|
|
236
|
+
sig { override.returns({ url: String, filename: String }) }
|
|
204
237
|
def to_hash
|
|
205
238
|
end
|
|
206
239
|
end
|
|
@@ -220,6 +253,11 @@ module PreludeSDK
|
|
|
220
253
|
:sms,
|
|
221
254
|
PreludeSDK::NotifySendBatchParams::PreferredChannel::TaggedSymbol
|
|
222
255
|
)
|
|
256
|
+
RCS =
|
|
257
|
+
T.let(
|
|
258
|
+
:rcs,
|
|
259
|
+
PreludeSDK::NotifySendBatchParams::PreferredChannel::TaggedSymbol
|
|
260
|
+
)
|
|
223
261
|
WHATSAPP =
|
|
224
262
|
T.let(
|
|
225
263
|
:whatsapp,
|
|
@@ -35,8 +35,16 @@ module PreludeSDK
|
|
|
35
35
|
sig { params(correlation_id: String).void }
|
|
36
36
|
attr_writer :correlation_id
|
|
37
37
|
|
|
38
|
-
# A
|
|
39
|
-
#
|
|
38
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
39
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
40
|
+
# type is determined by the template's registered header format; send the matching
|
|
41
|
+
# file type for each.
|
|
42
|
+
#
|
|
43
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
44
|
+
# required and displayed to the recipient.
|
|
45
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
46
|
+
# is ignored.
|
|
47
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
40
48
|
sig { returns(T.nilable(PreludeSDK::NotifySendParams::Document)) }
|
|
41
49
|
attr_reader :document
|
|
42
50
|
|
|
@@ -131,8 +139,16 @@ module PreludeSDK
|
|
|
131
139
|
# It is returned in the response and any webhook events that refer to this
|
|
132
140
|
# message.
|
|
133
141
|
correlation_id: nil,
|
|
134
|
-
# A
|
|
135
|
-
#
|
|
142
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
143
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
144
|
+
# type is determined by the template's registered header format; send the matching
|
|
145
|
+
# file type for each.
|
|
146
|
+
#
|
|
147
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
148
|
+
# required and displayed to the recipient.
|
|
149
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
150
|
+
# is ignored.
|
|
151
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
136
152
|
document: nil,
|
|
137
153
|
# The message expiration date in RFC3339 format. The message will not be sent if
|
|
138
154
|
# this time is reached.
|
|
@@ -188,26 +204,43 @@ module PreludeSDK
|
|
|
188
204
|
)
|
|
189
205
|
end
|
|
190
206
|
|
|
191
|
-
# The
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
# The URL of the document to attach. Must be a valid HTTP or HTTPS URL.
|
|
207
|
+
# HTTPS URL of the media file. The file extension must match the template's
|
|
208
|
+
# registered header format (PDF for DOCUMENT; PNG/JPG/JPEG/WEBP for IMAGE; MP4/3GP
|
|
209
|
+
# for VIDEO).
|
|
196
210
|
sig { returns(String) }
|
|
197
211
|
attr_accessor :url
|
|
198
212
|
|
|
199
|
-
#
|
|
200
|
-
#
|
|
201
|
-
sig {
|
|
213
|
+
# Filename displayed to the recipient. Required for templates with a `DOCUMENT`
|
|
214
|
+
# header; ignored for `IMAGE` and `VIDEO` headers.
|
|
215
|
+
sig { returns(T.nilable(String)) }
|
|
216
|
+
attr_reader :filename
|
|
217
|
+
|
|
218
|
+
sig { params(filename: String).void }
|
|
219
|
+
attr_writer :filename
|
|
220
|
+
|
|
221
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
222
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
223
|
+
# type is determined by the template's registered header format; send the matching
|
|
224
|
+
# file type for each.
|
|
225
|
+
#
|
|
226
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
227
|
+
# required and displayed to the recipient.
|
|
228
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
229
|
+
# is ignored.
|
|
230
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
231
|
+
sig { params(url: String, filename: String).returns(T.attached_class) }
|
|
202
232
|
def self.new(
|
|
203
|
-
# The
|
|
204
|
-
|
|
205
|
-
#
|
|
206
|
-
url
|
|
233
|
+
# HTTPS URL of the media file. The file extension must match the template's
|
|
234
|
+
# registered header format (PDF for DOCUMENT; PNG/JPG/JPEG/WEBP for IMAGE; MP4/3GP
|
|
235
|
+
# for VIDEO).
|
|
236
|
+
url:,
|
|
237
|
+
# Filename displayed to the recipient. Required for templates with a `DOCUMENT`
|
|
238
|
+
# header; ignored for `IMAGE` and `VIDEO` headers.
|
|
239
|
+
filename: nil
|
|
207
240
|
)
|
|
208
241
|
end
|
|
209
242
|
|
|
210
|
-
sig { override.returns({
|
|
243
|
+
sig { override.returns({ url: String, filename: String }) }
|
|
211
244
|
def to_hash
|
|
212
245
|
end
|
|
213
246
|
end
|
|
@@ -228,6 +261,11 @@ module PreludeSDK
|
|
|
228
261
|
:sms,
|
|
229
262
|
PreludeSDK::NotifySendParams::PreferredChannel::TaggedSymbol
|
|
230
263
|
)
|
|
264
|
+
RCS =
|
|
265
|
+
T.let(
|
|
266
|
+
:rcs,
|
|
267
|
+
PreludeSDK::NotifySendParams::PreferredChannel::TaggedSymbol
|
|
268
|
+
)
|
|
231
269
|
WHATSAPP =
|
|
232
270
|
T.let(
|
|
233
271
|
:whatsapp,
|
|
@@ -38,8 +38,16 @@ module PreludeSDK
|
|
|
38
38
|
sig { params(correlation_id: String).void }
|
|
39
39
|
attr_writer :correlation_id
|
|
40
40
|
|
|
41
|
-
# A
|
|
42
|
-
#
|
|
41
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
42
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
43
|
+
# type is determined by the template's registered header format; send the matching
|
|
44
|
+
# file type for each.
|
|
45
|
+
#
|
|
46
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
47
|
+
# required and displayed to the recipient.
|
|
48
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
49
|
+
# is ignored.
|
|
50
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
43
51
|
sig { returns(T.nilable(PreludeSDK::TransactionalSendParams::Document)) }
|
|
44
52
|
attr_reader :document
|
|
45
53
|
|
|
@@ -134,8 +142,16 @@ module PreludeSDK
|
|
|
134
142
|
# returned in the response and any webhook events that refer to this
|
|
135
143
|
# transactionalmessage.
|
|
136
144
|
correlation_id: nil,
|
|
137
|
-
# A
|
|
138
|
-
#
|
|
145
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
146
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
147
|
+
# type is determined by the template's registered header format; send the matching
|
|
148
|
+
# file type for each.
|
|
149
|
+
#
|
|
150
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
151
|
+
# required and displayed to the recipient.
|
|
152
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
153
|
+
# is ignored.
|
|
154
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
139
155
|
document: nil,
|
|
140
156
|
# The message expiration date.
|
|
141
157
|
expires_at: nil,
|
|
@@ -192,26 +208,43 @@ module PreludeSDK
|
|
|
192
208
|
)
|
|
193
209
|
end
|
|
194
210
|
|
|
195
|
-
# The
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
# The URL of the document to attach. Must be a valid HTTP or HTTPS URL.
|
|
211
|
+
# HTTPS URL of the media file. The file extension must match the template's
|
|
212
|
+
# registered header format (PDF for DOCUMENT; PNG/JPG/JPEG/WEBP for IMAGE; MP4/3GP
|
|
213
|
+
# for VIDEO).
|
|
200
214
|
sig { returns(String) }
|
|
201
215
|
attr_accessor :url
|
|
202
216
|
|
|
203
|
-
#
|
|
204
|
-
#
|
|
205
|
-
sig {
|
|
217
|
+
# Filename displayed to the recipient. Required for templates with a `DOCUMENT`
|
|
218
|
+
# header; ignored for `IMAGE` and `VIDEO` headers.
|
|
219
|
+
sig { returns(T.nilable(String)) }
|
|
220
|
+
attr_reader :filename
|
|
221
|
+
|
|
222
|
+
sig { params(filename: String).void }
|
|
223
|
+
attr_writer :filename
|
|
224
|
+
|
|
225
|
+
# A media attachment to include in the message header. Supported on WhatsApp
|
|
226
|
+
# templates registered with a `DOCUMENT`, `IMAGE`, or `VIDEO` header. The media
|
|
227
|
+
# type is determined by the template's registered header format; send the matching
|
|
228
|
+
# file type for each.
|
|
229
|
+
#
|
|
230
|
+
# - `DOCUMENT` headers accept PDF and other document formats; `filename` is
|
|
231
|
+
# required and displayed to the recipient.
|
|
232
|
+
# - `IMAGE` headers accept `.png`, `.jpg`, `.jpeg`, and `.webp` URLs; `filename`
|
|
233
|
+
# is ignored.
|
|
234
|
+
# - `VIDEO` headers accept `.mp4` and `.3gp` URLs; `filename` is ignored.
|
|
235
|
+
sig { params(url: String, filename: String).returns(T.attached_class) }
|
|
206
236
|
def self.new(
|
|
207
|
-
# The
|
|
208
|
-
|
|
209
|
-
#
|
|
210
|
-
url
|
|
237
|
+
# HTTPS URL of the media file. The file extension must match the template's
|
|
238
|
+
# registered header format (PDF for DOCUMENT; PNG/JPG/JPEG/WEBP for IMAGE; MP4/3GP
|
|
239
|
+
# for VIDEO).
|
|
240
|
+
url:,
|
|
241
|
+
# Filename displayed to the recipient. Required for templates with a `DOCUMENT`
|
|
242
|
+
# header; ignored for `IMAGE` and `VIDEO` headers.
|
|
243
|
+
filename: nil
|
|
211
244
|
)
|
|
212
245
|
end
|
|
213
246
|
|
|
214
|
-
sig { override.returns({
|
|
247
|
+
sig { override.returns({ url: String, filename: String }) }
|
|
215
248
|
def to_hash
|
|
216
249
|
end
|
|
217
250
|
end
|
|
@@ -31,6 +31,9 @@ module PreludeSDK
|
|
|
31
31
|
# non-voice channels only. This mode must be enabled for your customer account
|
|
32
32
|
# by Prelude support.
|
|
33
33
|
# - `blocked` - The verification was blocked.
|
|
34
|
+
# - `shadow_blocked` - The verification triggered a block rule but the decision
|
|
35
|
+
# was not enforced; this is used to dry-run anti-fraud configuration. This mode
|
|
36
|
+
# must be enabled for your customer account by Prelude support.
|
|
34
37
|
sig do
|
|
35
38
|
returns(
|
|
36
39
|
PreludeSDK::Models::VerificationCreateResponse::Status::TaggedSymbol
|
|
@@ -77,7 +80,7 @@ module PreludeSDK
|
|
|
77
80
|
attr_writer :metadata
|
|
78
81
|
|
|
79
82
|
# The reason why the verification was blocked. Only present when status is
|
|
80
|
-
# "blocked".
|
|
83
|
+
# "blocked" or "shadow_blocked".
|
|
81
84
|
#
|
|
82
85
|
# - `expired_signature` - The signature of the SDK signals is expired. They should
|
|
83
86
|
# be sent within the hour following their collection.
|
|
@@ -114,6 +117,51 @@ module PreludeSDK
|
|
|
114
117
|
sig { params(request_id: String).void }
|
|
115
118
|
attr_writer :request_id
|
|
116
119
|
|
|
120
|
+
# The risk factors that contributed to the verification being blocked. Only
|
|
121
|
+
# present when status is "blocked" or "shadow_blocked" and the anti-fraud system
|
|
122
|
+
# detected specific risk signals.
|
|
123
|
+
#
|
|
124
|
+
# - `behavioral_pattern` - The phone number past behavior during verification
|
|
125
|
+
# flows exhibits suspicious patterns.
|
|
126
|
+
# - `device_attribute` - The device exhibits characteristics associated with
|
|
127
|
+
# suspicious activity patterns.
|
|
128
|
+
# - `fraud_database` - The phone number has been flagged as suspicious in one or
|
|
129
|
+
# more of our fraud databases.
|
|
130
|
+
# - `location_discrepancy` - The phone number prefix and IP address discrepancy
|
|
131
|
+
# indicates potential fraud.
|
|
132
|
+
# - `network_fingerprint` - The network connection exhibits characteristics
|
|
133
|
+
# associated with suspicious activity patterns.
|
|
134
|
+
# - `poor_conversion_history` - The phone number has a history of poorly
|
|
135
|
+
# converting to a verified phone number.
|
|
136
|
+
# - `prefix_concentration` - The phone number is part of a range known to be
|
|
137
|
+
# associated with suspicious activity patterns.
|
|
138
|
+
# - `suspected_request_tampering` - The SDK signature is invalid and the request
|
|
139
|
+
# is considered to be tampered with.
|
|
140
|
+
# - `suspicious_ip_address` - The IP address is deemed to be associated with
|
|
141
|
+
# suspicious activity patterns.
|
|
142
|
+
# - `temporary_phone_number` - The phone number is known to be a temporary or
|
|
143
|
+
# disposable number.
|
|
144
|
+
sig do
|
|
145
|
+
returns(
|
|
146
|
+
T.nilable(
|
|
147
|
+
T::Array[
|
|
148
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
149
|
+
]
|
|
150
|
+
)
|
|
151
|
+
)
|
|
152
|
+
end
|
|
153
|
+
attr_reader :risk_factors
|
|
154
|
+
|
|
155
|
+
sig do
|
|
156
|
+
params(
|
|
157
|
+
risk_factors:
|
|
158
|
+
T::Array[
|
|
159
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::OrSymbol
|
|
160
|
+
]
|
|
161
|
+
).void
|
|
162
|
+
end
|
|
163
|
+
attr_writer :risk_factors
|
|
164
|
+
|
|
117
165
|
# The silent verification specific properties.
|
|
118
166
|
sig do
|
|
119
167
|
returns(
|
|
@@ -145,6 +193,10 @@ module PreludeSDK
|
|
|
145
193
|
reason:
|
|
146
194
|
PreludeSDK::Models::VerificationCreateResponse::Reason::OrSymbol,
|
|
147
195
|
request_id: String,
|
|
196
|
+
risk_factors:
|
|
197
|
+
T::Array[
|
|
198
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::OrSymbol
|
|
199
|
+
],
|
|
148
200
|
silent: PreludeSDK::Models::VerificationCreateResponse::Silent::OrHash
|
|
149
201
|
).returns(T.attached_class)
|
|
150
202
|
end
|
|
@@ -161,13 +213,16 @@ module PreludeSDK
|
|
|
161
213
|
# non-voice channels only. This mode must be enabled for your customer account
|
|
162
214
|
# by Prelude support.
|
|
163
215
|
# - `blocked` - The verification was blocked.
|
|
216
|
+
# - `shadow_blocked` - The verification triggered a block rule but the decision
|
|
217
|
+
# was not enforced; this is used to dry-run anti-fraud configuration. This mode
|
|
218
|
+
# must be enabled for your customer account by Prelude support.
|
|
164
219
|
status:,
|
|
165
220
|
# The ordered sequence of channels to be used for verification
|
|
166
221
|
channels: nil,
|
|
167
222
|
# The metadata for this verification.
|
|
168
223
|
metadata: nil,
|
|
169
224
|
# The reason why the verification was blocked. Only present when status is
|
|
170
|
-
# "blocked".
|
|
225
|
+
# "blocked" or "shadow_blocked".
|
|
171
226
|
#
|
|
172
227
|
# - `expired_signature` - The signature of the SDK signals is expired. They should
|
|
173
228
|
# be sent within the hour following their collection.
|
|
@@ -183,6 +238,31 @@ module PreludeSDK
|
|
|
183
238
|
# anti-fraud system.
|
|
184
239
|
reason: nil,
|
|
185
240
|
request_id: nil,
|
|
241
|
+
# The risk factors that contributed to the verification being blocked. Only
|
|
242
|
+
# present when status is "blocked" or "shadow_blocked" and the anti-fraud system
|
|
243
|
+
# detected specific risk signals.
|
|
244
|
+
#
|
|
245
|
+
# - `behavioral_pattern` - The phone number past behavior during verification
|
|
246
|
+
# flows exhibits suspicious patterns.
|
|
247
|
+
# - `device_attribute` - The device exhibits characteristics associated with
|
|
248
|
+
# suspicious activity patterns.
|
|
249
|
+
# - `fraud_database` - The phone number has been flagged as suspicious in one or
|
|
250
|
+
# more of our fraud databases.
|
|
251
|
+
# - `location_discrepancy` - The phone number prefix and IP address discrepancy
|
|
252
|
+
# indicates potential fraud.
|
|
253
|
+
# - `network_fingerprint` - The network connection exhibits characteristics
|
|
254
|
+
# associated with suspicious activity patterns.
|
|
255
|
+
# - `poor_conversion_history` - The phone number has a history of poorly
|
|
256
|
+
# converting to a verified phone number.
|
|
257
|
+
# - `prefix_concentration` - The phone number is part of a range known to be
|
|
258
|
+
# associated with suspicious activity patterns.
|
|
259
|
+
# - `suspected_request_tampering` - The SDK signature is invalid and the request
|
|
260
|
+
# is considered to be tampered with.
|
|
261
|
+
# - `suspicious_ip_address` - The IP address is deemed to be associated with
|
|
262
|
+
# suspicious activity patterns.
|
|
263
|
+
# - `temporary_phone_number` - The phone number is known to be a temporary or
|
|
264
|
+
# disposable number.
|
|
265
|
+
risk_factors: nil,
|
|
186
266
|
# The silent verification specific properties.
|
|
187
267
|
silent: nil
|
|
188
268
|
)
|
|
@@ -204,6 +284,10 @@ module PreludeSDK
|
|
|
204
284
|
reason:
|
|
205
285
|
PreludeSDK::Models::VerificationCreateResponse::Reason::TaggedSymbol,
|
|
206
286
|
request_id: String,
|
|
287
|
+
risk_factors:
|
|
288
|
+
T::Array[
|
|
289
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
290
|
+
],
|
|
207
291
|
silent: PreludeSDK::Models::VerificationCreateResponse::Silent
|
|
208
292
|
}
|
|
209
293
|
)
|
|
@@ -264,6 +348,9 @@ module PreludeSDK
|
|
|
264
348
|
# non-voice channels only. This mode must be enabled for your customer account
|
|
265
349
|
# by Prelude support.
|
|
266
350
|
# - `blocked` - The verification was blocked.
|
|
351
|
+
# - `shadow_blocked` - The verification triggered a block rule but the decision
|
|
352
|
+
# was not enforced; this is used to dry-run anti-fraud configuration. This mode
|
|
353
|
+
# must be enabled for your customer account by Prelude support.
|
|
267
354
|
module Status
|
|
268
355
|
extend PreludeSDK::Internal::Type::Enum
|
|
269
356
|
|
|
@@ -296,6 +383,11 @@ module PreludeSDK
|
|
|
296
383
|
:blocked,
|
|
297
384
|
PreludeSDK::Models::VerificationCreateResponse::Status::TaggedSymbol
|
|
298
385
|
)
|
|
386
|
+
SHADOW_BLOCKED =
|
|
387
|
+
T.let(
|
|
388
|
+
:shadow_blocked,
|
|
389
|
+
PreludeSDK::Models::VerificationCreateResponse::Status::TaggedSymbol
|
|
390
|
+
)
|
|
299
391
|
|
|
300
392
|
sig do
|
|
301
393
|
override.returns(
|
|
@@ -404,7 +496,7 @@ module PreludeSDK
|
|
|
404
496
|
end
|
|
405
497
|
|
|
406
498
|
# The reason why the verification was blocked. Only present when status is
|
|
407
|
-
# "blocked".
|
|
499
|
+
# "blocked" or "shadow_blocked".
|
|
408
500
|
#
|
|
409
501
|
# - `expired_signature` - The signature of the SDK signals is expired. They should
|
|
410
502
|
# be sent within the hour following their collection.
|
|
@@ -477,6 +569,80 @@ module PreludeSDK
|
|
|
477
569
|
end
|
|
478
570
|
end
|
|
479
571
|
|
|
572
|
+
module RiskFactor
|
|
573
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
574
|
+
|
|
575
|
+
TaggedSymbol =
|
|
576
|
+
T.type_alias do
|
|
577
|
+
T.all(
|
|
578
|
+
Symbol,
|
|
579
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor
|
|
580
|
+
)
|
|
581
|
+
end
|
|
582
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
583
|
+
|
|
584
|
+
BEHAVIORAL_PATTERN =
|
|
585
|
+
T.let(
|
|
586
|
+
:behavioral_pattern,
|
|
587
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
588
|
+
)
|
|
589
|
+
DEVICE_ATTRIBUTE =
|
|
590
|
+
T.let(
|
|
591
|
+
:device_attribute,
|
|
592
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
593
|
+
)
|
|
594
|
+
FRAUD_DATABASE =
|
|
595
|
+
T.let(
|
|
596
|
+
:fraud_database,
|
|
597
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
598
|
+
)
|
|
599
|
+
LOCATION_DISCREPANCY =
|
|
600
|
+
T.let(
|
|
601
|
+
:location_discrepancy,
|
|
602
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
603
|
+
)
|
|
604
|
+
NETWORK_FINGERPRINT =
|
|
605
|
+
T.let(
|
|
606
|
+
:network_fingerprint,
|
|
607
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
608
|
+
)
|
|
609
|
+
POOR_CONVERSION_HISTORY =
|
|
610
|
+
T.let(
|
|
611
|
+
:poor_conversion_history,
|
|
612
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
613
|
+
)
|
|
614
|
+
PREFIX_CONCENTRATION =
|
|
615
|
+
T.let(
|
|
616
|
+
:prefix_concentration,
|
|
617
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
618
|
+
)
|
|
619
|
+
SUSPECTED_REQUEST_TAMPERING =
|
|
620
|
+
T.let(
|
|
621
|
+
:suspected_request_tampering,
|
|
622
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
623
|
+
)
|
|
624
|
+
SUSPICIOUS_IP_ADDRESS =
|
|
625
|
+
T.let(
|
|
626
|
+
:suspicious_ip_address,
|
|
627
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
628
|
+
)
|
|
629
|
+
TEMPORARY_PHONE_NUMBER =
|
|
630
|
+
T.let(
|
|
631
|
+
:temporary_phone_number,
|
|
632
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
633
|
+
)
|
|
634
|
+
|
|
635
|
+
sig do
|
|
636
|
+
override.returns(
|
|
637
|
+
T::Array[
|
|
638
|
+
PreludeSDK::Models::VerificationCreateResponse::RiskFactor::TaggedSymbol
|
|
639
|
+
]
|
|
640
|
+
)
|
|
641
|
+
end
|
|
642
|
+
def self.values
|
|
643
|
+
end
|
|
644
|
+
end
|
|
645
|
+
|
|
480
646
|
class Silent < PreludeSDK::Internal::Type::BaseModel
|
|
481
647
|
OrHash =
|
|
482
648
|
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
|
)
|