Class CartClassificationTierBuilder

java.lang.Object
com.commercetools.api.models.shipping_method.CartClassificationTierBuilder
All Implemented Interfaces:
Builder<CartClassificationTier>

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

     CartClassificationTier cartClassificationTier = CartClassificationTier.builder()
             .value("{value}")
             .price(priceBuilder -> priceBuilder)
             .build()
 
  • Constructor Details

    • CartClassificationTierBuilder

      public CartClassificationTierBuilder()
  • Method Details

    • value

      public CartClassificationTierBuilder value(String value)

      key selected from the values of the CartClassificationType configured in the Project.

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

      Fixed shipping rate for the selected classification.

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

      Fixed shipping rate for the selected classification.

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

      public CartClassificationTierBuilder price(Money price)

      Fixed shipping rate for the selected classification.

      Parameters:
      price - value to be set
      Returns:
      Builder
    • isMatching

      public CartClassificationTierBuilder isMatching(@Nullable Boolean isMatching)

      Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.

      Parameters:
      isMatching - value to be set
      Returns:
      Builder
    • getValue

      public String getValue()

      key selected from the values of the CartClassificationType configured in the Project.

      Returns:
      value
    • getPrice

      public Money getPrice()

      Fixed shipping rate for the selected classification.

      Returns:
      price
    • getIsMatching

      @Nullable public Boolean getIsMatching()

      Appears in response to Get ShippingMethods for a Cart if the shipping rate matches the search query.

      Returns:
      isMatching
    • build

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

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

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

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