Interface CustomerToken


public interface CustomerToken
CustomerToken
Example to create an instance using the builder pattern

     CustomerToken customerToken = CustomerToken.builder()
             .id("{id}")
             .customerId("{customerId}")
             .value("{value}")
             .expiresAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .build()
 
  • Method Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the token.

      Returns:
      id
    • getCustomerId

      @NotNull @NotNull String getCustomerId()

      The id of the Customer.

      Returns:
      customerId
    • getValue

      @NotNull @NotNull String getValue()

      Value of the token.

      Returns:
      value
    • getExpiresAt

      @NotNull @NotNull ZonedDateTime getExpiresAt()

      Date and time (UTC) the token expires.

      Returns:
      expiresAt
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the token was initially created.

      Returns:
      createdAt
    • getLastModifiedAt

      ZonedDateTime getLastModifiedAt()

      When the token is created, lastModifiedAt is set to createdAt.

      Returns:
      lastModifiedAt
    • setId

      void setId(String id)

      Unique identifier of the token.

      Parameters:
      id - value to be set
    • setCustomerId

      void setCustomerId(String customerId)

      The id of the Customer.

      Parameters:
      customerId - value to be set
    • setValue

      void setValue(String value)

      Value of the token.

      Parameters:
      value - value to be set
    • setExpiresAt

      void setExpiresAt(ZonedDateTime expiresAt)

      Date and time (UTC) the token expires.

      Parameters:
      expiresAt - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the token was initially created.

      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      When the token is created, lastModifiedAt is set to createdAt.

      Parameters:
      lastModifiedAt - value to be set
    • of

      static CustomerToken of()
      factory method
      Returns:
      instance of CustomerToken
    • of

      static CustomerToken of(CustomerToken template)
      factory method to create a shallow copy CustomerToken
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static CustomerToken deepCopy(@Nullable CustomerToken template)
      factory method to create a deep copy of CustomerToken
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static CustomerTokenBuilder builder()
      builder factory method for CustomerToken
      Returns:
      builder
    • builder

      static CustomerTokenBuilder builder(CustomerToken template)
      create builder for CustomerToken instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCustomerToken

      default <T> T withCustomerToken(Function<CustomerToken,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CustomerToken> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference