Class StandalonePriceImportBuilder
- All Implemented Interfaces:
Builder<StandalonePriceImport>
Example to create an instance using the builder pattern
StandalonePriceImport standalonePriceImport = StandalonePriceImport.builder()
.key("{key}")
.sku("{sku}")
.value(valueBuilder -> valueBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddTiers
(Function<PriceTierBuilder, PriceTier> builder) Sets price tiers.build()
builds StandalonePriceImport with checking for non-null required valuesbuilds StandalonePriceImport without checking for non-null required valueschannel
(ChannelKeyReference channel) Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.Sets the country for this Price, if the Price does not yet have a country.Custom Fields for the StandalonePrice.custom
(Function<CustomBuilder, CustomBuilder> builder) Custom Fields for the StandalonePrice.customerGroup
(CustomerGroupKeyReference customerGroup) Sets the CustomerGroup for this Price, if the Price does not yet have a CustomerGroup.Sets the CustomerGroup for this Price, if the Price does not yet have a CustomerGroup.discounted
(DiscountedPrice discounted) Sets a discounted price for this Price that is different from the base price with value.Sets a discounted price for this Price that is different from the base price with value.Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.Sets the country for this Price, if the Price does not yet have a country.Custom Fields for the StandalonePrice.Sets the CustomerGroup for this Price, if the Price does not yet have a CustomerGroup.Sets a discounted price for this Price that is different from the base price with value.getKey()
User-defined unique identifier for the Standalone Price.getSku()
Identifies the ProductVariant to which this Standalone Price is associated.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 Standalone Price.static StandalonePriceImportBuilder
of()
factory method for an instance of StandalonePriceImportBuilderstatic StandalonePriceImportBuilder
of
(StandalonePriceImport template) create builder for StandalonePriceImport instanceSets price tiers.plusTiers
(Function<PriceTierBuilder, PriceTierBuilder> builder) Sets price tiers.setTiers
(Function<PriceTierBuilder, PriceTier> builder) Sets price tiers.Identifies the ProductVariant to which this Standalone Price is associated.Sets price 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.value
(TypedMoney value) Sets the money value of this Price.value
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Sets the money value of this Price.Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.withCustom
(Function<CustomBuilder, Custom> builder) Custom Fields for the StandalonePrice.Sets the CustomerGroup for this Price, if the Price does not yet have a CustomerGroup.Sets a discounted price for this Price that is different from the base price with value.withTiers
(Function<PriceTierBuilder, PriceTierBuilder> builder) Sets price tiers.
-
Constructor Details
-
StandalonePriceImportBuilder
public StandalonePriceImportBuilder()
-
-
Method Details
-
key
User-defined unique identifier for the Standalone Price. If a StandalonePrice) with this
key
exists, it will be updated with the imported data.- Parameters:
key
- value to be set- Returns:
- Builder
-
sku
Identifies the ProductVariant to which this Standalone Price is associated. This value 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:
value
- value to be set- Returns:
- Builder
-
value
public StandalonePriceImportBuilder value(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Sets the money value of this Price.
- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
country
Sets the country for this Price, if the Price does not yet have a country.
The country cannot be updated. Attempting to update the an existing country will result in an InvalidFieldsUpdate error.
- Parameters:
country
- value to be set- Returns:
- Builder
-
customerGroup
public StandalonePriceImportBuilder customerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReferenceBuilder> builder) Sets the CustomerGroup for this Price, if the Price does not yet have a CustomerGroup.
The CustomerGroup cannot be updated. Attempting to update an existing CustomerGroup will result in an InvalidFieldsUpdate error.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public StandalonePriceImportBuilder withCustomerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReference> builder) Sets the CustomerGroup for this Price, if the Price does not yet have a CustomerGroup.
The CustomerGroup cannot be updated. Attempting to update an existing CustomerGroup will result in an InvalidFieldsUpdate error.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
public StandalonePriceImportBuilder customerGroup(@Nullable CustomerGroupKeyReference customerGroup) Sets the CustomerGroup for this Price, if the Price does not yet have a CustomerGroup.
The CustomerGroup cannot be updated. Attempting to update an existing CustomerGroup will result in an InvalidFieldsUpdate error.
- Parameters:
customerGroup
- value to be set- Returns:
- Builder
-
channel
public StandalonePriceImportBuilder channel(Function<ChannelKeyReferenceBuilder, ChannelKeyReferenceBuilder> builder) Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.
The Channel cannot be updated. Attempting to update an existing Channel will result in an InvalidFieldsUpdate error.
- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
withChannel
public StandalonePriceImportBuilder withChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReference> builder) Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.
The Channel cannot be updated. Attempting to update an existing Channel will result in an InvalidFieldsUpdate error.
- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
channel
Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.
The Channel cannot be updated. Attempting to update an existing Channel will result in an InvalidFieldsUpdate error.
- Parameters:
channel
- value to be set- Returns:
- Builder
-
validFrom
Sets the date from which the Price is valid.
- Parameters:
validFrom
- value to be set- Returns:
- Builder
-
validUntil
Sets the date until the Price is valid.
- Parameters:
validUntil
- value to be set- Returns:
- Builder
-
tiers
Sets price tiers.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
tiers
Sets price tiers.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
Sets price tiers.
- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
Sets price tiers.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
withTiers
Sets price tiers.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
addTiers
Sets price tiers.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
setTiers
Sets price tiers.
- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
discounted
public StandalonePriceImportBuilder discounted(Function<DiscountedPriceBuilder, DiscountedPriceBuilder> 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 StandalonePriceImportBuilder withDiscounted(Function<DiscountedPriceBuilder, DiscountedPrice> 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
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
-
getKey
User-defined unique identifier for the Standalone Price. If a StandalonePrice) with this
key
exists, it will be updated with the imported data.- Returns:
- key
-
getSku
Identifies the ProductVariant to which this Standalone Price is associated. This value 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 this Price, if the Price does not yet have a country.
The country cannot be updated. Attempting to update the an existing country will result in an InvalidFieldsUpdate error.
- Returns:
- country
-
getCustomerGroup
Sets the CustomerGroup for this Price, if the Price does not yet have a CustomerGroup.
The CustomerGroup cannot be updated. Attempting to update an existing CustomerGroup will result in an InvalidFieldsUpdate error.
- Returns:
- customerGroup
-
getChannel
Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.
The Channel cannot be updated. Attempting to update an existing Channel will result in an InvalidFieldsUpdate error.
- Returns:
- channel
-
getValidFrom
Sets the date from which the Price is valid.
- Returns:
- validFrom
-
getValidUntil
Sets the date until the Price is valid.
- Returns:
- validUntil
-
getTiers
Sets price tiers.
- 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
-
build
builds StandalonePriceImport with checking for non-null required values- Specified by:
build
in interfaceBuilder<StandalonePriceImport>
- Returns:
- StandalonePriceImport
-
buildUnchecked
builds StandalonePriceImport without checking for non-null required values- Returns:
- StandalonePriceImport
-
of
factory method for an instance of StandalonePriceImportBuilder- Returns:
- builder
-
of
create builder for StandalonePriceImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-