Interface ShippingMethod
- All Superinterfaces:
BaseResource,Customizable<ShippingMethod>,DomainResource<ShippingMethod>,Identifiable<ShippingMethod>,Referencable<ShippingMethod>,ResourceIdentifiable<ShippingMethod>,ShippingMethodMixin,Versioned<ShippingMethod>,WithKey
Example to create an instance using the builder pattern
ShippingMethod shippingMethod = ShippingMethod.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.name("{name}")
.taxCategory(taxCategoryBuilder -> taxCategoryBuilder)
.plusZoneRates(zoneRatesBuilder -> zoneRatesBuilder)
.active(true)
.isDefault(true)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShippingMethodBuilderbuilder()builder factory method for ShippingMethodstatic ShippingMethodBuilderbuilder(ShippingMethod template) create builder for ShippingMethod instancecopyDeep()static ShippingMethoddeepCopy(ShippingMethod template) factory method to create a deep copy of ShippingMethod@NotNull BooleanIndicates if the ShippingMethod is active.@NotNull ZonedDateTimeDate and time (UTC) the ShippingMethod was initially created.@Valid CreatedByIDs and references that created the ShippingMethod.@Valid CustomFieldsCustom Fields of the ShippingMethod.Deprecated.@NotNull StringgetId()Unique identifier of the ShippingMethod.@NotNull BooleanIftrue, this ShippingMethod is the Project's default ShippingMethod.getKey()User-defined unique identifier of the ShippingMethod.@NotNull ZonedDateTimeDate and time (UTC) the ShippingMethod was last updated.@Valid LastModifiedByIDs and references that last modified the ShippingMethod.@Valid LocalizedStringLocalized description of the ShippingMethod.@Valid LocalizedStringLocalized name of the ShippingMethod.@NotNull StringgetName()Unique name of the ShippingMethod within a Project.Valid Cart predicate to select a ShippingMethod for a Cart.@NotNull @Valid TaxCategoryReferenceTaxCategory of all ZoneRates of the ShippingMethod.@NotNull LongCurrent version of the ShippingMethod.Defines ShippingRates (prices) for specific Zones.static ShippingMethodof()factory methodstatic ShippingMethodof(ShippingMethod template) factory method to create a shallow copy ShippingMethodstatic ReferenceTypeIdvoidIndicates if the ShippingMethod is active.voidsetCreatedAt(ZonedDateTime createdAt) Date and time (UTC) the ShippingMethod was initially created.voidsetCreatedBy(CreatedBy createdBy) IDs and references that created the ShippingMethod.voidsetCustom(CustomFields custom) Custom Fields of the ShippingMethod.voidsetDescription(String description) Deprecated.voidUnique identifier of the ShippingMethod.voidsetIsDefault(Boolean isDefault) Iftrue, this ShippingMethod is the Project's default ShippingMethod.voidUser-defined unique identifier of the ShippingMethod.voidsetLastModifiedAt(ZonedDateTime lastModifiedAt) Date and time (UTC) the ShippingMethod was last updated.voidsetLastModifiedBy(LastModifiedBy lastModifiedBy) IDs and references that last modified the ShippingMethod.voidsetLocalizedDescription(LocalizedString localizedDescription) Localized description of the ShippingMethod.voidsetLocalizedName(LocalizedString localizedName) Localized name of the ShippingMethod.voidUnique name of the ShippingMethod within a Project.voidsetPredicate(String predicate) Valid Cart predicate to select a ShippingMethod for a Cart.voidsetTaxCategory(TaxCategoryReference taxCategory) TaxCategory of all ZoneRates of the ShippingMethod.voidsetVersion(Long version) Current version of the ShippingMethod.voidsetZoneRates(ZoneRate... zoneRates) Defines ShippingRates (prices) for specific Zones.voidsetZoneRates(List<ZoneRate> zoneRates) Defines ShippingRates (prices) for specific Zones.static com.fasterxml.jackson.core.type.TypeReference<ShippingMethod>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithShippingMethod(Function<ShippingMethod, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizableMethods inherited from interface com.commercetools.api.models.DomainResource
getMethods inherited from interface com.commercetools.api.models.shipping_method.ShippingMethodMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the ShippingMethod.
- Specified by:
getIdin interfaceBaseResource- Specified by:
getIdin interfaceDomainResource<ShippingMethod>- Specified by:
getIdin interfaceIdentifiable<ShippingMethod>- Specified by:
getIdin interfaceVersioned<ShippingMethod>- Returns:
- id
-
getVersion
Current version of the ShippingMethod.
- Specified by:
getVersionin interfaceBaseResource- Specified by:
getVersionin interfaceDomainResource<ShippingMethod>- Specified by:
getVersionin interfaceVersioned<ShippingMethod>- Returns:
- version
-
getCreatedAt
Date and time (UTC) the ShippingMethod was initially created.
- Specified by:
getCreatedAtin interfaceBaseResource- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the ShippingMethod was last updated.
- Specified by:
getLastModifiedAtin interfaceBaseResource- Returns:
- lastModifiedAt
-
getLastModifiedBy
IDs and references that last modified the ShippingMethod.
- Returns:
- lastModifiedBy
-
getCreatedBy
IDs and references that created the ShippingMethod.
- Returns:
- createdBy
-
getKey
String getKey()User-defined unique identifier of the ShippingMethod.
-
getName
Unique name of 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 of all ZoneRates of the ShippingMethod.
- Returns:
- taxCategory
-
getZoneRates
Defines ShippingRates (prices) for specific Zones.
- Returns:
- zoneRates
-
getActive
Indicates if the ShippingMethod is active.
If
true, the ShippingMethod can be used during the creation or update of a Cart or Order.- Returns:
- active
-
getIsDefault
If
true, this ShippingMethod is the Project's default ShippingMethod. When retrieving matching Shipping Methods, it is returned as the first item in the array. This flag does not automatically apply the Shipping Method to Carts.- Returns:
- isDefault
-
getPredicate
String getPredicate()Valid Cart predicate to select a ShippingMethod for a Cart.
- Returns:
- predicate
-
getCustom
Custom Fields of the ShippingMethod.
- Specified by:
getCustomin interfaceCustomizable<ShippingMethod>- Returns:
- custom
-
setId
Unique identifier of the ShippingMethod.
- Specified by:
setIdin interfaceBaseResource- Parameters:
id- value to be set
-
setVersion
Current version of the ShippingMethod.
- Specified by:
setVersionin interfaceBaseResource- Parameters:
version- value to be set
-
setCreatedAt
Date and time (UTC) the ShippingMethod was initially created.
- Specified by:
setCreatedAtin interfaceBaseResource- Parameters:
createdAt- value to be set
-
setLastModifiedAt
Date and time (UTC) the ShippingMethod was last updated.
- Specified by:
setLastModifiedAtin interfaceBaseResource- Parameters:
lastModifiedAt- value to be set
-
setLastModifiedBy
IDs and references that last modified the ShippingMethod.
- Parameters:
lastModifiedBy- value to be set
-
setCreatedBy
IDs and references that created the ShippingMethod.
- Parameters:
createdBy- value to be set
-
setKey
User-defined unique identifier of the ShippingMethod.
- Parameters:
key- value to be set
-
setName
Unique name of 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 of 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
Indicates if the ShippingMethod is active.
If
true, the ShippingMethod can be used during the creation or update of a Cart or Order.- Parameters:
active- value to be set
-
setIsDefault
If
true, this ShippingMethod is the Project's default ShippingMethod. When retrieving matching Shipping Methods, it is returned as the first item in the array. This flag does not automatically apply the Shipping Method to Carts.- 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 of the ShippingMethod.
- Specified by:
setCustomin interfaceCustomizable<ShippingMethod>- Parameters:
custom- value to be set
-
of
factory method- Returns:
- instance of ShippingMethod
-
of
factory method to create a shallow copy ShippingMethod- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
ShippingMethod copyDeep()- Specified by:
copyDeepin interfaceBaseResource
-
deepCopy
factory method to create a deep copy of ShippingMethod- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ShippingMethod- Returns:
- builder
-
builder
create builder for ShippingMethod instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withShippingMethod
accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
referenceTypeId
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-