Interface CartSetCustomShippingMethodAction

All Superinterfaces:
CartUpdateAction, ResourceUpdateAction<CartUpdateAction>
All Known Implementing Classes:
CartSetCustomShippingMethodActionImpl

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

     CartSetCustomShippingMethodAction cartSetCustomShippingMethodAction = CartSetCustomShippingMethodAction.builder()
             .shippingMethodName("{shippingMethodName}")
             .shippingRate(shippingRateBuilder -> shippingRateBuilder)
             .build()