Interface CannotCreateReservationWarning
- All Superinterfaces:
WarningObject
Contained in responses to a Cart operation. Indicates that a reservation could not be created for the specified Product.
Example to create an instance using the builder pattern
CannotCreateReservationWarning cannotCreateReservationWarning = CannotCreateReservationWarning.builder()
.message("{message}")
.productId("{productId}")
.quantity(0.3)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CannotCreateReservationWarning -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CannotCreateReservationWarningbuilder(CannotCreateReservationWarning template) create builder for CannotCreateReservationWarning instancecopyDeep()deepCopy(CannotCreateReservationWarning template) factory method to create a deep copy of CannotCreateReservationWarning@NotNull StringgetCode()Identifier for the type of warning.@NotNull String"Failed to create a reservation for product $productId (SKU: $sku, Supply Channel: $supplyChannel) with quantity $quantity."@NotNull StringThe ID of the Product for which the reservation could not be created.@NotNull DoubleThe quantity for which the reservation could not be created.getSku()The SKU of the Product Variant for which the reservation could not be created.The ID of the Supply Channel for which the reservation could not be created.of()factory methodof(CannotCreateReservationWarning template) factory method to create a shallow copy CannotCreateReservationWarningvoidsetMessage(String message) "Failed to create a reservation for product $productId (SKU: $sku, Supply Channel: $supplyChannel) with quantity $quantity."voidsetProductId(String productId) The ID of the Product for which the reservation could not be created.voidsetQuantity(Double quantity) The quantity for which the reservation could not be created.voidThe SKU of the Product Variant for which the reservation could not be created.voidsetSupplyChannel(String supplyChannel) The ID of the Supply Channel for which the reservation could not be created.static com.fasterxml.jackson.core.type.TypeReference<CannotCreateReservationWarning>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_CREATE_RESERVATION
discriminator value for CannotCreateReservationWarning- See Also:
-
-
Method Details
-
getCode
Description copied from interface:WarningObjectIdentifier for the type of warning.
- Specified by:
getCodein interfaceWarningObject- Returns:
- code
-
getMessage
"Failed to create a reservation for product $productId (SKU: $sku, Supply Channel: $supplyChannel) with quantity $quantity."- Specified by:
getMessagein interfaceWarningObject- Returns:
- message
-
getProductId
The ID of the Product for which the reservation could not be created.
- Returns:
- productId
-
getSku
String getSku()The SKU of the Product Variant for which the reservation could not be created.
- Returns:
- sku
-
getSupplyChannel
String getSupplyChannel()The ID of the Supply Channel for which the reservation could not be created.
- Returns:
- supplyChannel
-
getQuantity
The quantity for which the reservation could not be created.
- Returns:
- quantity
-
setMessage
"Failed to create a reservation for product $productId (SKU: $sku, Supply Channel: $supplyChannel) with quantity $quantity."- Specified by:
setMessagein interfaceWarningObject- Parameters:
message- value to be set
-
setProductId
The ID of the Product for which the reservation could not be created.
- Parameters:
productId- value to be set
-
setSku
The SKU of the Product Variant for which the reservation could not be created.
- Parameters:
sku- value to be set
-
setSupplyChannel
The ID of the Supply Channel for which the reservation could not be created.
- Parameters:
supplyChannel- value to be set
-
setQuantity
The quantity for which the reservation could not be created.
- Parameters:
quantity- value to be set
-
of
factory method- Returns:
- instance of CannotCreateReservationWarning
-
of
factory method to create a shallow copy CannotCreateReservationWarning- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CannotCreateReservationWarning copyDeep()- Specified by:
copyDeepin interfaceWarningObject
-
deepCopy
@Nullable static CannotCreateReservationWarning deepCopy(@Nullable CannotCreateReservationWarning template) factory method to create a deep copy of CannotCreateReservationWarning- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CannotCreateReservationWarning- Returns:
- builder
-
builder
create builder for CannotCreateReservationWarning instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCannotCreateReservationWarning
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<CannotCreateReservationWarning> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-