Class StandalonePriceBuilder
- All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<StandalonePrice>
Example to create an instance using the builder pattern
StandalonePrice standalonePrice = StandalonePrice.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.sku("{sku}")
.value(valueBuilder -> valueBuilder)
.active(true)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionIf set totrue
, the StandalonePrice is considered during price selection.addTiers
(Function<PriceTierBuilder, PriceTier> builder) Price tiers if any are defined.build()
builds StandalonePrice with checking for non-null required valuesbuilds StandalonePrice without checking for non-null required valueschannel
(ChannelReference channel) Product distribution Channel for which this Price is valid.Product distribution Channel for which this Price is valid.Country for which this Price is valid.createdAt
(ZonedDateTime createdAt) Date and time (UTC) the StandalonePrice was initially created.Present on resources created after 1 February 2019 except for events not tracked.createdBy
(Function<CreatedByBuilder, CreatedByBuilder> builder) Present on resources created after 1 February 2019 except for events not tracked.custom
(CustomFields custom) Custom Fields for the StandalonePrice.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields for the StandalonePrice.customerGroup
(CustomerGroupReference customerGroup) CustomerGroup for which this Price is valid.CustomerGroup for which this Price is valid.discounted
(DiscountedPrice discounted) Set if a matching ProductDiscount exists.Set if a matching ProductDiscount exists.If set totrue
, the StandalonePrice is considered during price selection.Product distribution Channel for which this Price is valid.Country for which this Price is valid.Date and time (UTC) the StandalonePrice was initially created.Present on resources created after 1 February 2019 except for events not tracked.Custom Fields for the StandalonePrice.CustomerGroup for which this Price is valid.Set if a matching ProductDiscount exists.getId()
Unique identifier of the StandalonePrice.getKey()
User-defined unique identifier of the StandalonePrice.Date and time (UTC) the StandalonePrice was last updated.Present on resources created after 1 February 2019 except for events not tracked.getSku()
SKU of the ProductVariant to which this Price is associated.Staged changes of the StandalonePrice.getTiers()
Price tiers if any are defined.Date from which the Price is valid.Date until the Price is valid.getValue()
Money value of this Price.Current version of the StandalonePrice.Unique identifier of the StandalonePrice.User-defined unique identifier of the StandalonePrice.lastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the StandalonePrice was last updated.lastModifiedBy
(LastModifiedBy lastModifiedBy) Present on resources created after 1 February 2019 except for events not tracked.Present on resources created after 1 February 2019 except for events not tracked.static StandalonePriceBuilder
of()
factory method for an instance of StandalonePriceBuilderstatic StandalonePriceBuilder
of
(StandalonePrice template) create builder for StandalonePrice instancePrice tiers if any are defined.plusTiers
(Function<PriceTierBuilder, PriceTierBuilder> builder) Price tiers if any are defined.setTiers
(Function<PriceTierBuilder, PriceTier> builder) Price tiers if any are defined.SKU of the ProductVariant to which this Price is associated.staged
(StagedStandalonePrice staged) Staged changes of the StandalonePrice.Staged changes of the StandalonePrice.Price tiers if any are defined.Price tiers if any are defined.validFrom
(ZonedDateTime validFrom) Date from which the Price is valid.validUntil
(ZonedDateTime validUntil) Date until the Price is valid.value
(TypedMoney value) Money value of this Price.value
(Function<TypedMoneyBuilder, io.vrap.rmf.base.client.Builder<? extends TypedMoney>> builder) Money value of this Price.Current version of the StandalonePrice.Product distribution Channel for which this Price is valid.withCreatedBy
(Function<CreatedByBuilder, CreatedBy> builder) Present on resources created after 1 February 2019 except for events not tracked.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields for the StandalonePrice.CustomerGroup for which this Price is valid.Set if a matching ProductDiscount exists.Present on resources created after 1 February 2019 except for events not tracked.Staged changes of the StandalonePrice.withTiers
(Function<PriceTierBuilder, PriceTierBuilder> builder) Price tiers if any are defined.
-
Constructor Details
-
StandalonePriceBuilder
public StandalonePriceBuilder()
-
-
Method Details
-
id
Unique identifier of the StandalonePrice.
- Parameters:
id
- value to be set- Returns:
- Builder
-
version
Current version of the StandalonePrice.
- Parameters:
version
- value to be set- Returns:
- Builder
-
createdAt
Date and time (UTC) the StandalonePrice was initially created.
- Parameters:
createdAt
- value to be set- Returns:
- Builder
-
lastModifiedAt
Date and time (UTC) the StandalonePrice was last updated.
- Parameters:
lastModifiedAt
- value to be set- Returns:
- Builder
-
lastModifiedBy
public StandalonePriceBuilder lastModifiedBy(Function<LastModifiedByBuilder, LastModifiedByBuilder> builder) Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
withLastModifiedBy
public StandalonePriceBuilder withLastModifiedBy(Function<LastModifiedByBuilder, LastModifiedBy> builder) Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the lastModifiedBy value- Returns:
- Builder
-
lastModifiedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
lastModifiedBy
- value to be set- Returns:
- Builder
-
createdBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
withCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
builder
- function to build the createdBy value- Returns:
- Builder
-
createdBy
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
createdBy
- value to be set- Returns:
- Builder
-
key
User-defined unique identifier of the StandalonePrice.
- Parameters:
key
- value to be set- Returns:
- Builder
-
sku
SKU of the ProductVariant to which this Price is associated.
- Parameters:
sku
- value to be set- Returns:
- Builder
-
value
Money value of this Price.
- Parameters:
value
- value to be set- Returns:
- Builder
-
value
public StandalonePriceBuilder value(Function<TypedMoneyBuilder, io.vrap.rmf.base.client.Builder<? extends TypedMoney>> builder) Money value of this Price.
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
country
Country for which this Price is valid.
- Parameters:
country
- value to be set- Returns:
- Builder
-
customerGroup
public StandalonePriceBuilder customerGroup(Function<CustomerGroupReferenceBuilder, CustomerGroupReferenceBuilder> builder) CustomerGroup for which this Price is valid.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public StandalonePriceBuilder withCustomerGroup(Function<CustomerGroupReferenceBuilder, CustomerGroupReference> builder) CustomerGroup for which this Price is valid.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
CustomerGroup for which this Price is valid.
- Parameters:
customerGroup
- value to be set- Returns:
- Builder
-
channel
public StandalonePriceBuilder channel(Function<ChannelReferenceBuilder, ChannelReferenceBuilder> builder) Product distribution Channel for which this Price is valid.
- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
withChannel
public StandalonePriceBuilder withChannel(Function<ChannelReferenceBuilder, ChannelReference> builder) Product distribution Channel for which this Price is valid.
- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
channel
Product distribution Channel for which this Price is valid.
- Parameters:
channel
- value to be set- Returns:
- Builder
-
validFrom
Date from which the Price is valid.
- Parameters:
validFrom
- value to be set- Returns:
- Builder
-
validUntil
Date until the Price is valid. Standalone Prices that are no longer valid are not automatically deleted, but they can be deleted if necessary.
- Parameters:
validUntil
- value to be set- Returns:
- Builder
-
tiers
Price tiers if any are defined.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
tiers
Price tiers if any are defined.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
Price tiers if any are defined.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
Price tiers if any are defined.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
withTiers
Price tiers if any are defined.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
addTiers
Price tiers if any are defined.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
setTiers
Price tiers if any are defined.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
discounted
public StandalonePriceBuilder discounted(Function<DiscountedPriceBuilder, DiscountedPriceBuilder> builder) Set if a matching ProductDiscount exists. If set, the API uses the
discounted
value for the LineItem Price selection. When a relative discount is applied and the fraction part of thediscounted
price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
withDiscounted
public StandalonePriceBuilder withDiscounted(Function<DiscountedPriceBuilder, DiscountedPrice> builder) Set if a matching ProductDiscount exists. If set, the API uses the
discounted
value for the LineItem Price selection. When a relative discount is applied and the fraction part of thediscounted
price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
discounted
Set if a matching ProductDiscount exists. If set, the API uses the
discounted
value for the LineItem Price selection. When a relative discount is applied and the fraction part of thediscounted
price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.- Parameters:
discounted
- value to be set- Returns:
- Builder
-
custom
Custom Fields for the StandalonePrice.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields for the StandalonePrice.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the StandalonePrice.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
staged
public StandalonePriceBuilder staged(Function<StagedStandalonePriceBuilder, StagedStandalonePriceBuilder> builder) Staged changes of the StandalonePrice. Only present if the StandalonePrice has some changes staged.
- Parameters:
builder
- function to build the staged value- Returns:
- Builder
-
withStaged
public StandalonePriceBuilder withStaged(Function<StagedStandalonePriceBuilder, StagedStandalonePrice> builder) Staged changes of the StandalonePrice. Only present if the StandalonePrice has some changes staged.
- Parameters:
builder
- function to build the staged value- Returns:
- Builder
-
staged
Staged changes of the StandalonePrice. Only present if the StandalonePrice has some changes staged.
- Parameters:
staged
- value to be set- Returns:
- Builder
-
active
If set to
true
, the StandalonePrice is considered during price selection. If set tofalse
, the StandalonePrice is not considered during price selection.- Parameters:
active
- value to be set- Returns:
- Builder
-
getId
Unique identifier of the StandalonePrice.
- Returns:
- id
-
getVersion
Current version of the StandalonePrice.
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the StandalonePrice was initially created.
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the StandalonePrice was last updated.
- Returns:
- lastModifiedAt
-
getLastModifiedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Returns:
- lastModifiedBy
-
getCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- Returns:
- createdBy
-
getKey
User-defined unique identifier of the StandalonePrice.
- Returns:
- key
-
getSku
SKU of the ProductVariant to which this Price is associated.
- Returns:
- sku
-
getValue
Money value of this Price.
- Returns:
- value
-
getCountry
Country for which this Price is valid.
- Returns:
- country
-
getCustomerGroup
CustomerGroup for which this Price is valid.
- Returns:
- customerGroup
-
getChannel
Product distribution Channel for which this Price is valid.
- Returns:
- channel
-
getValidFrom
Date from which the Price is valid.
- Returns:
- validFrom
-
getValidUntil
Date until the Price is valid. Standalone Prices that are no longer valid are not automatically deleted, but they can be deleted if necessary.
- Returns:
- validUntil
-
getTiers
Price tiers if any are defined.
- Returns:
- tiers
-
getDiscounted
Set if a matching ProductDiscount exists. If set, the API uses the
discounted
value for the LineItem Price selection. When a relative discount is applied and the fraction part of thediscounted
price is 0.5, the discounted price is rounded in favor of the customer with the half down rounding.- Returns:
- discounted
-
getCustom
Custom Fields for the StandalonePrice.
- Returns:
- custom
-
getStaged
Staged changes of the StandalonePrice. Only present if the StandalonePrice has some changes staged.
- Returns:
- staged
-
getActive
If set to
true
, the StandalonePrice is considered during price selection. If set tofalse
, the StandalonePrice is not considered during price selection.- Returns:
- active
-
build
builds StandalonePrice with checking for non-null required values- Specified by:
build
in interfaceio.vrap.rmf.base.client.Builder<StandalonePrice>
- Returns:
- StandalonePrice
-
buildUnchecked
builds StandalonePrice without checking for non-null required values- Returns:
- StandalonePrice
-
of
factory method for an instance of StandalonePriceBuilder- Returns:
- builder
-
of
create builder for StandalonePrice instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-