Class StandalonePriceDraftImpl
- All Implemented Interfaces:
CustomizableDraft<StandalonePriceDraft>
,StandalonePriceDraft
,WithKey
,io.vrap.rmf.base.client.Draft<StandalonePriceDraft>
,io.vrap.rmf.base.client.ModelBase
Standalone Prices are defined with a scope consisting of currency
and optionally country
, customerGroup
, and channel
and/or a validity period (validFrom
and/or validTo
). For more information see price selection.
Creating a Standalone Price for an SKU which has a Standalone Price with exactly the same price scope, or with overlapping validity periods within the same price scope returns the DuplicateStandalonePriceScope and OverlappingStandalonePriceValidity errors, respectively. A Price without validity period does not conflict with a Price defined for a time period.
-
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
Set tofalse
, if the StandalonePrice should not be considered during price selection.Sets the product distribution Channel for which this Price is valid.Sets the country for which this Price is valid.Custom Fields for the StandalonePrice.Sets the CustomerGroup for which this Price is valid.Sets a discounted price for this Price that is different from the base price withvalue
.getKey()
User-defined unique identifier for the StandalonePrice.getSku()
Specifies to which ProductVariant the API associates this Price.getTiers()
Sets price tiers.Sets the date from which the Price is valid.Sets the date until the Price is valid.getValue()
Sets the money value of this Price.int
hashCode()
void
Set tofalse
, if the StandalonePrice should not be considered during price selection.void
setChannel
(ChannelResourceIdentifier channel) Sets the product distribution Channel for which this Price is valid.void
setCountry
(String country) Sets the country for which this Price is valid.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the StandalonePrice.void
setCustomerGroup
(CustomerGroupResourceIdentifier customerGroup) Sets the CustomerGroup for which this Price is valid.void
setDiscounted
(DiscountedPriceDraft discounted) Sets a discounted price for this Price that is different from the base price withvalue
.void
User-defined unique identifier for the StandalonePrice.void
Specifies to which ProductVariant the API associates this Price.void
setTiers
(PriceTierDraft... tiers) Sets price tiers.void
setTiers
(List<PriceTierDraft> tiers) Sets price tiers.void
setValidFrom
(ZonedDateTime validFrom) Sets the date from which the Price is valid.void
setValidUntil
(ZonedDateTime validUntil) Sets the date until the Price is valid.void
Sets the 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.CustomizableDraft
unwrapCustomizableDraft
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.standalone_price.StandalonePriceDraft
withStandalonePriceDraft
-
Constructor Details
-
StandalonePriceDraftImpl
public StandalonePriceDraftImpl()create empty instance
-
-
Method Details
-
getKey
User-defined unique identifier for the StandalonePrice.
- Specified by:
getKey
in interfaceStandalonePriceDraft
- Specified by:
getKey
in interfaceWithKey
- Returns:
- key
-
getSku
Specifies to which ProductVariant the API associates this Price. It is not validated to exist in product variants.
- Specified by:
getSku
in interfaceStandalonePriceDraft
- Returns:
- sku
-
getValue
Sets the money value of this Price.
- Specified by:
getValue
in interfaceStandalonePriceDraft
- Returns:
- value
-
getCountry
Sets the country for which this Price is valid.
- Specified by:
getCountry
in interfaceStandalonePriceDraft
- Returns:
- country
-
getCustomerGroup
Sets the CustomerGroup for which this Price is valid.
- Specified by:
getCustomerGroup
in interfaceStandalonePriceDraft
- Returns:
- customerGroup
-
getChannel
Sets the product distribution Channel for which this Price is valid.
- Specified by:
getChannel
in interfaceStandalonePriceDraft
- Returns:
- channel
-
getValidFrom
Sets the date from which the Price is valid. Must be at least 1 ms earlier than
validUntil
.- Specified by:
getValidFrom
in interfaceStandalonePriceDraft
- Returns:
- validFrom
-
getValidUntil
Sets the date until the Price is valid. Must be at least 1 ms later than
validFrom
. Standalone Prices that are no longer valid are not automatically deleted, but they can be deleted if necessary.- Specified by:
getValidUntil
in interfaceStandalonePriceDraft
- Returns:
- validUntil
-
getTiers
Sets price tiers.
- Specified by:
getTiers
in interfaceStandalonePriceDraft
- Returns:
- tiers
-
getDiscounted
Sets a discounted price for this Price that is different from the base price with
value
.- Specified by:
getDiscounted
in interfaceStandalonePriceDraft
- Returns:
- discounted
-
getCustom
Custom Fields for the StandalonePrice.
- Specified by:
getCustom
in interfaceCustomizableDraft<StandalonePriceDraft>
- Specified by:
getCustom
in interfaceStandalonePriceDraft
- Returns:
- custom
-
getActive
Set to
false
, if the StandalonePrice should not be considered during price selection.- Specified by:
getActive
in interfaceStandalonePriceDraft
- Returns:
- active
-
setKey
Description copied from interface:StandalonePriceDraft
User-defined unique identifier for the StandalonePrice.
- Specified by:
setKey
in interfaceStandalonePriceDraft
- Parameters:
key
- value to be set
-
setSku
Description copied from interface:StandalonePriceDraft
Specifies to which ProductVariant the API associates this Price. It is not validated to exist in product variants.
- Specified by:
setSku
in interfaceStandalonePriceDraft
- Parameters:
sku
- value to be set
-
setValue
Description copied from interface:StandalonePriceDraft
Sets the money value of this Price.
- Specified by:
setValue
in interfaceStandalonePriceDraft
- Parameters:
value
- value to be set
-
setCountry
Description copied from interface:StandalonePriceDraft
Sets the country for which this Price is valid.
- Specified by:
setCountry
in interfaceStandalonePriceDraft
- Parameters:
country
- value to be set
-
setCustomerGroup
Description copied from interface:StandalonePriceDraft
Sets the CustomerGroup for which this Price is valid.
- Specified by:
setCustomerGroup
in interfaceStandalonePriceDraft
- Parameters:
customerGroup
- value to be set
-
setChannel
Description copied from interface:StandalonePriceDraft
Sets the product distribution Channel for which this Price is valid.
- Specified by:
setChannel
in interfaceStandalonePriceDraft
- Parameters:
channel
- value to be set
-
setValidFrom
Description copied from interface:StandalonePriceDraft
Sets the date from which the Price is valid. Must be at least 1 ms earlier than
validUntil
.- Specified by:
setValidFrom
in interfaceStandalonePriceDraft
- Parameters:
validFrom
- value to be set
-
setValidUntil
Description copied from interface:StandalonePriceDraft
Sets the date until the Price is valid. Must be at least 1 ms later than
validFrom
. Standalone Prices that are no longer valid are not automatically deleted, but they can be deleted if necessary.- Specified by:
setValidUntil
in interfaceStandalonePriceDraft
- Parameters:
validUntil
- value to be set
-
setTiers
Description copied from interface:StandalonePriceDraft
Sets price tiers.
- Specified by:
setTiers
in interfaceStandalonePriceDraft
- Parameters:
tiers
- values to be set
-
setTiers
Description copied from interface:StandalonePriceDraft
Sets price tiers.
- Specified by:
setTiers
in interfaceStandalonePriceDraft
- Parameters:
tiers
- values to be set
-
setDiscounted
Description copied from interface:StandalonePriceDraft
Sets a discounted price for this Price that is different from the base price with
value
.- Specified by:
setDiscounted
in interfaceStandalonePriceDraft
- Parameters:
discounted
- value to be set
-
setCustom
Description copied from interface:StandalonePriceDraft
Custom Fields for the StandalonePrice.
- Specified by:
setCustom
in interfaceCustomizableDraft<StandalonePriceDraft>
- Specified by:
setCustom
in interfaceStandalonePriceDraft
- Parameters:
custom
- value to be set
-
setActive
Description copied from interface:StandalonePriceDraft
Set to
false
, if the StandalonePrice should not be considered during price selection.- Specified by:
setActive
in interfaceStandalonePriceDraft
- Parameters:
active
- value to be set
-
equals
-
hashCode
-