Interface OrderExcerpt


public interface OrderExcerpt

Excerpt of the Order extracting the total and the taxed price.


Example to create an instance using the builder pattern

     OrderExcerpt orderExcerpt = OrderExcerpt.builder()
             .totalPrice(totalPriceBuilder -> totalPriceBuilder)
             .version(0.3)
             .build()
 
  • Method Details

    • getTotalPrice

      @NotNull @Valid @NotNull @Valid TypedMoney getTotalPrice()

      Total price of the Order.

      Returns:
      totalPrice
    • getTaxedPrice

      @Valid @Valid TaxedPrice getTaxedPrice()

      Taxed price of the Order.

      Returns:
      taxedPrice
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the Order.

      Returns:
      version
    • setTotalPrice

      void setTotalPrice(TypedMoney totalPrice)

      Total price of the Order.

      Parameters:
      totalPrice - value to be set
    • setTaxedPrice

      void setTaxedPrice(TaxedPrice taxedPrice)

      Taxed price of the Order.

      Parameters:
      taxedPrice - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the Order.

      Parameters:
      version - value to be set
    • of

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

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

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

      static OrderExcerptBuilder builder()
      builder factory method for OrderExcerpt
      Returns:
      builder
    • builder

      static OrderExcerptBuilder builder(OrderExcerpt template)
      create builder for OrderExcerpt instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withOrderExcerpt

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