Class DiscountCodeNonApplicableErrorBuilder
- All Implemented Interfaces:
Builder<DiscountCodeNonApplicableError>
Example to create an instance using the builder pattern
DiscountCodeNonApplicableError discountCodeNonApplicableError = DiscountCodeNonApplicableError.builder()
.message("{message}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionError-specific additional fields.build()
builds DiscountCodeNonApplicableError with checking for non-null required valuesbuilds DiscountCodeNonApplicableError without checking for non-null required valuesdiscountCode
(String discountCode) Discount Code passed to the Cart.discountCodeId
(String discountCodeId) Unique identifier of the Discount Code.Discount Code passed to the Cart.Unique identifier of the Discount Code."The discountCode $discountCodeId cannot be applied to the cart."
"DoesNotExist"
or"TimeRangeNonApplicable"
Date and time (UTC) from which the Discount Code is valid.Date and time (UTC) the Discount Code validity check was last performed.Date and time (UTC) until which the Discount Code is valid.Error-specific additional fields."The discountCode $discountCodeId cannot be applied to the cart."
of()
factory method for an instance of DiscountCodeNonApplicableErrorBuilderof
(DiscountCodeNonApplicableError template) create builder for DiscountCodeNonApplicableError instance"DoesNotExist"
or"TimeRangeNonApplicable"
validFrom
(ZonedDateTime validFrom) Date and time (UTC) from which the Discount Code is valid.validityCheckTime
(ZonedDateTime validityCheckTime) Date and time (UTC) the Discount Code validity check was last performed.validUntil
(ZonedDateTime validUntil) Date and time (UTC) until which the Discount Code is valid.Error-specific additional fields.
-
Constructor Details
-
DiscountCodeNonApplicableErrorBuilder
public DiscountCodeNonApplicableErrorBuilder()
-
-
Method Details
-
message
"The discountCode $discountCodeId cannot be applied to the cart."
- 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
-
discountCode
Discount Code passed to the Cart.
- Parameters:
discountCode
- value to be set- Returns:
- Builder
-
reason
"DoesNotExist"
or"TimeRangeNonApplicable"
- Parameters:
reason
- value to be set- Returns:
- Builder
-
discountCodeId
Unique identifier of the Discount Code.
- Parameters:
discountCodeId
- value to be set- Returns:
- Builder
-
validFrom
Date and time (UTC) from which the Discount Code is valid.
- Parameters:
validFrom
- value to be set- Returns:
- Builder
-
validUntil
Date and time (UTC) until which the Discount Code is valid.
- Parameters:
validUntil
- value to be set- Returns:
- Builder
-
validityCheckTime
public DiscountCodeNonApplicableErrorBuilder validityCheckTime(@Nullable ZonedDateTime validityCheckTime) Date and time (UTC) the Discount Code validity check was last performed.
- Parameters:
validityCheckTime
- value to be set- Returns:
- Builder
-
getMessage
"The discountCode $discountCodeId cannot be applied to the cart."
- Returns:
- message
-
getValues
Error-specific additional fields.
- Returns:
- pattern properties
-
getDiscountCode
Discount Code passed to the Cart.
- Returns:
- discountCode
-
getReason
"DoesNotExist"
or"TimeRangeNonApplicable"
- Returns:
- reason
-
getDiscountCodeId
Unique identifier of the Discount Code.
- Returns:
- discountCodeId
-
getValidFrom
Date and time (UTC) from which the Discount Code is valid.
- Returns:
- validFrom
-
getValidUntil
Date and time (UTC) until which the Discount Code is valid.
- Returns:
- validUntil
-
getValidityCheckTime
Date and time (UTC) the Discount Code validity check was last performed.
- Returns:
- validityCheckTime
-
build
builds DiscountCodeNonApplicableError with checking for non-null required values- Specified by:
build
in interfaceBuilder<DiscountCodeNonApplicableError>
- Returns:
- DiscountCodeNonApplicableError
-
buildUnchecked
builds DiscountCodeNonApplicableError without checking for non-null required values- Returns:
- DiscountCodeNonApplicableError
-
of
factory method for an instance of DiscountCodeNonApplicableErrorBuilder- Returns:
- builder
-
of
create builder for DiscountCodeNonApplicableError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-