Class PriceImportBuilder
- All Implemented Interfaces:
Builder<PriceImport>
Example to create an instance using the builder pattern
PriceImport priceImport = PriceImport.builder()
.key("{key}")
.value(valueBuilder -> valueBuilder)
.productVariant(productVariantBuilder -> productVariantBuilder)
.product(productBuilder -> productBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddTiers
(Function<PriceTierBuilder, PriceTier> builder) The tiered prices for this price.build()
builds PriceImport with checking for non-null required valuesbuilds PriceImport without checking for non-null required valueschannel
(ChannelKeyReference channel) The Reference to the Channel with which the Price is associated.The Reference to the Channel with which the Price is associated.Maps toPrice.county
.The custom fields for this price.custom
(Function<CustomBuilder, CustomBuilder> builder) The custom fields for this price.customerGroup
(CustomerGroupKeyReference customerGroup) The Reference to the CustomerGroup with which the Price is associated.The Reference to the CustomerGroup with which the Price is associated.discounted
(DiscountedPrice discounted) Sets a discounted price from an external service.Sets a discounted price from an external service.The Reference to the Channel with which the Price is associated.Maps toPrice.county
.The custom fields for this price.The Reference to the CustomerGroup with which the Price is associated.Sets a discounted price from an external service.getKey()
User-defined unique identifier for the Embedded Price.The Product in which the Product Variant containing this Embedded Price is contained.The ProductVariant in which this Embedded Price is contained.Set tofalse
to update both the current and staged projections of the Product with the new Price data. Leave empty or set totrue
to only update the staged projection.getTiers()
The tiered prices for this price.Maps toPrice.validFrom
.Maps toPrice.validUntil
.getValue()
Maps toPrice.value
.User-defined unique identifier for the Embedded Price.static PriceImportBuilder
of()
factory method for an instance of PriceImportBuilderstatic PriceImportBuilder
of
(PriceImport template) create builder for PriceImport instanceThe tiered prices for this price.plusTiers
(Function<PriceTierBuilder, PriceTierBuilder> builder) The tiered prices for this price.product
(ProductKeyReference product) The Product in which the Product Variant containing this Embedded Price is contained.The Product in which the Product Variant containing this Embedded Price is contained.productVariant
(ProductVariantKeyReference productVariant) The ProductVariant in which this Embedded Price is contained.productVariant
(Function<ProductVariantKeyReferenceBuilder, ProductVariantKeyReferenceBuilder> builder) The ProductVariant in which this Embedded Price is contained.setTiers
(Function<PriceTierBuilder, PriceTier> builder) The tiered prices for this price.Set tofalse
to update both the current and staged projections of the Product with the new Price data. Leave empty or set totrue
to only update the staged projection.The tiered prices for this price.The tiered prices for this price.validFrom
(ZonedDateTime validFrom) Maps toPrice.validFrom
.validUntil
(ZonedDateTime validUntil) Maps toPrice.validUntil
.value
(TypedMoney value) Maps toPrice.value
.value
(Function<TypedMoneyBuilder, Builder<? extends TypedMoney>> builder) Maps toPrice.value
.The Reference to the Channel with which the Price is associated.withCustom
(Function<CustomBuilder, Custom> builder) The custom fields for this price.The Reference to the CustomerGroup with which the Price is associated.Sets a discounted price from an external service.The Product in which the Product Variant containing this Embedded Price is contained.The ProductVariant in which this Embedded Price is contained.withTiers
(Function<PriceTierBuilder, PriceTierBuilder> builder) The tiered prices for this price.
-
Constructor Details
-
PriceImportBuilder
public PriceImportBuilder()
-
-
Method Details
-
key
User-defined unique identifier for the Embedded Price. If a Price with this
key
exists on the specifiedproductVariant
, it will be updated with the imported data.- Parameters:
key
- value to be set- Returns:
- Builder
-
value
Maps to
Price.value
.- Parameters:
value
- value to be set- Returns:
- Builder
-
value
Maps to
Price.value
.- Parameters:
builder
- function to build the value value- Returns:
- Builder
-
country
Maps to
Price.county
.- Parameters:
country
- value to be set- Returns:
- Builder
-
validFrom
Maps to
Price.validFrom
.- Parameters:
validFrom
- value to be set- Returns:
- Builder
-
validUntil
Maps to
Price.validUntil
.- Parameters:
validUntil
- value to be set- Returns:
- Builder
-
customerGroup
public PriceImportBuilder customerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReferenceBuilder> builder) The Reference to the CustomerGroup with which the Price is associated. If referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary CustomerGroup is created.- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public PriceImportBuilder withCustomerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReference> builder) The Reference to the CustomerGroup with which the Price is associated. If referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary CustomerGroup is created.- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
The Reference to the CustomerGroup with which the Price is associated. If referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary CustomerGroup is created.- Parameters:
customerGroup
- value to be set- Returns:
- Builder
-
channel
public PriceImportBuilder channel(Function<ChannelKeyReferenceBuilder, ChannelKeyReferenceBuilder> builder) The Reference to the Channel with which the Price is associated. If referenced Channel does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Channel is created.- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
withChannel
public PriceImportBuilder withChannel(Function<ChannelKeyReferenceBuilder, ChannelKeyReference> builder) The Reference to the Channel with which the Price is associated. If referenced Channel does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Channel is created.- Parameters:
builder
- function to build the channel value- Returns:
- Builder
-
channel
The Reference to the Channel with which the Price is associated. If referenced Channel does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Channel is created.- Parameters:
channel
- value to be set- Returns:
- Builder
-
discounted
public PriceImportBuilder discounted(Function<DiscountedPriceBuilder, DiscountedPriceBuilder> builder) Sets a discounted price from an external service.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
withDiscounted
Sets a discounted price from an external service.
- Parameters:
builder
- function to build the discounted value- Returns:
- Builder
-
discounted
Sets a discounted price from an external service.
- Parameters:
discounted
- value to be set- Returns:
- Builder
-
staged
- Set to
false
to update both the current and staged projections of the Product with the new Price data. - Leave empty or set to
true
to only update the staged projection.
- Parameters:
staged
- value to be set- Returns:
- Builder
- Set to
-
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
-
custom
The custom fields for this price.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
The custom fields for this price.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
The custom fields for this price.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
productVariant
public PriceImportBuilder productVariant(Function<ProductVariantKeyReferenceBuilder, ProductVariantKeyReferenceBuilder> builder) The ProductVariant in which this Embedded Price is contained. The Reference to the ProductVariant with which the Price is associated. If the referenced ProductVariant does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary ProductVariant is created.- Parameters:
builder
- function to build the productVariant value- Returns:
- Builder
-
withProductVariant
public PriceImportBuilder withProductVariant(Function<ProductVariantKeyReferenceBuilder, ProductVariantKeyReference> builder) The ProductVariant in which this Embedded Price is contained. The Reference to the ProductVariant with which the Price is associated. If the referenced ProductVariant does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary ProductVariant is created.- Parameters:
builder
- function to build the productVariant value- Returns:
- Builder
-
productVariant
The ProductVariant in which this Embedded Price is contained. The Reference to the ProductVariant with which the Price is associated. If the referenced ProductVariant does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary ProductVariant is created.- Parameters:
productVariant
- value to be set- Returns:
- Builder
-
product
public PriceImportBuilder product(Function<ProductKeyReferenceBuilder, ProductKeyReferenceBuilder> builder) The Product in which the Product Variant containing this Embedded Price is contained. Maps to
ProductVariant.product
. The Reference to the Product with which the Price is associated. If referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Product is created.- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
withProduct
public PriceImportBuilder withProduct(Function<ProductKeyReferenceBuilder, ProductKeyReference> builder) The Product in which the Product Variant containing this Embedded Price is contained. Maps to
ProductVariant.product
. The Reference to the Product with which the Price is associated. If referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Product is created.- Parameters:
builder
- function to build the product value- Returns:
- Builder
-
product
The Product in which the Product Variant containing this Embedded Price is contained. Maps to
ProductVariant.product
. The Reference to the Product with which the Price is associated. If referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Product is created.- Parameters:
product
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier for the Embedded Price. If a Price with this
key
exists on the specifiedproductVariant
, it will be updated with the imported data.- Returns:
- key
-
getValue
Maps to
Price.value
.- Returns:
- value
-
getCountry
Maps to
Price.county
.- Returns:
- country
-
getValidFrom
Maps to
Price.validFrom
.- Returns:
- validFrom
-
getValidUntil
Maps to
Price.validUntil
.- Returns:
- validUntil
-
getCustomerGroup
The Reference to the CustomerGroup with which the Price is associated. If referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary CustomerGroup is created.- Returns:
- customerGroup
-
getChannel
The Reference to the Channel with which the Price is associated. If referenced Channel does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Channel is created.- Returns:
- channel
-
getDiscounted
Sets a discounted price from an external service.
- Returns:
- discounted
-
getStaged
- Set to
false
to update both the current and staged projections of the Product with the new Price data. - Leave empty or set to
true
to only update the staged projection.
- Returns:
- staged
- Set to
-
getTiers
The tiered prices for this price.
- Returns:
- tiers
-
getCustom
The custom fields for this price.
- Returns:
- custom
-
getProductVariant
The ProductVariant in which this Embedded Price is contained. The Reference to the ProductVariant with which the Price is associated. If the referenced ProductVariant does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary ProductVariant is created.- Returns:
- productVariant
-
getProduct
The Product in which the Product Variant containing this Embedded Price is contained. Maps to
ProductVariant.product
. The Reference to the Product with which the Price is associated. If referenced Product does not exist, thestate
of the ImportOperation will be set tounresolved
until the necessary Product is created.- Returns:
- product
-
build
builds PriceImport with checking for non-null required values- Specified by:
build
in interfaceBuilder<PriceImport>
- Returns:
- PriceImport
-
buildUnchecked
builds PriceImport without checking for non-null required values- Returns:
- PriceImport
-
of
factory method for an instance of PriceImportBuilder- Returns:
- builder
-
of
create builder for PriceImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-