Class StandalonePriceAddPriceTierActionBuilder

java.lang.Object
com.commercetools.api.models.standalone_price.StandalonePriceAddPriceTierActionBuilder
All Implemented Interfaces:
Builder<StandalonePriceAddPriceTierAction>

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

     StandalonePriceAddPriceTierAction standalonePriceAddPriceTierAction = StandalonePriceAddPriceTierAction.builder()
             .tier(tierBuilder -> tierBuilder)
             .build()
 
  • Constructor Details

    • StandalonePriceAddPriceTierActionBuilder

      public StandalonePriceAddPriceTierActionBuilder()
  • Method Details

    • tier

      The PriceTier to be added to the tiers field of the StandalonePrice. The action returns an InvalidField error in the following cases:

      • Trying to add a PriceTier with minimumQuantity < 2.
      • Trying to add a PriceTier with minimumQuantity that already exists for the StandalonePrice.
      Parameters:
      builder - function to build the tier value
      Returns:
      Builder
    • withTier

      The PriceTier to be added to the tiers field of the StandalonePrice. The action returns an InvalidField error in the following cases:

      • Trying to add a PriceTier with minimumQuantity < 2.
      • Trying to add a PriceTier with minimumQuantity that already exists for the StandalonePrice.
      Parameters:
      builder - function to build the tier value
      Returns:
      Builder
    • tier

      The PriceTier to be added to the tiers field of the StandalonePrice. The action returns an InvalidField error in the following cases:

      • Trying to add a PriceTier with minimumQuantity < 2.
      • Trying to add a PriceTier with minimumQuantity that already exists for the StandalonePrice.
      Parameters:
      tier - value to be set
      Returns:
      Builder
    • getTier

      public PriceTierDraft getTier()

      The PriceTier to be added to the tiers field of the StandalonePrice. The action returns an InvalidField error in the following cases:

      • Trying to add a PriceTier with minimumQuantity < 2.
      • Trying to add a PriceTier with minimumQuantity that already exists for the StandalonePrice.
      Returns:
      tier
    • build

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

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

      factory method for an instance of StandalonePriceAddPriceTierActionBuilder
      Returns:
      builder
    • of

      create builder for StandalonePriceAddPriceTierAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder