88use Bavix \Wallet \Exceptions \InsufficientFunds ;
99use Bavix \Wallet \Exceptions \ProductEnded ;
1010use Bavix \Wallet \Internal \Exceptions \ExceptionInterface ;
11+ use Bavix \Wallet \Internal \Exceptions \ModelNotFoundException ;
1112use Bavix \Wallet \Internal \Exceptions \TransactionFailedException ;
1213use Bavix \Wallet \Models \Transfer ;
1314use Illuminate \Database \RecordsNotFoundException ;
@@ -36,7 +37,7 @@ public function forceRefund(Product $product, bool $gifts = false): bool;
3637 * @throws TransactionFailedException
3738 * @throws ExceptionInterface
3839 *
39- * @return Transfer[]
40+ * @return non-empty-array< Transfer>
4041 */
4142 public function payFreeCart (CartInterface $ cart ): array ;
4243
@@ -48,23 +49,58 @@ public function payFreeCart(CartInterface $cart): array;
4849 * @throws TransactionFailedException
4950 * @throws ExceptionInterface
5051 *
51- * @return Transfer[]
52+ * @return non-empty-array< Transfer>
5253 */
5354 public function payCart (CartInterface $ cart , bool $ force = false ): array ;
5455
55- /**
56- * @return Transfer[]
57- */
56+ /** @return Transfer[] */
5857 public function safePayCart (CartInterface $ cart , bool $ force = false ): array ;
5958
6059 /**
61- * @return Transfer[]
60+ * @throws ProductEnded
61+ * @throws RecordsNotFoundException
62+ * @throws TransactionFailedException
63+ * @throws ExceptionInterface
64+ *
65+ * @return non-empty-array<Transfer>
6266 */
6367 public function forcePayCart (CartInterface $ cart ): array ;
6468
69+ /**
70+ * @throws BalanceIsEmpty
71+ * @throws InsufficientFunds
72+ * @throws RecordsNotFoundException
73+ * @throws TransactionFailedException
74+ * @throws ModelNotFoundException
75+ * @throws ExceptionInterface
76+ */
6577 public function refundCart (CartInterface $ cart , bool $ force = false , bool $ gifts = false ): bool ;
6678
6779 public function safeRefundCart (CartInterface $ cart , bool $ force = false , bool $ gifts = false ): bool ;
6880
81+ /**
82+ * @throws RecordsNotFoundException
83+ * @throws TransactionFailedException
84+ * @throws ModelNotFoundException
85+ * @throws ExceptionInterface
86+ */
6987 public function forceRefundCart (CartInterface $ cart , bool $ gifts = false ): bool ;
88+
89+ /**
90+ * @throws BalanceIsEmpty
91+ * @throws InsufficientFunds
92+ * @throws RecordsNotFoundException
93+ * @throws TransactionFailedException
94+ * @throws ModelNotFoundException
95+ * @throws ExceptionInterface
96+ */
97+ public function refundGiftCart (CartInterface $ cart , bool $ force = false ): bool ;
98+
99+ /**
100+ * @throws RecordsNotFoundException
101+ * @throws TransactionFailedException
102+ * @throws ModelNotFoundException
103+ * @throws ExceptionInterface
104+ */
105+ public function forceRefundGiftCart (CartInterface $ cart ): bool ;
70106}
0 commit comments