Interface LineItemPrice


public interface LineItemPrice
LineItemPrice
Example to create an instance using the builder pattern

     LineItemPrice lineItemPrice = LineItemPrice.builder()
             .value(valueBuilder -> valueBuilder)
             .build()
 
  • Method Details

    • getValue

      @NotNull @Valid @NotNull @Valid TypedMoney getValue()

      Maps to Price.value.

      Returns:
      value
    • getCountry

      String getCountry()

      Maps to Price.county.

      Returns:
      country
    • getValidFrom

      ZonedDateTime getValidFrom()

      Maps to Price.validFrom.

      Returns:
      validFrom
    • getValidUntil

      ZonedDateTime getValidUntil()

      Maps to Price.validUntil.

      Returns:
      validUntil
    • 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
    • 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
    • getCustom

      @Valid @Valid Custom getCustom()

      Maps to Price.custom.

      Returns:
      custom
    • setValue

      void setValue(TypedMoney value)

      Maps to Price.value.

      Parameters:
      value - value to be set
    • setCountry

      void setCountry(String country)

      Maps to Price.county.

      Parameters:
      country - value to be set
    • setValidFrom

      void setValidFrom(ZonedDateTime validFrom)

      Maps to Price.validFrom.

      Parameters:
      validFrom - value to be set
    • setValidUntil

      void setValidUntil(ZonedDateTime validUntil)

      Maps to Price.validUntil.

      Parameters:
      validUntil - 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
    • 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
    • setCustom

      void setCustom(Custom custom)

      Maps to Price.custom.

      Parameters:
      custom - value to be set
    • of

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

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

      @Nullable static LineItemPrice deepCopy(@Nullable LineItemPrice template)
      factory method to create a deep copy of LineItemPrice
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static LineItemPriceBuilder builder()
      builder factory method for LineItemPrice
      Returns:
      builder
    • builder

      static LineItemPriceBuilder builder(LineItemPrice template)
      create builder for LineItemPrice instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withLineItemPrice

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