Interface CannotChangeReservationExpiryWarning
- All Superinterfaces:
WarningObject
Contained in responses to a Cart update operation. Indicates that a ReserveOnCart Reservation was found for a Line Item but its expiration date and time cannot be changed using the Set Reservation Expiration In Minutes update action.
Example to create an instance using the builder pattern
CannotChangeReservationExpiryWarning cannotChangeReservationExpiryWarning = CannotChangeReservationExpiryWarning.builder()
.message("{message}")
.lineItemId("{lineItemId}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CannotChangeReservationExpiryWarning -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CannotChangeReservationExpiryWarningbuilder(CannotChangeReservationExpiryWarning template) create builder for CannotChangeReservationExpiryWarning instancecopyDeep()deepCopy(CannotChangeReservationExpiryWarning template) factory method to create a deep copy of CannotChangeReservationExpiryWarning@NotNull StringgetCode()Identifier for the type of warning.@NotNull StringThe ID of the Line Item.@NotNull String"The reservation expiration for line item $lineItemId cannot be changed."of()factory methodof(CannotChangeReservationExpiryWarning template) factory method to create a shallow copy CannotChangeReservationExpiryWarningvoidsetLineItemId(String lineItemId) The ID of the Line Item.voidsetMessage(String message) "The reservation expiration for line item $lineItemId cannot be changed."static com.fasterxml.jackson.core.type.TypeReference<CannotChangeReservationExpiryWarning>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.warning.WarningObject
withWarningObject
-
Field Details
-
CANNOT_CHANGE_RESERVATION_EXPIRY
discriminator value for CannotChangeReservationExpiryWarning- See Also:
-
-
Method Details
-
getCode
Description copied from interface:WarningObjectIdentifier for the type of warning.
- Specified by:
getCodein interfaceWarningObject- Returns:
- code
-
getMessage
"The reservation expiration for line item $lineItemId cannot be changed."- Specified by:
getMessagein interfaceWarningObject- Returns:
- message
-
getLineItemId
The ID of the Line Item.
- Returns:
- lineItemId
-
setMessage
"The reservation expiration for line item $lineItemId cannot be changed."- Specified by:
setMessagein interfaceWarningObject- Parameters:
message- value to be set
-
setLineItemId
The ID of the Line Item.
- Parameters:
lineItemId- value to be set
-
of
factory method- Returns:
- instance of CannotChangeReservationExpiryWarning
-
of
factory method to create a shallow copy CannotChangeReservationExpiryWarning- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CannotChangeReservationExpiryWarning copyDeep()- Specified by:
copyDeepin interfaceWarningObject
-
deepCopy
@Nullable static CannotChangeReservationExpiryWarning deepCopy(@Nullable CannotChangeReservationExpiryWarning template) factory method to create a deep copy of CannotChangeReservationExpiryWarning- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CannotChangeReservationExpiryWarning- Returns:
- builder
-
builder
static CannotChangeReservationExpiryWarningBuilder builder(CannotChangeReservationExpiryWarning template) create builder for CannotChangeReservationExpiryWarning instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCannotChangeReservationExpiryWarning
default <T> T withCannotChangeReservationExpiryWarning(Function<CannotChangeReservationExpiryWarning, 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<CannotChangeReservationExpiryWarning> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-