Class OutOfStockErrorBuilder
java.lang.Object
com.commercetools.api.models.error.OutOfStockErrorBuilder
- All Implemented Interfaces:
Builder<OutOfStockError>
OutOfStockErrorBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OutOfStockError outOfStockError = OutOfStockError.builder()
.message("{message}")
.plusLineItems(lineItemsBuilder -> lineItemsBuilder)
.plusSkus(skusBuilder -> skusBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.build()
builds OutOfStockError with checking for non-null required valuesbuilds OutOfStockError without checking for non-null required valuesUnique identifiers of the Line Items that are out of stock."Some line items are out of stock at the time of placing the order: $itemSku."
getSkus()
SKUs of the Line Items that are out of stock.Error-specific additional fields.Unique identifiers of the Line Items that are out of stock.Unique identifiers of the Line Items that are out of stock."Some line items are out of stock at the time of placing the order: $itemSku."
static OutOfStockErrorBuilder
of()
factory method for an instance of OutOfStockErrorBuilderstatic OutOfStockErrorBuilder
of
(OutOfStockError template) create builder for OutOfStockError instanceplusLineItems
(String... lineItems) Unique identifiers of the Line Items that are out of stock.SKUs of the Line Items that are out of stock.SKUs of the Line Items that are out of stock.SKUs of the Line Items that are out of stock.Error-specific additional fields.
-
Constructor Details
-
OutOfStockErrorBuilder
public OutOfStockErrorBuilder()
-
-
Method Details
-
message
"Some line items are out of stock at the time of placing the order: $itemSku."
- Parameters:
message
- value to be set- Returns:
- Builder
-
values
Error-specific additional fields.
- Parameters:
values
- properties to be set- Returns:
- Builder
-
addValue
Error-specific additional fields.
- Parameters:
key
- property namevalue
- property value- Returns:
- Builder
-
lineItems
Unique identifiers of the Line Items that are out of stock.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
lineItems
Unique identifiers of the Line Items that are out of stock.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
plusLineItems
Unique identifiers of the Line Items that are out of stock.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
skus
SKUs of the Line Items that are out of stock.
- Parameters:
skus
- value to be set- Returns:
- Builder
-
skus
SKUs of the Line Items that are out of stock.
- Parameters:
skus
- value to be set- Returns:
- Builder
-
plusSkus
SKUs of the Line Items that are out of stock.
- Parameters:
skus
- value to be set- Returns:
- Builder
-
getMessage
"Some line items are out of stock at the time of placing the order: $itemSku."
- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getLineItems
Unique identifiers of the Line Items that are out of stock.
- Returns:
- lineItems
-
getSkus
SKUs of the Line Items that are out of stock.
- Returns:
- skus
-
build
builds OutOfStockError with checking for non-null required values- Specified by:
build
in interfaceBuilder<OutOfStockError>
- Returns:
- OutOfStockError
-
buildUnchecked
builds OutOfStockError without checking for non-null required values- Returns:
- OutOfStockError
-
of
factory method for an instance of OutOfStockErrorBuilder- Returns:
- builder
-
of
create builder for OutOfStockError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-