Interface StandalonePriceImport

All Superinterfaces:
ImportResource

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

    • getKey

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

      @NotNull @NotNull String getSku()

      Maps to StandalonePrice.sku. This value is not validated to exist in Product Variants.

      Returns:
      sku
    • getValue

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

      @Valid @Valid CustomerGroupKeyReference getCustomerGroup()

      Maps to StandalonePrice.customerGroup. If the referenced CustomerGroup does not exist, the state of the ImportOperation will be set to unresolved 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

      @Valid @Valid ChannelKeyReference getChannel()

      Maps to StandalonePrice.channel. If the referenced Channel does not exist, the state of the ImportOperation will be set to unresolved 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

      @Valid @Valid List<PriceTier> getTiers()

      Maps to StandalonePrice.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()

      Maps to StandalonePrice.custom.

      Returns:
      custom
    • setKey

      void setKey(String key)

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

      void setSku(String sku)

      Maps to StandalonePrice.sku. This value is not validated to exist in Product Variants.

      Parameters:
      sku - value to be set
    • setValue

      void setValue(TypedMoney value)

      Maps to StandalonePrice.value.

      Parameters:
      value - value to be set
    • setCountry

      void setCountry(String country)

      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

      void setCustomerGroup(CustomerGroupKeyReference customerGroup)

      Maps to StandalonePrice.customerGroup. If the referenced CustomerGroup does not exist, the state of the ImportOperation will be set to unresolved 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

      void setChannel(ChannelKeyReference channel)

      Maps to StandalonePrice.channel. If the referenced Channel does not exist, the state of the ImportOperation will be set to unresolved 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

      void setValidFrom(ZonedDateTime validFrom)

      Maps to StandalonePrice.validFrom.

      Parameters:
      validFrom - value to be set
    • setValidUntil

      void setValidUntil(ZonedDateTime validUntil)

      Maps to StandalonePrice.validUntil.

      Parameters:
      validUntil - value to be set
    • setTiers

      void setTiers(PriceTier... tiers)

      Maps to StandalonePrice.tiers.

      Parameters:
      tiers - values to be set
    • setTiers

      void setTiers(List<PriceTier> tiers)

      Maps to StandalonePrice.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)

      Maps to StandalonePrice.custom.

      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
    • copyDeep

      Specified by:
      copyDeep in interface ImportResource
    • deepCopy

      @Nullable static StandalonePriceImport deepCopy(@Nullable StandalonePriceImport template)
      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