Home > @vsf-enterprise/sapcc-api > Endpoints > addVoucherAndGetNewCartVersion

Endpoints.addVoucherAndGetNewCartVersion() method

Applies coupon code to the cart and returns a new version of cart.

Signature:

addVoucherAndGetNewCartVersion(context: SapccIntegrationContext, props: AddVoucherAndGetNewCartVersionProps): Promise<Cart>;

Parameters

Parameter Type Description
context SapccIntegrationContext An auto-generated value prepended to the method as a first parameter.
props AddVoucherAndGetNewCartVersionProps An object containing composed properties for applying coupon to the cart and getting a new cart version.

Returns:

Promise<Cart>