Class ExtractCodesOptions
Options for extracting verification codes from email or SMS content. Use method to control extraction strategy and allowFallback to control strictness.
Implements
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "ExtractCodesOptions")]
public class ExtractCodesOptions : IValidatableObject
Constructors
View SourceExtractCodesOptions(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 SourceAllowFallback
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. |
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. |
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. |
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. |
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. |
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 SourceToJson()
Returns the JSON string presentation of the object
Declaration
public virtual string ToJson()
Returns
| Type | Description |
|---|---|
| string | JSON string presentation of the object |
ToString()
Returns the string presentation of the object
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | String presentation of the object |