Class StandalonePriceDraftBuilder
- All Implemented Interfaces:
Builder<StandalonePriceDraft>
Example to create an instance using the builder pattern
StandalonePriceDraft standalonePriceDraft = StandalonePriceDraft.builder()
.sku("{sku}")
.value(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionSet tofalse
, if the StandalonePrice should not be considered during Product price selection.addTiers
(Function<PriceTierDraftBuilder, PriceTierDraft> builder) Sets price tiers.build()
builds StandalonePriceDraft with checking for non-null required valuesbuilds StandalonePriceDraft without checking for non-null required valueschannel
(ChannelResourceIdentifier channel) Sets the product distribution Channel for which this Price is valid.Sets the product distribution Channel for which this Price is valid.Sets the country for which this Price is valid.custom
(CustomFieldsDraft custom) Custom Fields for the StandalonePrice.Custom Fields for the StandalonePrice.customerGroup
(CustomerGroupResourceIdentifier customerGroup) Sets the CustomerGroup for which this Price is valid.customerGroup
(Function<CustomerGroupResourceIdentifierBuilder, CustomerGroupResourceIdentifierBuilder> builder) Sets the CustomerGroup for which this Price is valid.discounted
(DiscountedPriceDraft discounted) Sets a discounted price for this Price that is different from the base price withvalue
.Sets a discounted price for this Price that is different from the base price withvalue
.Set tofalse
, if the StandalonePrice should not be considered during Product 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.Staged changes for the StandalonePrice.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.User-defined unique identifier for the StandalonePrice.static StandalonePriceDraftBuilder
of()
factory method for an instance of StandalonePriceDraftBuilderstatic StandalonePriceDraftBuilder
of
(StandalonePriceDraft template) create builder for StandalonePriceDraft instanceplusTiers
(PriceTierDraft... tiers) Sets price tiers.Sets price tiers.setTiers
(Function<PriceTierDraftBuilder, PriceTierDraft> builder) Sets price tiers.Specifies to which ProductVariant the API associates this Price.staged
(StagedPriceDraft staged) Staged changes for the StandalonePrice.Staged changes for the StandalonePrice.tiers
(PriceTierDraft... tiers) Sets price tiers.tiers
(List<PriceTierDraft> tiers) Sets price tiers.validFrom
(ZonedDateTime validFrom) Sets the date from which the Price is valid.validUntil
(ZonedDateTime validUntil) Sets the date until the Price is valid.Sets the money value of this Price.value
(Function<MoneyBuilder, MoneyBuilder> builder) Sets the money value of this Price.Sets the product distribution Channel for which this Price is valid.Custom Fields for the StandalonePrice.withCustomerGroup
(Function<CustomerGroupResourceIdentifierBuilder, CustomerGroupResourceIdentifier> builder) Sets the CustomerGroup for which this Price is valid.Sets a discounted price for this Price that is different from the base price withvalue
.Staged changes for the StandalonePrice.Sets price tiers.withValue
(Function<MoneyBuilder, Money> builder) Sets the money value of this Price.
-
Constructor Details
-
StandalonePriceDraftBuilder
public StandalonePriceDraftBuilder()
-
-
Method Details
-
key
User-defined unique identifier for the StandalonePrice.
- Parameters:
key
- value to be set- Returns:
- Builder
-
sku
Specifies to which ProductVariant the API associates this Price. It is not validated to exist in product variants.
- Parameters:
sku
- value to be set- Returns:
- Builder
-
value
Sets the money value of this Price.
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
withValue
Sets the money value of this Price.
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
value
Sets the money value of this Price.
- Parameters:
value
- value to be set- Returns:
- Builder
-
country
Sets the country for which this Price is valid.
- Parameters:
country
- value to be set- Returns:
- Builder
-
customerGroup
public StandalonePriceDraftBuilder customerGroup(Function<CustomerGroupResourceIdentifierBuilder, CustomerGroupResourceIdentifierBuilder> builder) Sets the CustomerGroup for which this Price is valid.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public StandalonePriceDraftBuilder withCustomerGroup(Function<CustomerGroupResourceIdentifierBuilder, CustomerGroupResourceIdentifier> builder) Sets the CustomerGroup for which this Price is valid.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
public StandalonePriceDraftBuilder customerGroup(@Nullable CustomerGroupResourceIdentifier customerGroup) Sets the CustomerGroup for which this Price is valid.
- Parameters:
customerGroup
- value to be set- Returns:
- Builder
-
channel
public StandalonePriceDraftBuilder channel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifierBuilder> builder) Sets the product distribution Channel for which this Price is valid.
- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
withChannel
public StandalonePriceDraftBuilder withChannel(Function<ChannelResourceIdentifierBuilder, ChannelResourceIdentifier> builder) Sets the product distribution Channel for which this Price is valid.
- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
channel
Sets the product distribution Channel for which this Price is valid.
- Parameters:
channel
- value to be set- Returns:
- Builder
-
validFrom
Sets the date from which the Price is valid. Must be at least 1 ms earlier than
validUntil
.- Parameters:
validFrom
- value to be set- Returns:
- Builder
-
validUntil
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.- Parameters:
validUntil
- value to be set- Returns:
- Builder
-
tiers
Sets price tiers.
If
discounted
is set, the tiered Price is ignored for a Product Variant.- Parameters:
tiers
- value to be set- Returns:
- Builder
-
tiers
Sets price tiers.
If
discounted
is set, the tiered Price is ignored for a Product Variant.- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
Sets price tiers.
If
discounted
is set, the tiered Price is ignored for a Product Variant.- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
public StandalonePriceDraftBuilder plusTiers(Function<PriceTierDraftBuilder, PriceTierDraftBuilder> builder) Sets price tiers.
If
discounted
is set, the tiered Price is ignored for a Product Variant.- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
withTiers
public StandalonePriceDraftBuilder withTiers(Function<PriceTierDraftBuilder, PriceTierDraftBuilder> builder) Sets price tiers.
If
discounted
is set, the tiered Price is ignored for a Product Variant.- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
addTiers
Sets price tiers.
If
discounted
is set, the tiered Price is ignored for a Product Variant.- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
setTiers
Sets price tiers.
If
discounted
is set, the tiered Price is ignored for a Product Variant.- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
discounted
public StandalonePriceDraftBuilder discounted(Function<DiscountedPriceDraftBuilder, DiscountedPriceDraftBuilder> builder) Sets a discounted price for this Price that is different from the base price with
value
.- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
withDiscounted
public StandalonePriceDraftBuilder withDiscounted(Function<DiscountedPriceDraftBuilder, DiscountedPriceDraft> builder) Sets a discounted price for this Price that is different from the base price with
value
.- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
discounted
Sets a discounted price for this Price that is different from the base price with
value
.- Parameters:
discounted
- value to be set- Returns:
- Builder
-
custom
public StandalonePriceDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the StandalonePrice.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public StandalonePriceDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) 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 StandalonePriceDraftBuilder staged(Function<StagedPriceDraftBuilder, StagedPriceDraftBuilder> builder) Staged changes for the StandalonePrice.
- Parameters:
builder
- function to build the staged value- Returns:
- Builder
-
withStaged
public StandalonePriceDraftBuilder withStaged(Function<StagedPriceDraftBuilder, StagedPriceDraft> builder) Staged changes for the StandalonePrice.
- Parameters:
builder
- function to build the staged value- Returns:
- Builder
-
staged
Staged changes for the StandalonePrice.
- Parameters:
staged
- value to be set- Returns:
- Builder
-
active
Set to
false
, if the StandalonePrice should not be considered during Product price selection.- Parameters:
active
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier for the StandalonePrice.
- Returns:
- key
-
getSku
Specifies to which ProductVariant the API associates this Price. It is not validated to exist in product variants.
- Returns:
- sku
-
getValue
Sets the money value of this Price.
- Returns:
- value
-
getCountry
Sets the country for which this Price is valid.
- Returns:
- country
-
getCustomerGroup
Sets the CustomerGroup for which this Price is valid.
- Returns:
- customerGroup
-
getChannel
Sets the product distribution Channel for which this Price is valid.
- Returns:
- channel
-
getValidFrom
Sets the date from which the Price is valid. Must be at least 1 ms earlier than
validUntil
.- 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.- Returns:
- validUntil
-
getTiers
Sets price tiers.
If
discounted
is set, the tiered Price is ignored for a Product Variant.- Returns:
- tiers
-
getDiscounted
Sets a discounted price for this Price that is different from the base price with
value
.- Returns:
- discounted
-
getCustom
Custom Fields for the StandalonePrice.
- Returns:
- custom
-
getStaged
Staged changes for the StandalonePrice.
- Returns:
- staged
-
getActive
Set to
false
, if the StandalonePrice should not be considered during Product price selection.- Returns:
- active
-
build
builds StandalonePriceDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<StandalonePriceDraft>
- Returns:
- StandalonePriceDraft
-
buildUnchecked
builds StandalonePriceDraft without checking for non-null required values- Returns:
- StandalonePriceDraft
-
of
factory method for an instance of StandalonePriceDraftBuilder- Returns:
- builder
-
of
create builder for StandalonePriceDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-