Class CartsConfigurationBuilder

java.lang.Object
com.commercetools.api.models.project.CartsConfigurationBuilder
All Implemented Interfaces:
Builder<CartsConfiguration>

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

     CartsConfiguration cartsConfiguration = CartsConfiguration.builder()
             .build()
 
  • Constructor Details

    • CartsConfigurationBuilder

      public CartsConfigurationBuilder()
  • Method Details

    • deleteDaysAfterLastModification

      public CartsConfigurationBuilder deleteDaysAfterLastModification(@Nullable Long deleteDaysAfterLastModification)

      Default value for the deleteDaysAfterLastModification parameter of the CartDraft and MyCartDraft. If a ChangeSubscription for Carts exists, a ResourceDeletedDeliveryPayload is sent upon deletion of a Cart.

      This field may not be present on Projects created before January 2020.

      Parameters:
      deleteDaysAfterLastModification - value to be set
      Returns:
      Builder
    • countryTaxRateFallbackEnabled

      public CartsConfigurationBuilder countryTaxRateFallbackEnabled(@Nullable Boolean countryTaxRateFallbackEnabled)

      Indicates if country - no state Tax Rate fallback should be used when a shipping address state is not explicitly covered in the rates lists of all Tax Categories of a Cart Line Items. This field may not be present on Projects created before June 2020.

      Parameters:
      countryTaxRateFallbackEnabled - value to be set
      Returns:
      Builder
    • getDeleteDaysAfterLastModification

      @Nullable public Long getDeleteDaysAfterLastModification()

      Default value for the deleteDaysAfterLastModification parameter of the CartDraft and MyCartDraft. If a ChangeSubscription for Carts exists, a ResourceDeletedDeliveryPayload is sent upon deletion of a Cart.

      This field may not be present on Projects created before January 2020.

      Returns:
      deleteDaysAfterLastModification
    • getCountryTaxRateFallbackEnabled

      @Nullable public Boolean getCountryTaxRateFallbackEnabled()

      Indicates if country - no state Tax Rate fallback should be used when a shipping address state is not explicitly covered in the rates lists of all Tax Categories of a Cart Line Items. This field may not be present on Projects created before June 2020.

      Returns:
      countryTaxRateFallbackEnabled
    • build

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

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

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

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