Class Session

java.lang.Object
io.voucherify.client.model.Session

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class Session extends Object
Session
  • Field Details

  • Constructor Details

    • Session

      public Session()
  • Method Details

    • key

      public Session key(String key)
    • getKey

      @Nullable public String 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

      public void setKey(String key)
    • type

      public Session type(Session.TypeEnum type)
    • getType

      @Nullable public Session.TypeEnum getType()
      This parameter is required to establish a new session.
      Returns:
      type
    • setType

      public void setType(Session.TypeEnum type)
    • ttl

      public Session ttl(BigDecimal ttl)
    • getTtl

      @Nullable public BigDecimal 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

      public void setTtl(BigDecimal ttl)
    • ttlUnit

      public Session ttlUnit(Session.TtlUnitEnum ttlUnit)
    • getTtlUnit

      @Nullable public Session.TtlUnitEnum getTtlUnit()
      Defines the type of unit in which the session time is counted.
      Returns:
      ttlUnit
    • setTtlUnit

      public void setTtlUnit(Session.TtlUnitEnum ttlUnit)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • fromJson

      public static Session fromJson(String jsonString) throws IOException
      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

      public String toJson()
      Convert an instance of Session to an JSON string
      Returns:
      JSON string