Package io.voucherify.client.model
Class CodeConfig
java.lang.Object
io.voucherify.client.model.CodeConfig
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class CodeConfig
extends Object
Contains information about the config used for the voucher code. Defines the code's pattern (prefix, postfix, length, charset, etc).
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic CodeConfigCreate an instance of CodeConfig given an JSON stringCharacters that can appear in the code.Internal value, does not change anything if provided.Number of characters in a generated code (excluding prefix and postfix).A pattern for codes where hashes (#) will be replaced with random characters.A text appended after the code.A text appended before the code.inthashCode()initialCount(Integer initialCount) length(BigDecimal length) voidsetCharset(String charset) voidsetInitialCount(Integer initialCount) voidsetLength(BigDecimal length) voidsetPattern(String pattern) voidsetPostfix(String postfix) voidtoJson()Convert an instance of CodeConfig to an JSON stringtoString()
-
Field Details
-
SERIALIZED_NAME_LENGTH
- See Also:
-
SERIALIZED_NAME_CHARSET
- See Also:
-
SERIALIZED_NAME_PREFIX
- See Also:
-
SERIALIZED_NAME_POSTFIX
- See Also:
-
SERIALIZED_NAME_PATTERN
- See Also:
-
SERIALIZED_NAME_INITIAL_COUNT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
CodeConfig
public CodeConfig()
-
-
Method Details
-
length
-
getLength
Number of characters in a generated code (excluding prefix and postfix).- Returns:
- length
-
setLength
-
charset
-
getCharset
Characters that can appear in the code. Examples: - Alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic Lowercase: `abcdefghijklmnopqrstuvwxyz` - Alphabetic Uppercase: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` - Numbers: `0123456789` - Custom: a custom character set- Returns:
- charset
-
setCharset
-
prefix
-
getPrefix
A text appended before the code.- Returns:
- prefix
-
setPrefix
-
postfix
-
getPostfix
A text appended after the code.- Returns:
- postfix
-
setPostfix
-
pattern
-
getPattern
A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`.- Returns:
- pattern
-
setPattern
-
initialCount
-
getInitialCount
Internal value, does not change anything if provided.- Returns:
- initialCount
-
setInitialCount
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of CodeConfig given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of CodeConfig
- Throws:
IOException- if the JSON string is invalid with respect to CodeConfig
-
toJson
Convert an instance of CodeConfig to an JSON string- Returns:
- JSON string
-