Interface ShippingMethod

All Superinterfaces:
BaseResource, Customizable<ShippingMethod>, DomainResource<ShippingMethod>, Identifiable<ShippingMethod>, Referencable<ShippingMethod>, ResourceIdentifiable<ShippingMethod>, ShippingMethodMixin, Versioned<ShippingMethod>, WithKey

ShippingMethod
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 Details

    • getId

      @NotNull @NotNull String getId()

      Unique identifier of the ShippingMethod.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface DomainResource<ShippingMethod>
      Specified by:
      getId in interface Identifiable<ShippingMethod>
      Specified by:
      getId in interface Versioned<ShippingMethod>
      Returns:
      id
    • getVersion

      @NotNull @NotNull Long getVersion()

      Current version of the ShippingMethod.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface DomainResource<ShippingMethod>
      Specified by:
      getVersion in interface Versioned<ShippingMethod>
      Returns:
      version
    • getCreatedAt

      @NotNull @NotNull ZonedDateTime getCreatedAt()

      Date and time (UTC) the ShippingMethod was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Returns:
      createdAt
    • getLastModifiedAt

      @NotNull @NotNull ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the ShippingMethod was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      @Valid @Valid LastModifiedBy getLastModifiedBy()

      IDs and references that last modified the ShippingMethod.

      Returns:
      lastModifiedBy
    • getCreatedBy

      @Valid @Valid CreatedBy getCreatedBy()

      IDs and references that created the ShippingMethod.

      Returns:
      createdBy
    • getKey

      String getKey()

      User-defined unique identifier of the ShippingMethod.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getName

      @NotNull @NotNull String getName()

      Unique name of the ShippingMethod within a Project.

      Returns:
      name
    • getLocalizedName

      @Valid @Valid LocalizedString getLocalizedName()

      Localized name of the ShippingMethod.

      Returns:
      localizedName
    • getDescription

      @Deprecated String getDescription()
      Deprecated.

      Description of the ShippingMethod.

      Returns:
      description
    • getLocalizedDescription

      @Valid @Valid LocalizedString getLocalizedDescription()

      Localized description of the ShippingMethod.

      Returns:
      localizedDescription
    • getTaxCategory

      @NotNull @Valid @NotNull @Valid TaxCategoryReference getTaxCategory()

      TaxCategory of all ZoneRates of the ShippingMethod.

      Returns:
      taxCategory
    • getZoneRates

      @NotNull @Valid @NotNull @Valid List<ZoneRate> getZoneRates()

      Defines ShippingRates (prices) for specific Zones.

      Returns:
      zoneRates
    • getIsDefault

      @NotNull @NotNull Boolean 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

      @Valid @Valid CustomFields getCustom()

      Custom Fields of the ShippingMethod.

      Specified by:
      getCustom in interface Customizable<ShippingMethod>
      Returns:
      custom
    • setId

      void setId(String id)

      Unique identifier of the ShippingMethod.

      Specified by:
      setId in interface BaseResource
      Parameters:
      id - value to be set
    • setVersion

      void setVersion(Long version)

      Current version of the ShippingMethod.

      Specified by:
      setVersion in interface BaseResource
      Parameters:
      version - value to be set
    • setCreatedAt

      void setCreatedAt(ZonedDateTime createdAt)

      Date and time (UTC) the ShippingMethod was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      void setLastModifiedAt(ZonedDateTime lastModifiedAt)

      Date and time (UTC) the ShippingMethod was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      void setLastModifiedBy(LastModifiedBy lastModifiedBy)

      IDs and references that last modified the ShippingMethod.

      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      void setCreatedBy(CreatedBy createdBy)

      IDs and references that created the ShippingMethod.

      Parameters:
      createdBy - value to be set
    • setKey

      void setKey(String key)

      User-defined unique identifier of the ShippingMethod.

      Parameters:
      key - value to be set
    • setName

      void setName(String name)

      Unique name of the ShippingMethod within a Project.

      Parameters:
      name - value to be set
    • setLocalizedName

      void setLocalizedName(LocalizedString localizedName)

      Localized name of the ShippingMethod.

      Parameters:
      localizedName - value to be set
    • setDescription

      @Deprecated void setDescription(String description)
      Deprecated.

      Description of the ShippingMethod.

      Parameters:
      description - value to be set
    • setLocalizedDescription

      void setLocalizedDescription(LocalizedString localizedDescription)

      Localized description of the ShippingMethod.

      Parameters:
      localizedDescription - value to be set
    • setTaxCategory

      void setTaxCategory(TaxCategoryReference taxCategory)

      TaxCategory of all ZoneRates of the ShippingMethod.

      Parameters:
      taxCategory - value to be set
    • setZoneRates

      void setZoneRates(ZoneRate... zoneRates)

      Defines ShippingRates (prices) for specific Zones.

      Parameters:
      zoneRates - values to be set
    • setZoneRates

      void setZoneRates(List<ZoneRate> zoneRates)

      Defines ShippingRates (prices) for specific Zones.

      Parameters:
      zoneRates - values to be set
    • setIsDefault

      void setIsDefault(Boolean isDefault)

      If true this ShippingMethod is the Project's default ShippingMethod.

      Parameters:
      isDefault - value to be set
    • setPredicate

      void setPredicate(String predicate)

      Valid Cart predicate to select a ShippingMethod for a Cart.

      Parameters:
      predicate - value to be set
    • setCustom

      void setCustom(CustomFields custom)

      Custom Fields of the ShippingMethod.

      Specified by:
      setCustom in interface Customizable<ShippingMethod>
      Parameters:
      custom - value to be set
    • of

      static ShippingMethod of()
      factory method
      Returns:
      instance of ShippingMethod
    • of

      static ShippingMethod of(ShippingMethod template)
      factory method to create a shallow copy ShippingMethod
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static ShippingMethod deepCopy(@Nullable ShippingMethod template)
      factory method to create a deep copy of ShippingMethod
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static ShippingMethodBuilder builder()
      builder factory method for ShippingMethod
      Returns:
      builder
    • builder

      static ShippingMethodBuilder builder(ShippingMethod template)
      create builder for ShippingMethod instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withShippingMethod

      default <T> T withShippingMethod(Function<ShippingMethod,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • referenceTypeId

      static ReferenceTypeId referenceTypeId()
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ShippingMethod> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference