prelude-sdk 0.5.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 +28 -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 +82 -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 -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 +184 -3
- 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 -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 +38 -0
- 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
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,33 @@
|
|
|
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
|
+
|
|
3
31
|
## 0.5.0 (2026-05-07)
|
|
4
32
|
|
|
5
33
|
Full Changelog: [v0.4.0...v0.5.0](https://github.com/prelude-so/ruby-sdk/compare/v0.4.0...v0.5.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
|
|
@@ -70,6 +70,16 @@ module PreludeSDK
|
|
|
70
70
|
# @return [String, nil]
|
|
71
71
|
optional :locale, String
|
|
72
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
|
+
|
|
73
83
|
# @!attribute preferred_channel
|
|
74
84
|
# The preferred channel to be used in priority for message delivery. If the
|
|
75
85
|
# channel is unavailable, the system will fallback to other available channels.
|
|
@@ -91,7 +101,7 @@ module PreludeSDK
|
|
|
91
101
|
# @return [Hash{Symbol=>String}, nil]
|
|
92
102
|
optional :variables, PreludeSDK::Internal::Type::HashOf[String]
|
|
93
103
|
|
|
94
|
-
# @!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: {})
|
|
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: {})
|
|
95
105
|
# Some parameter documentations has been truncated, see
|
|
96
106
|
# {PreludeSDK::Models::NotifySendParams} for more details.
|
|
97
107
|
#
|
|
@@ -111,6 +121,8 @@ module PreludeSDK
|
|
|
111
121
|
#
|
|
112
122
|
# @param locale [String] A BCP-47 formatted locale string with the language the text message will be sent
|
|
113
123
|
#
|
|
124
|
+
# @param max_auto_retries [Integer] Maximum number of automatic retry attempts across channels for this send, in add
|
|
125
|
+
#
|
|
114
126
|
# @param preferred_channel [Symbol, PreludeSDK::Models::NotifySendParams::PreferredChannel] The preferred channel to be used in priority for message delivery. If the channe
|
|
115
127
|
#
|
|
116
128
|
# @param schedule_at [Time] Schedule the message for future delivery in RFC3339 format. Marketing messages c
|
|
@@ -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
|
|
@@ -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
|
|
@@ -159,7 +159,7 @@ module PreludeSDK
|
|
|
159
159
|
# Send transactional and marketing messages to your users via SMS, RCS and
|
|
160
160
|
# WhatsApp with automatic compliance enforcement.
|
|
161
161
|
#
|
|
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: {})
|
|
162
|
+
# @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
163
|
#
|
|
164
164
|
# @param template_id [String] The template identifier configured by your Customer Success team.
|
|
165
165
|
#
|
|
@@ -177,6 +177,8 @@ module PreludeSDK
|
|
|
177
177
|
#
|
|
178
178
|
# @param locale [String] A BCP-47 formatted locale string with the language the text message will be sent
|
|
179
179
|
#
|
|
180
|
+
# @param max_auto_retries [Integer] Maximum number of automatic retry attempts across channels for this send, in add
|
|
181
|
+
#
|
|
180
182
|
# @param preferred_channel [Symbol, PreludeSDK::Models::NotifySendParams::PreferredChannel] The preferred channel to be used in priority for message delivery. If the channe
|
|
181
183
|
#
|
|
182
184
|
# @param schedule_at [Time] Schedule the message for future delivery in RFC3339 format. Marketing messages c
|
|
@@ -204,7 +206,7 @@ module PreludeSDK
|
|
|
204
206
|
#
|
|
205
207
|
# Send the same message to multiple recipients in a single request.
|
|
206
208
|
#
|
|
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: {})
|
|
209
|
+
# @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
210
|
#
|
|
209
211
|
# @param template_id [String] The template identifier configured by your Customer Success team.
|
|
210
212
|
#
|
|
@@ -222,6 +224,8 @@ module PreludeSDK
|
|
|
222
224
|
#
|
|
223
225
|
# @param locale [String] A BCP-47 formatted locale string.
|
|
224
226
|
#
|
|
227
|
+
# @param max_auto_retries [Integer] Maximum number of automatic retry attempts across channels for each send in the
|
|
228
|
+
#
|
|
225
229
|
# @param preferred_channel [Symbol, PreludeSDK::Models::NotifySendBatchParams::PreferredChannel] Preferred channel for delivery. If unavailable, automatic fallback applies.
|
|
226
230
|
#
|
|
227
231
|
# @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