Interface PriceImport
- All Superinterfaces:
ImportResource
Represents the data used to import an Embedded Price . Once imported, this data is persisted as a Price in a Product Variant.
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()
-
Method Summary
Modifier and TypeMethodDescriptionstatic PriceImportBuilderbuilder()builder factory method for PriceImportstatic PriceImportBuilderbuilder(PriceImport template) create builder for PriceImport instancecopyDeep()static PriceImportdeepCopy(PriceImport template) factory method to create a deep copy of PriceImport@Valid ChannelKeyReferenceMaps toPrice.channel.Maps toPrice.county.@Valid CustomMaps toPrice.custom.@Valid CustomerGroupKeyReferenceMaps toPrice.customerGroup.@Valid DiscountedPriceSets a discounted price from an external service.@NotNull StringgetKey()User-defined unique identifier for the Embedded Price.@NotNull @Valid ProductKeyReferenceThe Product which contains theproductVariant.@NotNull @Valid ProductVariantKeyReferenceThe ProductVariant which contains this Embedded Price.Set tofalseto update both the current and staged projections of the Product with the new Price data. Leave empty or set totrueto only update the staged projection.getTiers()The tiered prices for this price.Maps toPrice.validFrom.Maps toPrice.validUntil.@NotNull @Valid TypedMoneygetValue()Maps toPrice.value.static PriceImportof()factory methodstatic PriceImportof(PriceImport template) factory method to create a shallow copy PriceImportvoidsetChannel(ChannelKeyReference channel) Maps toPrice.channel.voidsetCountry(String country) Maps toPrice.county.voidMaps toPrice.custom.voidsetCustomerGroup(CustomerGroupKeyReference customerGroup) Maps toPrice.customerGroup.voidsetDiscounted(DiscountedPrice discounted) Sets a discounted price from an external service.voidUser-defined unique identifier for the Embedded Price.voidsetProduct(ProductKeyReference product) The Product which contains theproductVariant.voidsetProductVariant(ProductVariantKeyReference productVariant) The ProductVariant which contains this Embedded Price.voidSet tofalseto update both the current and staged projections of the Product with the new Price data. Leave empty or set totrueto only update the staged projection.voidThe tiered prices for this price.voidThe tiered prices for this price.voidsetValidFrom(ZonedDateTime validFrom) Maps toPrice.validFrom.voidsetValidUntil(ZonedDateTime validUntil) Maps toPrice.validUntil.voidsetValue(TypedMoney value) Maps toPrice.value.static com.fasterxml.jackson.core.type.TypeReference<PriceImport>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithPriceImport(Function<PriceImport, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.common.ImportResource
withImportResource
-
Method Details
-
getKey
User-defined unique identifier for the Embedded Price. If a Price with this
keyexists on the specifiedproductVariant, it is updated with the imported data.- Specified by:
getKeyin interfaceImportResource- Returns:
- key
-
getValue
Maps to
Price.value.- Returns:
- value
-
getCountry
String getCountry()Maps to
Price.county.- Returns:
- country
-
getValidFrom
ZonedDateTime getValidFrom()Maps to
Price.validFrom.- Returns:
- validFrom
-
getValidUntil
ZonedDateTime getValidUntil()Maps to
Price.validUntil.- Returns:
- validUntil
-
getCustomerGroup
Maps to
Price.customerGroup. If the referenced CustomerGroup does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced CustomerGroup is created.- Returns:
- customerGroup
-
getChannel
Maps to
Price.channel. If the referenced Channel does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Channel is created.- Returns:
- channel
-
getDiscounted
Sets a discounted price from an external service.
- Returns:
- discounted
-
getStaged
Boolean getStaged()- Set to
falseto update both the current and staged projections of the Product with the new Price data. - Leave empty or set to
trueto only update the staged projection.
- Returns:
- staged
- Set to
-
getTiers
The tiered prices for this price.
- Returns:
- tiers
-
getCustom
Maps to
Price.custom.- Returns:
- custom
-
getProductVariant
The ProductVariant which contains this Embedded Price. If the referenced ProductVariant does not exist, the
stateof the ImportOperation will be set tounresolveduntil the referenced ProductVariant is created.- Returns:
- productVariant
-
getProduct
The Product which contains the
productVariant. If the referenced Product does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Product is created.- Returns:
- product
-
setKey
User-defined unique identifier for the Embedded Price. If a Price with this
keyexists on the specifiedproductVariant, it is updated with the imported data.- Specified by:
setKeyin interfaceImportResource- Parameters:
key- value to be set
-
setValue
Maps to
Price.value.- Parameters:
value- value to be set
-
setCountry
Maps to
Price.county.- Parameters:
country- value to be set
-
setValidFrom
Maps to
Price.validFrom.- Parameters:
validFrom- value to be set
-
setValidUntil
Maps to
Price.validUntil.- Parameters:
validUntil- value to be set
-
setCustomerGroup
Maps to
Price.customerGroup. If the referenced CustomerGroup does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced CustomerGroup is created.- Parameters:
customerGroup- value to be set
-
setChannel
Maps to
Price.channel. If the referenced Channel does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Channel is created.- Parameters:
channel- value to be set
-
setDiscounted
Sets a discounted price from an external service.
- Parameters:
discounted- value to be set
-
setStaged
- Set to
falseto update both the current and staged projections of the Product with the new Price data. - Leave empty or set to
trueto only update the staged projection.
- Parameters:
staged- value to be set
- Set to
-
setTiers
The tiered prices for this price.
- Parameters:
tiers- values to be set
-
setTiers
The tiered prices for this price.
- Parameters:
tiers- values to be set
-
setCustom
Maps to
Price.custom.- Parameters:
custom- value to be set
-
setProductVariant
The ProductVariant which contains this Embedded Price. If the referenced ProductVariant does not exist, the
stateof the ImportOperation will be set tounresolveduntil the referenced ProductVariant is created.- Parameters:
productVariant- value to be set
-
setProduct
The Product which contains the
productVariant. If the referenced Product does not exist, thestateof the ImportOperation will be set tounresolveduntil the referenced Product is created.- Parameters:
product- value to be set
-
of
factory method- Returns:
- instance of PriceImport
-
of
factory method to create a shallow copy PriceImport- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
PriceImport copyDeep()- Specified by:
copyDeepin interfaceImportResource
-
deepCopy
factory method to create a deep copy of PriceImport- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for PriceImport- Returns:
- builder
-
builder
create builder for PriceImport instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withPriceImport
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-