prelude-sdk 0.4.0 → 0.6.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 +37 -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 -38
- 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 +82 -4
- data/lib/prelude_sdk/models/verification_create_response.rb +11 -4
- data/lib/prelude_sdk/models/watch_predict_params.rb +3 -3
- data/lib/prelude_sdk/models/watch_send_events_params.rb +22 -3
- data/lib/prelude_sdk/resources/notify.rb +6 -6
- 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 -59
- 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 +184 -3
- data/rbi/prelude_sdk/models/verification_create_response.rbi +21 -7
- data/rbi/prelude_sdk/models/watch_predict_params.rbi +3 -3
- data/rbi/prelude_sdk/models/watch_send_events_params.rbi +27 -3
- data/rbi/prelude_sdk/resources/notify.rbi +14 -9
- 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 -26
- 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 +38 -0
- data/sig/prelude_sdk/models/verification_create_response.rbs +2 -1
- data/sig/prelude_sdk/resources/notify.rbs +2 -2
- data/sig/prelude_sdk/resources/transactional.rbs +1 -0
- data/sig/prelude_sdk/resources/verification.rbs +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cc907faf5181de68a78b810ea7e8f112b9487a1509787ade20ee24a89ebb1e47
|
|
4
|
+
data.tar.gz: 72ee64f891262d8b42dbf743563acf09d649090ac5b0e5b4a651ab3250228952
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92d9f3a4bc299dc75db670d6be40eeeadd34e2ee1d19c82197ea7217f05e3fed75f279a3e13f209dbfd129d190794d9a53f6cef584e32fa90e97fd30abfe06ee
|
|
7
|
+
data.tar.gz: 360197b7fafbed000c76dc07e8b21dc81c8f46e869c193298da0ad51b71930ad6bb1ea5585f1d0570a1c3d2fd88c0a68984f54cacf6630a1c78a656465b632d5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.6.0 (2026-08-07)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.5.0...v0.6.0](https://github.com/prelude-so/ruby-sdk/compare/v0.5.0...v0.6.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** api update ([f50fa71](https://github.com/prelude-so/ruby-sdk/commit/f50fa71d8df49b0787d7db47a5510f44151f9e8d))
|
|
10
|
+
* **api:** api update ([05e7092](https://github.com/prelude-so/ruby-sdk/commit/05e7092347c6b2b2c8824c3912843b751ee5139b))
|
|
11
|
+
* **api:** api update ([9354ab4](https://github.com/prelude-so/ruby-sdk/commit/9354ab444b7f24f01f953071f76088c05d7b60e0))
|
|
12
|
+
* **api:** api update ([8617519](https://github.com/prelude-so/ruby-sdk/commit/8617519ff89a67501d6a68a48e228f8f90c1acc5))
|
|
13
|
+
* **api:** api update ([714bb99](https://github.com/prelude-so/ruby-sdk/commit/714bb99f625935f8e7320ff56fe30db697015bc6))
|
|
14
|
+
* **api:** api update ([36cef75](https://github.com/prelude-so/ruby-sdk/commit/36cef7585d0e0217ef205a0de19a74cab7088ed6))
|
|
15
|
+
* **api:** api update ([4f9e5d5](https://github.com/prelude-so/ruby-sdk/commit/4f9e5d5fed8221c84514419e8fc55b4fe9695bb4))
|
|
16
|
+
* **api:** api update ([3a7d02a](https://github.com/prelude-so/ruby-sdk/commit/3a7d02aaff30f5db464a6669134125b645faccdb))
|
|
17
|
+
* **api:** api update ([b481c73](https://github.com/prelude-so/ruby-sdk/commit/b481c73a09d3cea498b5449612e8f36ffd134b68))
|
|
18
|
+
* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([066b5f2](https://github.com/prelude-so/ruby-sdk/commit/066b5f29b4bf551e90d782fc5216a62669c7c415))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Bug Fixes
|
|
22
|
+
|
|
23
|
+
* **client:** elide content type header on requests without body ([3b5e81c](https://github.com/prelude-so/ruby-sdk/commit/3b5e81cec044555fb0b3aecead5ae056eedb3373))
|
|
24
|
+
* **client:** send content-type header for requests with an omitted optional body ([513ece3](https://github.com/prelude-so/ruby-sdk/commit/513ece3bc7f8c0282b8825bb7a817c3a27e5c795))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Chores
|
|
28
|
+
|
|
29
|
+
* **internal:** bound formatter parallelism to CPU count ([8370b94](https://github.com/prelude-so/ruby-sdk/commit/8370b948890fbb6e4a981e63e4be6c0ee1fb0b1e))
|
|
30
|
+
|
|
31
|
+
## 0.5.0 (2026-05-07)
|
|
32
|
+
|
|
33
|
+
Full Changelog: [v0.4.0...v0.5.0](https://github.com/prelude-so/ruby-sdk/compare/v0.4.0...v0.5.0)
|
|
34
|
+
|
|
35
|
+
### Features
|
|
36
|
+
|
|
37
|
+
* **api:** api update ([4a28614](https://github.com/prelude-so/ruby-sdk/commit/4a286145c86c872f859225d1d892e98c640598af))
|
|
38
|
+
* **api:** api update ([7beed1d](https://github.com/prelude-so/ruby-sdk/commit/7beed1dab00a7fd90594bba5f94f53261e22b549))
|
|
39
|
+
|
|
3
40
|
## 0.4.0 (2026-04-30)
|
|
4
41
|
|
|
5
42
|
Full Changelog: [v0.3.0...v0.4.0](https://github.com/prelude-so/ruby-sdk/compare/v0.3.0...v0.4.0)
|
data/README.md
CHANGED
|
@@ -306,6 +306,11 @@ module PreludeSDK
|
|
|
306
306
|
PreludeSDK::Internal::Util.deep_merge(*[req[:body], opts[:extra_body]].compact)
|
|
307
307
|
end
|
|
308
308
|
|
|
309
|
+
# Generated methods always pass `req[:body]` for operations that define a
|
|
310
|
+
# request body, so only elide the content-type header when the operation
|
|
311
|
+
# has no body at all, not when an optional body param was omitted.
|
|
312
|
+
headers.delete("content-type") if body.nil? && !req.key?(:body)
|
|
313
|
+
|
|
309
314
|
url = PreludeSDK::Internal::Util.join_parsed_uri(
|
|
310
315
|
@base_url_components,
|
|
311
316
|
{**req, path: path, query: query}
|
|
@@ -65,6 +65,16 @@ module PreludeSDK
|
|
|
65
65
|
# @return [String, nil]
|
|
66
66
|
optional :locale, String
|
|
67
67
|
|
|
68
|
+
# @!attribute max_auto_retries
|
|
69
|
+
# Maximum number of automatic retry attempts across channels for each send in the
|
|
70
|
+
# batch, in addition to the first attempt. For example, `2` allows up to 3 total
|
|
71
|
+
# delivery attempts per recipient. Lower values reduce delivery cost on
|
|
72
|
+
# hard-to-reach numbers at the expense of deliverability. When omitted, your
|
|
73
|
+
# account's configured default applies.
|
|
74
|
+
#
|
|
75
|
+
# @return [Integer, nil]
|
|
76
|
+
optional :max_auto_retries, Integer
|
|
77
|
+
|
|
68
78
|
# @!attribute preferred_channel
|
|
69
79
|
# Preferred channel for delivery. If unavailable, automatic fallback applies.
|
|
70
80
|
#
|
|
@@ -84,7 +94,7 @@ module PreludeSDK
|
|
|
84
94
|
# @return [Hash{Symbol=>String}, nil]
|
|
85
95
|
optional :variables, PreludeSDK::Internal::Type::HashOf[String]
|
|
86
96
|
|
|
87
|
-
# @!method initialize(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: {})
|
|
97
|
+
# @!method initialize(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: {})
|
|
88
98
|
# Some parameter documentations has been truncated, see
|
|
89
99
|
# {PreludeSDK::Models::NotifySendBatchParams} for more details.
|
|
90
100
|
#
|
|
@@ -104,6 +114,8 @@ module PreludeSDK
|
|
|
104
114
|
#
|
|
105
115
|
# @param locale [String] A BCP-47 formatted locale string.
|
|
106
116
|
#
|
|
117
|
+
# @param max_auto_retries [Integer] Maximum number of automatic retry attempts across channels for each send in the
|
|
118
|
+
#
|
|
107
119
|
# @param preferred_channel [Symbol, PreludeSDK::Models::NotifySendBatchParams::PreferredChannel] Preferred channel for delivery. If unavailable, automatic fallback applies.
|
|
108
120
|
#
|
|
109
121
|
# @param schedule_at [Time] Schedule delivery in RFC3339 format. Marketing sends may be adjusted to comply w
|
|
@@ -25,13 +25,6 @@ module PreludeSDK
|
|
|
25
25
|
# @return [String, nil]
|
|
26
26
|
optional :callback_url, String
|
|
27
27
|
|
|
28
|
-
# @!attribute context
|
|
29
|
-
# Context for replying to an inbound message. When provided, the message is sent
|
|
30
|
-
# as a WhatsApp reply within the 24-hour conversation window.
|
|
31
|
-
#
|
|
32
|
-
# @return [PreludeSDK::Models::NotifySendParams::Context, nil]
|
|
33
|
-
optional :context, -> { PreludeSDK::NotifySendParams::Context }
|
|
34
|
-
|
|
35
28
|
# @!attribute correlation_id
|
|
36
29
|
# A user-defined identifier to correlate this message with your internal systems.
|
|
37
30
|
# It is returned in the response and any webhook events that refer to this
|
|
@@ -77,6 +70,16 @@ module PreludeSDK
|
|
|
77
70
|
# @return [String, nil]
|
|
78
71
|
optional :locale, String
|
|
79
72
|
|
|
73
|
+
# @!attribute max_auto_retries
|
|
74
|
+
# Maximum number of automatic retry attempts across channels for this send, in
|
|
75
|
+
# addition to the first attempt. For example, `2` allows up to 3 total delivery
|
|
76
|
+
# attempts. Lower values reduce delivery cost on hard-to-reach numbers at the
|
|
77
|
+
# expense of deliverability. When omitted, your account's configured default
|
|
78
|
+
# applies.
|
|
79
|
+
#
|
|
80
|
+
# @return [Integer, nil]
|
|
81
|
+
optional :max_auto_retries, Integer
|
|
82
|
+
|
|
80
83
|
# @!attribute preferred_channel
|
|
81
84
|
# The preferred channel to be used in priority for message delivery. If the
|
|
82
85
|
# channel is unavailable, the system will fallback to other available channels.
|
|
@@ -92,21 +95,13 @@ module PreludeSDK
|
|
|
92
95
|
# @return [Time, nil]
|
|
93
96
|
optional :schedule_at, Time
|
|
94
97
|
|
|
95
|
-
# @!attribute text
|
|
96
|
-
# The reply message body. Required when `context.reply_to` is provided. Used for
|
|
97
|
-
# 2-way WhatsApp messaging to send free-form text replies within a conversation
|
|
98
|
-
# window.
|
|
99
|
-
#
|
|
100
|
-
# @return [String, nil]
|
|
101
|
-
optional :text, String
|
|
102
|
-
|
|
103
98
|
# @!attribute variables
|
|
104
99
|
# The variables to be replaced in the template.
|
|
105
100
|
#
|
|
106
101
|
# @return [Hash{Symbol=>String}, nil]
|
|
107
102
|
optional :variables, PreludeSDK::Internal::Type::HashOf[String]
|
|
108
103
|
|
|
109
|
-
# @!method initialize(template_id:, to:, callback_url: nil,
|
|
104
|
+
# @!method initialize(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: {})
|
|
110
105
|
# Some parameter documentations has been truncated, see
|
|
111
106
|
# {PreludeSDK::Models::NotifySendParams} for more details.
|
|
112
107
|
#
|
|
@@ -116,8 +111,6 @@ module PreludeSDK
|
|
|
116
111
|
#
|
|
117
112
|
# @param callback_url [String] The URL where webhooks will be sent for message delivery events.
|
|
118
113
|
#
|
|
119
|
-
# @param context [PreludeSDK::Models::NotifySendParams::Context] Context for replying to an inbound message. When provided, the message is sent a
|
|
120
|
-
#
|
|
121
114
|
# @param correlation_id [String] A user-defined identifier to correlate this message with your internal systems.
|
|
122
115
|
#
|
|
123
116
|
# @param document [PreludeSDK::Models::NotifySendParams::Document] A media attachment to include in the message header. Supported on
|
|
@@ -128,34 +121,16 @@ module PreludeSDK
|
|
|
128
121
|
#
|
|
129
122
|
# @param locale [String] A BCP-47 formatted locale string with the language the text message will be sent
|
|
130
123
|
#
|
|
124
|
+
# @param max_auto_retries [Integer] Maximum number of automatic retry attempts across channels for this send, in add
|
|
125
|
+
#
|
|
131
126
|
# @param preferred_channel [Symbol, PreludeSDK::Models::NotifySendParams::PreferredChannel] The preferred channel to be used in priority for message delivery. If the channe
|
|
132
127
|
#
|
|
133
128
|
# @param schedule_at [Time] Schedule the message for future delivery in RFC3339 format. Marketing messages c
|
|
134
129
|
#
|
|
135
|
-
# @param text [String] The reply message body. Required when `context.reply_to` is provided. Used for 2
|
|
136
|
-
#
|
|
137
130
|
# @param variables [Hash{Symbol=>String}] The variables to be replaced in the template.
|
|
138
131
|
#
|
|
139
132
|
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
140
133
|
|
|
141
|
-
class Context < PreludeSDK::Internal::Type::BaseModel
|
|
142
|
-
# @!attribute reply_to
|
|
143
|
-
# The inbound message ID (prefixed with `im_`) to reply to. This ID is provided in
|
|
144
|
-
# the `inbound.message.received` webhook event.
|
|
145
|
-
#
|
|
146
|
-
# @return [String]
|
|
147
|
-
required :reply_to, String
|
|
148
|
-
|
|
149
|
-
# @!method initialize(reply_to:)
|
|
150
|
-
# Some parameter documentations has been truncated, see
|
|
151
|
-
# {PreludeSDK::Models::NotifySendParams::Context} for more details.
|
|
152
|
-
#
|
|
153
|
-
# Context for replying to an inbound message. When provided, the message is sent
|
|
154
|
-
# as a WhatsApp reply within the 24-hour conversation window.
|
|
155
|
-
#
|
|
156
|
-
# @param reply_to [String] The inbound message ID (prefixed with `im_`) to reply to. This ID is provided in
|
|
157
|
-
end
|
|
158
|
-
|
|
159
134
|
class Document < PreludeSDK::Internal::Type::BaseModel
|
|
160
135
|
# @!attribute url
|
|
161
136
|
# HTTPS URL of the media file. The file extension must match the template's
|
|
@@ -69,6 +69,14 @@ module PreludeSDK
|
|
|
69
69
|
# @return [String, nil]
|
|
70
70
|
optional :locale, String
|
|
71
71
|
|
|
72
|
+
# @!attribute max_auto_retries
|
|
73
|
+
# Maximum number of automatic retry attempts across channels for this send, in
|
|
74
|
+
# addition to the first attempt. For example, `2` allows up to 3 total delivery
|
|
75
|
+
# attempts. When omitted, your account's configured default applies.
|
|
76
|
+
#
|
|
77
|
+
# @return [Integer, nil]
|
|
78
|
+
optional :max_auto_retries, Integer
|
|
79
|
+
|
|
72
80
|
# @!attribute preferred_channel
|
|
73
81
|
# The preferred delivery channel for the message. When specified, the system will
|
|
74
82
|
# prioritize sending via the requested channel if the template is configured for
|
|
@@ -89,7 +97,7 @@ module PreludeSDK
|
|
|
89
97
|
# @return [Hash{Symbol=>String}, nil]
|
|
90
98
|
optional :variables, PreludeSDK::Internal::Type::HashOf[String]
|
|
91
99
|
|
|
92
|
-
# @!method initialize(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: {})
|
|
100
|
+
# @!method initialize(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: {})
|
|
93
101
|
# Some parameter documentations has been truncated, see
|
|
94
102
|
# {PreludeSDK::Models::TransactionalSendParams} for more details.
|
|
95
103
|
#
|
|
@@ -109,6 +117,8 @@ module PreludeSDK
|
|
|
109
117
|
#
|
|
110
118
|
# @param locale [String] A BCP-47 formatted locale string with the language the text message will be sent
|
|
111
119
|
#
|
|
120
|
+
# @param max_auto_retries [Integer] Maximum number of automatic retry attempts across channels for this send, in add
|
|
121
|
+
#
|
|
112
122
|
# @param preferred_channel [Symbol, PreludeSDK::Models::TransactionalSendParams::PreferredChannel] The preferred delivery channel for the message. When specified, the system will
|
|
113
123
|
#
|
|
114
124
|
# @param variables [Hash{Symbol=>String}] The variables to be replaced in the template.
|
|
@@ -20,7 +20,16 @@ module PreludeSDK
|
|
|
20
20
|
# @return [PreludeSDK::Models::VerificationCheckParams::Target]
|
|
21
21
|
required :target, -> { PreludeSDK::VerificationCheckParams::Target }
|
|
22
22
|
|
|
23
|
-
# @!
|
|
23
|
+
# @!attribute psd2
|
|
24
|
+
# Required when checking a code issued under the `prelude:psd2` template. The
|
|
25
|
+
# submitted variables must match those provided at issuance; any mismatch
|
|
26
|
+
# invalidates the code (PSD2 SCA RTS Article 5 dynamic linking). Ignored on
|
|
27
|
+
# non-PSD2 verifications.
|
|
28
|
+
#
|
|
29
|
+
# @return [PreludeSDK::Models::VerificationCheckParams::Psd2, nil]
|
|
30
|
+
optional :psd2, -> { PreludeSDK::VerificationCheckParams::Psd2 }
|
|
31
|
+
|
|
32
|
+
# @!method initialize(code:, target:, psd2: nil, request_options: {})
|
|
24
33
|
# Some parameter documentations has been truncated, see
|
|
25
34
|
# {PreludeSDK::Models::VerificationCheckParams} for more details.
|
|
26
35
|
#
|
|
@@ -28,6 +37,8 @@ module PreludeSDK
|
|
|
28
37
|
#
|
|
29
38
|
# @param target [PreludeSDK::Models::VerificationCheckParams::Target] The verification target. Either a phone number or an email address. To use the e
|
|
30
39
|
#
|
|
40
|
+
# @param psd2 [PreludeSDK::Models::VerificationCheckParams::Psd2] Required when checking a code issued under the `prelude:psd2` template. The subm
|
|
41
|
+
#
|
|
31
42
|
# @param request_options [PreludeSDK::RequestOptions, Hash{Symbol=>Object}]
|
|
32
43
|
|
|
33
44
|
class Target < PreludeSDK::Internal::Type::BaseModel
|
|
@@ -64,6 +75,38 @@ module PreludeSDK
|
|
|
64
75
|
# @return [Array<Symbol>]
|
|
65
76
|
end
|
|
66
77
|
end
|
|
78
|
+
|
|
79
|
+
class Psd2 < PreludeSDK::Internal::Type::BaseModel
|
|
80
|
+
# @!attribute amount
|
|
81
|
+
# Decimal amount of the transaction.
|
|
82
|
+
#
|
|
83
|
+
# @return [String]
|
|
84
|
+
required :amount, String
|
|
85
|
+
|
|
86
|
+
# @!attribute currency
|
|
87
|
+
# ISO 4217 currency code.
|
|
88
|
+
#
|
|
89
|
+
# @return [String]
|
|
90
|
+
required :currency, String
|
|
91
|
+
|
|
92
|
+
# @!attribute recipient
|
|
93
|
+
# Payee name displayed to the payer.
|
|
94
|
+
#
|
|
95
|
+
# @return [String]
|
|
96
|
+
required :recipient, String
|
|
97
|
+
|
|
98
|
+
# @!method initialize(amount:, currency:, recipient:)
|
|
99
|
+
# Required when checking a code issued under the `prelude:psd2` template. The
|
|
100
|
+
# submitted variables must match those provided at issuance; any mismatch
|
|
101
|
+
# invalidates the code (PSD2 SCA RTS Article 5 dynamic linking). Ignored on
|
|
102
|
+
# non-PSD2 verifications.
|
|
103
|
+
#
|
|
104
|
+
# @param amount [String] Decimal amount of the transaction.
|
|
105
|
+
#
|
|
106
|
+
# @param currency [String] ISO 4217 currency code.
|
|
107
|
+
#
|
|
108
|
+
# @param recipient [String] Payee name displayed to the payer.
|
|
109
|
+
end
|
|
67
110
|
end
|
|
68
111
|
end
|
|
69
112
|
end
|
|
@@ -5,7 +5,9 @@ module PreludeSDK
|
|
|
5
5
|
# @see PreludeSDK::Resources::Verification#check
|
|
6
6
|
class VerificationCheckResponse < PreludeSDK::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute status
|
|
8
|
-
# The status of the check.
|
|
8
|
+
# The status of the check. For `prelude:psd2` codes, `transaction_missing` is
|
|
9
|
+
# returned when the `psd2` block is omitted, and `transaction_mismatch` when the
|
|
10
|
+
# submitted variables differ from those provided at issuance.
|
|
9
11
|
#
|
|
10
12
|
# @return [Symbol, PreludeSDK::Models::VerificationCheckResponse::Status]
|
|
11
13
|
required :status, enum: -> { PreludeSDK::Models::VerificationCheckResponse::Status }
|
|
@@ -28,7 +30,10 @@ module PreludeSDK
|
|
|
28
30
|
optional :request_id, String
|
|
29
31
|
|
|
30
32
|
# @!method initialize(status:, id: nil, metadata: nil, request_id: nil)
|
|
31
|
-
#
|
|
33
|
+
# Some parameter documentations has been truncated, see
|
|
34
|
+
# {PreludeSDK::Models::VerificationCheckResponse} for more details.
|
|
35
|
+
#
|
|
36
|
+
# @param status [Symbol, PreludeSDK::Models::VerificationCheckResponse::Status] The status of the check. For `prelude:psd2` codes, `transaction_missing` is retu
|
|
32
37
|
#
|
|
33
38
|
# @param id [String] The verification identifier.
|
|
34
39
|
#
|
|
@@ -36,7 +41,9 @@ module PreludeSDK
|
|
|
36
41
|
#
|
|
37
42
|
# @param request_id [String]
|
|
38
43
|
|
|
39
|
-
# The status of the check.
|
|
44
|
+
# The status of the check. For `prelude:psd2` codes, `transaction_missing` is
|
|
45
|
+
# returned when the `psd2` block is omitted, and `transaction_mismatch` when the
|
|
46
|
+
# submitted variables differ from those provided at issuance.
|
|
40
47
|
#
|
|
41
48
|
# @see PreludeSDK::Models::VerificationCheckResponse#status
|
|
42
49
|
module Status
|
|
@@ -45,6 +52,8 @@ module PreludeSDK
|
|
|
45
52
|
SUCCESS = :success
|
|
46
53
|
FAILURE = :failure
|
|
47
54
|
EXPIRED_OR_NOT_FOUND = :expired_or_not_found
|
|
55
|
+
TRANSACTION_MISSING = :transaction_missing
|
|
56
|
+
TRANSACTION_MISMATCH = :transaction_mismatch
|
|
48
57
|
|
|
49
58
|
# @!method self.values
|
|
50
59
|
# @return [Array<Symbol>]
|
|
@@ -125,6 +125,22 @@ module PreludeSDK
|
|
|
125
125
|
# @return [String, nil]
|
|
126
126
|
optional :callback_url, String
|
|
127
127
|
|
|
128
|
+
# @!attribute channels
|
|
129
|
+
# The channels this verification may use, in the order they are tried. Channels
|
|
130
|
+
# you omit are never used, including on retries. This option can only be set when
|
|
131
|
+
# the verification is created. The list is recorded on the verification and
|
|
132
|
+
# applies for its whole lifecycle, so `channels` sent while retrying an existing
|
|
133
|
+
# verification is ignored — unlike `preferred_channel`, which is honored on every
|
|
134
|
+
# retry. Every channel you list must be enabled on your account and active in the
|
|
135
|
+
# destination country, otherwise the request fails with
|
|
136
|
+
# `channel_not_enabled_in_region`. Prelude still picks the best provider within
|
|
137
|
+
# each channel. Cannot be combined with `preferred_channel`. Voice is requested
|
|
138
|
+
# through `method` instead. Disabled by default — contact support to enable it.
|
|
139
|
+
#
|
|
140
|
+
# @return [Array<Symbol, PreludeSDK::Models::VerificationCreateParams::Options::Channel>, nil]
|
|
141
|
+
optional :channels,
|
|
142
|
+
-> { PreludeSDK::Internal::Type::ArrayOf[enum: PreludeSDK::VerificationCreateParams::Options::Channel] }
|
|
143
|
+
|
|
128
144
|
# @!attribute code_size
|
|
129
145
|
# The size of the code generated. It should be between 4 and 8. Defaults to the
|
|
130
146
|
# code size specified from the Dashboard.
|
|
@@ -140,6 +156,18 @@ module PreludeSDK
|
|
|
140
156
|
# @return [String, nil]
|
|
141
157
|
optional :custom_code, String
|
|
142
158
|
|
|
159
|
+
# @!attribute force_challenge
|
|
160
|
+
# When `true`, the verification is routed through challenge-safe channels
|
|
161
|
+
# (non-SMS/Voice) regardless of country eligibility or any antispam outcome. The
|
|
162
|
+
# resulting verification has `status: "challenged"`. Use this when you have your
|
|
163
|
+
# own signal that the request is suspicious and want stricter routing — the
|
|
164
|
+
# verification is **not** classified as fraud and does not contribute to
|
|
165
|
+
# anti-fraud counters or risk factors. This feature is disabled by default —
|
|
166
|
+
# contact Prelude support to enable it on your account.
|
|
167
|
+
#
|
|
168
|
+
# @return [Boolean, nil]
|
|
169
|
+
optional :force_challenge, PreludeSDK::Internal::Type::Boolean
|
|
170
|
+
|
|
143
171
|
# @!attribute locale
|
|
144
172
|
# A BCP-47 formatted locale string with the language the text message will be sent
|
|
145
173
|
# to. If there's no locale set, the language will be determined by the country
|
|
@@ -149,6 +177,26 @@ module PreludeSDK
|
|
|
149
177
|
# @return [String, nil]
|
|
150
178
|
optional :locale, String
|
|
151
179
|
|
|
180
|
+
# @!attribute max_auto_fallbacks
|
|
181
|
+
# Maximum number of delivery attempts Prelude may add on its own after the one you
|
|
182
|
+
# requested. `0` means a single attempt: if it cannot be delivered, Prelude
|
|
183
|
+
# neither tries another provider nor another channel, and does not retry
|
|
184
|
+
# automatically. `1` allows one additional attempt, and so on — a value larger
|
|
185
|
+
# than the number of routes available for the destination simply behaves like the
|
|
186
|
+
# default. When omitted, Prelude retries as your account is configured, across as
|
|
187
|
+
# many channels as the route offers.
|
|
188
|
+
#
|
|
189
|
+
# This option can only be set when the verification is created. The value is
|
|
190
|
+
# recorded on the verification and applies for its whole lifecycle, so a
|
|
191
|
+
# `max_auto_fallbacks` sent while retrying an existing verification is ignored —
|
|
192
|
+
# the limit cannot be raised or lowered after the fact. A retry you ask for is not
|
|
193
|
+
# an automatic attempt, so it gets a fresh allowance of the same limit. This
|
|
194
|
+
# option is disabled by default — contact Prelude support to enable it on your
|
|
195
|
+
# account.
|
|
196
|
+
#
|
|
197
|
+
# @return [Integer, nil]
|
|
198
|
+
optional :max_auto_fallbacks, Integer
|
|
199
|
+
|
|
152
200
|
# @!attribute verification_method
|
|
153
201
|
# The method used for verifying this phone number. The 'voice' option provides an
|
|
154
202
|
# accessible alternative for visually impaired users by delivering the
|
|
@@ -164,7 +212,12 @@ module PreludeSDK
|
|
|
164
212
|
api_name: :method
|
|
165
213
|
|
|
166
214
|
# @!attribute preferred_channel
|
|
167
|
-
# The
|
|
215
|
+
# The channel to prioritize when delivering the verification. Prelude prioritizes
|
|
216
|
+
# this channel on the first attempt and continues to prefer it on retries while an
|
|
217
|
+
# untried route on that channel remains; once those are exhausted, retries fall
|
|
218
|
+
# back to the next best available route. If the channel is unavailable (for
|
|
219
|
+
# example, when a verification is challenged), Prelude uses the best available
|
|
220
|
+
# route instead. Cannot be combined with `channels`.
|
|
168
221
|
#
|
|
169
222
|
# @return [Symbol, PreludeSDK::Models::VerificationCreateParams::Options::PreferredChannel, nil]
|
|
170
223
|
optional :preferred_channel, enum: -> { PreludeSDK::VerificationCreateParams::Options::PreferredChannel }
|
|
@@ -189,7 +242,7 @@ module PreludeSDK
|
|
|
189
242
|
# @return [Hash{Symbol=>String}, nil]
|
|
190
243
|
optional :variables, PreludeSDK::Internal::Type::HashOf[String]
|
|
191
244
|
|
|
192
|
-
# @!method initialize(app_realm: nil, callback_url: nil, code_size: nil, custom_code: nil, locale: nil, verification_method: nil, preferred_channel: nil, sender_id: nil, template_id: nil, variables: nil)
|
|
245
|
+
# @!method initialize(app_realm: nil, callback_url: nil, channels: nil, code_size: nil, custom_code: nil, force_challenge: nil, locale: nil, max_auto_fallbacks: nil, verification_method: nil, preferred_channel: nil, sender_id: nil, template_id: nil, variables: nil)
|
|
193
246
|
# Some parameter documentations has been truncated, see
|
|
194
247
|
# {PreludeSDK::Models::VerificationCreateParams::Options} for more details.
|
|
195
248
|
#
|
|
@@ -199,15 +252,21 @@ module PreludeSDK
|
|
|
199
252
|
#
|
|
200
253
|
# @param callback_url [String] The URL where webhooks will be sent when verification events occur, including ve
|
|
201
254
|
#
|
|
255
|
+
# @param channels [Array<Symbol, PreludeSDK::Models::VerificationCreateParams::Options::Channel>] The channels this verification may use, in the order they are tried. Channels yo
|
|
256
|
+
#
|
|
202
257
|
# @param code_size [Integer] The size of the code generated. It should be between 4 and 8. Defaults to the co
|
|
203
258
|
#
|
|
204
259
|
# @param custom_code [String] The custom code to use for OTP verification. To use the custom code feature, con
|
|
205
260
|
#
|
|
261
|
+
# @param force_challenge [Boolean] When `true`, the verification is routed through challenge-safe channels (non-SMS
|
|
262
|
+
#
|
|
206
263
|
# @param locale [String] A BCP-47 formatted locale string with the language the text message will be sent
|
|
207
264
|
#
|
|
265
|
+
# @param max_auto_fallbacks [Integer] Maximum number of delivery attempts Prelude may add on its own after the one you
|
|
266
|
+
#
|
|
208
267
|
# @param verification_method [Symbol, PreludeSDK::Models::VerificationCreateParams::Options::Method] The method used for verifying this phone number. The 'voice' option provides an
|
|
209
268
|
#
|
|
210
|
-
# @param preferred_channel [Symbol, PreludeSDK::Models::VerificationCreateParams::Options::PreferredChannel] The
|
|
269
|
+
# @param preferred_channel [Symbol, PreludeSDK::Models::VerificationCreateParams::Options::PreferredChannel] The channel to prioritize when delivering the verification. Prelude prioritizes
|
|
211
270
|
#
|
|
212
271
|
# @param sender_id [String] The Sender ID to use for this message. The Sender ID needs to be enabled by Prel
|
|
213
272
|
#
|
|
@@ -262,6 +321,20 @@ module PreludeSDK
|
|
|
262
321
|
end
|
|
263
322
|
end
|
|
264
323
|
|
|
324
|
+
module Channel
|
|
325
|
+
extend PreludeSDK::Internal::Type::Enum
|
|
326
|
+
|
|
327
|
+
SMS = :sms
|
|
328
|
+
RCS = :rcs
|
|
329
|
+
WHATSAPP = :whatsapp
|
|
330
|
+
VIBER = :viber
|
|
331
|
+
ZALO = :zalo
|
|
332
|
+
TELEGRAM = :telegram
|
|
333
|
+
|
|
334
|
+
# @!method self.values
|
|
335
|
+
# @return [Array<Symbol>]
|
|
336
|
+
end
|
|
337
|
+
|
|
265
338
|
# The method used for verifying this phone number. The 'voice' option provides an
|
|
266
339
|
# accessible alternative for visually impaired users by delivering the
|
|
267
340
|
# verification code through a phone call rather than a text message. It also
|
|
@@ -282,7 +355,12 @@ module PreludeSDK
|
|
|
282
355
|
# @return [Array<Symbol>]
|
|
283
356
|
end
|
|
284
357
|
|
|
285
|
-
# The
|
|
358
|
+
# The channel to prioritize when delivering the verification. Prelude prioritizes
|
|
359
|
+
# this channel on the first attempt and continues to prefer it on retries while an
|
|
360
|
+
# untried route on that channel remains; once those are exhausted, retries fall
|
|
361
|
+
# back to the next best available route. If the channel is unavailable (for
|
|
362
|
+
# example, when a verification is challenged), Prelude uses the best available
|
|
363
|
+
# route instead. Cannot be combined with `channels`.
|
|
286
364
|
#
|
|
287
365
|
# @see PreludeSDK::Models::VerificationCreateParams::Options#preferred_channel
|
|
288
366
|
module PreferredChannel
|
|
@@ -27,6 +27,9 @@ module PreludeSDK
|
|
|
27
27
|
# non-voice channels only. This mode must be enabled for your customer account
|
|
28
28
|
# by Prelude support.
|
|
29
29
|
# - `blocked` - The verification was blocked.
|
|
30
|
+
# - `shadow_blocked` - The verification triggered a block rule but the decision
|
|
31
|
+
# was not enforced; this is used to dry-run anti-fraud configuration. This mode
|
|
32
|
+
# must be enabled for your customer account by Prelude support.
|
|
30
33
|
#
|
|
31
34
|
# @return [Symbol, PreludeSDK::Models::VerificationCreateResponse::Status]
|
|
32
35
|
required :status, enum: -> { PreludeSDK::Models::VerificationCreateResponse::Status }
|
|
@@ -46,7 +49,7 @@ module PreludeSDK
|
|
|
46
49
|
|
|
47
50
|
# @!attribute reason
|
|
48
51
|
# The reason why the verification was blocked. Only present when status is
|
|
49
|
-
# "blocked".
|
|
52
|
+
# "blocked" or "shadow_blocked".
|
|
50
53
|
#
|
|
51
54
|
# - `expired_signature` - The signature of the SDK signals is expired. They should
|
|
52
55
|
# be sent within the hour following their collection.
|
|
@@ -71,8 +74,8 @@ module PreludeSDK
|
|
|
71
74
|
|
|
72
75
|
# @!attribute risk_factors
|
|
73
76
|
# The risk factors that contributed to the verification being blocked. Only
|
|
74
|
-
# present when status is "blocked" and the anti-fraud system
|
|
75
|
-
# risk signals.
|
|
77
|
+
# present when status is "blocked" or "shadow_blocked" and the anti-fraud system
|
|
78
|
+
# detected specific risk signals.
|
|
76
79
|
#
|
|
77
80
|
# - `behavioral_pattern` - The phone number past behavior during verification
|
|
78
81
|
# flows exhibits suspicious patterns.
|
|
@@ -150,6 +153,9 @@ module PreludeSDK
|
|
|
150
153
|
# non-voice channels only. This mode must be enabled for your customer account
|
|
151
154
|
# by Prelude support.
|
|
152
155
|
# - `blocked` - The verification was blocked.
|
|
156
|
+
# - `shadow_blocked` - The verification triggered a block rule but the decision
|
|
157
|
+
# was not enforced; this is used to dry-run anti-fraud configuration. This mode
|
|
158
|
+
# must be enabled for your customer account by Prelude support.
|
|
153
159
|
#
|
|
154
160
|
# @see PreludeSDK::Models::VerificationCreateResponse#status
|
|
155
161
|
module Status
|
|
@@ -159,6 +165,7 @@ module PreludeSDK
|
|
|
159
165
|
RETRY = :retry
|
|
160
166
|
CHALLENGED = :challenged
|
|
161
167
|
BLOCKED = :blocked
|
|
168
|
+
SHADOW_BLOCKED = :shadow_blocked
|
|
162
169
|
|
|
163
170
|
# @!method self.values
|
|
164
171
|
# @return [Array<Symbol>]
|
|
@@ -199,7 +206,7 @@ module PreludeSDK
|
|
|
199
206
|
end
|
|
200
207
|
|
|
201
208
|
# The reason why the verification was blocked. Only present when status is
|
|
202
|
-
# "blocked".
|
|
209
|
+
# "blocked" or "shadow_blocked".
|
|
203
210
|
#
|
|
204
211
|
# - `expired_signature` - The signature of the SDK signals is expired. They should
|
|
205
212
|
# be sent within the hour following their collection.
|
|
@@ -8,7 +8,7 @@ module PreludeSDK
|
|
|
8
8
|
include PreludeSDK::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute target
|
|
11
|
-
# The
|
|
11
|
+
# The signup identifier to score — a phone number or email address.
|
|
12
12
|
#
|
|
13
13
|
# @return [PreludeSDK::Models::WatchPredictParams::Target]
|
|
14
14
|
required :target, -> { PreludeSDK::WatchPredictParams::Target }
|
|
@@ -36,7 +36,7 @@ module PreludeSDK
|
|
|
36
36
|
# Some parameter documentations has been truncated, see
|
|
37
37
|
# {PreludeSDK::Models::WatchPredictParams} for more details.
|
|
38
38
|
#
|
|
39
|
-
# @param target [PreludeSDK::Models::WatchPredictParams::Target] The
|
|
39
|
+
# @param target [PreludeSDK::Models::WatchPredictParams::Target] The signup identifier to score — a phone number or email address.
|
|
40
40
|
#
|
|
41
41
|
# @param dispatch_id [String] The identifier of the dispatch that came from the front-end SDK.
|
|
42
42
|
#
|
|
@@ -60,7 +60,7 @@ module PreludeSDK
|
|
|
60
60
|
required :value, String
|
|
61
61
|
|
|
62
62
|
# @!method initialize(type:, value:)
|
|
63
|
-
# The
|
|
63
|
+
# The signup identifier to score — a phone number or email address.
|
|
64
64
|
#
|
|
65
65
|
# @param type [Symbol, PreludeSDK::Models::WatchPredictParams::Target::Type] The type of the target. Either "phone_number" or "email_address".
|
|
66
66
|
#
|
|
@@ -24,7 +24,15 @@ module PreludeSDK
|
|
|
24
24
|
|
|
25
25
|
class Event < PreludeSDK::Internal::Type::BaseModel
|
|
26
26
|
# @!attribute confidence
|
|
27
|
-
#
|
|
27
|
+
# How much this event tells us to trust the end-user's legitimacy — not how
|
|
28
|
+
# certain you are that the event occurred. In increasing order of trust:
|
|
29
|
+
# `minimum`, `low`, `neutral`, `high`, `maximum`.
|
|
30
|
+
#
|
|
31
|
+
# Use `minimum` for an event tied to a user you trust the least to be legitimate
|
|
32
|
+
# (e.g. a `payment.chargeback`), and `maximum` for an event tied to a highly
|
|
33
|
+
# trustworthy user (e.g. a confirmed 3DS payment). Prelude weights these signals
|
|
34
|
+
# when scoring traffic: it filters out users tied to low-confidence events while
|
|
35
|
+
# preserving the experience for users tied to high-confidence ones.
|
|
28
36
|
#
|
|
29
37
|
# @return [Symbol, PreludeSDK::Models::WatchSendEventsParams::Event::Confidence]
|
|
30
38
|
required :confidence, enum: -> { PreludeSDK::WatchSendEventsParams::Event::Confidence }
|
|
@@ -42,13 +50,24 @@ module PreludeSDK
|
|
|
42
50
|
required :target, -> { PreludeSDK::WatchSendEventsParams::Event::Target }
|
|
43
51
|
|
|
44
52
|
# @!method initialize(confidence:, label:, target:)
|
|
45
|
-
#
|
|
53
|
+
# Some parameter documentations has been truncated, see
|
|
54
|
+
# {PreludeSDK::Models::WatchSendEventsParams::Event} for more details.
|
|
55
|
+
#
|
|
56
|
+
# @param confidence [Symbol, PreludeSDK::Models::WatchSendEventsParams::Event::Confidence] How much this event tells us to trust the end-user's legitimacy — not how certai
|
|
46
57
|
#
|
|
47
58
|
# @param label [String] A label to describe what the event refers to.
|
|
48
59
|
#
|
|
49
60
|
# @param target [PreludeSDK::Models::WatchSendEventsParams::Event::Target] The event target. Only supports phone numbers for now.
|
|
50
61
|
|
|
51
|
-
#
|
|
62
|
+
# How much this event tells us to trust the end-user's legitimacy — not how
|
|
63
|
+
# certain you are that the event occurred. In increasing order of trust:
|
|
64
|
+
# `minimum`, `low`, `neutral`, `high`, `maximum`.
|
|
65
|
+
#
|
|
66
|
+
# Use `minimum` for an event tied to a user you trust the least to be legitimate
|
|
67
|
+
# (e.g. a `payment.chargeback`), and `maximum` for an event tied to a highly
|
|
68
|
+
# trustworthy user (e.g. a confirmed 3DS payment). Prelude weights these signals
|
|
69
|
+
# when scoring traffic: it filters out users tied to low-confidence events while
|
|
70
|
+
# preserving the experience for users tied to high-confidence ones.
|
|
52
71
|
#
|
|
53
72
|
# @see PreludeSDK::Models::WatchSendEventsParams::Event#confidence
|
|
54
73
|
module Confidence
|