Interface StandalonePriceImport
- All Superinterfaces:
ImportResource
The data representation for a Standalone Price to be imported that is persisted as a Standalone Price) 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 instancestatic StandalonePriceImport
deepCopy
(StandalonePriceImport template) factory method to create a deep copy of StandalonePriceImport@Valid ChannelKeyReference
Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.Sets the country for this Price, if the Price does not yet have a country.@Valid Custom
Custom Fields for the StandalonePrice.@Valid CustomerGroupKeyReference
Sets the CustomerGroup for this Price, if the Price does not yet have a 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 Standalone Price.@NotNull String
getSku()
Identifies the ProductVariant to which this Standalone Price is associated.getTiers()
Sets price tiers.Sets the date from which the Price is valid.Sets the date until the Price is valid.@NotNull @Valid TypedMoney
getValue()
Sets the money value of this Price.static StandalonePriceImport
of()
factory methodstatic StandalonePriceImport
of
(StandalonePriceImport template) factory method to create a shallow copy StandalonePriceImportvoid
setChannel
(ChannelKeyReference channel) Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.void
setCountry
(String country) Sets the country for this Price, if the Price does not yet have a country.void
Custom Fields for the StandalonePrice.void
setCustomerGroup
(CustomerGroupKeyReference customerGroup) Sets the CustomerGroup for this Price, if the Price does not yet have a 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 Standalone Price.void
Identifies the ProductVariant to which this Standalone Price is associated.void
Sets price tiers.void
Sets price tiers.void
setValidFrom
(ZonedDateTime validFrom) Sets the date from which the Price is valid.void
setValidUntil
(ZonedDateTime validUntil) Sets the date until the Price is valid.void
setValue
(TypedMoney value) Sets the money value of this Price.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 Standalone Price. If a StandalonePrice) with this
key
exists, it will be updated with the imported data.- Specified by:
getKey
in interfaceImportResource
- Returns:
- key
-
getSku
Identifies the ProductVariant to which this Standalone Price is associated. This value is not validated to exist in Product Variants.
- Returns:
- sku
-
getValue
Sets the money value of this Price.
- Returns:
- value
-
getCountry
String getCountry()Sets the country for this Price, if the Price does not yet have a country.
The country cannot be updated. Attempting to update the an existing country will result in an InvalidFieldsUpdate error.
- Returns:
- country
-
getCustomerGroup
Sets the CustomerGroup for this Price, if the Price does not yet have a CustomerGroup.
The CustomerGroup cannot be updated. Attempting to update an existing CustomerGroup will result in an InvalidFieldsUpdate error.
- Returns:
- customerGroup
-
getChannel
Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.
The Channel cannot be updated. Attempting to update an existing Channel will result in an InvalidFieldsUpdate error.
- Returns:
- channel
-
getValidFrom
ZonedDateTime getValidFrom()Sets the date from which the Price is valid.
- Returns:
- validFrom
-
getValidUntil
ZonedDateTime getValidUntil()Sets the date until the Price is valid.
- Returns:
- validUntil
-
getTiers
Sets price tiers.
- Returns:
- tiers
-
getDiscounted
Sets a discounted price for this Price that is different from the base price with value.
- Returns:
- discounted
-
getCustom
Custom Fields for the StandalonePrice.
- Returns:
- custom
-
setKey
User-defined unique identifier for the Standalone Price. If a StandalonePrice) with this
key
exists, it will be updated with the imported data.- Specified by:
setKey
in interfaceImportResource
- Parameters:
key
- value to be set
-
setSku
Identifies the ProductVariant to which this Standalone Price is associated. This value is not validated to exist in Product Variants.
- Parameters:
sku
- value to be set
-
setValue
Sets the money value of this Price.
- Parameters:
value
- value to be set
-
setCountry
Sets the country for this Price, if the Price does not yet have a country.
The country cannot be updated. Attempting to update the an existing country will result in an InvalidFieldsUpdate error.
- Parameters:
country
- value to be set
-
setCustomerGroup
Sets the CustomerGroup for this Price, if the Price does not yet have a CustomerGroup.
The CustomerGroup cannot be updated. Attempting to update an existing CustomerGroup will result in an InvalidFieldsUpdate error.
- Parameters:
customerGroup
- value to be set
-
setChannel
Sets the product distribution Channel for this Price, if the Price does not yet have a Channel.
The Channel cannot be updated. Attempting to update an existing Channel will result in an InvalidFieldsUpdate error.
- Parameters:
channel
- value to be set
-
setValidFrom
Sets the date from which the Price is valid.
- Parameters:
validFrom
- value to be set
-
setValidUntil
Sets the date until the Price is valid.
- Parameters:
validUntil
- value to be set
-
setTiers
Sets price tiers.
- Parameters:
tiers
- values to be set
-
setTiers
Sets price 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
Custom Fields for the StandalonePrice.
- 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
-
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
-