Interface CustomShippingDraft

All Superinterfaces:
Draft<CustomShippingDraft>, WithKey

public interface CustomShippingDraft extends WithKey, Draft<CustomShippingDraft>
CustomShippingDraft
Example to create an instance using the builder pattern

     CustomShippingDraft customShippingDraft = CustomShippingDraft.builder()
             .key("{key}")
             .shippingMethodName("{shippingMethodName}")
             .shippingRate(shippingRateBuilder -> shippingRateBuilder)
             .build()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier of the custom Shipping Method in the Cart with Multiple ShippingMode.

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

      @NotNull @NotNull String getShippingMethodName()

      Name of the custom Shipping Method.

      Returns:
      shippingMethodName
    • getShippingAddress

      @Valid @Valid BaseAddress getShippingAddress()

      Determines the shipping rate and Tax Rate of the associated Line Items.

      Returns:
      shippingAddress
    • getShippingRate

      @NotNull @Valid @NotNull @Valid ShippingRateDraft getShippingRate()

      Determines the shipping price.

      Returns:
      shippingRate
    • getShippingRateInput

      @Valid @Valid ShippingRateInputDraft getShippingRateInput()

      Input used to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

      • If CartClassification, it must be ClassificationShippingRateInputDraft.
      • If CartScore, it must be ScoreShippingRateInputDraft.
      • If CartValue, it cannot be set.
      Returns:
      shippingRateInput
    • getTaxCategory

      @Valid @Valid TaxCategoryResourceIdentifier getTaxCategory()

      Tax Category used to determine a shipping Tax Rate if the Cart has the Platform TaxMode.

      Returns:
      taxCategory
    • getExternalTaxRate

      @Valid @Valid ExternalTaxRateDraft getExternalTaxRate()

      Tax Rate used to tax a shipping expense if the Cart has the External TaxMode.

      Returns:
      externalTaxRate
    • getDeliveries

      @Valid @Valid List<DeliveryDraft> getDeliveries()

      Deliveries to be shipped with the custom Shipping Method.

      Returns:
      deliveries
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields for the custom Shipping Method.

      Returns:
      custom
    • setKey

      void setKey(String key)

      User-defined unique identifier of the custom Shipping Method in the Cart with Multiple ShippingMode.

      Parameters:
      key - value to be set
    • setShippingMethodName

      void setShippingMethodName(String shippingMethodName)

      Name of the custom Shipping Method.

      Parameters:
      shippingMethodName - value to be set
    • setShippingAddress

      void setShippingAddress(BaseAddress shippingAddress)

      Determines the shipping rate and Tax Rate of the associated Line Items.

      Parameters:
      shippingAddress - value to be set
    • setShippingRate

      void setShippingRate(ShippingRateDraft shippingRate)

      Determines the shipping price.

      Parameters:
      shippingRate - value to be set
    • setShippingRateInput

      void setShippingRateInput(ShippingRateInputDraft shippingRateInput)

      Input used to select a ShippingRatePriceTier. The data type of this field depends on the shippingRateInputType.type configured in the Project:

      • If CartClassification, it must be ClassificationShippingRateInputDraft.
      • If CartScore, it must be ScoreShippingRateInputDraft.
      • If CartValue, it cannot be set.
      Parameters:
      shippingRateInput - value to be set
    • setTaxCategory

      void setTaxCategory(TaxCategoryResourceIdentifier taxCategory)

      Tax Category used to determine a shipping Tax Rate if the Cart has the Platform TaxMode.

      Parameters:
      taxCategory - value to be set
    • setExternalTaxRate

      void setExternalTaxRate(ExternalTaxRateDraft externalTaxRate)

      Tax Rate used to tax a shipping expense if the Cart has the External TaxMode.

      Parameters:
      externalTaxRate - value to be set
    • setDeliveries

      void setDeliveries(DeliveryDraft... deliveries)

      Deliveries to be shipped with the custom Shipping Method.

      Parameters:
      deliveries - values to be set
    • setDeliveries

      void setDeliveries(List<DeliveryDraft> deliveries)

      Deliveries to be shipped with the custom Shipping Method.

      Parameters:
      deliveries - values to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields for the custom Shipping Method.

      Parameters:
      custom - value to be set
    • of

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

      factory method to create a shallow copy CustomShippingDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of CustomShippingDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static CustomShippingDraftBuilder builder()
      builder factory method for CustomShippingDraft
      Returns:
      builder
    • builder

      create builder for CustomShippingDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCustomShippingDraft

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

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