Interface StandalonePriceImport
- All Superinterfaces:
ImportResource
Represents the data used to import a StandalonePrice. Once imported, this data is persisted as a StandalonePrice) in the Project.
Example to create an instance using the builder pattern
StandalonePriceImport standalonePriceImport = StandalonePriceImport.builder()
.key("{key}")
.sku("{sku}")
.value(valueBuilder -> valueBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic StandalonePriceImportBuilder
builder()
builder factory method for StandalonePriceImportstatic StandalonePriceImportBuilder
builder
(StandalonePriceImport template) create builder for StandalonePriceImport instancecopyDeep()
static StandalonePriceImport
deepCopy
(StandalonePriceImport template) factory method to create a deep copy of StandalonePriceImport@Valid ChannelKeyReference
Maps toStandalonePrice.channel
.Maps toStandalonePrice.country
.@Valid Custom
Maps toStandalonePrice.custom
.@Valid CustomerGroupKeyReference
Maps toStandalonePrice.customerGroup
.@Valid DiscountedPrice
Sets a discounted price for this Price that is different from the base price with value.@NotNull String
getKey()
User-defined unique identifier for the StandalonePrice.@NotNull String
getSku()
Maps toStandalonePrice.sku
.getTiers()
Maps toStandalonePrice.tiers
.Maps toStandalonePrice.validFrom
.Maps toStandalonePrice.validUntil
.@NotNull @Valid TypedMoney
getValue()
Maps toStandalonePrice.value
.static StandalonePriceImport
of()
factory methodstatic StandalonePriceImport
of
(StandalonePriceImport template) factory method to create a shallow copy StandalonePriceImportvoid
setChannel
(ChannelKeyReference channel) Maps toStandalonePrice.channel
.void
setCountry
(String country) Maps toStandalonePrice.country
.void
Maps toStandalonePrice.custom
.void
setCustomerGroup
(CustomerGroupKeyReference customerGroup) Maps toStandalonePrice.customerGroup
.void
setDiscounted
(DiscountedPrice discounted) Sets a discounted price for this Price that is different from the base price with value.void
User-defined unique identifier for the StandalonePrice.void
Maps toStandalonePrice.sku
.void
Maps toStandalonePrice.tiers
.void
Maps toStandalonePrice.tiers
.void
setValidFrom
(ZonedDateTime validFrom) Maps toStandalonePrice.validFrom
.void
setValidUntil
(ZonedDateTime validUntil) Maps toStandalonePrice.validUntil
.void
setValue
(TypedMoney value) Maps toStandalonePrice.value
.static com.fasterxml.jackson.core.type.TypeReference<StandalonePriceImport>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.importapi.models.common.ImportResource
withImportResource
-
Method Details
-
getKey
User-defined unique identifier for the StandalonePrice. If a StandalonePrice) with this
key
exists, it is updated with the imported data.- Specified by:
getKey
in interfaceImportResource
- 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
String 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
ZonedDateTime getValidFrom()Maps to
StandalonePrice.validFrom
.- Returns:
- validFrom
-
getValidUntil
ZonedDateTime 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
-
setKey
User-defined unique identifier for the StandalonePrice. If a StandalonePrice) with this
key
exists, it is updated with the imported data.- Specified by:
setKey
in interfaceImportResource
- Parameters:
key
- value to be set
-
setSku
Maps to
StandalonePrice.sku
. This value is not validated to exist in Product Variants.- Parameters:
sku
- value to be set
-
setValue
Maps to
StandalonePrice.value
.- Parameters:
value
- value to be set
-
setCountry
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
-
setCustomerGroup
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
-
setChannel
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
-
setValidFrom
Maps to
StandalonePrice.validFrom
.- Parameters:
validFrom
- value to be set
-
setValidUntil
Maps to
StandalonePrice.validUntil
.- Parameters:
validUntil
- value to be set
-
setTiers
Maps to
StandalonePrice.tiers
.- Parameters:
tiers
- values to be set
-
setTiers
Maps to
StandalonePrice.tiers
.- Parameters:
tiers
- values to be set
-
setDiscounted
Sets a discounted price for this Price that is different from the base price with value.
- Parameters:
discounted
- value to be set
-
setCustom
Maps to
StandalonePrice.custom
.- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of StandalonePriceImport
-
of
factory method to create a shallow copy StandalonePriceImport- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
copyDeep
StandalonePriceImport copyDeep()- Specified by:
copyDeep
in interfaceImportResource
-
deepCopy
factory method to create a deep copy of StandalonePriceImport- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StandalonePriceImport- Returns:
- builder
-
builder
create builder for StandalonePriceImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withStandalonePriceImport
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
-