Interface CustomShippingDraft
- All Superinterfaces:
Draft<CustomShippingDraft>,WithKey
Example to create an instance using the builder pattern
CustomShippingDraft customShippingDraft = CustomShippingDraft.builder()
.key("{key}")
.shippingMethodName("{shippingMethodName}")
.shippingRate(shippingRateBuilder -> shippingRateBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomShippingDraftBuilderbuilder()builder factory method for CustomShippingDraftstatic CustomShippingDraftBuilderbuilder(CustomShippingDraft template) create builder for CustomShippingDraft instancecopyDeep()static CustomShippingDraftdeepCopy(CustomShippingDraft template) factory method to create a deep copy of CustomShippingDraft@Valid CustomFieldsDraftCustom Fields for the custom Shipping Method.@Valid List<DeliveryDraft>Deliveries to be shipped with the custom Shipping Method.@Valid ExternalTaxRateDraftTax Rate used to tax a shipping expense if the Cart has theExternalTaxMode.@NotNull StringgetKey()User-defined unique identifier of the custom Shipping Method in the Cart withMultipleShippingMode.@Valid BaseAddressDetermines the shipping rate and Tax Rate of the associated Line Items.@NotNull StringName of the custom Shipping Method.@NotNull @Valid ShippingRateDraftDetermines the shipping price.@Valid ShippingRateInputDraftInput used to select a ShippingRatePriceTier.Tax Category used to determine a shipping Tax Rate if the Cart has thePlatformTaxMode.static CustomShippingDraftof()factory methodstatic CustomShippingDraftof(CustomShippingDraft template) factory method to create a shallow copy CustomShippingDraftvoidsetCustom(CustomFieldsDraft custom) Custom Fields for the custom Shipping Method.voidsetDeliveries(DeliveryDraft... deliveries) Deliveries to be shipped with the custom Shipping Method.voidsetDeliveries(List<DeliveryDraft> deliveries) Deliveries to be shipped with the custom Shipping Method.voidsetExternalTaxRate(ExternalTaxRateDraft externalTaxRate) Tax Rate used to tax a shipping expense if the Cart has theExternalTaxMode.voidUser-defined unique identifier of the custom Shipping Method in the Cart withMultipleShippingMode.voidsetShippingAddress(BaseAddress shippingAddress) Determines the shipping rate and Tax Rate of the associated Line Items.voidsetShippingMethodName(String shippingMethodName) Name of the custom Shipping Method.voidsetShippingRate(ShippingRateDraft shippingRate) Determines the shipping price.voidsetShippingRateInput(ShippingRateInputDraft shippingRateInput) Input used to select a ShippingRatePriceTier.voidsetTaxCategory(TaxCategoryResourceIdentifier taxCategory) Tax Category used to determine a shipping Tax Rate if the Cart has thePlatformTaxMode.static com.fasterxml.jackson.core.type.TypeReference<CustomShippingDraft>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithCustomShippingDraft(Function<CustomShippingDraft, T> helper) accessor map function
-
Method Details
-
getKey
User-defined unique identifier of the custom Shipping Method in the Cart with
MultipleShippingMode. -
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.typeconfigured 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
PlatformTaxMode.- Returns:
- taxCategory
-
getExternalTaxRate
Tax Rate used to tax a shipping expense if the Cart has the
ExternalTaxMode.- Returns:
- externalTaxRate
-
getDeliveries
Deliveries to be shipped with the custom Shipping Method.
- Returns:
- deliveries
-
getCustom
Custom Fields for the custom Shipping Method.
- Returns:
- custom
-
setKey
User-defined unique identifier of the custom Shipping Method in the Cart with
MultipleShippingMode.- Parameters:
key- value to be set
-
setShippingMethodName
Name of the custom Shipping Method.
- Parameters:
shippingMethodName- value to be set
-
setShippingAddress
Determines the shipping rate and Tax Rate of the associated Line Items.
- Parameters:
shippingAddress- value to be set
-
setShippingRate
Determines the shipping price.
- Parameters:
shippingRate- value to be set
-
setShippingRateInput
Input used to select a ShippingRatePriceTier. The data type of this field depends on the
shippingRateInputType.typeconfigured 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
- If
-
setTaxCategory
Tax Category used to determine a shipping Tax Rate if the Cart has the
PlatformTaxMode.- Parameters:
taxCategory- value to be set
-
setExternalTaxRate
Tax Rate used to tax a shipping expense if the Cart has the
ExternalTaxMode.- Parameters:
externalTaxRate- value to be set
-
setDeliveries
Deliveries to be shipped with the custom Shipping Method.
- Parameters:
deliveries- values to be set
-
setDeliveries
Deliveries to be shipped with the custom Shipping Method.
- Parameters:
deliveries- values to be set
-
setCustom
Custom Fields for the custom Shipping Method.
- Parameters:
custom- value to be set
-
of
factory method- Returns:
- instance of CustomShippingDraft
-
of
factory method to create a shallow copy CustomShippingDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CustomShippingDraft copyDeep() -
deepCopy
factory method to create a deep copy of CustomShippingDraft- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CustomShippingDraft- Returns:
- builder
-
builder
create builder for CustomShippingDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCustomShippingDraft
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-