public interface Price extends PriceLike
A Price can have custom fields
.
PriceBuilder
.AddPrice
,
ChangePrice
,
RemovePrice
,
ProductVariant.getPrices()
Modifier and Type | Method and Description |
---|---|
default boolean |
equalsIgnoreId(Price price) |
Reference<Channel> |
getChannel() |
com.neovisionaries.i18n.CountryCode |
getCountry() |
CustomFields |
getCustom() |
Reference<CustomerGroup> |
getCustomerGroup() |
DiscountedPrice |
getDiscounted()
Supplies a discount if there is any.
|
String |
getId()
The unique ID of this price.
|
List<PriceTier> |
getTiers() |
ZonedDateTime |
getValidFrom() |
ZonedDateTime |
getValidUntil() |
javax.money.MonetaryAmount |
getValue() |
static Price |
of(BigDecimal amount,
javax.money.CurrencyUnit currencyUnit) |
static Price |
of(javax.money.MonetaryAmount money) |
static String |
resourceTypeId()
An identifier for this resource which supports
CustomFields . |
default Price |
withChannel(Referenceable<Channel> channel) |
default Price |
withCountry(com.neovisionaries.i18n.CountryCode country) |
default Price |
withCustomerGroup(Referenceable<CustomerGroup> customerGroup) |
default Price |
withDiscounted(DiscountedPrice discounted) |
default Price |
withId(String id) |
default Price |
withValidFrom(ZonedDateTime validFrom) |
default Price |
withValidUntil(ZonedDateTime validUntil) |
default Price |
withValue(javax.money.MonetaryAmount value) |
@Nullable Reference<Channel> getChannel()
getChannel
in interface PriceLike
@Nullable com.neovisionaries.i18n.CountryCode getCountry()
getCountry
in interface PriceLike
@Nullable CustomFields getCustom()
@Nullable Reference<CustomerGroup> getCustomerGroup()
getCustomerGroup
in interface PriceLike
@Nullable DiscountedPrice getDiscounted()
PriceLike
getDiscounted
in interface PriceLike
@Nullable String getId()
PriceLike
@Nullable ZonedDateTime getValidFrom()
getValidFrom
in interface PriceLike
@Nullable ZonedDateTime getValidUntil()
getValidUntil
in interface PriceLike
default Price withCustomerGroup(@Nullable Referenceable<CustomerGroup> customerGroup)
default Price withChannel(@Nullable Referenceable<Channel> channel)
default Price withDiscounted(@Nullable DiscountedPrice discounted)
default Price withValue(javax.money.MonetaryAmount value)
default Price withValidFrom(ZonedDateTime validFrom)
default Price withValidUntil(ZonedDateTime validUntil)
static Price of(javax.money.MonetaryAmount money)
static Price of(BigDecimal amount, javax.money.CurrencyUnit currencyUnit)
default boolean equalsIgnoreId(Price price)
static String resourceTypeId()
CustomFields
.TypeDraft.getResourceTypeIds()
,
Custom