1515
1616interface Customer extends Wallet
1717{
18- public function pay (Product $ product , bool $ force = false ): Transfer ;
18+ /**
19+ * @throws ProductEnded
20+ * @throws BalanceIsEmpty
21+ * @throws InsufficientFunds
22+ * @throws RecordsNotFoundException
23+ * @throws TransactionFailedException
24+ * @throws ExceptionInterface
25+ */
26+ public function payFree (Product $ product ): Transfer ;
1927
2028 public function safePay (Product $ product , bool $ force = false ): ?Transfer ;
2129
30+ /**
31+ * @throws ProductEnded
32+ * @throws BalanceIsEmpty
33+ * @throws InsufficientFunds
34+ * @throws RecordsNotFoundException
35+ * @throws TransactionFailedException
36+ * @throws ExceptionInterface
37+ */
38+ public function pay (Product $ product , bool $ force = false ): Transfer ;
39+
40+ /**
41+ * @throws ProductEnded
42+ * @throws RecordsNotFoundException
43+ * @throws TransactionFailedException
44+ * @throws ExceptionInterface
45+ */
2246 public function forcePay (Product $ product ): Transfer ;
2347
24- public function paid (Product $ product , bool $ gifts = false ): ? Transfer ;
48+ public function safeRefund (Product $ product , bool $ force = false , bool $ gifts = false ): bool ;
2549
50+ /**
51+ * @throws BalanceIsEmpty
52+ * @throws InsufficientFunds
53+ * @throws RecordsNotFoundException
54+ * @throws TransactionFailedException
55+ * @throws ModelNotFoundException
56+ * @throws ExceptionInterface
57+ */
2658 public function refund (Product $ product , bool $ force = false , bool $ gifts = false ): bool ;
2759
28- public function safeRefund (Product $ product , bool $ force = false , bool $ gifts = false ): bool ;
29-
60+ /**
61+ * @throws RecordsNotFoundException
62+ * @throws TransactionFailedException
63+ * @throws ModelNotFoundException
64+ * @throws ExceptionInterface
65+ */
3066 public function forceRefund (Product $ product , bool $ gifts = false ): bool ;
3167
68+ public function safeRefundGift (Product $ product , bool $ force = false ): bool ;
69+
70+ /**
71+ * @throws BalanceIsEmpty
72+ * @throws InsufficientFunds
73+ * @throws RecordsNotFoundException
74+ * @throws TransactionFailedException
75+ * @throws ModelNotFoundException
76+ * @throws ExceptionInterface
77+ */
78+ public function refundGift (Product $ product , bool $ force = false ): bool ;
79+
80+ /**
81+ * @throws RecordsNotFoundException
82+ * @throws TransactionFailedException
83+ * @throws ModelNotFoundException
84+ * @throws ExceptionInterface
85+ */
86+ public function forceRefundGift (Product $ product ): bool ;
87+
3288 /**
3389 * @throws ProductEnded
3490 * @throws BalanceIsEmpty
@@ -41,6 +97,9 @@ public function forceRefund(Product $product, bool $gifts = false): bool;
4197 */
4298 public function payFreeCart (CartInterface $ cart ): array ;
4399
100+ /** @return Transfer[] */
101+ public function safePayCart (CartInterface $ cart , bool $ force = false ): array ;
102+
44103 /**
45104 * @throws ProductEnded
46105 * @throws BalanceIsEmpty
@@ -53,9 +112,6 @@ public function payFreeCart(CartInterface $cart): array;
53112 */
54113 public function payCart (CartInterface $ cart , bool $ force = false ): array ;
55114
56- /** @return Transfer[] */
57- public function safePayCart (CartInterface $ cart , bool $ force = false ): array ;
58-
59115 /**
60116 * @throws ProductEnded
61117 * @throws RecordsNotFoundException
@@ -66,6 +122,8 @@ public function safePayCart(CartInterface $cart, bool $force = false): array;
66122 */
67123 public function forcePayCart (CartInterface $ cart ): array ;
68124
125+ public function safeRefundCart (CartInterface $ cart , bool $ force = false , bool $ gifts = false ): bool ;
126+
69127 /**
70128 * @throws BalanceIsEmpty
71129 * @throws InsufficientFunds
@@ -76,8 +134,6 @@ public function forcePayCart(CartInterface $cart): array;
76134 */
77135 public function refundCart (CartInterface $ cart , bool $ force = false , bool $ gifts = false ): bool ;
78136
79- public function safeRefundCart (CartInterface $ cart , bool $ force = false , bool $ gifts = false ): bool ;
80-
81137 /**
82138 * @throws RecordsNotFoundException
83139 * @throws TransactionFailedException
@@ -86,6 +142,8 @@ public function safeRefundCart(CartInterface $cart, bool $force = false, bool $g
86142 */
87143 public function forceRefundCart (CartInterface $ cart , bool $ gifts = false ): bool ;
88144
145+ public function safeRefundGiftCart (CartInterface $ cart , bool $ force = false ): bool ;
146+
89147 /**
90148 * @throws BalanceIsEmpty
91149 * @throws InsufficientFunds
@@ -103,4 +161,6 @@ public function refundGiftCart(CartInterface $cart, bool $force = false): bool;
103161 * @throws ExceptionInterface
104162 */
105163 public function forceRefundGiftCart (CartInterface $ cart ): bool ;
164+
165+ public function paid (Product $ product , bool $ gifts = false ): ?Transfer ;
106166}
0 commit comments