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 or ApplicationStoppedByGroupBestDeal.
The error is returned as a failed response to:
- Create Cart and Create Cart in Store requests.
- Create Cart and Create Cart in Store requests.
- Create Cart in BusinessUnit request on Associate Carts.
- 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.
- Add DiscountCode update action on Carts, if the associated Cart Discounts are inactive or invalid, or belongs to a different Store than the Cart.
- Add DiscountCode update action on My Carts, if the associated Cart Discounts are inactive or invalid, or belongs to a different Store than the Cart.
- Add DiscountCode update action on Order Edits, if the associated Cart Discounts are inactive or invalid, or belongs to a different Store than the Order.
- Create Order from Cart in BusinessUnit request on Associate 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopyDeep()booleangetCode()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.inthashCode()voidsetDiscountCode(String discountCode) Discount Code passed to the Cart.voidsetDiscountCodeId(String discountCodeId) Unique identifier of the Discount Code.voidsetMessage(String message) "The discountCode $discountCodeId cannot be applied to the cart."void"DoesNotExist"or"TimeRangeNonApplicable"voidsetValidFrom(ZonedDateTime validFrom) Date and time (UTC) from which the Discount Code is valid.voidsetValidityCheckTime(ZonedDateTime validityCheckTime) Date and time (UTC) the Discount Code validity check was last performed.voidsetValidUntil(ZonedDateTime validUntil) Date and time (UTC) until which the Discount Code is valid.voidError-specific additional fields.toString()values()Error-specific additional fields.Methods inherited from interface com.commercetools.api.models.error.DiscountCodeNonApplicableError
withDiscountCodeNonApplicableErrorMethods inherited from interface com.commercetools.api.models.error.ErrorObject
withErrorObjectMethods 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:ErrorObjectError identifier.
- Specified by:
getCodein interfaceDiscountCodeNonApplicableError- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"The discountCode $discountCodeId cannot be applied to the cart."- Specified by:
getMessagein interfaceDiscountCodeNonApplicableError- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
values
Error-specific additional fields.
- Specified by:
valuesin interfaceErrorObject- Returns:
- map of the pattern property values
-
getDiscountCode
Discount Code passed to the Cart.
- Specified by:
getDiscountCodein interfaceDiscountCodeNonApplicableError- Returns:
- discountCode
-
getReason
"DoesNotExist"or"TimeRangeNonApplicable"- Specified by:
getReasonin interfaceDiscountCodeNonApplicableError- Returns:
- reason
-
getDiscountCodeId
Unique identifier of the Discount Code.
- Specified by:
getDiscountCodeIdin interfaceDiscountCodeNonApplicableError- Returns:
- discountCodeId
-
getValidFrom
Date and time (UTC) from which the Discount Code is valid.
- Specified by:
getValidFromin interfaceDiscountCodeNonApplicableError- Returns:
- validFrom
-
getValidUntil
Date and time (UTC) until which the Discount Code is valid.
- Specified by:
getValidUntilin interfaceDiscountCodeNonApplicableError- Returns:
- validUntil
-
getValidityCheckTime
Date and time (UTC) the Discount Code validity check was last performed.
- Specified by:
getValidityCheckTimein interfaceDiscountCodeNonApplicableError- Returns:
- validityCheckTime
-
setMessage
Description copied from interface:DiscountCodeNonApplicableError"The discountCode $discountCodeId cannot be applied to the cart."- Specified by:
setMessagein interfaceDiscountCodeNonApplicableError- Specified by:
setMessagein interfaceErrorObject- Parameters:
message- value to be set
-
setValue
Description copied from interface:ErrorObjectError-specific additional fields.
- Specified by:
setValuein interfaceErrorObject- Parameters:
key- property namevalue- property value
-
setDiscountCode
Description copied from interface:DiscountCodeNonApplicableErrorDiscount Code passed to the Cart.
- Specified by:
setDiscountCodein interfaceDiscountCodeNonApplicableError- Parameters:
discountCode- value to be set
-
setReason
Description copied from interface:DiscountCodeNonApplicableError"DoesNotExist"or"TimeRangeNonApplicable"- Specified by:
setReasonin interfaceDiscountCodeNonApplicableError- Parameters:
reason- value to be set
-
setDiscountCodeId
Description copied from interface:DiscountCodeNonApplicableErrorUnique identifier of the Discount Code.
- Specified by:
setDiscountCodeIdin interfaceDiscountCodeNonApplicableError- Parameters:
discountCodeId- value to be set
-
setValidFrom
Description copied from interface:DiscountCodeNonApplicableErrorDate and time (UTC) from which the Discount Code is valid.
- Specified by:
setValidFromin interfaceDiscountCodeNonApplicableError- Parameters:
validFrom- value to be set
-
setValidUntil
Description copied from interface:DiscountCodeNonApplicableErrorDate and time (UTC) until which the Discount Code is valid.
- Specified by:
setValidUntilin interfaceDiscountCodeNonApplicableError- Parameters:
validUntil- value to be set
-
setValidityCheckTime
Description copied from interface:DiscountCodeNonApplicableErrorDate and time (UTC) the Discount Code validity check was last performed.
- Specified by:
setValidityCheckTimein interfaceDiscountCodeNonApplicableError- Parameters:
validityCheckTime- value to be set
-
equals
-
hashCode
public int hashCode() -
toString
-
copyDeep
- Specified by:
copyDeepin interfaceDiscountCodeNonApplicableError- Specified by:
copyDeepin interfaceErrorObject
-