Class TaxedItemPriceBuilder

java.lang.Object
com.commercetools.history.models.common.TaxedItemPriceBuilder
All Implemented Interfaces:
Builder<TaxedItemPrice>

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

     TaxedItemPrice taxedItemPrice = TaxedItemPrice.builder()
             .totalNet(totalNetBuilder -> totalNetBuilder)
             .totalGross(totalGrossBuilder -> totalGrossBuilder)
             .build()
 
  • Constructor Details

    • TaxedItemPriceBuilder

      public TaxedItemPriceBuilder()
  • Method Details

    • totalNet

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

      public TaxedItemPriceBuilder withTotalNet(Function<MoneyBuilder,Money> builder)
      set the value to the totalNet using the builder function
      Parameters:
      builder - function to build the totalNet value
      Returns:
      Builder
    • totalNet

      public TaxedItemPriceBuilder totalNet(Money totalNet)
      set the value to the totalNet
      Parameters:
      totalNet - value to be set
      Returns:
      Builder
    • totalGross

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

      public TaxedItemPriceBuilder withTotalGross(Function<MoneyBuilder,Money> builder)
      set the value to the totalGross using the builder function
      Parameters:
      builder - function to build the totalGross value
      Returns:
      Builder
    • totalGross

      public TaxedItemPriceBuilder totalGross(Money totalGross)
      set the value to the totalGross
      Parameters:
      totalGross - value to be set
      Returns:
      Builder
    • getTotalNet

      public Money getTotalNet()
      value of totalNet}
      Returns:
      totalNet
    • getTotalGross

      public Money getTotalGross()
      value of totalGross}
      Returns:
      totalGross
    • build

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

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

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

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