Class ScopedPriceImpl
- All Implemented Interfaces:
ScopedPrice
,Customizable<ScopedPrice>
,io.vrap.rmf.base.client.ModelBase
Scoped Price is contained in a ProductVariant which is returned in response to a Product Projection Search request when Scoped Price Search is used.
-
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
Reference to a Channel.Country code of the geographic location.If available, either the original pricevalue
ordiscounted
value.Custom Fields for the Price.Reference to a CustomerGroup.Is set when a matching ProductDiscount exists.getId()
Platform-generated unique identifier of the Price.Date and time from which the Price is valid.Date and time until which the Price is valid.getValue()
Original value of the Price.int
hashCode()
void
setChannel
(ChannelReference channel) Reference to a Channel.void
setCountry
(String country) Country code of the geographic location.void
setCurrentValue
(TypedMoney currentValue) If available, either the original pricevalue
ordiscounted
value.void
setCustom
(CustomFields custom) Custom Fields for the Price.void
setCustomerGroup
(CustomerGroupReference customerGroup) Reference to a CustomerGroup.void
setDiscounted
(DiscountedPrice discounted) Is set when a matching ProductDiscount exists.void
Platform-generated unique identifier of the Price.void
setValidFrom
(ZonedDateTime validFrom) Date and time from which the Price is valid.void
setValidUntil
(ZonedDateTime validUntil) Date and time until which the Price is valid.void
setValue
(TypedMoney value) Original value of the 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
Methods inherited from interface com.commercetools.api.models.common.ScopedPrice
withScopedPrice
-
Constructor Details
-
ScopedPriceImpl
public ScopedPriceImpl()create empty instance
-
-
Method Details
-
getId
Platform-generated unique identifier of the Price.
- Specified by:
getId
in interfaceScopedPrice
- Returns:
- id
-
getValue
Original value of the Price.
- Specified by:
getValue
in interfaceScopedPrice
- Returns:
- value
-
getCurrentValue
If available, either the original price
value
ordiscounted
value.- Specified by:
getCurrentValue
in interfaceScopedPrice
- Returns:
- currentValue
-
getCountry
Country code of the geographic location.
- Specified by:
getCountry
in interfaceScopedPrice
- Returns:
- country
-
getCustomerGroup
Reference to a CustomerGroup.
- Specified by:
getCustomerGroup
in interfaceScopedPrice
- Returns:
- customerGroup
-
getChannel
Reference to a Channel.
- Specified by:
getChannel
in interfaceScopedPrice
- Returns:
- channel
-
getValidFrom
Date and time from which the Price is valid.
- Specified by:
getValidFrom
in interfaceScopedPrice
- Returns:
- validFrom
-
getValidUntil
Date and time until which the Price is valid.
- Specified by:
getValidUntil
in interfaceScopedPrice
- Returns:
- validUntil
-
getDiscounted
Is set when a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.
When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.
- Specified by:
getDiscounted
in interfaceScopedPrice
- Returns:
- discounted
-
getCustom
Custom Fields for the Price.
- Specified by:
getCustom
in interfaceCustomizable<ScopedPrice>
- Specified by:
getCustom
in interfaceScopedPrice
- Returns:
- custom
-
setId
Description copied from interface:ScopedPrice
Platform-generated unique identifier of the Price.
- Specified by:
setId
in interfaceScopedPrice
- Parameters:
id
- value to be set
-
setValue
Description copied from interface:ScopedPrice
Original value of the Price.
- Specified by:
setValue
in interfaceScopedPrice
- Parameters:
value
- value to be set
-
setCurrentValue
Description copied from interface:ScopedPrice
If available, either the original price
value
ordiscounted
value.- Specified by:
setCurrentValue
in interfaceScopedPrice
- Parameters:
currentValue
- value to be set
-
setCountry
Description copied from interface:ScopedPrice
Country code of the geographic location.
- Specified by:
setCountry
in interfaceScopedPrice
- Parameters:
country
- value to be set
-
setCustomerGroup
Description copied from interface:ScopedPrice
Reference to a CustomerGroup.
- Specified by:
setCustomerGroup
in interfaceScopedPrice
- Parameters:
customerGroup
- value to be set
-
setChannel
Description copied from interface:ScopedPrice
Reference to a Channel.
- Specified by:
setChannel
in interfaceScopedPrice
- Parameters:
channel
- value to be set
-
setValidFrom
Description copied from interface:ScopedPrice
Date and time from which the Price is valid.
- Specified by:
setValidFrom
in interfaceScopedPrice
- Parameters:
validFrom
- value to be set
-
setValidUntil
Description copied from interface:ScopedPrice
Date and time until which the Price is valid.
- Specified by:
setValidUntil
in interfaceScopedPrice
- Parameters:
validUntil
- value to be set
-
setDiscounted
Description copied from interface:ScopedPrice
Is set when a matching ProductDiscount exists. If set, the Cart uses the discounted value for the Cart Price calculation.
When a relative Product Discount is applied and the fractional part of the discounted Price is 0.5, the discounted Price is rounded half down in favor of the Customer.
- Specified by:
setDiscounted
in interfaceScopedPrice
- Parameters:
discounted
- value to be set
-
setCustom
Description copied from interface:ScopedPrice
Custom Fields for the Price.
- Specified by:
setCustom
in interfaceCustomizable<ScopedPrice>
- Specified by:
setCustom
in interfaceScopedPrice
- Parameters:
custom
- value to be set
-
equals
-
hashCode
public int hashCode()
-