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 object to store money in cent amounts for a specific currency.

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

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

      Draft object to store money in cent amounts for a specific currency.

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

      public TaxedItemPriceDraftBuilder totalNet(Money totalNet)

      Draft object to store money in cent amounts for a specific currency.

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

      Draft object to store money in cent amounts for a specific currency.

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

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

      Draft object to store money in cent amounts for a specific currency.

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

      public TaxedItemPriceDraftBuilder totalGross(Money totalGross)

      Draft object to store money in cent amounts for a specific currency.

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

      public Money getTotalNet()

      Draft object to store money in cent amounts for a specific currency.

      Returns:
      totalNet
    • getTotalGross

      public Money getTotalGross()

      Draft object to store money in cent amounts for a specific 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