Class: PreludeSDK::Models::VerificationCreateParams::Options
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- PreludeSDK::Models::VerificationCreateParams::Options
- Defined in:
- lib/prelude_sdk/models/verification_create_params.rb,
sig/prelude_sdk/models/verification_create_params.rbs
Defined Under Namespace
Modules: Channel, Method, PreferredChannel Classes: AppRealm
Instance Attribute Summary collapse
-
#app_realm ⇒ PreludeSDK::Models::VerificationCreateParams::Options::AppRealm?
This allows automatic OTP retrieval on mobile apps and web browsers.
-
#callback_url ⇒ String?
The URL where webhooks will be sent when verification events occur, including verification creation, attempt creation, and delivery status changes.
-
#channels ⇒ Array<Symbol, PreludeSDK::Models::VerificationCreateParams::Options::Channel>?
The channels this verification may use, in the order they are tried.
-
#code_size ⇒ Integer?
The size of the code generated.
-
#custom_code ⇒ String?
The custom code to use for OTP verification.
-
#force_challenge ⇒ Boolean?
When
true, the verification is routed through challenge-safe channels (non-SMS/Voice) regardless of country eligibility or any antispam outcome. -
#locale ⇒ String?
A BCP-47 formatted locale string with the language the text message will be sent to.
-
#max_auto_fallbacks ⇒ Integer?
Maximum number of delivery attempts Prelude may add on its own after the one you requested.
-
#preferred_channel ⇒ Symbol, ...
The channel to prioritize when delivering the verification.
-
#sender_id ⇒ String?
The Sender ID to use for this message.
-
#template_id ⇒ String?
The identifier of a verification template.
-
#variables ⇒ Hash{Symbol=>String}?
The variables to be replaced in the template.
-
#verification_method ⇒ Symbol, ...
The method used for verifying this phone number.
Class Method Summary collapse
Instance Method Summary collapse
-
#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) ⇒ Object
constructor
Some parameter documentations has been truncated, see Options for more details.
- #to_hash ⇒ {
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#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) ⇒ Object
Some parameter documentations has been truncated, see PreludeSDK::Models::VerificationCreateParams::Options for more details.
Verification options
|
|
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 245
|
Instance Attribute Details
#app_realm ⇒ PreludeSDK::Models::VerificationCreateParams::Options::AppRealm?
This allows automatic OTP retrieval on mobile apps and web browsers. Supported platforms are Android (SMS Retriever API) and Web (WebOTP API).
118 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 118 optional :app_realm, -> { PreludeSDK::VerificationCreateParams::Options::AppRealm } |
#callback_url ⇒ String?
The URL where webhooks will be sent when verification events occur, including verification creation, attempt creation, and delivery status changes. For more details, refer to Webhook.
126 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 126 optional :callback_url, String |
#channels ⇒ Array<Symbol, PreludeSDK::Models::VerificationCreateParams::Options::Channel>?
The channels this verification may use, in the order they are tried. Channels
you omit are never used, including on retries. This option can only be set when
the verification is created. The list is recorded on the verification and
applies for its whole lifecycle, so channels sent while retrying an existing
verification is ignored — unlike preferred_channel, which is honored on every
retry. Every channel you list must be enabled on your account and active in the
destination country, otherwise the request fails with
channel_not_enabled_in_region. Prelude still picks the best provider within
each channel. Cannot be combined with preferred_channel. Voice is requested
through method instead. Disabled by default — contact support to enable it.
141 142 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 141 optional :channels, -> { PreludeSDK::Internal::Type::ArrayOf[enum: PreludeSDK::VerificationCreateParams::Options::Channel] } |
#code_size ⇒ Integer?
The size of the code generated. It should be between 4 and 8. Defaults to the code size specified from the Dashboard.
149 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 149 optional :code_size, Integer |
#custom_code ⇒ String?
The custom code to use for OTP verification. To use the custom code feature, contact us to enable it for your account. For more details, refer to Custom Code.
157 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 157 optional :custom_code, String |
#force_challenge ⇒ Boolean?
When true, the verification is routed through challenge-safe channels
(non-SMS/Voice) regardless of country eligibility or any antispam outcome. The
resulting verification has status: "challenged". Use this when you have your
own signal that the request is suspicious and want stricter routing — the
verification is not classified as fraud and does not contribute to
anti-fraud counters or risk factors. This feature is disabled by default —
contact Prelude support to enable it on your account.
169 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 169 optional :force_challenge, PreludeSDK::Internal::Type::Boolean |
#locale ⇒ String?
A BCP-47 formatted locale string with the language the text message will be sent to. If there's no locale set, the language will be determined by the country code of the phone number. If the language specified doesn't exist, it defaults to US English.
178 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 178 optional :locale, String |
#max_auto_fallbacks ⇒ Integer?
Maximum number of delivery attempts Prelude may add on its own after the one you
requested. 0 means a single attempt: if it cannot be delivered, Prelude
neither tries another provider nor another channel, and does not retry
automatically. 1 allows one additional attempt, and so on — a value larger
than the number of routes available for the destination simply behaves like the
default. When omitted, Prelude retries as your account is configured, across as
many channels as the route offers.
This option can only be set when the verification is created. The value is
recorded on the verification and applies for its whole lifecycle, so a
max_auto_fallbacks sent while retrying an existing verification is ignored —
the limit cannot be raised or lowered after the fact. A retry you ask for is not
an automatic attempt, so it gets a fresh allowance of the same limit. This
option is disabled by default — contact Prelude support to enable it on your
account.
198 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 198 optional :max_auto_fallbacks, Integer |
#preferred_channel ⇒ Symbol, ...
The channel to prioritize when delivering the verification. Prelude prioritizes
this channel on the first attempt and continues to prefer it on retries while an
untried route on that channel remains; once those are exhausted, retries fall
back to the next best available route. If the channel is unavailable (for
example, when a verification is challenged), Prelude uses the best available
route instead. Cannot be combined with channels.
223 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 223 optional :preferred_channel, enum: -> { PreludeSDK::VerificationCreateParams::Options::PreferredChannel } |
#sender_id ⇒ String?
The Sender ID to use for this message. The Sender ID needs to be enabled by Prelude.
230 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 230 optional :sender_id, String |
#template_id ⇒ String?
The identifier of a verification template. It applies use case-specific settings, such as the message content or certain verification parameters.
237 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 237 optional :template_id, String |
#variables ⇒ Hash{Symbol=>String}?
The variables to be replaced in the template.
243 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 243 optional :variables, PreludeSDK::Internal::Type::HashOf[String] |
#verification_method ⇒ Symbol, ...
The method used for verifying this phone number. The 'voice' option provides an accessible alternative for visually impaired users by delivering the verification code through a phone call rather than a text message. It also allows verification of landline numbers that cannot receive SMS messages. The 'message' option explicitly requests message delivery (SMS, WhatsApp ...) and skips silent verification, useful for scenarios requiring direct user interaction.
210 211 212 |
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 210 optional :verification_method, enum: -> { PreludeSDK::VerificationCreateParams::Options::Method }, api_name: :method |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 319
|
Instance Method Details
#to_hash ⇒ {
198 |
# File 'sig/prelude_sdk/models/verification_create_params.rbs', line 198
def to_hash: -> {
|