Class DiscountCodeNonApplicableErrorImpl
- All Implemented Interfaces:
DiscountCodeNonApplicableError
,ErrorObject
,io.vrap.rmf.base.client.ModelBase
Returned when the Cart contains a Discount Code with a DiscountCodeState other than MatchesCart
.
The error is returned as a failed response to:
- Create Order from Cart and Create Order in Store from Cart requests on Orders.
- Create Order from Cart and Create Order in Store from Cart requests on My Orders.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Field Summary
Fields inherited from interface com.commercetools.api.models.error.DiscountCodeNonApplicableError
DISCOUNT_CODE_NON_APPLICABLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getCode()
Error identifier.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.int
hashCode()
void
setDiscountCode
(String discountCode) Discount Code passed to the Cart.void
setDiscountCodeId
(String discountCodeId) Unique identifier of the Discount Code.void
setMessage
(String message) "The discountCode $discountCodeId cannot be applied to the cart."
void
"DoesNotExist"
or"TimeRangeNonApplicable"
void
setValidFrom
(ZonedDateTime validFrom) Date and time (UTC) from which the Discount Code is valid.void
setValidityCheckTime
(ZonedDateTime validityCheckTime) Date and time (UTC) the Discount Code validity check was last performed.void
setValidUntil
(ZonedDateTime validUntil) Date and time (UTC) until which the Discount Code is valid.void
Error-specific additional fields.values()
Error-specific additional fields.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.error.DiscountCodeNonApplicableError
withDiscountCodeNonApplicableError
Methods inherited from interface com.commercetools.api.models.error.ErrorObject
withErrorObject
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
DiscountCodeNonApplicableErrorImpl
public DiscountCodeNonApplicableErrorImpl()create empty instance
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceDiscountCodeNonApplicableError
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"The discountCode $discountCodeId cannot be applied to the cart."
- Specified by:
getMessage
in interfaceDiscountCodeNonApplicableError
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
values
Error-specific additional fields.
- Specified by:
values
in interfaceErrorObject
- Returns:
- map of the pattern property values
-
getDiscountCode
Discount Code passed to the Cart.
- Specified by:
getDiscountCode
in interfaceDiscountCodeNonApplicableError
- Returns:
- discountCode
-
getReason
"DoesNotExist"
or"TimeRangeNonApplicable"
- Specified by:
getReason
in interfaceDiscountCodeNonApplicableError
- Returns:
- reason
-
getDiscountCodeId
Unique identifier of the Discount Code.
- Specified by:
getDiscountCodeId
in interfaceDiscountCodeNonApplicableError
- Returns:
- discountCodeId
-
getValidFrom
Date and time (UTC) from which the Discount Code is valid.
- Specified by:
getValidFrom
in interfaceDiscountCodeNonApplicableError
- Returns:
- validFrom
-
getValidUntil
Date and time (UTC) until which the Discount Code is valid.
- Specified by:
getValidUntil
in interfaceDiscountCodeNonApplicableError
- Returns:
- validUntil
-
getValidityCheckTime
Date and time (UTC) the Discount Code validity check was last performed.
- Specified by:
getValidityCheckTime
in interfaceDiscountCodeNonApplicableError
- Returns:
- validityCheckTime
-
setMessage
Description copied from interface:DiscountCodeNonApplicableError
"The discountCode $discountCodeId cannot be applied to the cart."
- Specified by:
setMessage
in interfaceDiscountCodeNonApplicableError
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setValue
Description copied from interface:ErrorObject
Error-specific additional fields.
- Specified by:
setValue
in interfaceErrorObject
- Parameters:
key
- property namevalue
- property value
-
setDiscountCode
Description copied from interface:DiscountCodeNonApplicableError
Discount Code passed to the Cart.
- Specified by:
setDiscountCode
in interfaceDiscountCodeNonApplicableError
- Parameters:
discountCode
- value to be set
-
setReason
Description copied from interface:DiscountCodeNonApplicableError
"DoesNotExist"
or"TimeRangeNonApplicable"
- Specified by:
setReason
in interfaceDiscountCodeNonApplicableError
- Parameters:
reason
- value to be set
-
setDiscountCodeId
Description copied from interface:DiscountCodeNonApplicableError
Unique identifier of the Discount Code.
- Specified by:
setDiscountCodeId
in interfaceDiscountCodeNonApplicableError
- Parameters:
discountCodeId
- value to be set
-
setValidFrom
Description copied from interface:DiscountCodeNonApplicableError
Date and time (UTC) from which the Discount Code is valid.
- Specified by:
setValidFrom
in interfaceDiscountCodeNonApplicableError
- Parameters:
validFrom
- value to be set
-
setValidUntil
Description copied from interface:DiscountCodeNonApplicableError
Date and time (UTC) until which the Discount Code is valid.
- Specified by:
setValidUntil
in interfaceDiscountCodeNonApplicableError
- Parameters:
validUntil
- value to be set
-
setValidityCheckTime
Description copied from interface:DiscountCodeNonApplicableError
Date and time (UTC) the Discount Code validity check was last performed.
- Specified by:
setValidityCheckTime
in interfaceDiscountCodeNonApplicableError
- Parameters:
validityCheckTime
- value to be set
-
equals
-
hashCode
-