Class PriceImpl
- All Implemented Interfaces:
Price
,Customizable<Price>
,WithKey
,io.vrap.rmf.base.client.ModelBase
The representation for prices embedded in LineItems and in ProductVariants when the ProductPriceMode is Embedded
. For the Standalone
ProductPriceMode refer to StandalonePrice.
-
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
ProductDistribution
Channel for which this Price is valid.Country for which this Price is valid.Custom Fields defined for the Price.CustomerGroup for which this Price is valid.Is set if a ProductDiscount has been applied.getId()
Unique identifier of this Price.getKey()
User-defined identifier of the Price.getTiers()
Present if different Prices for certain LineItem quantities have been specified.Date and time from which this Price is valid.Date and time until this Price is valid.getValue()
Money value of this Price.int
hashCode()
void
setChannel
(ChannelReference channel) ProductDistribution
Channel for which this Price is valid.void
setCountry
(String country) Country for which this Price is valid.void
setCustom
(CustomFields custom) Custom Fields defined for the Price.void
setCustomerGroup
(CustomerGroupReference customerGroup) CustomerGroup for which this Price is valid.void
setDiscounted
(DiscountedPrice discounted) Is set if a ProductDiscount has been applied.void
Unique identifier of this Price.void
User-defined identifier of the Price.void
Present if different Prices for certain LineItem quantities have been specified.void
Present if different Prices for certain LineItem quantities have been specified.void
setValidFrom
(ZonedDateTime validFrom) Date and time from which this Price is valid.void
setValidUntil
(ZonedDateTime validUntil) Date and time until this Price is valid.void
setValue
(TypedMoney value) Money value of this Price.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
PriceImpl
public PriceImpl()create empty instance
-
-
Method Details
-
getId
Unique identifier of this Price.
-
getKey
User-defined identifier of the Price. It is unique per ProductVariant.
-
getValue
Money value of this Price.
-
getCountry
Country for which this Price is valid.
- Specified by:
getCountry
in interfacePrice
- Returns:
- country
-
getCustomerGroup
CustomerGroup for which this Price is valid.
- Specified by:
getCustomerGroup
in interfacePrice
- Returns:
- customerGroup
-
getChannel
ProductDistribution
Channel for which this Price is valid.- Specified by:
getChannel
in interfacePrice
- Returns:
- channel
-
getValidFrom
Date and time from which this Price is valid.
- Specified by:
getValidFrom
in interfacePrice
- Returns:
- validFrom
-
getValidUntil
Date and time until this Price is valid. Prices that are no longer valid are not automatically removed, but they can be removed if necessary.
- Specified by:
getValidUntil
in interfacePrice
- Returns:
- validUntil
-
getDiscounted
Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item Price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice
value
is 0.5, thevalue
is rounded in favor of the customer with half-down rounding.- Specified by:
getDiscounted
in interfacePrice
- Returns:
- discounted
-
getTiers
Present if different Prices for certain LineItem quantities have been specified.
-
getCustom
Custom Fields defined for the Price.
- Specified by:
getCustom
in interfaceCustomizable<Price>
- Specified by:
getCustom
in interfacePrice
- Returns:
- custom
-
setId
Description copied from interface:Price
Unique identifier of this Price.
-
setKey
Description copied from interface:Price
User-defined identifier of the Price. It is unique per ProductVariant.
-
setValue
Description copied from interface:Price
Money value of this Price.
-
setCountry
Description copied from interface:Price
Country for which this Price is valid.
- Specified by:
setCountry
in interfacePrice
- Parameters:
country
- value to be set
-
setCustomerGroup
Description copied from interface:Price
CustomerGroup for which this Price is valid.
- Specified by:
setCustomerGroup
in interfacePrice
- Parameters:
customerGroup
- value to be set
-
setChannel
Description copied from interface:Price
ProductDistribution
Channel for which this Price is valid.- Specified by:
setChannel
in interfacePrice
- Parameters:
channel
- value to be set
-
setValidFrom
Description copied from interface:Price
Date and time from which this Price is valid.
- Specified by:
setValidFrom
in interfacePrice
- Parameters:
validFrom
- value to be set
-
setValidUntil
Description copied from interface:Price
Date and time until this Price is valid. Prices that are no longer valid are not automatically removed, but they can be removed if necessary.
- Specified by:
setValidUntil
in interfacePrice
- Parameters:
validUntil
- value to be set
-
setDiscounted
Description copied from interface:Price
Is set if a ProductDiscount has been applied. If set, the API uses the DiscountedPrice value for the Line Item Price selection. When a relative discount has been applied and the fraction part of the DiscountedPrice
value
is 0.5, thevalue
is rounded in favor of the customer with half-down rounding.- Specified by:
setDiscounted
in interfacePrice
- Parameters:
discounted
- value to be set
-
setTiers
Description copied from interface:Price
Present if different Prices for certain LineItem quantities have been specified.
-
setTiers
Description copied from interface:Price
Present if different Prices for certain LineItem quantities have been specified.
-
setCustom
Description copied from interface:Price
Custom Fields defined for the Price.
- Specified by:
setCustom
in interfaceCustomizable<Price>
- Specified by:
setCustom
in interfacePrice
- Parameters:
custom
- value to be set
-
equals
-
hashCode
public int hashCode()
-