Class PriceChangedErrorBuilder
- All Implemented Interfaces:
Builder<PriceChangedError>
Example to create an instance using the builder pattern
PriceChangedError priceChangedError = PriceChangedError.builder()
.message("{message}")
.plusLineItems(lineItemsBuilder -> lineItemsBuilder)
.shipping(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.build()
builds PriceChangedError with checking for non-null required valuesbuilds PriceChangedError without checking for non-null required valuesUnique identifiers of the Line Items for which the Price or TaxRate has changed.Plain text description of the reason for the Price change.true
if the ShippingRate has changed.Error-specific additional fields.Unique identifiers of the Line Items for which the Price or TaxRate has changed.Unique identifiers of the Line Items for which the Price or TaxRate has changed.Plain text description of the reason for the Price change.static PriceChangedErrorBuilder
of()
factory method for an instance of PriceChangedErrorBuilderstatic PriceChangedErrorBuilder
of
(PriceChangedError template) create builder for PriceChangedError instanceplusLineItems
(String... lineItems) Unique identifiers of the Line Items for which the Price or TaxRate has changed.true
if the ShippingRate has changed.Error-specific additional fields.
-
Constructor Details
-
PriceChangedErrorBuilder
public PriceChangedErrorBuilder()
-
-
Method Details
-
message
Plain text description of the reason for the Price change. For example,
"The price or tax of some line items changed at the time of placing the order: $lineItems."
.- 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 for which the Price or TaxRate has changed.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
lineItems
Unique identifiers of the Line Items for which the Price or TaxRate has changed.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
plusLineItems
Unique identifiers of the Line Items for which the Price or TaxRate has changed.
- Parameters:
lineItems
- value to be set- Returns:
- Builder
-
shipping
true
if the ShippingRate has changed.- Parameters:
shipping
- value to be set- Returns:
- Builder
-
getMessage
Plain text description of the reason for the Price change. For example,
"The price or tax of some line items changed at the time of placing the order: $lineItems."
.- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getLineItems
Unique identifiers of the Line Items for which the Price or TaxRate has changed.
- Returns:
- lineItems
-
getShipping
true
if the ShippingRate has changed.- Returns:
- shipping
-
build
builds PriceChangedError with checking for non-null required values- Specified by:
build
in interfaceBuilder<PriceChangedError>
- Returns:
- PriceChangedError
-
buildUnchecked
builds PriceChangedError without checking for non-null required values- Returns:
- PriceChangedError
-
of
factory method for an instance of PriceChangedErrorBuilder- Returns:
- builder
-
of
create builder for PriceChangedError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-