Class CartSetCustomShippingMethodActionBuilder
- All Implemented Interfaces:
Builder<CartSetCustomShippingMethodAction>
Example to create an instance using the builder pattern
CartSetCustomShippingMethodAction cartSetCustomShippingMethodAction = CartSetCustomShippingMethodAction.builder()
.shippingMethodName("{shippingMethodName}")
.shippingRate(shippingRateBuilder -> shippingRateBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds CartSetCustomShippingMethodAction with checking for non-null required valuesbuilds CartSetCustomShippingMethodAction without checking for non-null required valuescustom(CustomFieldsDraft custom) Custom Fields for the custom Shipping Method.Custom Fields for the custom Shipping Method.estimatedDelivery(EstimatedDelivery estimatedDelivery) Estimated time window during which the shipment is expected to be delivered.Estimated time window during which the shipment is expected to be delivered.externalTaxRate(ExternalTaxRateDraft externalTaxRate) Custom Fields for the custom Shipping Method.Estimated time window during which the shipment is expected to be delivered.Name of the custom Shipping Method.Determines the shipping price.Tax Category used to determine the Tax Rate when the Cart has thePlatformTaxMode.of()factory method for an instance of CartSetCustomShippingMethodActionBuilderof(CartSetCustomShippingMethodAction template) create builder for CartSetCustomShippingMethodAction instanceshippingMethodName(String shippingMethodName) Name of the custom Shipping Method.shippingRate(ShippingRateDraft shippingRate) Determines the shipping price.Determines the shipping price.taxCategory(TaxCategoryResourceIdentifier taxCategory) Tax Category used to determine the Tax Rate when the Cart has thePlatformTaxMode.taxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifierBuilder> builder) Tax Category used to determine the Tax Rate when the Cart has thePlatformTaxMode.Custom Fields for the custom Shipping Method.Estimated time window during which the shipment is expected to be delivered.Determines the shipping price.withTaxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifier> builder) Tax Category used to determine the Tax Rate when the Cart has thePlatformTaxMode.
-
Constructor Details
-
CartSetCustomShippingMethodActionBuilder
public CartSetCustomShippingMethodActionBuilder()
-
-
Method Details
-
shippingMethodName
Name of the custom Shipping Method.
- Parameters:
shippingMethodName- value to be set- Returns:
- Builder
-
shippingRate
public CartSetCustomShippingMethodActionBuilder shippingRate(Function<ShippingRateDraftBuilder, ShippingRateDraftBuilder> builder) Determines the shipping price.
- Parameters:
builder- function to build the shippingRate value- Returns:
- Builder
-
withShippingRate
public CartSetCustomShippingMethodActionBuilder withShippingRate(Function<ShippingRateDraftBuilder, ShippingRateDraft> builder) Determines the shipping price.
- Parameters:
builder- function to build the shippingRate value- Returns:
- Builder
-
shippingRate
Determines the shipping price.
- Parameters:
shippingRate- value to be set- Returns:
- Builder
-
taxCategory
public CartSetCustomShippingMethodActionBuilder taxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifierBuilder> builder) Tax Category used to determine the Tax Rate when the Cart has the
PlatformTaxMode.- Parameters:
builder- function to build the taxCategory value- Returns:
- Builder
-
withTaxCategory
public CartSetCustomShippingMethodActionBuilder withTaxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifier> builder) Tax Category used to determine the Tax Rate when the Cart has the
PlatformTaxMode.- Parameters:
builder- function to build the taxCategory value- Returns:
- Builder
-
taxCategory
public CartSetCustomShippingMethodActionBuilder taxCategory(@Nullable TaxCategoryResourceIdentifier taxCategory) Tax Category used to determine the Tax Rate when the Cart has the
PlatformTaxMode.- Parameters:
taxCategory- value to be set- Returns:
- Builder
-
externalTaxRate
public CartSetCustomShippingMethodActionBuilder externalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraftBuilder> builder) External Tax Rate for the
shippingRateto be set if the Cart has theExternalTaxMode.- Parameters:
builder- function to build the externalTaxRate value- Returns:
- Builder
-
withExternalTaxRate
public CartSetCustomShippingMethodActionBuilder withExternalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraft> builder) External Tax Rate for the
shippingRateto be set if the Cart has theExternalTaxMode.- Parameters:
builder- function to build the externalTaxRate value- Returns:
- Builder
-
externalTaxRate
public CartSetCustomShippingMethodActionBuilder externalTaxRate(@Nullable ExternalTaxRateDraft externalTaxRate) External Tax Rate for the
shippingRateto be set if the Cart has theExternalTaxMode.- Parameters:
externalTaxRate- value to be set- Returns:
- Builder
-
custom
public CartSetCustomShippingMethodActionBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the custom Shipping Method.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
withCustom
public CartSetCustomShippingMethodActionBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the custom Shipping Method.
- Parameters:
builder- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the custom Shipping Method.
- Parameters:
custom- value to be set- Returns:
- Builder
-
estimatedDelivery
public CartSetCustomShippingMethodActionBuilder estimatedDelivery(Function<EstimatedDeliveryBuilder, EstimatedDeliveryBuilder> builder) Estimated time window during which the shipment is expected to be delivered. If not set, any existing estimate on the Cart's ShippingInfo is cleared.
- Parameters:
builder- function to build the estimatedDelivery value- Returns:
- Builder
-
withEstimatedDelivery
public CartSetCustomShippingMethodActionBuilder withEstimatedDelivery(Function<EstimatedDeliveryBuilder, EstimatedDelivery> builder) Estimated time window during which the shipment is expected to be delivered. If not set, any existing estimate on the Cart's ShippingInfo is cleared.
- Parameters:
builder- function to build the estimatedDelivery value- Returns:
- Builder
-
estimatedDelivery
public CartSetCustomShippingMethodActionBuilder estimatedDelivery(@Nullable EstimatedDelivery estimatedDelivery) Estimated time window during which the shipment is expected to be delivered. If not set, any existing estimate on the Cart's ShippingInfo is cleared.
- Parameters:
estimatedDelivery- value to be set- Returns:
- Builder
-
getShippingMethodName
Name of the custom Shipping Method.
- Returns:
- shippingMethodName
-
getShippingRate
Determines the shipping price.
- Returns:
- shippingRate
-
getTaxCategory
Tax Category used to determine the Tax Rate when the Cart has the
PlatformTaxMode.- Returns:
- taxCategory
-
getExternalTaxRate
External Tax Rate for the
shippingRateto be set if the Cart has theExternalTaxMode.- Returns:
- externalTaxRate
-
getCustom
Custom Fields for the custom Shipping Method.
- Returns:
- custom
-
getEstimatedDelivery
Estimated time window during which the shipment is expected to be delivered. If not set, any existing estimate on the Cart's ShippingInfo is cleared.
- Returns:
- estimatedDelivery
-
build
builds CartSetCustomShippingMethodAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<CartSetCustomShippingMethodAction>- Returns:
- CartSetCustomShippingMethodAction
-
buildUnchecked
builds CartSetCustomShippingMethodAction without checking for non-null required values- Returns:
- CartSetCustomShippingMethodAction
-
of
factory method for an instance of CartSetCustomShippingMethodActionBuilder- Returns:
- builder
-
of
public static CartSetCustomShippingMethodActionBuilder of(CartSetCustomShippingMethodAction template) create builder for CartSetCustomShippingMethodAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-