Class CartsConfigurationBuilder
- All Implemented Interfaces:
Builder<CartsConfiguration>
Example to create an instance using the builder pattern
CartsConfiguration cartsConfiguration = CartsConfiguration.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds CartsConfiguration with checking for non-null required valuesbuilds CartsConfiguration without checking for non-null required valuescountryTaxRateFallbackEnabled
(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.deleteDaysAfterLastModification
(Long deleteDaysAfterLastModification) 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.Default value for thepriceRoundingMode
parameter of the CartDraft.Default value for thetaxRoundingMode
parameter of the CartDraft.static CartsConfigurationBuilder
of()
factory method for an instance of CartsConfigurationBuilderstatic CartsConfigurationBuilder
of
(CartsConfiguration template) create builder for CartsConfiguration instancepriceRoundingMode
(RoundingMode priceRoundingMode) Default value for thepriceRoundingMode
parameter of the CartDraft.taxRoundingMode
(RoundingMode taxRoundingMode) Default value for thetaxRoundingMode
parameter of the CartDraft.
-
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
-
priceRoundingMode
Default value for the
priceRoundingMode
parameter of the CartDraft. Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated.- Parameters:
priceRoundingMode
- value to be set- Returns:
- Builder
-
taxRoundingMode
Default value for the
taxRoundingMode
parameter of the CartDraft. Indicates how monetary values are rounded when calculating taxes fortaxedPrice
.- Parameters:
taxRoundingMode
- value to be set- Returns:
- Builder
-
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
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
-
getPriceRoundingMode
Default value for the
priceRoundingMode
parameter of the CartDraft. Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated.- Returns:
- priceRoundingMode
-
getTaxRoundingMode
Default value for the
taxRoundingMode
parameter of the CartDraft. Indicates how monetary values are rounded when calculating taxes fortaxedPrice
.- Returns:
- taxRoundingMode
-
build
builds CartsConfiguration with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartsConfiguration>
- Returns:
- CartsConfiguration
-
buildUnchecked
builds CartsConfiguration without checking for non-null required values- Returns:
- CartsConfiguration
-
of
factory method for an instance of CartsConfigurationBuilder- Returns:
- builder
-
of
create builder for CartsConfiguration instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-