couponUtil = $couponUtil; } /** * @deprecated Use `discountCodeExists` OR `coupon` method */ #[Query] public function checkCouponExists(string $coupon): ?Coupon { return $this->couponUtil->checkCouponExists($coupon); } /** * Ověří, zda zadaný slevový kupón nebo dárkový poukaz existuje. */ #[Query] #[Module(\Modules::ORDER_DISCOUNT)] public function discountCodeExists(string $code): bool { return $this->couponUtil->checkCodeExists($code); } /** * Informace o dárkovém poukazu (generovaný kód). */ #[Query] #[Module(\Modules::ORDER_DISCOUNT)] public function coupon(string $code): ?DiscountCoupon { return $this->couponUtil->getCoupon($code); } /** * Nastaví generovaný kód jako použitý. */ #[Mutation] #[Module(\Modules::ORDER_DISCOUNT)] public function couponUse(string $code): CouponMutateResponse { return $this->couponUtil->useCoupon($code); } /** * Znovu aktivuje už použitý generovaný kód. */ #[Mutation] #[Module(\Modules::ORDER_DISCOUNT)] public function couponReactivate(string $code): CouponMutateResponse { return $this->couponUtil->reactivateCoupon($code); } }