Class CartAddCustomShippingMethodActionBuilder
- All Implemented Interfaces:
Builder<CartAddCustomShippingMethodAction>
Example to create an instance using the builder pattern
CartAddCustomShippingMethodAction cartAddCustomShippingMethodAction = CartAddCustomShippingMethodAction.builder()
.shippingKey("{shippingKey}")
.shippingMethodName("{shippingMethodName}")
.shippingAddress(shippingAddressBuilder -> shippingAddressBuilder)
.shippingRate(shippingRateBuilder -> shippingRateBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDeliveries to be shipped with the custom Shipping Method.build()
builds CartAddCustomShippingMethodAction with checking for non-null required valuesbuilds CartAddCustomShippingMethodAction without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields for the custom Shipping Method.Custom Fields for the custom Shipping Method.deliveries
(DeliveryDraft... deliveries) Deliveries to be shipped with the custom Shipping Method.deliveries
(List<DeliveryDraft> deliveries) Deliveries to be shipped with the custom Shipping Method.externalTaxRate
(ExternalTaxRateDraft externalTaxRate) Tax Rate used to tax a shipping expense if the Cart has theExternal
TaxMode.Tax Rate used to tax a shipping expense if the Cart has theExternal
TaxMode.Custom Fields for the custom Shipping Method.Deliveries to be shipped with the custom Shipping Method.Tax Rate used to tax a shipping expense if the Cart has theExternal
TaxMode.Determines the shipping rate and Tax Rate of the associated Line Items.User-defined identifier for the custom Shipping Method that must be unique across the Cart withMultiple
ShippingMode.Name of the custom Shipping Method.Determines the shipping price.Input used to select a ShippingRatePriceTier.Tax Category used to determine a shipping Tax Rate if the Cart has thePlatform
TaxMode.of()
factory method for an instance of CartAddCustomShippingMethodActionBuilderof
(CartAddCustomShippingMethodAction template) create builder for CartAddCustomShippingMethodAction instanceplusDeliveries
(DeliveryDraft... deliveries) Deliveries to be shipped with the custom Shipping Method.Deliveries to be shipped with the custom Shipping Method.Deliveries to be shipped with the custom Shipping Method.shippingAddress
(BaseAddress shippingAddress) Determines the shipping rate and Tax Rate of the associated Line Items.Determines the shipping rate and Tax Rate of the associated Line Items.shippingKey
(String shippingKey) User-defined identifier for the custom Shipping Method that must be unique across the Cart withMultiple
ShippingMode.shippingMethodName
(String shippingMethodName) Name of the custom Shipping Method.shippingRate
(ShippingRateDraft shippingRate) Determines the shipping price.Determines the shipping price.shippingRateInput
(ShippingRateInputDraft shippingRateInput) Input used to select a ShippingRatePriceTier.shippingRateInput
(Function<ShippingRateInputDraftBuilder, Builder<? extends ShippingRateInputDraft>> builder) Input used to select a ShippingRatePriceTier.taxCategory
(TaxCategoryResourceIdentifier taxCategory) Tax Category used to determine a shipping Tax Rate if the Cart has thePlatform
TaxMode.taxCategory
(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifierBuilder> builder) Tax Category used to determine a shipping Tax Rate if the Cart has thePlatform
TaxMode.Custom Fields for the custom Shipping Method.Deliveries to be shipped with the custom Shipping Method.Tax Rate used to tax a shipping expense if the Cart has theExternal
TaxMode.Determines the shipping rate and Tax Rate of the associated Line Items.Determines the shipping price.withTaxCategory
(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifier> builder) Tax Category used to determine a shipping Tax Rate if the Cart has thePlatform
TaxMode.
-
Constructor Details
-
CartAddCustomShippingMethodActionBuilder
public CartAddCustomShippingMethodActionBuilder()
-
-
Method Details
-
shippingKey
User-defined identifier for the custom Shipping Method that must be unique across the Cart with
Multiple
ShippingMode.- Parameters:
shippingKey
- value to be set- Returns:
- Builder
-
shippingMethodName
Name of the custom Shipping Method.
- Parameters:
shippingMethodName
- value to be set- Returns:
- Builder
-
shippingAddress
public CartAddCustomShippingMethodActionBuilder shippingAddress(Function<BaseAddressBuilder, BaseAddressBuilder> builder) Determines the shipping rate and Tax Rate of the associated Line Items.
- Parameters:
builder
- function to build the shippingAddress value- Returns:
- Builder
-
withShippingAddress
public CartAddCustomShippingMethodActionBuilder withShippingAddress(Function<BaseAddressBuilder, BaseAddress> builder) Determines the shipping rate and Tax Rate of the associated Line Items.
- Parameters:
builder
- function to build the shippingAddress value- Returns:
- Builder
-
shippingAddress
Determines the shipping rate and Tax Rate of the associated Line Items.
- Parameters:
shippingAddress
- value to be set- Returns:
- Builder
-
shippingRate
public CartAddCustomShippingMethodActionBuilder shippingRate(Function<ShippingRateDraftBuilder, ShippingRateDraftBuilder> builder) Determines the shipping price.
- Parameters:
builder
- function to build the shippingRate value- Returns:
- Builder
-
withShippingRate
public CartAddCustomShippingMethodActionBuilder 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
-
shippingRateInput
public CartAddCustomShippingMethodActionBuilder shippingRateInput(@Nullable ShippingRateInputDraft shippingRateInput) Input used to select a ShippingRatePriceTier. The data type of this field depends on the
shippingRateInputType.type
configured in the Project:- If
CartClassification
, it must be ClassificationShippingRateInputDraft. - If
CartScore
, it must be ScoreShippingRateInputDraft. - If
CartValue
, it cannot be set.
- Parameters:
shippingRateInput
- value to be set- Returns:
- Builder
- If
-
shippingRateInput
public CartAddCustomShippingMethodActionBuilder shippingRateInput(Function<ShippingRateInputDraftBuilder, Builder<? extends ShippingRateInputDraft>> builder) Input used to select a ShippingRatePriceTier. The data type of this field depends on the
shippingRateInputType.type
configured in the Project:- If
CartClassification
, it must be ClassificationShippingRateInputDraft. - If
CartScore
, it must be ScoreShippingRateInputDraft. - If
CartValue
, it cannot be set.
- Parameters:
builder
- function to build the shippingRateInput value- Returns:
- Builder
- If
-
taxCategory
public CartAddCustomShippingMethodActionBuilder taxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifierBuilder> builder) Tax Category used to determine a shipping Tax Rate if the Cart has the
Platform
TaxMode.- Parameters:
builder
- function to build the taxCategory value- Returns:
- Builder
-
withTaxCategory
public CartAddCustomShippingMethodActionBuilder withTaxCategory(Function<TaxCategoryResourceIdentifierBuilder, TaxCategoryResourceIdentifier> builder) Tax Category used to determine a shipping Tax Rate if the Cart has the
Platform
TaxMode.- Parameters:
builder
- function to build the taxCategory value- Returns:
- Builder
-
taxCategory
public CartAddCustomShippingMethodActionBuilder taxCategory(@Nullable TaxCategoryResourceIdentifier taxCategory) Tax Category used to determine a shipping Tax Rate if the Cart has the
Platform
TaxMode.- Parameters:
taxCategory
- value to be set- Returns:
- Builder
-
externalTaxRate
public CartAddCustomShippingMethodActionBuilder externalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraftBuilder> builder) Tax Rate used to tax a shipping expense if the Cart has the
External
TaxMode.- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
withExternalTaxRate
public CartAddCustomShippingMethodActionBuilder withExternalTaxRate(Function<ExternalTaxRateDraftBuilder, ExternalTaxRateDraft> builder) Tax Rate used to tax a shipping expense if the Cart has the
External
TaxMode.- Parameters:
builder
- function to build the externalTaxRate value- Returns:
- Builder
-
externalTaxRate
public CartAddCustomShippingMethodActionBuilder externalTaxRate(@Nullable ExternalTaxRateDraft externalTaxRate) Tax Rate used to tax a shipping expense if the Cart has the
External
TaxMode.- Parameters:
externalTaxRate
- value to be set- Returns:
- Builder
-
deliveries
Deliveries to be shipped with the custom Shipping Method.
- Parameters:
deliveries
- value to be set- Returns:
- Builder
-
deliveries
public CartAddCustomShippingMethodActionBuilder deliveries(@Nullable List<DeliveryDraft> deliveries) Deliveries to be shipped with the custom Shipping Method.
- Parameters:
deliveries
- value to be set- Returns:
- Builder
-
plusDeliveries
public CartAddCustomShippingMethodActionBuilder plusDeliveries(@Nullable DeliveryDraft... deliveries) Deliveries to be shipped with the custom Shipping Method.
- Parameters:
deliveries
- value to be set- Returns:
- Builder
-
plusDeliveries
public CartAddCustomShippingMethodActionBuilder plusDeliveries(Function<DeliveryDraftBuilder, DeliveryDraftBuilder> builder) Deliveries to be shipped with the custom Shipping Method.
- Parameters:
builder
- function to build the deliveries value- Returns:
- Builder
-
withDeliveries
public CartAddCustomShippingMethodActionBuilder withDeliveries(Function<DeliveryDraftBuilder, DeliveryDraftBuilder> builder) Deliveries to be shipped with the custom Shipping Method.
- Parameters:
builder
- function to build the deliveries value- Returns:
- Builder
-
addDeliveries
public CartAddCustomShippingMethodActionBuilder addDeliveries(Function<DeliveryDraftBuilder, DeliveryDraft> builder) Deliveries to be shipped with the custom Shipping Method.
- Parameters:
builder
- function to build the deliveries value- Returns:
- Builder
-
setDeliveries
public CartAddCustomShippingMethodActionBuilder setDeliveries(Function<DeliveryDraftBuilder, DeliveryDraft> builder) Deliveries to be shipped with the custom Shipping Method.
- Parameters:
builder
- function to build the deliveries value- Returns:
- Builder
-
custom
public CartAddCustomShippingMethodActionBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the custom Shipping Method.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public CartAddCustomShippingMethodActionBuilder 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
-
getShippingKey
User-defined identifier for the custom Shipping Method that must be unique across the Cart with
Multiple
ShippingMode.- Returns:
- shippingKey
-
getShippingMethodName
Name of the custom Shipping Method.
- Returns:
- shippingMethodName
-
getShippingAddress
Determines the shipping rate and Tax Rate of the associated Line Items.
- Returns:
- shippingAddress
-
getShippingRate
Determines the shipping price.
- Returns:
- shippingRate
-
getShippingRateInput
Input used to select a ShippingRatePriceTier. The data type of this field depends on the
shippingRateInputType.type
configured in the Project:- If
CartClassification
, it must be ClassificationShippingRateInputDraft. - If
CartScore
, it must be ScoreShippingRateInputDraft. - If
CartValue
, it cannot be set.
- Returns:
- shippingRateInput
- If
-
getTaxCategory
Tax Category used to determine a shipping Tax Rate if the Cart has the
Platform
TaxMode.- Returns:
- taxCategory
-
getExternalTaxRate
Tax Rate used to tax a shipping expense if the Cart has the
External
TaxMode.- Returns:
- externalTaxRate
-
getDeliveries
Deliveries to be shipped with the custom Shipping Method.
- Returns:
- deliveries
-
getCustom
Custom Fields for the custom Shipping Method.
- Returns:
- custom
-
build
builds CartAddCustomShippingMethodAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartAddCustomShippingMethodAction>
- Returns:
- CartAddCustomShippingMethodAction
-
buildUnchecked
builds CartAddCustomShippingMethodAction without checking for non-null required values- Returns:
- CartAddCustomShippingMethodAction
-
of
factory method for an instance of CartAddCustomShippingMethodActionBuilder- Returns:
- builder
-
of
public static CartAddCustomShippingMethodActionBuilder of(CartAddCustomShippingMethodAction template) create builder for CartAddCustomShippingMethodAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-