Class CartSetCountryActionBuilder

java.lang.Object
com.commercetools.api.models.cart.CartSetCountryActionBuilder
All Implemented Interfaces:
Builder<CartSetCountryAction>

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

     CartSetCountryAction cartSetCountryAction = CartSetCountryAction.builder()
             .build()
 
  • Constructor Details

    • CartSetCountryActionBuilder

      public CartSetCountryActionBuilder()
  • Method Details

    • country

      public CartSetCountryActionBuilder country(@Nullable String country)

      Value to set. If empty, any existing value is removed.

      If the Cart is bound to a store, the provided value must be included in the Store's countries. Otherwise a CountryNotConfiguredInStore error is returned.

      Parameters:
      country - value to be set
      Returns:
      Builder
    • getCountry

      @Nullable public String getCountry()

      Value to set. If empty, any existing value is removed.

      If the Cart is bound to a store, the provided value must be included in the Store's countries. Otherwise a CountryNotConfiguredInStore error is returned.

      Returns:
      country
    • build

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

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

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

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