| Modifier and Type | Method and Description |
|---|---|
Price |
build()
Creates a new instance of
Price with the values of this builder. |
PriceBuilder |
channel(Referenceable<Channel> channel)
Sets the
channel property of this builder. |
PriceBuilder |
country(com.neovisionaries.i18n.CountryCode country)
Sets the
country property of this builder. |
PriceBuilder |
custom(CustomFields custom)
Sets the
custom property of this builder. |
PriceBuilder |
customerGroup(Referenceable<CustomerGroup> customerGroup)
Sets the
customerGroup property of this builder. |
PriceBuilder |
discounted(DiscountedPrice discounted)
Sets the
discounted property of this builder. |
PriceBuilder |
id(String id)
Sets the
id property of this builder. |
static PriceBuilder |
of(javax.money.MonetaryAmount value)
Creates a new object initialized with the given values.
|
static PriceBuilder |
of(Price template)
Creates a new object initialized with the fields of the template parameter.
|
PriceBuilder |
tiers(List<PriceTier> tiers)
Sets the
tiers property of this builder. |
PriceBuilder |
validFrom(ZonedDateTime validFrom)
Sets the
validFrom property of this builder. |
PriceBuilder |
validUntil(ZonedDateTime validUntil)
Sets the
validUntil property of this builder. |
PriceBuilder |
value(javax.money.MonetaryAmount value)
Sets the
value property of this builder. |
public PriceBuilder channel(@Nullable Referenceable<Channel> channel)
channel property of this builder.channel - the value for Price.getChannel()public PriceBuilder country(@Nullable com.neovisionaries.i18n.CountryCode country)
country property of this builder.country - the value for Price.getCountry()public PriceBuilder custom(@Nullable CustomFields custom)
custom property of this builder.custom - the value for Price.getCustom()public PriceBuilder customerGroup(@Nullable Referenceable<CustomerGroup> customerGroup)
customerGroup property of this builder.customerGroup - the value for Price.getCustomerGroup()public PriceBuilder discounted(@Nullable DiscountedPrice discounted)
discounted property of this builder.discounted - the value for Price.getDiscounted()public PriceBuilder id(@Nullable String id)
id property of this builder.id - the value for Price.getId()public PriceBuilder tiers(@Nullable List<PriceTier> tiers)
tiers property of this builder.tiers - the value for Price.getTiers()public PriceBuilder validFrom(@Nullable ZonedDateTime validFrom)
validFrom property of this builder.validFrom - the value for Price.getValidFrom()public PriceBuilder validUntil(@Nullable ZonedDateTime validUntil)
validUntil property of this builder.validUntil - the value for Price.getValidUntil()public PriceBuilder value(javax.money.MonetaryAmount value)
value property of this builder.value - the value for Price.getValue()public Price build()
Price with the values of this builder.public static PriceBuilder of(javax.money.MonetaryAmount value)
value - initial value for the Price.getValue() propertypublic static PriceBuilder of(Price template)
template - the template