From 0dbb27fc94ca0f4d8ac25f7f97f2e5aa0226668f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maurice=20Preu=C3=9F?= Date: Sat, 6 Sep 2025 13:22:23 +0000 Subject: [PATCH] update transaction description MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maurice Preuß --- src/Id/Resources/Transactions.php | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/Id/Resources/Transactions.php b/src/Id/Resources/Transactions.php index 6a2e285..adfbc9c 100644 --- a/src/Id/Resources/Transactions.php +++ b/src/Id/Resources/Transactions.php @@ -13,9 +13,25 @@ class Transactions extends BaseCollection /** * Create a new transaction for the current user. * - * @param array $attributes The attributes for the transaction. + * @param array{ + * group: null|string, + * invoice_id: null|string, + * payment_provider: null|string, + * payment_intent: null|string, + * status: string, + * type: string, + * amount: float, + * created_at: string + * } $attributes The attributes for the transaction. + * - group: The group (optional) + * - invoice_id: The invoice id (optional) + * - payment_provider: The payment provider (optional, e.g. "kofi", "stripe") + * - payment_intent: The payment intent (optional) + * - status: The status (e.g. "expired", "failed", "pending", "refunded", "succeeded") + * - type: The type (e.g. "deposit", "withdrawal") + * - amount: The payload + * - created_at: The created at datetime string (e.g. "Y-M-D H:i:s") * @throws Throwable - * @todo Add type hinting for the attributes array. */ public function create(array $attributes = []): Transaction { @@ -29,6 +45,6 @@ class Transactions extends BaseCollection public function find(string $id): ?Transaction { return (new Transaction(fn() => $this->billable->request('GET', sprintf('v1/transactions/%s', $id)))) - ->setBillable($this->billable); + ->setBillable($this->billable); } } \ No newline at end of file