Class StagedOrderSetDirectDiscountsActionImpl
java.lang.Object
com.commercetools.api.models.order_edit.StagedOrderSetDirectDiscountsActionImpl
- All Implemented Interfaces:
StagedOrderSetDirectDiscountsAction
,StagedOrderUpdateAction
,ResourceUpdateAction<StagedOrderUpdateAction>
,io.vrap.rmf.base.client.ModelBase
public class StagedOrderSetDirectDiscountsActionImpl
extends Object
implements StagedOrderSetDirectDiscountsAction, io.vrap.rmf.base.client.ModelBase
Adds a DirectDiscount, but only if no DiscountCode has been added to the Order. Either a Discount Code or a Direct Discount can exist on a Order at the same time.
-
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.order_edit.StagedOrderSetDirectDiscountsAction
SET_DIRECT_DISCOUNTS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
If set, all existing Direct Discounts are replaced.int
hashCode()
void
setDiscounts
(DirectDiscountDraft... discounts) If set, all existing Direct Discounts are replaced.void
setDiscounts
(List<DirectDiscountDraft> discounts) If set, all existing Direct Discounts are replaced.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
Methods inherited from interface com.commercetools.api.models.order_edit.StagedOrderSetDirectDiscountsAction
withStagedOrderSetDirectDiscountsAction
Methods inherited from interface com.commercetools.api.models.order.StagedOrderUpdateAction
withStagedOrderUpdateAction
-
Constructor Details
-
StagedOrderSetDirectDiscountsActionImpl
create empty instance
-
-
Method Details
-
getAction
- Specified by:
getAction
in interfaceResourceUpdateAction<StagedOrderUpdateAction>
- Specified by:
getAction
in interfaceStagedOrderUpdateAction
- Returns:
- action
-
getDiscounts
- If set, all existing Direct Discounts are replaced. The discounts apply in the order they are added to the list.
- If empty, all existing Direct Discounts are removed and all affected prices on the Order are recalculated.
- Specified by:
getDiscounts
in interfaceStagedOrderSetDirectDiscountsAction
- Returns:
- discounts
-
setDiscounts
Description copied from interface:StagedOrderSetDirectDiscountsAction
- If set, all existing Direct Discounts are replaced. The discounts apply in the order they are added to the list.
- If empty, all existing Direct Discounts are removed and all affected prices on the Order are recalculated.
- Specified by:
setDiscounts
in interfaceStagedOrderSetDirectDiscountsAction
- Parameters:
discounts
- values to be set
-
setDiscounts
Description copied from interface:StagedOrderSetDirectDiscountsAction
- If set, all existing Direct Discounts are replaced. The discounts apply in the order they are added to the list.
- If empty, all existing Direct Discounts are removed and all affected prices on the Order are recalculated.
- Specified by:
setDiscounts
in interfaceStagedOrderSetDirectDiscountsAction
- Parameters:
discounts
- values to be set
-
equals
-
hashCode
-