prelude-sdk 0.5.0 → 0.7.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 +43 -0
- data/README.md +1 -1
- data/lib/prelude_sdk/internal/transport/base_client.rb +5 -0
- data/lib/prelude_sdk/models/notify_send_batch_params.rb +13 -1
- data/lib/prelude_sdk/models/notify_send_params.rb +13 -1
- data/lib/prelude_sdk/models/transactional_send_params.rb +11 -1
- data/lib/prelude_sdk/models/verification_check_params.rb +44 -1
- data/lib/prelude_sdk/models/verification_check_response.rb +12 -3
- data/lib/prelude_sdk/models/verification_create_params.rb +95 -5
- data/lib/prelude_sdk/models/watch_predict_params.rb +16 -4
- data/lib/prelude_sdk/models/watch_predict_response.rb +4 -0
- data/lib/prelude_sdk/models/watch_send_events_params.rb +22 -3
- data/lib/prelude_sdk/resources/notify.rb +16 -2
- data/lib/prelude_sdk/resources/transactional.rb +3 -1
- data/lib/prelude_sdk/resources/verification.rb +3 -1
- data/lib/prelude_sdk/resources/watch.rb +19 -6
- data/lib/prelude_sdk/version.rb +1 -1
- data/rbi/prelude_sdk/models/notify_send_batch_params.rbi +19 -0
- data/rbi/prelude_sdk/models/notify_send_params.rbi +19 -0
- data/rbi/prelude_sdk/models/transactional_send_params.rbi +15 -0
- data/rbi/prelude_sdk/models/verification_check_params.rbi +68 -0
- data/rbi/prelude_sdk/models/verification_check_response.rbi +19 -3
- data/rbi/prelude_sdk/models/verification_create_params.rbi +203 -3
- data/rbi/prelude_sdk/models/watch_predict_params.rbi +22 -3
- data/rbi/prelude_sdk/models/watch_predict_response.rbi +11 -0
- data/rbi/prelude_sdk/models/watch_send_events_params.rbi +27 -3
- data/rbi/prelude_sdk/resources/notify.rbi +24 -0
- data/rbi/prelude_sdk/resources/transactional.rbi +5 -0
- data/rbi/prelude_sdk/resources/verification.rbi +6 -0
- data/rbi/prelude_sdk/resources/watch.rbi +19 -6
- data/sig/prelude_sdk/models/notify_send_batch_params.rbs +7 -0
- data/sig/prelude_sdk/models/notify_send_params.rbs +7 -0
- data/sig/prelude_sdk/models/transactional_send_params.rbs +7 -0
- data/sig/prelude_sdk/models/verification_check_params.rbs +31 -1
- data/sig/prelude_sdk/models/verification_check_response.rbs +8 -1
- data/sig/prelude_sdk/models/verification_create_params.rbs +45 -0
- data/sig/prelude_sdk/models/watch_predict_params.rbs +7 -0
- data/sig/prelude_sdk/models/watch_predict_response.rbs +3 -1
- data/sig/prelude_sdk/resources/notify.rbs +2 -0
- data/sig/prelude_sdk/resources/transactional.rbs +1 -0
- data/sig/prelude_sdk/resources/verification.rbs +1 -0
- metadata +2 -2
|
@@ -6,6 +6,8 @@ module PreludeSDK
|
|
|
6
6
|
class Notify
|
|
7
7
|
# Retrieve a specific subscription management configuration by its ID.
|
|
8
8
|
#
|
|
9
|
+
# In order to get access to this endpoint, contact our support team.
|
|
10
|
+
#
|
|
9
11
|
# @overload get_subscription_config(config_id, request_options: {})
|
|
10
12
|
#
|
|
11
13
|
# @param config_id [String] The subscription configuration ID
|
|
@@ -27,6 +29,8 @@ module PreludeSDK
|
|
|
27
29
|
# Retrieve the current subscription status for a specific phone number within a
|
|
28
30
|
# subscription configuration.
|
|
29
31
|
#
|
|
32
|
+
# In order to get access to this endpoint, contact our support team.
|
|
33
|
+
#
|
|
30
34
|
# @overload get_subscription_phone_number(phone_number, config_id:, request_options: {})
|
|
31
35
|
#
|
|
32
36
|
# @param phone_number [String] The phone number in E.164 format (e.g., +33612345678)
|
|
@@ -58,6 +62,8 @@ module PreludeSDK
|
|
|
58
62
|
# Each configuration represents a subscription management setup with phone numbers
|
|
59
63
|
# for receiving opt-out/opt-in requests and a callback URL for webhook events.
|
|
60
64
|
#
|
|
65
|
+
# In order to get access to this endpoint, contact our support team.
|
|
66
|
+
#
|
|
61
67
|
# @overload list_subscription_configs(cursor: nil, limit: nil, request_options: {})
|
|
62
68
|
#
|
|
63
69
|
# @param cursor [String] Pagination cursor from the previous response
|
|
@@ -86,6 +92,8 @@ module PreludeSDK
|
|
|
86
92
|
#
|
|
87
93
|
# Events are ordered by timestamp in descending order (most recent first).
|
|
88
94
|
#
|
|
95
|
+
# In order to get access to this endpoint, contact our support team.
|
|
96
|
+
#
|
|
89
97
|
# @overload list_subscription_phone_number_events(phone_number, config_id:, cursor: nil, limit: nil, request_options: {})
|
|
90
98
|
#
|
|
91
99
|
# @param phone_number [String] Path param: The phone number in E.164 format (e.g., +33612345678)
|
|
@@ -126,6 +134,8 @@ module PreludeSDK
|
|
|
126
134
|
#
|
|
127
135
|
# You can optionally filter by subscription state (SUB or UNSUB).
|
|
128
136
|
#
|
|
137
|
+
# In order to get access to this endpoint, contact our support team.
|
|
138
|
+
#
|
|
129
139
|
# @overload list_subscription_phone_numbers(config_id, cursor: nil, limit: nil, state: nil, request_options: {})
|
|
130
140
|
#
|
|
131
141
|
# @param config_id [String] The subscription configuration ID
|
|
@@ -159,7 +169,7 @@ module PreludeSDK
|
|
|
159
169
|
# Send transactional and marketing messages to your users via SMS, RCS and
|
|
160
170
|
# WhatsApp with automatic compliance enforcement.
|
|
161
171
|
#
|
|
162
|
-
# @overload send_(template_id:, to:, callback_url: nil, correlation_id: nil, document: nil, expires_at: nil, from: nil, locale: nil, preferred_channel: nil, schedule_at: nil, variables: nil, request_options: {})
|
|
172
|
+
# @overload send_(template_id:, to:, callback_url: nil, correlation_id: nil, document: nil, expires_at: nil, from: nil, locale: nil, max_auto_retries: nil, preferred_channel: nil, schedule_at: nil, variables: nil, request_options: {})
|
|
163
173
|
#
|
|
164
174
|
# @param template_id [String] The template identifier configured by your Customer Success team.
|
|
165
175
|
#
|
|
@@ -177,6 +187,8 @@ module PreludeSDK
|
|
|
177
187
|
#
|
|
178
188
|
# @param locale [String] A BCP-47 formatted locale string with the language the text message will be sent
|
|
179
189
|
#
|
|
190
|
+
# @param max_auto_retries [Integer] Maximum number of automatic retry attempts across channels for this send, in add
|
|
191
|
+
#
|
|
180
192
|
# @param preferred_channel [Symbol, PreludeSDK::Models::NotifySendParams::PreferredChannel] The preferred channel to be used in priority for message delivery. If the channe
|
|
181
193
|
#
|
|
182
194
|
# @param schedule_at [Time] Schedule the message for future delivery in RFC3339 format. Marketing messages c
|
|
@@ -204,7 +216,7 @@ module PreludeSDK
|
|
|
204
216
|
#
|
|
205
217
|
# Send the same message to multiple recipients in a single request.
|
|
206
218
|
#
|
|
207
|
-
# @overload send_batch(template_id:, to:, callback_url: nil, correlation_id: nil, document: nil, expires_at: nil, from: nil, locale: nil, preferred_channel: nil, schedule_at: nil, variables: nil, request_options: {})
|
|
219
|
+
# @overload send_batch(template_id:, to:, callback_url: nil, correlation_id: nil, document: nil, expires_at: nil, from: nil, locale: nil, max_auto_retries: nil, preferred_channel: nil, schedule_at: nil, variables: nil, request_options: {})
|
|
208
220
|
#
|
|
209
221
|
# @param template_id [String] The template identifier configured by your Customer Success team.
|
|
210
222
|
#
|
|
@@ -222,6 +234,8 @@ module PreludeSDK
|
|
|
222
234
|
#
|
|
223
235
|
# @param locale [String] A BCP-47 formatted locale string.
|
|
224
236
|
#
|
|
237
|
+
# @param max_auto_retries [Integer] Maximum number of automatic retry attempts across channels for each send in the
|
|
238
|
+
#
|
|
225
239
|
# @param preferred_channel [Symbol, PreludeSDK::Models::NotifySendBatchParams::PreferredChannel] Preferred channel for delivery. If unavailable, automatic fallback applies.
|
|
226
240
|
#
|
|
227
241
|
# @param schedule_at [Time] Schedule delivery in RFC3339 format. Marketing sends may be adjusted to comply w
|
|
@@ -12,7 +12,7 @@ module PreludeSDK
|
|
|
12
12
|
# Legacy route maintained for backward compatibility. Migrate to `/v2/notify`
|
|
13
13
|
# instead.
|
|
14
14
|
#
|
|
15
|
-
# @overload send_(template_id:, to:, callback_url: nil, correlation_id: nil, document: nil, expires_at: nil, from: nil, locale: nil, preferred_channel: nil, variables: nil, request_options: {})
|
|
15
|
+
# @overload send_(template_id:, to:, callback_url: nil, correlation_id: nil, document: nil, expires_at: nil, from: nil, locale: nil, max_auto_retries: nil, preferred_channel: nil, variables: nil, request_options: {})
|
|
16
16
|
#
|
|
17
17
|
# @param template_id [String] The template identifier.
|
|
18
18
|
#
|
|
@@ -30,6 +30,8 @@ module PreludeSDK
|
|
|
30
30
|
#
|
|
31
31
|
# @param locale [String] A BCP-47 formatted locale string with the language the text message will be sent
|
|
32
32
|
#
|
|
33
|
+
# @param max_auto_retries [Integer] Maximum number of automatic retry attempts across channels for this send, in add
|
|
34
|
+
#
|
|
33
35
|
# @param preferred_channel [Symbol, PreludeSDK::Models::TransactionalSendParams::PreferredChannel] The preferred delivery channel for the message. When specified, the system will
|
|
34
36
|
#
|
|
35
37
|
# @param variables [Hash{Symbol=>String}] The variables to be replaced in the template.
|
|
@@ -44,12 +44,14 @@ module PreludeSDK
|
|
|
44
44
|
#
|
|
45
45
|
# Check the validity of a verification code.
|
|
46
46
|
#
|
|
47
|
-
# @overload check(code:, target:, request_options: {})
|
|
47
|
+
# @overload check(code:, target:, psd2: nil, request_options: {})
|
|
48
48
|
#
|
|
49
49
|
# @param code [String] The OTP code to validate.
|
|
50
50
|
#
|
|
51
51
|
# @param target [PreludeSDK::Models::VerificationCheckParams::Target] The verification target. Either a phone number or an email address. To use the e
|
|
52
52
|
#
|
|
53
|
+
# @param psd2 [PreludeSDK::Models::VerificationCheckParams::Psd2] Required when checking a code issued under the `prelude:psd2` template. The subm
|
|
54
|
+
#
|
|
53
55
|
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
54
56
|
#
|
|
55
57
|
# @return [PreludeSDK::Models::VerificationCheckResponse]
|
|
@@ -7,11 +7,16 @@ module PreludeSDK
|
|
|
7
7
|
# Some parameter documentations has been truncated, see
|
|
8
8
|
# {PreludeSDK::Models::WatchPredictParams} for more details.
|
|
9
9
|
#
|
|
10
|
-
#
|
|
10
|
+
# At signup, score the user's phone number or email address (target) as legitimate
|
|
11
|
+
# or suspicious. Scoring-only — does not update counters by itself. When using
|
|
12
|
+
# Feedback, call predict before verification.started on the same target (and
|
|
13
|
+
# correlation_id when used) so feedback can warm Watch auth-start counters. Use
|
|
14
|
+
# Events for product fraud labels; use Feedback only if you run your own phone
|
|
15
|
+
# verification funnel outside Prelude Verify.
|
|
11
16
|
#
|
|
12
17
|
# @overload predict(target:, dispatch_id: nil, metadata: nil, signals: nil, request_options: {})
|
|
13
18
|
#
|
|
14
|
-
# @param target [PreludeSDK::Models::WatchPredictParams::Target] The
|
|
19
|
+
# @param target [PreludeSDK::Models::WatchPredictParams::Target] The signup identifier to score — a phone number or email address.
|
|
15
20
|
#
|
|
16
21
|
# @param dispatch_id [String] The identifier of the dispatch that came from the front-end SDK.
|
|
17
22
|
#
|
|
@@ -38,8 +43,11 @@ module PreludeSDK
|
|
|
38
43
|
# Some parameter documentations has been truncated, see
|
|
39
44
|
# {PreludeSDK::Models::WatchSendEventsParams} for more details.
|
|
40
45
|
#
|
|
41
|
-
# Send
|
|
42
|
-
# Events
|
|
46
|
+
# Send custom fraud signals from your application (labels and confidence levels).
|
|
47
|
+
# Events capture product-specific risk patterns and are weighted when scoring
|
|
48
|
+
# traffic. Use without Predict or Feedback if you only need to report product-side
|
|
49
|
+
# abuse (for example account.banned). Feedback is a separate, optional endpoint
|
|
50
|
+
# for self-hosted phone verification funnels.
|
|
43
51
|
#
|
|
44
52
|
# @overload send_events(events:, request_options: {})
|
|
45
53
|
#
|
|
@@ -64,8 +72,13 @@ module PreludeSDK
|
|
|
64
72
|
# Some parameter documentations has been truncated, see
|
|
65
73
|
# {PreludeSDK::Models::WatchSendFeedbacksParams} for more details.
|
|
66
74
|
#
|
|
67
|
-
#
|
|
68
|
-
#
|
|
75
|
+
# Optional. Report verification-funnel steps (verification.started,
|
|
76
|
+
# verification.completed) when you run phone verification outside Prelude Verify.
|
|
77
|
+
# Feeds Watch abuse-rate counters for your own flow. Call Predict on the same
|
|
78
|
+
# target before verification.started and reuse metadata.correlation_id so
|
|
79
|
+
# auth-start counters receive predict signals; without a linked predict, only
|
|
80
|
+
# attempt-rate counters update on started. Not required if you only use Events
|
|
81
|
+
# and/or Predict, or if Verify already handles verification for that traffic.
|
|
69
82
|
#
|
|
70
83
|
# @overload send_feedbacks(feedbacks:, request_options: {})
|
|
71
84
|
#
|
data/lib/prelude_sdk/version.rb
CHANGED
|
@@ -78,6 +78,17 @@ module PreludeSDK
|
|
|
78
78
|
sig { params(locale: String).void }
|
|
79
79
|
attr_writer :locale
|
|
80
80
|
|
|
81
|
+
# Maximum number of automatic retry attempts across channels for each send in the
|
|
82
|
+
# batch, in addition to the first attempt. For example, `2` allows up to 3 total
|
|
83
|
+
# delivery attempts per recipient. Lower values reduce delivery cost on
|
|
84
|
+
# hard-to-reach numbers at the expense of deliverability. When omitted, your
|
|
85
|
+
# account's configured default applies.
|
|
86
|
+
sig { returns(T.nilable(Integer)) }
|
|
87
|
+
attr_reader :max_auto_retries
|
|
88
|
+
|
|
89
|
+
sig { params(max_auto_retries: Integer).void }
|
|
90
|
+
attr_writer :max_auto_retries
|
|
91
|
+
|
|
81
92
|
# Preferred channel for delivery. If unavailable, automatic fallback applies.
|
|
82
93
|
sig do
|
|
83
94
|
returns(
|
|
@@ -121,6 +132,7 @@ module PreludeSDK
|
|
|
121
132
|
expires_at: Time,
|
|
122
133
|
from: String,
|
|
123
134
|
locale: String,
|
|
135
|
+
max_auto_retries: Integer,
|
|
124
136
|
preferred_channel:
|
|
125
137
|
PreludeSDK::NotifySendBatchParams::PreferredChannel::OrSymbol,
|
|
126
138
|
schedule_at: Time,
|
|
@@ -155,6 +167,12 @@ module PreludeSDK
|
|
|
155
167
|
from: nil,
|
|
156
168
|
# A BCP-47 formatted locale string.
|
|
157
169
|
locale: nil,
|
|
170
|
+
# Maximum number of automatic retry attempts across channels for each send in the
|
|
171
|
+
# batch, in addition to the first attempt. For example, `2` allows up to 3 total
|
|
172
|
+
# delivery attempts per recipient. Lower values reduce delivery cost on
|
|
173
|
+
# hard-to-reach numbers at the expense of deliverability. When omitted, your
|
|
174
|
+
# account's configured default applies.
|
|
175
|
+
max_auto_retries: nil,
|
|
158
176
|
# Preferred channel for delivery. If unavailable, automatic fallback applies.
|
|
159
177
|
preferred_channel: nil,
|
|
160
178
|
# Schedule delivery in RFC3339 format. Marketing sends may be adjusted to comply
|
|
@@ -177,6 +195,7 @@ module PreludeSDK
|
|
|
177
195
|
expires_at: Time,
|
|
178
196
|
from: String,
|
|
179
197
|
locale: String,
|
|
198
|
+
max_auto_retries: Integer,
|
|
180
199
|
preferred_channel:
|
|
181
200
|
PreludeSDK::NotifySendBatchParams::PreferredChannel::OrSymbol,
|
|
182
201
|
schedule_at: Time,
|
|
@@ -78,6 +78,17 @@ module PreludeSDK
|
|
|
78
78
|
sig { params(locale: String).void }
|
|
79
79
|
attr_writer :locale
|
|
80
80
|
|
|
81
|
+
# Maximum number of automatic retry attempts across channels for this send, in
|
|
82
|
+
# addition to the first attempt. For example, `2` allows up to 3 total delivery
|
|
83
|
+
# attempts. Lower values reduce delivery cost on hard-to-reach numbers at the
|
|
84
|
+
# expense of deliverability. When omitted, your account's configured default
|
|
85
|
+
# applies.
|
|
86
|
+
sig { returns(T.nilable(Integer)) }
|
|
87
|
+
attr_reader :max_auto_retries
|
|
88
|
+
|
|
89
|
+
sig { params(max_auto_retries: Integer).void }
|
|
90
|
+
attr_writer :max_auto_retries
|
|
91
|
+
|
|
81
92
|
# The preferred channel to be used in priority for message delivery. If the
|
|
82
93
|
# channel is unavailable, the system will fallback to other available channels.
|
|
83
94
|
sig do
|
|
@@ -121,6 +132,7 @@ module PreludeSDK
|
|
|
121
132
|
expires_at: Time,
|
|
122
133
|
from: String,
|
|
123
134
|
locale: String,
|
|
135
|
+
max_auto_retries: Integer,
|
|
124
136
|
preferred_channel:
|
|
125
137
|
PreludeSDK::NotifySendParams::PreferredChannel::OrSymbol,
|
|
126
138
|
schedule_at: Time,
|
|
@@ -160,6 +172,12 @@ module PreludeSDK
|
|
|
160
172
|
# code of the phone number. If the language specified doesn't exist, the default
|
|
161
173
|
# set on the template will be used.
|
|
162
174
|
locale: nil,
|
|
175
|
+
# Maximum number of automatic retry attempts across channels for this send, in
|
|
176
|
+
# addition to the first attempt. For example, `2` allows up to 3 total delivery
|
|
177
|
+
# attempts. Lower values reduce delivery cost on hard-to-reach numbers at the
|
|
178
|
+
# expense of deliverability. When omitted, your account's configured default
|
|
179
|
+
# applies.
|
|
180
|
+
max_auto_retries: nil,
|
|
163
181
|
# The preferred channel to be used in priority for message delivery. If the
|
|
164
182
|
# channel is unavailable, the system will fallback to other available channels.
|
|
165
183
|
preferred_channel: nil,
|
|
@@ -184,6 +202,7 @@ module PreludeSDK
|
|
|
184
202
|
expires_at: Time,
|
|
185
203
|
from: String,
|
|
186
204
|
locale: String,
|
|
205
|
+
max_auto_retries: Integer,
|
|
187
206
|
preferred_channel:
|
|
188
207
|
PreludeSDK::NotifySendParams::PreferredChannel::OrSymbol,
|
|
189
208
|
schedule_at: Time,
|
|
@@ -82,6 +82,15 @@ module PreludeSDK
|
|
|
82
82
|
sig { params(locale: String).void }
|
|
83
83
|
attr_writer :locale
|
|
84
84
|
|
|
85
|
+
# Maximum number of automatic retry attempts across channels for this send, in
|
|
86
|
+
# addition to the first attempt. For example, `2` allows up to 3 total delivery
|
|
87
|
+
# attempts. When omitted, your account's configured default applies.
|
|
88
|
+
sig { returns(T.nilable(Integer)) }
|
|
89
|
+
attr_reader :max_auto_retries
|
|
90
|
+
|
|
91
|
+
sig { params(max_auto_retries: Integer).void }
|
|
92
|
+
attr_writer :max_auto_retries
|
|
93
|
+
|
|
85
94
|
# The preferred delivery channel for the message. When specified, the system will
|
|
86
95
|
# prioritize sending via the requested channel if the template is configured for
|
|
87
96
|
# it.
|
|
@@ -125,6 +134,7 @@ module PreludeSDK
|
|
|
125
134
|
expires_at: String,
|
|
126
135
|
from: String,
|
|
127
136
|
locale: String,
|
|
137
|
+
max_auto_retries: Integer,
|
|
128
138
|
preferred_channel:
|
|
129
139
|
PreludeSDK::TransactionalSendParams::PreferredChannel::OrSymbol,
|
|
130
140
|
variables: T::Hash[Symbol, String],
|
|
@@ -162,6 +172,10 @@ module PreludeSDK
|
|
|
162
172
|
# code of the phone number. If the language specified doesn't exist, the default
|
|
163
173
|
# set on the template will be used.
|
|
164
174
|
locale: nil,
|
|
175
|
+
# Maximum number of automatic retry attempts across channels for this send, in
|
|
176
|
+
# addition to the first attempt. For example, `2` allows up to 3 total delivery
|
|
177
|
+
# attempts. When omitted, your account's configured default applies.
|
|
178
|
+
max_auto_retries: nil,
|
|
165
179
|
# The preferred delivery channel for the message. When specified, the system will
|
|
166
180
|
# prioritize sending via the requested channel if the template is configured for
|
|
167
181
|
# it.
|
|
@@ -189,6 +203,7 @@ module PreludeSDK
|
|
|
189
203
|
expires_at: String,
|
|
190
204
|
from: String,
|
|
191
205
|
locale: String,
|
|
206
|
+
max_auto_retries: Integer,
|
|
192
207
|
preferred_channel:
|
|
193
208
|
PreludeSDK::TransactionalSendParams::PreferredChannel::OrSymbol,
|
|
194
209
|
variables: T::Hash[Symbol, String],
|
|
@@ -28,10 +28,23 @@ module PreludeSDK
|
|
|
28
28
|
end
|
|
29
29
|
attr_writer :target
|
|
30
30
|
|
|
31
|
+
# Required when checking a code issued under the `prelude:psd2` template. The
|
|
32
|
+
# submitted variables must match those provided at issuance; any mismatch
|
|
33
|
+
# invalidates the code (PSD2 SCA RTS Article 5 dynamic linking). Ignored on
|
|
34
|
+
# non-PSD2 verifications.
|
|
35
|
+
sig { returns(T.nilable(PreludeSDK::VerificationCheckParams::Psd2)) }
|
|
36
|
+
attr_reader :psd2
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
params(psd2: PreludeSDK::VerificationCheckParams::Psd2::OrHash).void
|
|
40
|
+
end
|
|
41
|
+
attr_writer :psd2
|
|
42
|
+
|
|
31
43
|
sig do
|
|
32
44
|
params(
|
|
33
45
|
code: String,
|
|
34
46
|
target: PreludeSDK::VerificationCheckParams::Target::OrHash,
|
|
47
|
+
psd2: PreludeSDK::VerificationCheckParams::Psd2::OrHash,
|
|
35
48
|
request_options: PreludeSDK::RequestOptions::OrHash
|
|
36
49
|
).returns(T.attached_class)
|
|
37
50
|
end
|
|
@@ -41,6 +54,11 @@ module PreludeSDK
|
|
|
41
54
|
# The verification target. Either a phone number or an email address. To use the
|
|
42
55
|
# email verification feature contact us to discuss your use case.
|
|
43
56
|
target:,
|
|
57
|
+
# Required when checking a code issued under the `prelude:psd2` template. The
|
|
58
|
+
# submitted variables must match those provided at issuance; any mismatch
|
|
59
|
+
# invalidates the code (PSD2 SCA RTS Article 5 dynamic linking). Ignored on
|
|
60
|
+
# non-PSD2 verifications.
|
|
61
|
+
psd2: nil,
|
|
44
62
|
request_options: {}
|
|
45
63
|
)
|
|
46
64
|
end
|
|
@@ -50,6 +68,7 @@ module PreludeSDK
|
|
|
50
68
|
{
|
|
51
69
|
code: String,
|
|
52
70
|
target: PreludeSDK::VerificationCheckParams::Target,
|
|
71
|
+
psd2: PreludeSDK::VerificationCheckParams::Psd2,
|
|
53
72
|
request_options: PreludeSDK::RequestOptions
|
|
54
73
|
}
|
|
55
74
|
)
|
|
@@ -135,6 +154,55 @@ module PreludeSDK
|
|
|
135
154
|
end
|
|
136
155
|
end
|
|
137
156
|
end
|
|
157
|
+
|
|
158
|
+
class Psd2 < PreludeSDK::Internal::Type::BaseModel
|
|
159
|
+
OrHash =
|
|
160
|
+
T.type_alias do
|
|
161
|
+
T.any(
|
|
162
|
+
PreludeSDK::VerificationCheckParams::Psd2,
|
|
163
|
+
PreludeSDK::Internal::AnyHash
|
|
164
|
+
)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Decimal amount of the transaction.
|
|
168
|
+
sig { returns(String) }
|
|
169
|
+
attr_accessor :amount
|
|
170
|
+
|
|
171
|
+
# ISO 4217 currency code.
|
|
172
|
+
sig { returns(String) }
|
|
173
|
+
attr_accessor :currency
|
|
174
|
+
|
|
175
|
+
# Payee name displayed to the payer.
|
|
176
|
+
sig { returns(String) }
|
|
177
|
+
attr_accessor :recipient
|
|
178
|
+
|
|
179
|
+
# Required when checking a code issued under the `prelude:psd2` template. The
|
|
180
|
+
# submitted variables must match those provided at issuance; any mismatch
|
|
181
|
+
# invalidates the code (PSD2 SCA RTS Article 5 dynamic linking). Ignored on
|
|
182
|
+
# non-PSD2 verifications.
|
|
183
|
+
sig do
|
|
184
|
+
params(amount: String, currency: String, recipient: String).returns(
|
|
185
|
+
T.attached_class
|
|
186
|
+
)
|
|
187
|
+
end
|
|
188
|
+
def self.new(
|
|
189
|
+
# Decimal amount of the transaction.
|
|
190
|
+
amount:,
|
|
191
|
+
# ISO 4217 currency code.
|
|
192
|
+
currency:,
|
|
193
|
+
# Payee name displayed to the payer.
|
|
194
|
+
recipient:
|
|
195
|
+
)
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
sig do
|
|
199
|
+
override.returns(
|
|
200
|
+
{ amount: String, currency: String, recipient: String }
|
|
201
|
+
)
|
|
202
|
+
end
|
|
203
|
+
def to_hash
|
|
204
|
+
end
|
|
205
|
+
end
|
|
138
206
|
end
|
|
139
207
|
end
|
|
140
208
|
end
|
|
@@ -11,7 +11,9 @@ module PreludeSDK
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
# The status of the check.
|
|
14
|
+
# The status of the check. For `prelude:psd2` codes, `transaction_missing` is
|
|
15
|
+
# returned when the `psd2` block is omitted, and `transaction_mismatch` when the
|
|
16
|
+
# submitted variables differ from those provided at issuance.
|
|
15
17
|
sig do
|
|
16
18
|
returns(
|
|
17
19
|
PreludeSDK::Models::VerificationCheckResponse::Status::TaggedSymbol
|
|
@@ -59,7 +61,9 @@ module PreludeSDK
|
|
|
59
61
|
).returns(T.attached_class)
|
|
60
62
|
end
|
|
61
63
|
def self.new(
|
|
62
|
-
# The status of the check.
|
|
64
|
+
# The status of the check. For `prelude:psd2` codes, `transaction_missing` is
|
|
65
|
+
# returned when the `psd2` block is omitted, and `transaction_mismatch` when the
|
|
66
|
+
# submitted variables differ from those provided at issuance.
|
|
63
67
|
status:,
|
|
64
68
|
# The verification identifier.
|
|
65
69
|
id: nil,
|
|
@@ -83,7 +87,9 @@ module PreludeSDK
|
|
|
83
87
|
def to_hash
|
|
84
88
|
end
|
|
85
89
|
|
|
86
|
-
# The status of the check.
|
|
90
|
+
# The status of the check. For `prelude:psd2` codes, `transaction_missing` is
|
|
91
|
+
# returned when the `psd2` block is omitted, and `transaction_mismatch` when the
|
|
92
|
+
# submitted variables differ from those provided at issuance.
|
|
87
93
|
module Status
|
|
88
94
|
extend PreludeSDK::Internal::Type::Enum
|
|
89
95
|
|
|
@@ -108,6 +114,16 @@ module PreludeSDK
|
|
|
108
114
|
:expired_or_not_found,
|
|
109
115
|
PreludeSDK::Models::VerificationCheckResponse::Status::TaggedSymbol
|
|
110
116
|
)
|
|
117
|
+
TRANSACTION_MISSING =
|
|
118
|
+
T.let(
|
|
119
|
+
:transaction_missing,
|
|
120
|
+
PreludeSDK::Models::VerificationCheckResponse::Status::TaggedSymbol
|
|
121
|
+
)
|
|
122
|
+
TRANSACTION_MISMATCH =
|
|
123
|
+
T.let(
|
|
124
|
+
:transaction_mismatch,
|
|
125
|
+
PreludeSDK::Models::VerificationCheckResponse::Status::TaggedSymbol
|
|
126
|
+
)
|
|
111
127
|
|
|
112
128
|
sig do
|
|
113
129
|
override.returns(
|