Interface StandalonePriceImport

All Superinterfaces:
ImportResource

public interface StandalonePriceImport extends 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 Details

    • getKey

      @NotNull @NotNull String 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 interface ImportResource
      Returns:
      key
    • getSku

      @NotNull @NotNull String getSku()

      Identifies the ProductVariant to which this Standalone Price is associated. This value is not validated to exist in Product Variants.

      Returns:
      sku
    • getValue

      @NotNull @Valid @NotNull @Valid TypedMoney 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

      @Valid @Valid CustomerGroupKeyReference 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

      @Valid @Valid ChannelKeyReference 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

      @Valid @Valid List<PriceTier> getTiers()

      Sets price tiers.

      Returns:
      tiers
    • getDiscounted

      @Valid @Valid DiscountedPrice getDiscounted()

      Sets a discounted price for this Price that is different from the base price with value.

      Returns:
      discounted
    • getCustom

      @Valid @Valid Custom getCustom()

      Custom Fields for the StandalonePrice.

      Returns:
      custom
    • setKey

      void setKey(String key)

      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 interface ImportResource
      Parameters:
      key - value to be set
    • setSku

      void setSku(String sku)

      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

      void setValue(TypedMoney value)

      Sets the money value of this Price.

      Parameters:
      value - value to be set
    • setCountry

      void setCountry(String country)

      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

      void setCustomerGroup(CustomerGroupKeyReference customerGroup)

      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

      void setChannel(ChannelKeyReference channel)

      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

      void setValidFrom(ZonedDateTime validFrom)

      Sets the date from which the Price is valid.

      Parameters:
      validFrom - value to be set
    • setValidUntil

      void setValidUntil(ZonedDateTime validUntil)

      Sets the date until the Price is valid.

      Parameters:
      validUntil - value to be set
    • setTiers

      void setTiers(PriceTier... tiers)

      Sets price tiers.

      Parameters:
      tiers - values to be set
    • setTiers

      void setTiers(List<PriceTier> tiers)

      Sets price tiers.

      Parameters:
      tiers - values to be set
    • setDiscounted

      void setDiscounted(DiscountedPrice discounted)

      Sets a discounted price for this Price that is different from the base price with value.

      Parameters:
      discounted - value to be set
    • setCustom

      void setCustom(Custom custom)

      Custom Fields for the StandalonePrice.

      Parameters:
      custom - value to be set
    • of

      static StandalonePriceImport 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

      static StandalonePriceImportBuilder 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

      default <T> T withStandalonePriceImport(Function<StandalonePriceImport,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<StandalonePriceImport> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference