Search Results for

    Show / Hide Table of Contents

    Class ExtractCodesOptions

    Options for extracting verification codes from email or SMS content. Use method to control extraction strategy and allowFallback to control strictness.

    Inheritance
    object
    ExtractCodesOptions
    Implements
    IValidatableObject
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: mailslurp.Model
    Assembly: mailslurp.dll
    Syntax
    [DataContract(Name = "ExtractCodesOptions")]
    public class ExtractCodesOptions : IValidatableObject

    Constructors

    View Source

    ExtractCodesOptions(MethodEnum?, bool, int, int, int, List<string>)

    Initializes a new instance of the ExtractCodesOptions class.

    Declaration
    public ExtractCodesOptions(ExtractCodesOptions.MethodEnum? method = null, bool allowFallback = true, int minLength = 4, int maxLength = 10, int maxCandidates = 5, List<string> customPatterns = null)
    Parameters
    Type Name Description
    ExtractCodesOptions.MethodEnum? method

    Extraction strategy for verification codes. Unsupported strategies may fall back when allowFallback is true..

    bool allowFallback

    Allow fallback to deterministic pattern extraction when the selected method is unavailable. (default to true).

    int minLength

    Minimum code length to consider. Typical OTP values are between 4 and 8 characters. (default to 4).

    int maxLength

    Maximum code length to consider. (default to 10).

    int maxCandidates

    Maximum number of code candidates to return. Best candidate is also returned separately. (default to 5).

    List<string> customPatterns

    Optional custom regex patterns for code extraction. Each pattern should have either one capture group for the code or match the full code directly..

    Properties

    View Source

    AllowFallback

    Allow fallback to deterministic pattern extraction when the selected method is unavailable.

    Declaration
    [DataMember(Name = "allowFallback", EmitDefaultValue = true)]
    public bool AllowFallback { get; set; }
    Property Value
    Type Description
    bool

    Allow fallback to deterministic pattern extraction when the selected method is unavailable.

    View Source

    CustomPatterns

    Optional custom regex patterns for code extraction. Each pattern should have either one capture group for the code or match the full code directly.

    Declaration
    [DataMember(Name = "customPatterns", EmitDefaultValue = true)]
    public List<string> CustomPatterns { get; set; }
    Property Value
    Type Description
    List<string>

    Optional custom regex patterns for code extraction. Each pattern should have either one capture group for the code or match the full code directly.

    View Source

    MaxCandidates

    Maximum number of code candidates to return. Best candidate is also returned separately.

    Declaration
    [DataMember(Name = "maxCandidates", EmitDefaultValue = false)]
    public int MaxCandidates { get; set; }
    Property Value
    Type Description
    int

    Maximum number of code candidates to return. Best candidate is also returned separately.

    View Source

    MaxLength

    Maximum code length to consider.

    Declaration
    [DataMember(Name = "maxLength", EmitDefaultValue = false)]
    public int MaxLength { get; set; }
    Property Value
    Type Description
    int

    Maximum code length to consider.

    View Source

    Method

    Extraction strategy for verification codes. Unsupported strategies may fall back when allowFallback is true.

    Declaration
    [DataMember(Name = "method", EmitDefaultValue = true)]
    public ExtractCodesOptions.MethodEnum? Method { get; set; }
    Property Value
    Type Description
    ExtractCodesOptions.MethodEnum?

    Extraction strategy for verification codes. Unsupported strategies may fall back when allowFallback is true.

    View Source

    MinLength

    Minimum code length to consider. Typical OTP values are between 4 and 8 characters.

    Declaration
    [DataMember(Name = "minLength", EmitDefaultValue = false)]
    public int MinLength { get; set; }
    Property Value
    Type Description
    int

    Minimum code length to consider. Typical OTP values are between 4 and 8 characters.

    Methods

    View Source

    ToJson()

    Returns the JSON string presentation of the object

    Declaration
    public virtual string ToJson()
    Returns
    Type Description
    string

    JSON string presentation of the object

    View Source

    ToString()

    Returns the string presentation of the object

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    String presentation of the object

    Overrides
    object.ToString()

    Implements

    IValidatableObject
    • View Source
    In this article
    Back to top See MailSlurp website for more information.