Interface ShippingMethodDraft
- All Superinterfaces:
CustomizableDraft<ShippingMethodDraft>
,io.vrap.rmf.base.client.Draft<ShippingMethodDraft>
,WithKey
- All Known Implementing Classes:
ShippingMethodDraftImpl
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 ShippingMethodDraft@Valid CustomFieldsDraft
Custom Fields for the ShippingMethod.Deprecated.@NotNull Boolean
Iftrue
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()
Name of the ShippingMethod.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
setCustom
(CustomFieldsDraft custom) Custom Fields for the ShippingMethod.void
setDescription
(String description) Deprecated.void
setIsDefault
(Boolean isDefault) Iftrue
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
Name of the ShippingMethod.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
User-defined unique identifier for the ShippingMethod.
-
getName
Name of the ShippingMethod.
- 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
-
getIsDefault
If
true
the ShippingMethod will be the Project's default ShippingMethod.- Returns:
- isDefault
-
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
Name of the ShippingMethod.
- 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
-
setIsDefault
If
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
-