Class SingleQuantityCartValidator
A cart validator that checks that the quantity of each product in the cart is exactly one.
Implements
Inherited Members
Namespace: UnityEngine.Purchasing
Assembly: Unity.Purchasing.dll
Syntax
public class SingleQuantityCartValidator : ICartValidator
Methods
Validate(ICart)
Validates that the cart's items each have a quantity of exactly 1.
Declaration
public void Validate(ICart cart)
Parameters
Type | Name | Description |
---|---|---|
ICart | cart | The cart to be validated. |
Exceptions
Type | Condition |
---|---|
InvalidCartItemException | Thrown if any of the products in the cart have a non-1 quantity. |