Class TaxedItemPriceDraftBuilder

java.lang.Object
com.commercetools.api.models.order.TaxedItemPriceDraftBuilder
All Implemented Interfaces:
Builder<TaxedItemPriceDraft>

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

     TaxedItemPriceDraft taxedItemPriceDraft = TaxedItemPriceDraft.builder()
             .totalNet(totalNetBuilder -> totalNetBuilder)
             .totalGross(totalGrossBuilder -> totalGrossBuilder)
             .build()
 
  • Constructor Details

    • TaxedItemPriceDraftBuilder

      public TaxedItemPriceDraftBuilder()
  • Method Details

    • totalNet

      Draft type that stores amounts only in cent precision for the specified currency.

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

      public TaxedItemPriceDraftBuilder withTotalNet(Function<MoneyBuilder,Money> builder)

      Draft type that stores amounts only in cent precision for the specified currency.

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

      public TaxedItemPriceDraftBuilder totalNet(Money totalNet)

      Draft type that stores amounts only in cent precision for the specified currency.

      Parameters:
      totalNet - value to be set
      Returns:
      Builder
    • totalGross

      Draft type that stores amounts only in cent precision for the specified currency.

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

      public TaxedItemPriceDraftBuilder withTotalGross(Function<MoneyBuilder,Money> builder)

      Draft type that stores amounts only in cent precision for the specified currency.

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

      public TaxedItemPriceDraftBuilder totalGross(Money totalGross)

      Draft type that stores amounts only in cent precision for the specified currency.

      Parameters:
      totalGross - value to be set
      Returns:
      Builder
    • getTotalNet

      public Money getTotalNet()

      Draft type that stores amounts only in cent precision for the specified currency.

      Returns:
      totalNet
    • getTotalGross

      public Money getTotalGross()

      Draft type that stores amounts only in cent precision for the specified currency.

      Returns:
      totalGross
    • build

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

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

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

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