Home > @vue-storefront/magento-api > setShippingMethodsOnCart
setShippingMethodsOnCart() function
Sets a shipping method on received cart.
Signature:
export default function setShippingMethodsOnCart(context: Context, input: SetShippingMethodsOnCartInput, customQuery?: CustomQuery, customHeaders?: CustomHeaders): Promise<FetchResult<SetShippingMethodsOnCartMutation>>;
Parameters
Parameter | Type | Description |
---|---|---|
context | Context | VSF context |
input | SetShippingMethodsOnCartInput | params with cart ID and shipping method. |
customQuery | CustomQuery | (Optional) (optional) - custom GraphQL query that extends the default one |
customHeaders | CustomHeaders | (Optional) (optional) - custom headers that extends the default headers |
Returns:
Promise<FetchResult<SetShippingMethodsOnCartMutation>>