Interface CartLock
public interface CartLock
Indicates that the Cart is locked to prevent changes. Provides metadata about when the lock was created and which API Client initiated it.
Example to create an instance using the builder pattern
CartLock cartLock = CartLock.builder()
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.clientId("{clientId}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CartLockBuilderbuilder()builder factory method for CartLockstatic CartLockBuildercreate builder for CartLock instancecopyDeep()static CartLockfactory method to create a deep copy of CartLock@NotNull Stringidof the API Client that locked the Cart.@NotNull ZonedDateTimeDate and time (UTC) the Cart was locked.static CartLockof()factory methodstatic CartLockfactory method to create a shallow copy CartLockvoidsetClientId(String clientId) idof the API Client that locked the Cart.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the Cart was locked.static com.fasterxml.jackson.core.type.TypeReference<CartLock>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithCartLock(Function<CartLock, T> helper) accessor map function
-
Method Details
-
getCreatedAt
Date and time (UTC) the Cart was locked.
- Returns:
- createdAt
-
getClientId
idof the API Client that locked the Cart.- Returns:
- clientId
-
setCreatedAt
Date and time (UTC) the Cart was locked.
- Parameters:
createdAt- value to be set
-
setClientId
idof the API Client that locked the Cart.- Parameters:
clientId- value to be set
-
of
factory method- Returns:
- instance of CartLock
-
of
factory method to create a shallow copy CartLock- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartLock copyDeep() -
deepCopy
factory method to create a deep copy of CartLock- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartLock- Returns:
- builder
-
builder
create builder for CartLock instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartLock
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
-