Class PriceTierDraftImpl
- All Implemented Interfaces:
PriceTierDraft
,io.vrap.rmf.base.client.Draft<PriceTierDraft>
,io.vrap.rmf.base.client.ModelBase
Specifies a Price tier that applies when the minimum quantity for the LineItem of a ProductVariant with the related Price is reached in a Cart.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Minimum quantity this Price tier is valid for.getValue()
Money value that applies when theminimumQuantity
is greater than or equal to the LineItemquantity
.int
hashCode()
void
setMinimumQuantity
(Long minimumQuantity) Minimum quantity this Price tier is valid for.void
Money value that applies when theminimumQuantity
is greater than or equal to the LineItemquantity
.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.common.PriceTierDraft
withPriceTierDraft
-
Constructor Details
-
PriceTierDraftImpl
public PriceTierDraftImpl()create empty instance
-
-
Method Details
-
getMinimumQuantity
Minimum quantity this Price tier is valid for.
The minimum quantity is always greater than or equal to 2. The base Price is interpreted as valid for a minimum quantity equal to 1. A Price or StandalonePrice cannot contain more than one tier with the same
minimumQuantity
. In the case one of the constraint is not met an InvalidField is returned.- Specified by:
getMinimumQuantity
in interfacePriceTierDraft
- Returns:
- minimumQuantity
-
getValue
Money value that applies when the
minimumQuantity
is greater than or equal to the LineItemquantity
.The
currencyCode
of a Price tier must be the same as thecurrencyCode
in thevalue
of the related Price.- Specified by:
getValue
in interfacePriceTierDraft
- Returns:
- value
-
setMinimumQuantity
Description copied from interface:PriceTierDraft
Minimum quantity this Price tier is valid for.
The minimum quantity is always greater than or equal to 2. The base Price is interpreted as valid for a minimum quantity equal to 1. A Price or StandalonePrice cannot contain more than one tier with the same
minimumQuantity
. In the case one of the constraint is not met an InvalidField is returned.- Specified by:
setMinimumQuantity
in interfacePriceTierDraft
- Parameters:
minimumQuantity
- value to be set
-
setValue
Description copied from interface:PriceTierDraft
Money value that applies when the
minimumQuantity
is greater than or equal to the LineItemquantity
.The
currencyCode
of a Price tier must be the same as thecurrencyCode
in thevalue
of the related Price.- Specified by:
setValue
in interfacePriceTierDraft
- Parameters:
value
- value to be set
-
equals
-
hashCode
public int hashCode()
-