Class SingleProductCartValidator
A cart validator that checks that only one product is in the cart items list.
Implements
Inherited Members
Namespace: UnityEngine.Purchasing
Assembly: Unity.Purchasing.dll
Syntax
public class SingleProductCartValidator : ICartValidator
Methods
Validate(ICart)
Validates that there is exactly one item in the cart.
Declaration
public void Validate(ICart cart)
Parameters
Type | Name | Description |
---|---|---|
ICart | cart | The cart to be validated. |
Exceptions
Type | Condition |
---|---|
InvalidCartException | Thrown if the amount of items in the cart is not 1. |