Class CartAddShippingMethodActionBuilder
- All Implemented Interfaces:
Builder<CartAddShippingMethodAction>
Example to create an instance using the builder pattern
CartAddShippingMethodAction cartAddShippingMethodAction = CartAddShippingMethodAction.builder()
.shippingKey("{shippingKey}")
.shippingMethod(shippingMethodBuilder -> shippingMethodBuilder)
.shippingAddress(shippingAddressBuilder -> shippingAddressBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDeliveries to be shipped with the referenced Shipping Method.build()
builds CartAddShippingMethodAction with checking for non-null required valuesbuilds CartAddShippingMethodAction without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields for the Shipping Method.Custom Fields for the Shipping Method.deliveries
(DeliveryDraft... deliveries) Deliveries to be shipped with the referenced Shipping Method.deliveries
(List<DeliveryDraft> deliveries) Deliveries to be shipped with the referenced 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 Shipping Method.Deliveries to be shipped with the referenced 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 Line Items.User-defined identifier for the Shipping that must be unique across the Cart withMultiple
ShippingMode.RecourceIdentifier to a ShippingMethod to add to the Cart withMultiple
ShippingMode.Input used to select a ShippingRatePriceTier.of()
factory method for an instance of CartAddShippingMethodActionBuilderof
(CartAddShippingMethodAction template) create builder for CartAddShippingMethodAction instanceplusDeliveries
(DeliveryDraft... deliveries) Deliveries to be shipped with the referenced Shipping Method.Deliveries to be shipped with the referenced Shipping Method.Deliveries to be shipped with the referenced Shipping Method.shippingAddress
(BaseAddress shippingAddress) Determines the shipping rate and Tax Rate of the Line Items.Determines the shipping rate and Tax Rate of the Line Items.shippingKey
(String shippingKey) User-defined identifier for the Shipping that must be unique across the Cart withMultiple
ShippingMode.shippingMethod
(ShippingMethodResourceIdentifier shippingMethod) RecourceIdentifier to a ShippingMethod to add to the Cart withMultiple
ShippingMode.shippingMethod
(Function<ShippingMethodResourceIdentifierBuilder, ShippingMethodResourceIdentifierBuilder> builder) RecourceIdentifier to a ShippingMethod to add to the Cart withMultiple
ShippingMode.shippingRateInput
(ShippingRateInputDraft shippingRateInput) Input used to select a ShippingRatePriceTier.shippingRateInput
(Function<ShippingRateInputDraftBuilder, Builder<? extends ShippingRateInputDraft>> builder) Input used to select a ShippingRatePriceTier.Custom Fields for the Shipping Method.Deliveries to be shipped with the referenced 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 Line Items.withShippingMethod
(Function<ShippingMethodResourceIdentifierBuilder, ShippingMethodResourceIdentifier> builder) RecourceIdentifier to a ShippingMethod to add to the Cart withMultiple
ShippingMode.
-
Constructor Details
-
CartAddShippingMethodActionBuilder
public CartAddShippingMethodActionBuilder()
-
-
Method Details
-
shippingKey
User-defined identifier for the Shipping that must be unique across the Cart with
Multiple
ShippingMode.- Parameters:
shippingKey
- value to be set- Returns:
- Builder
-
shippingMethod
public CartAddShippingMethodActionBuilder shippingMethod(Function<ShippingMethodResourceIdentifierBuilder, ShippingMethodResourceIdentifierBuilder> builder) RecourceIdentifier to a ShippingMethod to add to the Cart with
Multiple
ShippingMode. If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned.- Parameters:
builder
- function to build the shippingMethod value- Returns:
- Builder
-
withShippingMethod
public CartAddShippingMethodActionBuilder withShippingMethod(Function<ShippingMethodResourceIdentifierBuilder, ShippingMethodResourceIdentifier> builder) RecourceIdentifier to a ShippingMethod to add to the Cart with
Multiple
ShippingMode. If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned.- Parameters:
builder
- function to build the shippingMethod value- Returns:
- Builder
-
shippingMethod
public CartAddShippingMethodActionBuilder shippingMethod(ShippingMethodResourceIdentifier shippingMethod) RecourceIdentifier to a ShippingMethod to add to the Cart with
Multiple
ShippingMode. If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned.- Parameters:
shippingMethod
- value to be set- Returns:
- Builder
-
shippingAddress
public CartAddShippingMethodActionBuilder shippingAddress(Function<BaseAddressBuilder, BaseAddressBuilder> builder) Determines the shipping rate and Tax Rate of the Line Items.
- Parameters:
builder
- function to build the shippingAddress value- Returns:
- Builder
-
withShippingAddress
public CartAddShippingMethodActionBuilder withShippingAddress(Function<BaseAddressBuilder, BaseAddress> builder) Determines the shipping rate and Tax Rate of the Line Items.
- Parameters:
builder
- function to build the shippingAddress value- Returns:
- Builder
-
shippingAddress
Determines the shipping rate and Tax Rate of the Line Items.
- Parameters:
shippingAddress
- value to be set- Returns:
- Builder
-
shippingRateInput
public CartAddShippingMethodActionBuilder 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 CartAddShippingMethodActionBuilder 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
-
externalTaxRate
public CartAddShippingMethodActionBuilder 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 CartAddShippingMethodActionBuilder 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 CartAddShippingMethodActionBuilder 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 referenced Shipping Method.
- Parameters:
deliveries
- value to be set- Returns:
- Builder
-
deliveries
Deliveries to be shipped with the referenced Shipping Method.
- Parameters:
deliveries
- value to be set- Returns:
- Builder
-
plusDeliveries
Deliveries to be shipped with the referenced Shipping Method.
- Parameters:
deliveries
- value to be set- Returns:
- Builder
-
plusDeliveries
public CartAddShippingMethodActionBuilder plusDeliveries(Function<DeliveryDraftBuilder, DeliveryDraftBuilder> builder) Deliveries to be shipped with the referenced Shipping Method.
- Parameters:
builder
- function to build the deliveries value- Returns:
- Builder
-
withDeliveries
public CartAddShippingMethodActionBuilder withDeliveries(Function<DeliveryDraftBuilder, DeliveryDraftBuilder> builder) Deliveries to be shipped with the referenced Shipping Method.
- Parameters:
builder
- function to build the deliveries value- Returns:
- Builder
-
addDeliveries
public CartAddShippingMethodActionBuilder addDeliveries(Function<DeliveryDraftBuilder, DeliveryDraft> builder) Deliveries to be shipped with the referenced Shipping Method.
- Parameters:
builder
- function to build the deliveries value- Returns:
- Builder
-
setDeliveries
public CartAddShippingMethodActionBuilder setDeliveries(Function<DeliveryDraftBuilder, DeliveryDraft> builder) Deliveries to be shipped with the referenced Shipping Method.
- Parameters:
builder
- function to build the deliveries value- Returns:
- Builder
-
custom
public CartAddShippingMethodActionBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Shipping Method.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public CartAddShippingMethodActionBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the Shipping Method.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Shipping Method.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getShippingKey
User-defined identifier for the Shipping that must be unique across the Cart with
Multiple
ShippingMode.- Returns:
- shippingKey
-
getShippingMethod
RecourceIdentifier to a ShippingMethod to add to the Cart with
Multiple
ShippingMode. If the referenced Shipping Method has a predicate that does not match the Cart, an InvalidOperation error is returned.- Returns:
- shippingMethod
-
getShippingAddress
Determines the shipping rate and Tax Rate of the Line Items.
- Returns:
- shippingAddress
-
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
-
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 referenced Shipping Method.
- Returns:
- deliveries
-
getCustom
Custom Fields for the Shipping Method.
- Returns:
- custom
-
build
builds CartAddShippingMethodAction with checking for non-null required values- Specified by:
build
in interfaceBuilder<CartAddShippingMethodAction>
- Returns:
- CartAddShippingMethodAction
-
buildUnchecked
builds CartAddShippingMethodAction without checking for non-null required values- Returns:
- CartAddShippingMethodAction
-
of
factory method for an instance of CartAddShippingMethodActionBuilder- Returns:
- builder
-
of
create builder for CartAddShippingMethodAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-