AddDiscountCodeToCart Method

Adds a dicount code to the cart.

Namespace:  Microsoft.Dynamics.Commerce.Runtime.Client
Assembly:  Microsoft.Dynamics.Commerce.Runtime.Client (in Microsoft.Dynamics.Commerce.Runtime.Client.dll)

public Cart AddDiscountCodeToCart(
	string cartId,
	string customerAccountNumber,
	string discountCode,
	CalculationModes modes
)

Parameters

cartId
Type: System.String
customerAccountNumber
Type: System.String
discountCode
Type: System.String
modes
Type: Microsoft.Dynamics.Commerce.Runtime.DataModel.CalculationModes

Return Value

Type: Microsoft.Dynamics.Commerce.Runtime.DataModel.Cart
The updated cart.

Community Additions

Show: