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 ShippingMethodBuilder
builder()
builder factory method for ShippingMethodstatic ShippingMethodBuilder
builder
(ShippingMethod template) create builder for ShippingMethod instancestatic ShippingMethod
deepCopy
(ShippingMethod template) factory method to create a deep copy of ShippingMethod@NotNull Boolean
Indicates if the ShippingMethod is active.@NotNull ZonedDateTime
Date and time (UTC) the ShippingMethod was initially created.@Valid CreatedBy
IDs and references that created the ShippingMethod.@Valid CustomFields
Custom Fields of the ShippingMethod.Deprecated.@NotNull String
getId()
Unique identifier of the ShippingMethod.@NotNull Boolean
Iftrue
, this ShippingMethod is the Project's default ShippingMethod.getKey()
User-defined unique identifier of the ShippingMethod.@NotNull ZonedDateTime
Date and time (UTC) the ShippingMethod was last updated.@Valid LastModifiedBy
IDs and references that last modified the ShippingMethod.@Valid LocalizedString
Localized description of the ShippingMethod.@Valid LocalizedString
Localized name of the ShippingMethod.@NotNull String
getName()
Unique name of the ShippingMethod within a Project.Valid Cart predicate to select a ShippingMethod for a Cart.@NotNull @Valid TaxCategoryReference
TaxCategory of all ZoneRates of the ShippingMethod.@NotNull Long
Current version of the ShippingMethod.Defines ShippingRates (prices) for specific Zones.static ShippingMethod
of()
factory methodstatic ShippingMethod
of
(ShippingMethod template) factory method to create a shallow copy ShippingMethodstatic ReferenceTypeId
void
Indicates if the ShippingMethod is active.void
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the ShippingMethod was initially created.void
setCreatedBy
(CreatedBy createdBy) IDs and references that created the ShippingMethod.void
setCustom
(CustomFields custom) Custom Fields of the ShippingMethod.void
setDescription
(String description) Deprecated.void
Unique identifier of the ShippingMethod.void
setIsDefault
(Boolean isDefault) Iftrue
, this ShippingMethod is the Project's default ShippingMethod.void
User-defined unique identifier of the ShippingMethod.void
setLastModifiedAt
(ZonedDateTime lastModifiedAt) Date and time (UTC) the ShippingMethod was last updated.void
setLastModifiedBy
(LastModifiedBy lastModifiedBy) IDs and references that last modified the ShippingMethod.void
setLocalizedDescription
(LocalizedString localizedDescription) Localized description of the ShippingMethod.void
setLocalizedName
(LocalizedString localizedName) Localized name of the ShippingMethod.void
Unique name of the ShippingMethod within a Project.void
setPredicate
(String predicate) Valid Cart predicate to select a ShippingMethod for a Cart.void
setTaxCategory
(TaxCategoryReference taxCategory) TaxCategory of all ZoneRates of the ShippingMethod.void
setVersion
(Long version) Current version of the ShippingMethod.void
setZoneRates
(ZoneRate... zoneRates) Defines ShippingRates (prices) for specific Zones.void
setZoneRates
(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> T
withShippingMethod
(Function<ShippingMethod, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
Methods inherited from interface com.commercetools.api.models.DomainResource
get
Methods inherited from interface com.commercetools.api.models.shipping_method.ShippingMethodMixin
toReference, toResourceIdentifier
-
Method Details
-
getId
Unique identifier of the ShippingMethod.
- Specified by:
getId
in interfaceBaseResource
- Specified by:
getId
in interfaceDomainResource<ShippingMethod>
- Specified by:
getId
in interfaceIdentifiable<ShippingMethod>
- Specified by:
getId
in interfaceVersioned<ShippingMethod>
- Returns:
- id
-
getVersion
Current version of the ShippingMethod.
- Specified by:
getVersion
in interfaceBaseResource
- Specified by:
getVersion
in interfaceDomainResource<ShippingMethod>
- Specified by:
getVersion
in interfaceVersioned<ShippingMethod>
- Returns:
- version
-
getCreatedAt
Date and time (UTC) the ShippingMethod was initially created.
- Specified by:
getCreatedAt
in interfaceBaseResource
- Returns:
- createdAt
-
getLastModifiedAt
Date and time (UTC) the ShippingMethod was last updated.
- Specified by:
getLastModifiedAt
in 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.- 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:
getCustom
in interfaceCustomizable<ShippingMethod>
- Returns:
- custom
-
setId
Unique identifier of the ShippingMethod.
- Specified by:
setId
in interfaceBaseResource
- Parameters:
id
- value to be set
-
setVersion
Current version of the ShippingMethod.
- Specified by:
setVersion
in interfaceBaseResource
- Parameters:
version
- value to be set
-
setCreatedAt
Date and time (UTC) the ShippingMethod was initially created.
- Specified by:
setCreatedAt
in interfaceBaseResource
- Parameters:
createdAt
- value to be set
-
setLastModifiedAt
Date and time (UTC) the ShippingMethod was last updated.
- Specified by:
setLastModifiedAt
in 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.- 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:
setCustom
in 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
-
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
-