Interface CannotUpdateReservationWarning
- All Superinterfaces:
WarningObject
Contained in responses to a Cart operation. Indicates that the reservation for a Line Item could not be updated to the requested quantity. The existing reserved amount remains unchanged.
Example to create an instance using the builder pattern
CannotUpdateReservationWarning cannotUpdateReservationWarning = CannotUpdateReservationWarning.builder()
.message("{message}")
.lineItemId("{lineItemId}")
.requestedQuantity(0.3)
.reservedQuantity(0.3)
.productId("{productId}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CannotUpdateReservationWarning -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CannotUpdateReservationWarningbuilder(CannotUpdateReservationWarning template) create builder for CannotUpdateReservationWarning instancecopyDeep()deepCopy(CannotUpdateReservationWarning template) factory method to create a deep copy of CannotUpdateReservationWarning@NotNull StringgetCode()Identifier for the type of warning.@NotNull StringThe ID of the Line Item.@NotNull String"Failed to update the reservation for line item $lineItemId (Product ID: $productId, SKU: $sku, Supply Channel: $supplyChannel) to a quantity of $requestedQuantity.@NotNull StringThe ID of the Product associated with the Line Item.@NotNull DoubleThe quantity that was requested for the Line Item.@NotNull DoubleThe quantity that remains reserved for the Line Item.getSku()The SKU of the Product Variant associated with the Line Item.The ID of the Supply Channel associated with the reservation.of()factory methodof(CannotUpdateReservationWarning template) factory method to create a shallow copy CannotUpdateReservationWarningvoidsetLineItemId(String lineItemId) The ID of the Line Item.voidsetMessage(String message) "Failed to update the reservation for line item $lineItemId (Product ID: $productId, SKU: $sku, Supply Channel: $supplyChannel) to a quantity of $requestedQuantity.voidsetProductId(String productId) The ID of the Product associated with the Line Item.voidsetRequestedQuantity(Double requestedQuantity) The quantity that was requested for the Line Item.voidsetReservedQuantity(Double reservedQuantity) The quantity that remains reserved for the Line Item.voidThe SKU of the Product Variant associated with the Line Item.voidsetSupplyChannel(String supplyChannel) The ID of the Supply Channel associated with the reservation.static com.fasterxml.jackson.core.type.TypeReference<CannotUpdateReservationWarning>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_UPDATE_RESERVATION
discriminator value for CannotUpdateReservationWarning- See Also:
-
-
Method Details
-
getCode
Description copied from interface:WarningObjectIdentifier for the type of warning.
- Specified by:
getCodein interfaceWarningObject- Returns:
- code
-
getMessage
"Failed to update the reservation for line item $lineItemId (Product ID: $productId, SKU: $sku, Supply Channel: $supplyChannel) to a quantity of $requestedQuantity. The reserved amount is still $reservedQuantity."- Specified by:
getMessagein interfaceWarningObject- Returns:
- message
-
getLineItemId
The ID of the Line Item.
- Returns:
- lineItemId
-
getRequestedQuantity
The quantity that was requested for the Line Item.
- Returns:
- requestedQuantity
-
getReservedQuantity
The quantity that remains reserved for the Line Item.
- Returns:
- reservedQuantity
-
getProductId
The ID of the Product associated with the Line Item.
- Returns:
- productId
-
getSku
String getSku()The SKU of the Product Variant associated with the Line Item.
- Returns:
- sku
-
getSupplyChannel
String getSupplyChannel()The ID of the Supply Channel associated with the reservation.
- Returns:
- supplyChannel
-
setMessage
"Failed to update the reservation for line item $lineItemId (Product ID: $productId, SKU: $sku, Supply Channel: $supplyChannel) to a quantity of $requestedQuantity. The reserved amount is still $reservedQuantity."- Specified by:
setMessagein interfaceWarningObject- Parameters:
message- value to be set
-
setLineItemId
The ID of the Line Item.
- Parameters:
lineItemId- value to be set
-
setRequestedQuantity
The quantity that was requested for the Line Item.
- Parameters:
requestedQuantity- value to be set
-
setReservedQuantity
The quantity that remains reserved for the Line Item.
- Parameters:
reservedQuantity- value to be set
-
setProductId
The ID of the Product associated with the Line Item.
- Parameters:
productId- value to be set
-
setSku
The SKU of the Product Variant associated with the Line Item.
- Parameters:
sku- value to be set
-
setSupplyChannel
The ID of the Supply Channel associated with the reservation.
- Parameters:
supplyChannel- value to be set
-
of
factory method- Returns:
- instance of CannotUpdateReservationWarning
-
of
factory method to create a shallow copy CannotUpdateReservationWarning- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CannotUpdateReservationWarning copyDeep()- Specified by:
copyDeepin interfaceWarningObject
-
deepCopy
@Nullable static CannotUpdateReservationWarning deepCopy(@Nullable CannotUpdateReservationWarning template) factory method to create a deep copy of CannotUpdateReservationWarning- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CannotUpdateReservationWarning- Returns:
- builder
-
builder
create builder for CannotUpdateReservationWarning instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCannotUpdateReservationWarning
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<CannotUpdateReservationWarning> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-