Class PriceDraftImportBuilder
- All Implemented Interfaces:
Builder<PriceDraftImport>
Example to create an instance using the builder pattern
PriceDraftImport priceDraftImport = PriceDraftImport.builder()
.value(valueBuilder -> valueBuilder)
.key("{key}")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddTiers
(Function<PriceTierBuilder, PriceTier> builder) The tiered prices for this price.build()
builds PriceDraftImport with checking for non-null required valuesbuilds PriceDraftImport without checking for non-null required valueschannel
(ChannelKeyReference channel) Set this field if this Price is only valid for the referencedProductDistribution
Channel.Set this field if this Price is only valid for the referencedProductDistribution
Channel.Set this field if this Price is only valid for the specified country.Custom Fields for the Embedded Price.custom
(Function<CustomBuilder, CustomBuilder> builder) Custom Fields for the Embedded Price.customerGroup
(CustomerGroupKeyReference customerGroup) Set this field if this Price is only valid for the referenced CustomerGroup.Set this field if this Price is only valid for the referenced CustomerGroup.discounted
(DiscountedPrice discounted) Set this field to add a DiscountedPrice from an external service.Set this field to add a DiscountedPrice from an external service.Set this field if this Price is only valid for the referencedProductDistribution
Channel.Set this field if this Price is only valid for the specified country.Custom Fields for the Embedded Price.Set this field if this Price is only valid for the referenced CustomerGroup.Set this field to add a DiscountedPrice from an external service.getKey()
User-defined unique identifier for the Embedded Price.getTiers()
The tiered prices for this price.Set this field if this Price is only valid from the specified date and time.Set this field if this Price is only valid until the specified date and time.getValue()
Money value of this Price.User-defined unique identifier for the Embedded Price.static PriceDraftImportBuilder
of()
factory method for an instance of PriceDraftImportBuilderstatic PriceDraftImportBuilder
of
(PriceDraftImport template) create builder for PriceDraftImport instanceThe tiered prices for this price.plusTiers
(Function<PriceTierBuilder, PriceTierBuilder> builder) The tiered prices for this price.setTiers
(Function<PriceTierBuilder, PriceTier> builder) The tiered prices for this price.The tiered prices for this price.The tiered prices for this price.validFrom
(ZonedDateTime validFrom) Set this field if this Price is only valid from the specified date and time.validUntil
(ZonedDateTime validUntil) Set this field if this Price is only valid until the specified date and time.value
(TypedMoney value) Money value of this Price.value
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Money value of this Price.Set this field if this Price is only valid for the referencedProductDistribution
Channel.withCustom
(Function<CustomBuilder, Custom> builder) Custom Fields for the Embedded Price.Set this field if this Price is only valid for the referenced CustomerGroup.Set this field to add a DiscountedPrice from an external service.withTiers
(Function<PriceTierBuilder, PriceTierBuilder> builder) The tiered prices for this price.
-
Constructor Details
-
PriceDraftImportBuilder
public PriceDraftImportBuilder()
-
-
Method Details
-
value
Money value of this Price.
- Parameters:
value
- value to be set- Returns:
- Builder
-
value
public PriceDraftImportBuilder value(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Money value of this Price.
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
country
Set this field if this Price is only valid for the specified country.
- Parameters:
country
- value to be set- Returns:
- Builder
-
customerGroup
public PriceDraftImportBuilder customerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReferenceBuilder> builder) Set this field if this Price is only valid for the referenced CustomerGroup. If the referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public PriceDraftImportBuilder withCustomerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReference> builder) Set this field if this Price is only valid for the referenced CustomerGroup. If the referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
Set this field if this Price is only valid for the referenced CustomerGroup. If the referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.- Parameters:
customerGroup
- value to be set- Returns:
- Builder
-
channel
public PriceDraftImportBuilder channel(Function<ChannelKeyReferenceBuilder, ChannelKeyReferenceBuilder> builder) Set this field if this Price is only valid for the referenced
ProductDistribution
Channel. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
withChannel
public PriceDraftImportBuilder withChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReference> builder) Set this field if this Price is only valid for the referenced
ProductDistribution
Channel. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
channel
Set this field if this Price is only valid for the referenced
ProductDistribution
Channel. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.- Parameters:
channel
- value to be set- Returns:
- Builder
-
validFrom
Set this field if this Price is only valid from the specified date and time. Must be at least 1 ms earlier than
validUntil
.- Parameters:
validFrom
- value to be set- Returns:
- Builder
-
validUntil
Set this field if this Price is only valid until the specified date and time. Must be at least 1 ms later than
validFrom
.- Parameters:
validUntil
- value to be set- Returns:
- Builder
-
custom
Custom Fields for the Embedded Price.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields for the Embedded Price.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Embedded Price.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
discounted
public PriceDraftImportBuilder discounted(Function<DiscountedPriceBuilder, DiscountedPriceBuilder> builder) Set this field to add a DiscountedPrice from an external service.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
withDiscounted
public PriceDraftImportBuilder withDiscounted(Function<DiscountedPriceBuilder, DiscountedPrice> builder) Set this field to add a DiscountedPrice from an external service.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
discounted
Set this field to add a DiscountedPrice from an external service.
- Parameters:
discounted
- value to be set- Returns:
- Builder
-
tiers
The tiered prices for this price.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
tiers
The tiered prices for this price.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
The tiered prices for this price.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
The tiered prices for this price.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
withTiers
The tiered prices for this price.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
addTiers
The tiered prices for this price.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
setTiers
The tiered prices for this price.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
key
User-defined unique identifier for the Embedded Price.
- Parameters:
key
- value to be set- Returns:
- Builder
-
getValue
Money value of this Price.
- Returns:
- value
-
getCountry
Set this field if this Price is only valid for the specified country.
- Returns:
- country
-
getCustomerGroup
Set this field if this Price is only valid for the referenced CustomerGroup. If the referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.- Returns:
- customerGroup
-
getChannel
Set this field if this Price is only valid for the referenced
ProductDistribution
Channel. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.- Returns:
- channel
-
getValidFrom
Set this field if this Price is only valid from the specified date and time. Must be at least 1 ms earlier than
validUntil
.- Returns:
- validFrom
-
getValidUntil
Set this field if this Price is only valid until the specified date and time. Must be at least 1 ms later than
validFrom
.- Returns:
- validUntil
-
getCustom
Custom Fields for the Embedded Price.
- Returns:
- custom
-
getDiscounted
Set this field to add a DiscountedPrice from an external service.
- Returns:
- discounted
-
getTiers
The tiered prices for this price.
- Returns:
- tiers
-
getKey
User-defined unique identifier for the Embedded Price.
- Returns:
- key
-
build
builds PriceDraftImport with checking for non-null required values- Specified by:
build
in interfaceBuilder<PriceDraftImport>
- Returns:
- PriceDraftImport
-
buildUnchecked
builds PriceDraftImport without checking for non-null required values- Returns:
- PriceDraftImport
-
of
factory method for an instance of PriceDraftImportBuilder- Returns:
- builder
-
of
create builder for PriceDraftImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-