Interface StagedOrderSetCustomShippingMethodAction

All Superinterfaces:
ResourceUpdateAction<StagedOrderUpdateAction>, StagedOrderUpdateAction

public interface StagedOrderSetCustomShippingMethodAction extends StagedOrderUpdateAction

To set the Cart's custom Shipping Method (independent of the ShippingMethods managed through the Shipping Methods API) the Cart must have the Single ShippingMode and a shippingAddress.

To unset a custom Shipping Method on a Cart, use the Set ShippingMethod update action without the shippingMethod field instead.


Example to create an instance using the builder pattern

     StagedOrderSetCustomShippingMethodAction stagedOrderSetCustomShippingMethodAction = StagedOrderSetCustomShippingMethodAction.builder()
             .shippingMethodName("{shippingMethodName}")
             .shippingRate(shippingRateBuilder -> shippingRateBuilder)
             .build()
 
  • Field Details

    • SET_CUSTOM_SHIPPING_METHOD

      static final String SET_CUSTOM_SHIPPING_METHOD
      discriminator value for StagedOrderSetCustomShippingMethodAction
      See Also:
  • Method Details

    • getShippingMethodName

      @NotNull @NotNull String getShippingMethodName()

      Name of the custom Shipping Method.

      Returns:
      shippingMethodName
    • getShippingRate

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

      Determines the shipping price.

      Returns:
      shippingRate
    • getTaxCategory

      @Valid @Valid TaxCategoryResourceIdentifier getTaxCategory()

      Tax Category used to determine the Tax Rate when the Cart has the Platform TaxMode.

      Returns:
      taxCategory
    • getExternalTaxRate

      @Valid @Valid ExternalTaxRateDraft getExternalTaxRate()

      External Tax Rate for the shippingRate to be set if the Cart has the External TaxMode.

      Returns:
      externalTaxRate
    • setShippingMethodName

      void setShippingMethodName(String shippingMethodName)

      Name of the custom Shipping Method.

      Parameters:
      shippingMethodName - value to be set
    • setShippingRate

      void setShippingRate(ShippingRateDraft shippingRate)

      Determines the shipping price.

      Parameters:
      shippingRate - value to be set
    • setTaxCategory

      void setTaxCategory(TaxCategoryResourceIdentifier taxCategory)

      Tax Category used to determine the Tax Rate when the Cart has the Platform TaxMode.

      Parameters:
      taxCategory - value to be set
    • setExternalTaxRate

      void setExternalTaxRate(ExternalTaxRateDraft externalTaxRate)

      External Tax Rate for the shippingRate to be set if the Cart has the External TaxMode.

      Parameters:
      externalTaxRate - value to be set
    • of

      factory method
      Returns:
      instance of StagedOrderSetCustomShippingMethodAction
    • of

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

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

      builder factory method for StagedOrderSetCustomShippingMethodAction
      Returns:
      builder
    • builder

      create builder for StagedOrderSetCustomShippingMethodAction instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withStagedOrderSetCustomShippingMethodAction

      default <T> T withStagedOrderSetCustomShippingMethodAction(Function<StagedOrderSetCustomShippingMethodAction,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<StagedOrderSetCustomShippingMethodAction> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference