Interface PriceDraftImport


public 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 Details

    • getValue

      @NotNull @Valid @NotNull @Valid TypedMoney getValue()
      Returns:
      value
    • getCountry

      String getCountry()

      A two-digit country code as per ISO 3166-1 alpha-2.

      Returns:
      country
    • getCustomerGroup

      @Valid @Valid CustomerGroupKeyReference getCustomerGroup()

      References a customer group by key.

      Returns:
      customerGroup
    • getChannel

      @Valid @Valid ChannelKeyReference getChannel()

      References a channel by key.

      Returns:
      channel
    • getValidFrom

      ZonedDateTime getValidFrom()
      Returns:
      validFrom
    • getValidUntil

      ZonedDateTime getValidUntil()
      Returns:
      validUntil
    • getCustom

      @Valid @Valid Custom getCustom()

      The custom fields for this category.

      Returns:
      custom
    • getDiscounted

      @Valid @Valid DiscountedPrice getDiscounted()

      Sets a discounted price from an external service.

      Returns:
      discounted
    • getTiers

      @Valid @Valid List<PriceTier> getTiers()

      The tiered prices for this price.

      Returns:
      tiers
    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier for the Embedded Price.

      Returns:
      key
    • setValue

      void setValue(TypedMoney value)
      set value
      Parameters:
      value - value to be set
    • setCountry

      void setCountry(String country)

      A two-digit country code as per ISO 3166-1 alpha-2.

      Parameters:
      country - value to be set
    • setCustomerGroup

      void setCustomerGroup(CustomerGroupKeyReference customerGroup)

      References a customer group by key.

      Parameters:
      customerGroup - value to be set
    • setChannel

      void setChannel(ChannelKeyReference channel)

      References a channel by key.

      Parameters:
      channel - value to be set
    • setValidFrom

      void setValidFrom(ZonedDateTime validFrom)
      set validFrom
      Parameters:
      validFrom - value to be set
    • setValidUntil

      void setValidUntil(ZonedDateTime validUntil)
      set validUntil
      Parameters:
      validUntil - value to be set
    • setCustom

      void setCustom(Custom custom)

      The custom fields for this category.

      Parameters:
      custom - value to be set
    • setDiscounted

      void setDiscounted(DiscountedPrice discounted)

      Sets a discounted price from an external service.

      Parameters:
      discounted - value to be set
    • setTiers

      void setTiers(PriceTier... tiers)

      The tiered prices for this price.

      Parameters:
      tiers - values to be set
    • setTiers

      void setTiers(List<PriceTier> tiers)

      The tiered prices for this price.

      Parameters:
      tiers - values to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier for the Embedded Price.

      Parameters:
      key - value to be set
    • of

      static PriceDraftImport of()
      factory method
      Returns:
      instance of PriceDraftImport
    • of

      static PriceDraftImport of(PriceDraftImport template)
      factory method to create a shallow copy PriceDraftImport
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of PriceDraftImport
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static PriceDraftImportBuilder builder()
      builder factory method for PriceDraftImport
      Returns:
      builder
    • builder

      static PriceDraftImportBuilder builder(PriceDraftImport template)
      create builder for PriceDraftImport instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withPriceDraftImport

      default <T> T withPriceDraftImport(Function<PriceDraftImport,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<PriceDraftImport> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference