Interface PriceDraftImport
The representation of a Price Draft for the import purpose.
Example to create an instance using the builder pattern
PriceDraftImport priceDraftImport = PriceDraftImport.builder()
.value(valueBuilder -> valueBuilder)
.key("{key}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic PriceDraftImportBuilder
builder()
builder factory method for PriceDraftImportstatic PriceDraftImportBuilder
builder
(PriceDraftImport template) create builder for PriceDraftImport instancecopyDeep()
static PriceDraftImport
deepCopy
(PriceDraftImport template) factory method to create a deep copy of PriceDraftImport@Valid ChannelKeyReference
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.@Valid Custom
Custom Fields for the Embedded Price.@Valid CustomerGroupKeyReference
Set this field if this Price is only valid for the referenced CustomerGroup.@Valid DiscountedPrice
Set this field to add a DiscountedPrice from an external service.@NotNull String
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.@NotNull @Valid TypedMoney
getValue()
Money value of this Price.static PriceDraftImport
of()
factory methodstatic PriceDraftImport
of
(PriceDraftImport template) factory method to create a shallow copy PriceDraftImportvoid
setChannel
(ChannelKeyReference channel) Set this field if this Price is only valid for the referencedProductDistribution
Channel.void
setCountry
(String country) Set this field if this Price is only valid for the specified country.void
Custom Fields for the Embedded Price.void
setCustomerGroup
(CustomerGroupKeyReference customerGroup) Set this field if this Price is only valid for the referenced CustomerGroup.void
setDiscounted
(DiscountedPrice discounted) Set this field to add a DiscountedPrice from an external service.void
User-defined unique identifier for the Embedded Price.void
The tiered prices for this price.void
The tiered prices for this price.void
setValidFrom
(ZonedDateTime validFrom) Set this field if this Price is only valid from the specified date and time.void
setValidUntil
(ZonedDateTime validUntil) Set this field if this Price is only valid until the specified date and time.void
setValue
(TypedMoney value) Money value of this Price.static com.fasterxml.jackson.core.type.TypeReference<PriceDraftImport>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withPriceDraftImport
(Function<PriceDraftImport, T> helper) accessor map function
-
Method Details
-
getValue
Money value of this Price.
- Returns:
- value
-
getCountry
String 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
ZonedDateTime 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
ZonedDateTime 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
-
setValue
Money value of this Price.
- Parameters:
value
- value to be set
-
setCountry
Set this field if this Price is only valid for the specified country.
- Parameters:
country
- value to be set
-
setCustomerGroup
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
-
setChannel
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
-
setValidFrom
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
-
setValidUntil
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
-
setCustom
Custom Fields for the Embedded Price.
- Parameters:
custom
- value to be set
-
setDiscounted
Set this field to add a DiscountedPrice from an external service.
- Parameters:
discounted
- value to be set
-
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
-
setKey
User-defined unique identifier for the Embedded Price.
- Parameters:
key
- value to be set
-
of
factory method- Returns:
- instance of PriceDraftImport
-
of
factory method to create a shallow copy PriceDraftImport- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
PriceDraftImport copyDeep() -
deepCopy
factory method to create a deep copy of PriceDraftImport- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for PriceDraftImport- Returns:
- builder
-
builder
create builder for PriceDraftImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withPriceDraftImport
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
-