Interface ShippingMethod
- All Superinterfaces:
BaseResource
,Customizable<ShippingMethod>
,DomainResource<ShippingMethod>
,Identifiable<ShippingMethod>
,Referencable<ShippingMethod>
,ResourceIdentifiable<ShippingMethod>
,ShippingMethodMixin
,Versioned<ShippingMethod>
,WithKey
- All Known Implementing Classes:
ShippingMethodImpl
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)
.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 ZonedDateTime
Date and time (UTC) the ShippingMethod was initially created.@Valid CreatedBy
Present on resources created after 1 February 2019 except for events not tracked.@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
Present on resources created after 1 February 2019 except for events not tracked.@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
setCreatedAt
(ZonedDateTime createdAt) Date and time (UTC) the ShippingMethod was initially created.void
setCreatedBy
(CreatedBy createdBy) Present on resources created after 1 February 2019 except for events not tracked.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) Present on resources created after 1 February 2019 except for events not tracked.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
Present on resources created after 1 February 2019 except for events not tracked.
- Returns:
- lastModifiedBy
-
getCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- 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
-
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
Present on resources created after 1 February 2019 except for events not tracked.
- Parameters:
lastModifiedBy
- value to be set
-
setCreatedBy
Present on resources created after 1 February 2019 except for events not tracked.
- 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
-
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
-