Class: PreludeSDK::Models::VerificationCreateParams::Options

Inherits:
Internal::Type::BaseModel show all
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

Class Method Summary collapse

Instance Method Summary collapse

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

Parameters:

  • app_realm (PreludeSDK::Models::VerificationCreateParams::Options::AppRealm) (defaults to: nil)

    This allows automatic OTP retrieval on mobile apps and web browsers. Supported p

  • callback_url (String) (defaults to: nil)

    The URL where webhooks will be sent when verification events occur, including ve

  • channels (Array<Symbol, PreludeSDK::Models::VerificationCreateParams::Options::Channel>) (defaults to: nil)

    The channels this verification may use, in the order they are tried. Channels yo

  • code_size (Integer) (defaults to: nil)

    The size of the code generated. It should be between 4 and 8. Defaults to the co

  • custom_code (String) (defaults to: nil)

    The custom code to use for OTP verification. To use the custom code feature, con

  • force_challenge (Boolean) (defaults to: nil)

    When true, the verification is routed through challenge-safe channels (non-SMS

  • locale (String) (defaults to: nil)

    A BCP-47 formatted locale string with the language the text message will be sent

  • max_auto_fallbacks (Integer) (defaults to: nil)

    Maximum number of delivery attempts Prelude may add on its own after the one you

  • verification_method (Symbol, PreludeSDK::Models::VerificationCreateParams::Options::Method) (defaults to: nil)

    The method used for verifying this phone number. The 'voice' option provides an

  • preferred_channel (Symbol, PreludeSDK::Models::VerificationCreateParams::Options::PreferredChannel) (defaults to: nil)

    The channel to prioritize when delivering the verification. Prelude prioritizes

  • sender_id (String) (defaults to: nil)

    The Sender ID to use for this message. The Sender ID needs to be enabled by Prel

  • template_id (String) (defaults to: nil)

    The identifier of a verification template. It applies use case-specific settings

  • variables (Hash{Symbol=>String}) (defaults to: nil)

    The variables to be replaced in the template.



# File 'lib/prelude_sdk/models/verification_create_params.rb', line 245

Instance Attribute Details

#app_realmPreludeSDK::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_urlString?

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


126
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 126

optional :callback_url, String

#channelsArray<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_sizeInteger?

The size of the code generated. It should be between 4 and 8. Defaults to the code size specified from the Dashboard.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


149
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 149

optional :code_size, Integer

#custom_codeString?

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


157
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 157

optional :custom_code, String

#force_challengeBoolean?

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.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


169
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 169

optional :force_challenge, PreludeSDK::Internal::Type::Boolean

#localeString?

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.

Parameters:

  • (String)

Returns:

  • (String, nil)


178
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 178

optional :locale, String

#max_auto_fallbacksInteger?

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.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


198
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 198

optional :max_auto_fallbacks, Integer

#preferred_channelSymbol, ...

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_idString?

The Sender ID to use for this message. The Sender ID needs to be enabled by Prelude.

Parameters:

  • (String)

Returns:

  • (String, nil)


230
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 230

optional :sender_id, String

#template_idString?

The identifier of a verification template. It applies use case-specific settings, such as the message content or certain verification parameters.

Parameters:

  • (String)

Returns:

  • (String, nil)


237
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 237

optional :template_id, String

#variablesHash{Symbol=>String}?

The variables to be replaced in the template.

Parameters:

  • (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String}, nil)


243
# File 'lib/prelude_sdk/models/verification_create_params.rb', line 243

optional :variables, PreludeSDK::Internal::Type::HashOf[String]

#verification_methodSymbol, ...

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

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/prelude_sdk/models/verification_create_params.rb', line 319

Instance Method Details

#to_hash{

Returns:

  • ({)


198
# File 'sig/prelude_sdk/models/verification_create_params.rbs', line 198

def to_hash: -> {