/**
* @param CouponInterface|null $coupon
*
* @return bool
* @throws CouponException
*/
public function useCoupon(CouponInterface $coupon = null)
{
if (!$this->couponChecker->isValid($coupon)) {
throw new CouponException($this->couponChecker->getError());
}
$this->applyCartCoupon($coupon);
return true;
}