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()

      Money value of this Price.

      Returns:
      value
    • getCountry

      String getCountry()

      Set this field if this Price is only valid for the specified country.

      Returns:
      country
    • getCustomerGroup

      @Valid @Valid CustomerGroupKeyReference getCustomerGroup()

      Set this field if this Price is only valid for the referenced CustomerGroup. If the referenced CustomerGroup does not exist, the state of the ImportOperation will be set to unresolved until the referenced CustomerGroup is created.

      Returns:
      customerGroup
    • getChannel

      @Valid @Valid ChannelKeyReference getChannel()

      Set this field if this Price is only valid for the referenced ProductDistribution Channel. If the referenced Channel does not exist, the state of the ImportOperation will be set to unresolved until the referenced Channel is created.

      Returns:
      channel
    • getValidFrom

      ZonedDateTime getValidFrom()

      Set this field if this Price is only valid from the specified date and time. Must be at least 1 ms earlier than validUntil.

      Returns:
      validFrom
    • getValidUntil

      ZonedDateTime getValidUntil()

      Set this field if this Price is only valid until the specified date and time. Must be at least 1 ms later than validFrom.

      Returns:
      validUntil
    • getCustom

      @Valid @Valid Custom getCustom()

      Custom Fields for the Embedded Price.

      Returns:
      custom
    • getDiscounted

      @Valid @Valid DiscountedPrice getDiscounted()

      Set this field to add a DiscountedPrice 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)

      Money value of this Price.

      Parameters:
      value - value to be set
    • setCountry

      void setCountry(String country)

      Set this field if this Price is only valid for the specified country.

      Parameters:
      country - value to be set
    • setCustomerGroup

      void setCustomerGroup(CustomerGroupKeyReference customerGroup)

      Set this field if this Price is only valid for the referenced CustomerGroup. If the referenced CustomerGroup does not exist, the state of the ImportOperation will be set to unresolved until the referenced CustomerGroup is created.

      Parameters:
      customerGroup - value to be set
    • setChannel

      void setChannel(ChannelKeyReference channel)

      Set this field if this Price is only valid for the referenced ProductDistribution Channel. If the referenced Channel does not exist, the state of the ImportOperation will be set to unresolved until the referenced Channel is created.

      Parameters:
      channel - value to be set
    • setValidFrom

      void setValidFrom(ZonedDateTime validFrom)

      Set this field if this Price is only valid from the specified date and time. Must be at least 1 ms earlier than validUntil.

      Parameters:
      validFrom - value to be set
    • setValidUntil

      void setValidUntil(ZonedDateTime validUntil)

      Set this field if this Price is only valid until the specified date and time. Must be at least 1 ms later than validFrom.

      Parameters:
      validUntil - value to be set
    • setCustom

      void setCustom(Custom custom)

      Custom Fields for the Embedded Price.

      Parameters:
      custom - value to be set
    • setDiscounted

      void setDiscounted(DiscountedPrice discounted)

      Set this field to add a DiscountedPrice 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
    • copyDeep

      PriceDraftImport copyDeep()
    • deepCopy

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