Class ShippingBuilder
Example to create an instance using the builder pattern
Shipping shipping = Shipping.builder()
.shippingKey("{shippingKey}")
.shippingInfo(shippingInfoBuilder -> shippingInfoBuilder)
.shippingAddress(shippingAddressBuilder -> shippingAddressBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds Shipping with checking for non-null required valuesbuilds Shipping without checking for non-null required valuesDetermines the shipping rates and Tax Rates of associated Line Items.Custom Fields of Shipping withMultipleShippingMode.Automatically set when the Shipping Method is added.User-defined unique identifier of the Shipping in a Cart withMultipleShippingMode.Used as an input to select a ShippingRatePriceTier.static ShippingBuilderof()factory method for an instance of ShippingBuilderstatic ShippingBuildercreate builder for Shipping instanceshippingAddress(Address shippingAddress) Determines the shipping rates and Tax Rates of associated Line Items.shippingAddress(Function<AddressBuilder, AddressBuilder> builder) Determines the shipping rates and Tax Rates of associated Line Items.shippingCustomFields(CustomFields shippingCustomFields) Custom Fields of Shipping withMultipleShippingMode.Custom Fields of Shipping withMultipleShippingMode.shippingInfo(ShippingInfo shippingInfo) Automatically set when the Shipping Method is added.Automatically set when the Shipping Method is added.shippingKey(String shippingKey) User-defined unique identifier of the Shipping in a Cart withMultipleShippingMode.shippingRateInput(ShippingRateInput shippingRateInput) Used as an input to select a ShippingRatePriceTier.shippingRateInput(Function<ShippingRateInputBuilder, Builder<? extends ShippingRateInput>> builder) Used as an input to select a ShippingRatePriceTier.withShippingAddress(Function<AddressBuilder, Address> builder) Determines the shipping rates and Tax Rates of associated Line Items.Custom Fields of Shipping withMultipleShippingMode.Automatically set when the Shipping Method is added.
-
Constructor Details
-
ShippingBuilder
public ShippingBuilder()
-
-
Method Details
-
shippingKey
User-defined unique identifier of the Shipping in a Cart with
MultipleShippingMode.- Parameters:
shippingKey- value to be set- Returns:
- Builder
-
shippingInfo
Automatically set when the Shipping Method is added.
- Parameters:
builder- function to build the shippingInfo value- Returns:
- Builder
-
withShippingInfo
Automatically set when the Shipping Method is added.
- Parameters:
builder- function to build the shippingInfo value- Returns:
- Builder
-
shippingInfo
Automatically set when the Shipping Method is added.
- Parameters:
shippingInfo- value to be set- Returns:
- Builder
-
shippingAddress
Determines the shipping rates and Tax Rates of associated Line Items.
- Parameters:
builder- function to build the shippingAddress value- Returns:
- Builder
-
withShippingAddress
Determines the shipping rates and Tax Rates of associated Line Items.
- Parameters:
builder- function to build the shippingAddress value- Returns:
- Builder
-
shippingAddress
Determines the shipping rates and Tax Rates of associated Line Items.
- Parameters:
shippingAddress- value to be set- Returns:
- Builder
-
shippingRateInput
Used as an input to select a ShippingRatePriceTier. The data type of this field depends on the
shippingRateInputType.typeconfigured in the Project:- If
CartClassification, it is ClassificationShippingRateInput. - If
CartScore, it is ScoreShippingRateInput. - If
CartValue, it cannot be used.
- Parameters:
shippingRateInput- value to be set- Returns:
- Builder
- If
-
shippingRateInput
public ShippingBuilder shippingRateInput(Function<ShippingRateInputBuilder, Builder<? extends ShippingRateInput>> builder) Used as an input to select a ShippingRatePriceTier. The data type of this field depends on the
shippingRateInputType.typeconfigured in the Project:- If
CartClassification, it is ClassificationShippingRateInput. - If
CartScore, it is ScoreShippingRateInput. - If
CartValue, it cannot be used.
- Parameters:
builder- function to build the shippingRateInput value- Returns:
- Builder
- If
-
shippingCustomFields
public ShippingBuilder shippingCustomFields(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields of Shipping with
MultipleShippingMode.- Parameters:
builder- function to build the shippingCustomFields value- Returns:
- Builder
-
withShippingCustomFields
Custom Fields of Shipping with
MultipleShippingMode.- Parameters:
builder- function to build the shippingCustomFields value- Returns:
- Builder
-
shippingCustomFields
Custom Fields of Shipping with
MultipleShippingMode.- Parameters:
shippingCustomFields- value to be set- Returns:
- Builder
-
getShippingKey
User-defined unique identifier of the Shipping in a Cart with
MultipleShippingMode.- Returns:
- shippingKey
-
getShippingInfo
Automatically set when the Shipping Method is added.
- Returns:
- shippingInfo
-
getShippingAddress
Determines the shipping rates and Tax Rates of associated Line Items.
- Returns:
- shippingAddress
-
getShippingRateInput
Used as an input to select a ShippingRatePriceTier. The data type of this field depends on the
shippingRateInputType.typeconfigured in the Project:- If
CartClassification, it is ClassificationShippingRateInput. - If
CartScore, it is ScoreShippingRateInput. - If
CartValue, it cannot be used.
- Returns:
- shippingRateInput
- If
-
getShippingCustomFields
Custom Fields of Shipping with
MultipleShippingMode.- Returns:
- shippingCustomFields
-
build
builds Shipping with checking for non-null required values -
buildUnchecked
builds Shipping without checking for non-null required values- Returns:
- Shipping
-
of
factory method for an instance of ShippingBuilder- Returns:
- builder
-
of
create builder for Shipping instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-