Package io.voucherify.client.model
Class Session
java.lang.Object
io.voucherify.client.model.Session
@Generated("org.openapitools.codegen.languages.JavaClientCodegen")
public class Session
extends Object
Session
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumDefines the type of unit in which the session time is counted.static enumThis parameter is required to establish a new session. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic SessionCreate an instance of Session given an JSON stringgetKey()The session unique ID assigned by Voucherify or your own unique session ID.getTtl()Value for the period of time that the session is active.Defines the type of unit in which the session time is counted.getType()This parameter is required to establish a new session.inthashCode()voidvoidsetTtl(BigDecimal ttl) voidsetTtlUnit(Session.TtlUnitEnum ttlUnit) voidsetType(Session.TypeEnum type) toJson()Convert an instance of Session to an JSON stringtoString()ttl(BigDecimal ttl) ttlUnit(Session.TtlUnitEnum ttlUnit) type(Session.TypeEnum type)
-
Field Details
-
SERIALIZED_NAME_KEY
- See Also:
-
SERIALIZED_NAME_TYPE
- See Also:
-
SERIALIZED_NAME_TTL
- See Also:
-
SERIALIZED_NAME_TTL_UNIT
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
Session
public Session()
-
-
Method Details
-
key
-
getKey
The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated.- Returns:
- key
-
setKey
-
type
-
getType
This parameter is required to establish a new session.- Returns:
- type
-
setType
-
ttl
-
getTtl
Value for the period of time that the session is active. Units for this parameter are defined by the session.ttl_unit parameter.- Returns:
- ttl
-
setTtl
-
ttlUnit
-
getTtlUnit
Defines the type of unit in which the session time is counted.- Returns:
- ttlUnit
-
setTtlUnit
-
equals
-
hashCode
public int hashCode() -
toString
-
fromJson
Create an instance of Session given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Session
- Throws:
IOException- if the JSON string is invalid with respect to Session
-
toJson
Convert an instance of Session to an JSON string- Returns:
- JSON string
-