Class OrderExcerptBuilder

java.lang.Object
com.commercetools.api.models.order_edit.OrderExcerptBuilder
All Implemented Interfaces:
Builder<OrderExcerpt>

public class OrderExcerptBuilder extends Object implements Builder<OrderExcerpt>
OrderExcerptBuilder
Example to create an instance using the builder pattern

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

    • OrderExcerptBuilder

      public OrderExcerptBuilder()
  • Method Details

    • totalPrice

      public OrderExcerptBuilder totalPrice(TypedMoney totalPrice)

      Total price of the Order.

      Parameters:
      totalPrice - value to be set
      Returns:
      Builder
    • totalPrice

      public OrderExcerptBuilder totalPrice(Function<TypedMoneyBuilder,Builder<? extends TypedMoney>> builder)

      Total price of the Order.

      Parameters:
      builder - function to build the totalPrice value
      Returns:
      Builder
    • taxedPrice

      Taxed price of the Order.

      Parameters:
      builder - function to build the taxedPrice value
      Returns:
      Builder
    • withTaxedPrice

      public OrderExcerptBuilder withTaxedPrice(Function<TaxedPriceBuilder,TaxedPrice> builder)

      Taxed price of the Order.

      Parameters:
      builder - function to build the taxedPrice value
      Returns:
      Builder
    • taxedPrice

      public OrderExcerptBuilder taxedPrice(@Nullable TaxedPrice taxedPrice)

      Taxed price of the Order.

      Parameters:
      taxedPrice - value to be set
      Returns:
      Builder
    • version

      public OrderExcerptBuilder version(Long version)

      Current version of the Order.

      Parameters:
      version - value to be set
      Returns:
      Builder
    • getTotalPrice

      public TypedMoney getTotalPrice()

      Total price of the Order.

      Returns:
      totalPrice
    • getTaxedPrice

      @Nullable public TaxedPrice getTaxedPrice()

      Taxed price of the Order.

      Returns:
      taxedPrice
    • getVersion

      public Long getVersion()

      Current version of the Order.

      Returns:
      version
    • build

      public OrderExcerpt build()
      builds OrderExcerpt with checking for non-null required values
      Specified by:
      build in interface Builder<OrderExcerpt>
      Returns:
      OrderExcerpt
    • buildUnchecked

      public OrderExcerpt buildUnchecked()
      builds OrderExcerpt without checking for non-null required values
      Returns:
      OrderExcerpt
    • of

      public static OrderExcerptBuilder of()
      factory method for an instance of OrderExcerptBuilder
      Returns:
      builder
    • of

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