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 thepriceRoundingModeparameter of the CartDraft.Default value for thetaxRoundingModeparameter of the CartDraft.static CartsConfigurationBuilderof()factory method for an instance of CartsConfigurationBuilderstatic CartsConfigurationBuilderof(CartsConfiguration template) create builder for CartsConfiguration instancepriceRoundingMode(RoundingMode priceRoundingMode) Default value for thepriceRoundingModeparameter of the CartDraft.taxRoundingMode(RoundingMode taxRoundingMode) Default value for thetaxRoundingModeparameter of the CartDraft.
-
Constructor Details
-
CartsConfigurationBuilder
public CartsConfigurationBuilder()
-
-
Method Details
-
deleteDaysAfterLastModification
public CartsConfigurationBuilder deleteDaysAfterLastModification(@Nullable Long deleteDaysAfterLastModification) Default value for the
deleteDaysAfterLastModificationparameter of the CartDraft and MyCartDraft.- If a ChangeSubscription for Carts exists, a ResourceDeletedDeliveryPayload is sent upon deletion of a Cart.
- Carts with CartOrigin
QuoteorRecurringOrderare not affected by this configuration value. - Changing this value doesn't affect the retention of existing Carts. To update an existing Cart's retention use
setDeleteDaysAfterLastModificationon the Carts API. - 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
priceRoundingModeparameter 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
taxRoundingModeparameter 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
deleteDaysAfterLastModificationparameter of the CartDraft and MyCartDraft.- If a ChangeSubscription for Carts exists, a ResourceDeletedDeliveryPayload is sent upon deletion of a Cart.
- Carts with CartOrigin
QuoteorRecurringOrderare not affected by this configuration value. - Changing this value doesn't affect the retention of existing Carts. To update an existing Cart's retention use
setDeleteDaysAfterLastModificationon the Carts API. - 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
priceRoundingModeparameter of the CartDraft. Indicates how the total prices on LineItems and CustomLineItems are rounded when calculated.- Returns:
- priceRoundingMode
-
getTaxRoundingMode
Default value for the
taxRoundingModeparameter 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:
buildin 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
-