Interface ShippingMethodDraft
- All Superinterfaces:
CustomizableDraft<ShippingMethodDraft>
,Draft<ShippingMethodDraft>
,WithKey
Example to create an instance using the builder pattern
ShippingMethodDraft shippingMethodDraft = ShippingMethodDraft.builder()
.name("{name}")
.taxCategory(taxCategoryBuilder -> taxCategoryBuilder)
.plusZoneRates(zoneRatesBuilder -> zoneRatesBuilder)
.isDefault(true)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShippingMethodDraftBuilder
builder()
builder factory method for ShippingMethodDraftstatic ShippingMethodDraftBuilder
builder
(ShippingMethodDraft template) create builder for ShippingMethodDraft instancestatic ShippingMethodDraft
deepCopy
(ShippingMethodDraft template) factory method to create a deep copy of ShippingMethodDraftIf set totrue
, the ShippingMethod can be used during the creation or update of a Cart or Order.@Valid CustomFieldsDraft
Custom Fields for the ShippingMethod.Deprecated.@NotNull Boolean
If set totrue
, the ShippingMethod will be the Project's default ShippingMethod.getKey()
User-defined unique identifier for the ShippingMethod.@Valid LocalizedString
Localized description of the ShippingMethod.@Valid LocalizedString
Localized name of the ShippingMethod.@NotNull String
getName()
Unique name for the ShippingMethod within a Project.Valid Cart predicate to select a ShippingMethod for a Cart.@NotNull @Valid TaxCategoryResourceIdentifier
TaxCategory for all ZoneRates of the ShippingMethod.@NotNull @Valid List<ZoneRateDraft>
Defines ShippingRates (prices) for specific zones.static ShippingMethodDraft
of()
factory methodstatic ShippingMethodDraft
of
(ShippingMethodDraft template) factory method to create a shallow copy ShippingMethodDraftvoid
If set totrue
, the ShippingMethod can be used during the creation or update of a Cart or Order.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the ShippingMethod.void
setDescription
(String description) Deprecated.void
setIsDefault
(Boolean isDefault) If set totrue
, the ShippingMethod will be the Project's default ShippingMethod.void
User-defined unique identifier for the ShippingMethod.void
setLocalizedDescription
(LocalizedString localizedDescription) Localized description of the ShippingMethod.void
setLocalizedName
(LocalizedString localizedName) Localized name of the ShippingMethod.void
Unique name for the ShippingMethod within a Project.void
setPredicate
(String predicate) Valid Cart predicate to select a ShippingMethod for a Cart.void
setTaxCategory
(TaxCategoryResourceIdentifier taxCategory) TaxCategory for all ZoneRates of the ShippingMethod.void
setZoneRates
(ZoneRateDraft... zoneRates) Defines ShippingRates (prices) for specific zones.void
setZoneRates
(List<ZoneRateDraft> zoneRates) Defines ShippingRates (prices) for specific zones.static com.fasterxml.jackson.core.type.TypeReference<ShippingMethodDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withShippingMethodDraft
(Function<ShippingMethodDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getKey
String getKey()User-defined unique identifier for the ShippingMethod.
-
getName
Unique name for the ShippingMethod within a Project.
- Returns:
- name
-
getLocalizedName
Localized name of the ShippingMethod.
- Returns:
- localizedName
-
getDescription
Deprecated.Description of the ShippingMethod.
- Returns:
- description
-
getLocalizedDescription
Localized description of the ShippingMethod.
- Returns:
- localizedDescription
-
getTaxCategory
TaxCategory for all ZoneRates of the ShippingMethod.
- Returns:
- taxCategory
-
getZoneRates
Defines ShippingRates (prices) for specific zones.
- Returns:
- zoneRates
-
getActive
Boolean getActive()If set to
true
, the ShippingMethod can be used during the creation or update of a Cart or Order.- Returns:
- active
-
getIsDefault
If set to
true
, the ShippingMethod will be the Project's default ShippingMethod.- Returns:
- isDefault
-
getPredicate
String getPredicate()Valid Cart predicate to select a ShippingMethod for a Cart.
- Returns:
- predicate
-
getCustom
Custom Fields for the ShippingMethod.
- Specified by:
getCustom
in interfaceCustomizableDraft<ShippingMethodDraft>
- Returns:
- custom
-
setKey
User-defined unique identifier for the ShippingMethod.
- Parameters:
key
- value to be set
-
setName
Unique name for the ShippingMethod within a Project.
- Parameters:
name
- value to be set
-
setLocalizedName
Localized name of the ShippingMethod.
- Parameters:
localizedName
- value to be set
-
setDescription
Deprecated.Description of the ShippingMethod.
- Parameters:
description
- value to be set
-
setLocalizedDescription
Localized description of the ShippingMethod.
- Parameters:
localizedDescription
- value to be set
-
setTaxCategory
TaxCategory for all ZoneRates of the ShippingMethod.
- Parameters:
taxCategory
- value to be set
-
setZoneRates
Defines ShippingRates (prices) for specific zones.
- Parameters:
zoneRates
- values to be set
-
setZoneRates
Defines ShippingRates (prices) for specific zones.
- Parameters:
zoneRates
- values to be set
-
setActive
If set to
true
, the ShippingMethod can be used during the creation or update of a Cart or Order.- Parameters:
active
- value to be set
-
setIsDefault
If set to
true
, the ShippingMethod will be the Project's default ShippingMethod.- Parameters:
isDefault
- value to be set
-
setPredicate
Valid Cart predicate to select a ShippingMethod for a Cart.
- Parameters:
predicate
- value to be set
-
setCustom
Custom Fields for the ShippingMethod.
- Specified by:
setCustom
in interfaceCustomizableDraft<ShippingMethodDraft>
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of ShippingMethodDraft
-
of
factory method to create a shallow copy ShippingMethodDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ShippingMethodDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ShippingMethodDraft- Returns:
- builder
-
builder
create builder for ShippingMethodDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withShippingMethodDraft
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
-