Interface CustomerToken
public interface CustomerToken
CustomerToken
Example to create an instance using the builder pattern
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 Summary
Modifier and TypeMethodDescriptionstatic CustomerTokenBuilder
builder()
builder factory method for CustomerTokenstatic CustomerTokenBuilder
builder
(CustomerToken template) create builder for CustomerToken instancestatic CustomerToken
deepCopy
(CustomerToken template) factory method to create a deep copy of CustomerToken@NotNull ZonedDateTime
Date and time (UTC) the token was initially created.@NotNull String
Theid
of the Customer.@NotNull ZonedDateTime
Date and time (UTC) the token expires.@NotNull String
getId()
Unique identifier of the token.When the token is created,lastModifiedAt
is set tocreatedAt
.@NotNull String
getValue()
Value of the token.static CustomerToken
of()
factory methodstatic CustomerToken
of
(CustomerToken template) factory method to create a shallow copy CustomerTokenvoid
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the token was initially created.void
setCustomerId
(String customerId) Theid
of the Customer.void
setExpiresAt
(ZonedDateTime expiresAt) Date and time (UTC) the token expires.void
Unique identifier of the token.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) When the token is created,lastModifiedAt
is set tocreatedAt
.void
Value of the token.static com.fasterxml.jackson.core.type.TypeReference<CustomerToken>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCustomerToken
(Function<CustomerToken, T> helper) accessor map function
-
Method Details
-
getId
Unique identifier of the token.
- Returns:
- id
-
getCustomerId
The
id
of the Customer.- Returns:
- customerId
-
getValue
Value of the token.
- Returns:
- value
-
getExpiresAt
Date and time (UTC) the token expires.
- Returns:
- expiresAt
-
getCreatedAt
Date and time (UTC) the token was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
ZonedDateTime getLastModifiedAt()When the token is created,
lastModifiedAt
is set tocreatedAt
.- Returns:
- lastModifiedAt
-
setId
Unique identifier of the token.
- Parameters:
id
- value to be set
-
setCustomerId
The
id
of the Customer.- Parameters:
customerId
- value to be set
-
setValue
Value of the token.
- Parameters:
value
- value to be set
-
setExpiresAt
Date and time (UTC) the token expires.
- Parameters:
expiresAt
- value to be set
-
setCreatedAt
Date and time (UTC) the token was initially created.
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
When the token is created,
lastModifiedAt
is set tocreatedAt
.- Parameters:
lastModifiedAt
- value to be set
-
of
factory method- Returns:
- instance of CustomerToken
-
of
factory method to create a shallow copy CustomerToken- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CustomerToken- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CustomerToken- Returns:
- builder
-
builder
create builder for CustomerToken instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCustomerToken
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-