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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddTiers
(Function<PriceTierBuilder, PriceTier> builder) Maps toStandalonePrice.tiers
.build()
builds StandalonePriceImport with checking for non-null required valuesbuilds StandalonePriceImport without checking for non-null required valueschannel
(ChannelKeyReference channel) Maps toStandalonePrice.channel
.Maps toStandalonePrice.channel
.Maps toStandalonePrice.country
.Maps toStandalonePrice.custom
.custom
(Function<CustomBuilder, CustomBuilder> builder) Maps toStandalonePrice.custom
.customerGroup
(CustomerGroupKeyReference customerGroup) Maps toStandalonePrice.customerGroup
.Maps toStandalonePrice.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.Maps toStandalonePrice.channel
.Maps toStandalonePrice.country
.Maps toStandalonePrice.custom
.Maps toStandalonePrice.customerGroup
.Sets a discounted price for this Price that is different from the base price with value.getKey()
User-defined unique identifier for the StandalonePrice.getSku()
Maps toStandalonePrice.sku
.getTiers()
Maps toStandalonePrice.tiers
.Maps toStandalonePrice.validFrom
.Maps toStandalonePrice.validUntil
.getValue()
Maps toStandalonePrice.value
.User-defined unique identifier for the StandalonePrice.static StandalonePriceImportBuilder
of()
factory method for an instance of StandalonePriceImportBuilderstatic StandalonePriceImportBuilder
of
(StandalonePriceImport template) create builder for StandalonePriceImport instanceMaps toStandalonePrice.tiers
.plusTiers
(Function<PriceTierBuilder, PriceTierBuilder> builder) Maps toStandalonePrice.tiers
.setTiers
(Function<PriceTierBuilder, PriceTier> builder) Maps toStandalonePrice.tiers
.Maps toStandalonePrice.sku
.Maps toStandalonePrice.tiers
.Maps toStandalonePrice.tiers
.validFrom
(ZonedDateTime validFrom) Maps toStandalonePrice.validFrom
.validUntil
(ZonedDateTime validUntil) Maps toStandalonePrice.validUntil
.value
(TypedMoney value) Maps toStandalonePrice.value
.value
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Maps toStandalonePrice.value
.Maps toStandalonePrice.channel
.withCustom
(Function<CustomBuilder, Custom> builder) Maps toStandalonePrice.custom
.Maps toStandalonePrice.customerGroup
.Sets a discounted price for this Price that is different from the base price with value.withTiers
(Function<PriceTierBuilder, PriceTierBuilder> builder) Maps toStandalonePrice.tiers
.
-
Constructor Details
-
StandalonePriceImportBuilder
public StandalonePriceImportBuilder()
-
-
Method Details
-
key
User-defined unique identifier for the StandalonePrice. If a StandalonePrice) with this
key
exists, it is updated with the imported data.- Parameters:
key
- value to be set- Returns:
- Builder
-
sku
Maps to
StandalonePrice.sku
. This value is not validated to exist in Product Variants.- Parameters:
sku
- value to be set- Returns:
- Builder
-
value
Maps to
StandalonePrice.value
.- Parameters:
value
- value to be set- Returns:
- Builder
-
value
public StandalonePriceImportBuilder value(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Maps to
StandalonePrice.value
.- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
country
Maps to
StandalonePrice.country
. This value cannot be updated. Attempting to update this value will result in an InvalidFieldsUpdate error.- Parameters:
country
- value to be set- Returns:
- Builder
-
customerGroup
public StandalonePriceImportBuilder customerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReferenceBuilder> builder) Maps to
StandalonePrice.customerGroup
. If the referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.This value cannot be updated. Attempting to update this value will result in an InvalidFieldsUpdate error.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public StandalonePriceImportBuilder withCustomerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReference> builder) Maps to
StandalonePrice.customerGroup
. If the referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.This value cannot be updated. Attempting to update this value will result in an InvalidFieldsUpdate error.
- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
public StandalonePriceImportBuilder customerGroup(@Nullable CustomerGroupKeyReference customerGroup) Maps to
StandalonePrice.customerGroup
. If the referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.This value cannot be updated. Attempting to update this value will result in an InvalidFieldsUpdate error.
- Parameters:
customerGroup
- value to be set- Returns:
- Builder
-
channel
public StandalonePriceImportBuilder channel(Function<ChannelKeyReferenceBuilder, ChannelKeyReferenceBuilder> builder) Maps to
StandalonePrice.channel
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.This value cannot be updated. Attempting to update this value will result in an InvalidFieldsUpdate error.
- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
withChannel
public StandalonePriceImportBuilder withChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReference> builder) Maps to
StandalonePrice.channel
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.This value cannot be updated. Attempting to update this value will result in an InvalidFieldsUpdate error.
- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
channel
Maps to
StandalonePrice.channel
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.This value cannot be updated. Attempting to update this value will result in an InvalidFieldsUpdate error.
- Parameters:
channel
- value to be set- Returns:
- Builder
-
validFrom
Maps to
StandalonePrice.validFrom
.- Parameters:
validFrom
- value to be set- Returns:
- Builder
-
validUntil
Maps to
StandalonePrice.validUntil
.- Parameters:
validUntil
- value to be set- Returns:
- Builder
-
tiers
Maps to
StandalonePrice.tiers
.- Parameters:
tiers
- value to be set- Returns:
- Builder
-
tiers
Maps to
StandalonePrice.tiers
.- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
Maps to
StandalonePrice.tiers
.- Parameters:
tiers
- value to be set- Returns:
- Builder
-
plusTiers
Maps to
StandalonePrice.tiers
.- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
withTiers
Maps to
StandalonePrice.tiers
.- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
addTiers
Maps to
StandalonePrice.tiers
.- Parameters:
builder
- function to build the tiers value- Returns:
- Builder
-
setTiers
Maps to
StandalonePrice.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
Maps to
StandalonePrice.custom
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Maps to
StandalonePrice.custom
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Maps to
StandalonePrice.custom
.- Parameters:
custom
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier for the StandalonePrice. If a StandalonePrice) with this
key
exists, it is updated with the imported data.- Returns:
- key
-
getSku
Maps to
StandalonePrice.sku
. This value is not validated to exist in Product Variants.- Returns:
- sku
-
getValue
Maps to
StandalonePrice.value
.- Returns:
- value
-
getCountry
Maps to
StandalonePrice.country
. This value cannot be updated. Attempting to update this value will result in an InvalidFieldsUpdate error.- Returns:
- country
-
getCustomerGroup
Maps to
StandalonePrice.customerGroup
. If the referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.This value cannot be updated. Attempting to update this value will result in an InvalidFieldsUpdate error.
- Returns:
- customerGroup
-
getChannel
Maps to
StandalonePrice.channel
. If the referenced Channel does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Channel is created.This value cannot be updated. Attempting to update this value will result in an InvalidFieldsUpdate error.
- Returns:
- channel
-
getValidFrom
Maps to
StandalonePrice.validFrom
.- Returns:
- validFrom
-
getValidUntil
Maps to
StandalonePrice.validUntil
.- Returns:
- validUntil
-
getTiers
Maps to
StandalonePrice.tiers
.- Returns:
- tiers
-
getDiscounted
Sets a discounted price for this Price that is different from the base price with value.
- Returns:
- discounted
-
getCustom
Maps to
StandalonePrice.custom
.- 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
-