From be91df6d18b7a2f9ce4c66b8884b7300a4f3db65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maurice=20Preu=C3=9F?= Date: Fri, 6 Nov 2026 20:03:12 +0000 Subject: [PATCH] Restore CRLF line endings in ManagesBalance --- src/Id/Concerns/ManagesBalance.php | 132 ++++++++++++++--------------- 1 file changed, 66 insertions(+), 66 deletions(-) diff --git a/src/Id/Concerns/ManagesBalance.php b/src/Id/Concerns/ManagesBalance.php index 1595b26..9c5e97c 100644 --- a/src/Id/Concerns/ManagesBalance.php +++ b/src/Id/Concerns/ManagesBalance.php @@ -1,66 +1,66 @@ -getUserData()->current_balance; - } - - /** - * Get charges from the current user. - * - * @throws Throwable - */ - public function charges(): float - { - return $this->getUserData()->current_charges; - } - - /** - * Billing overview of the current user: current_balance, current_charges, vat_rate, - * has_billing_address, has_default_payment_method, open_orders and billing_limit. - * - * billing_limit is the user's monthly billing limit {object: "billing_limit", user_id, - * currency, basis, limit, used, remaining, remaining_net, vat_rate, reached, resets_at, - * version} (`limit`, `remaining` and `remaining_net` null without a limit; wrap it in - * `new \Anikeen\Id\Resources\BillingLimit(…)` for its helpers), or null while the user has no - * limit and can't set one yet. Older Anikeen ID releases don't send the key. - * - * @throws Throwable - */ - public function billingOverview(): object - { - return $this->anikeenId()->request('GET', 'v1/billing')->data; - } - - /** - * Charge given amount (deposit) from one of the current user's payment methods. - * - * @param float|string $amount Amount in euros (0.50 to 10,000, at most 2 decimals). - * @param string $paymentMethodId Stripe payment method ID (pm_…). - * @param array $options Ignored; Stripe options can no longer be passed through. - * @throws Throwable - */ - public function charge(float|string $amount, string $paymentMethodId, array $options = []): Transaction - { - return (new Transaction(fn() => $this->anikeenId() - ->request('POST', 'v1/billing/charge', [ - 'amount' => $amount, - 'payment_method_id' => $paymentMethodId, - ]))) - ->setBillable($this); - } -} +getUserData()->current_balance; + } + + /** + * Get charges from the current user. + * + * @throws Throwable + */ + public function charges(): float + { + return $this->getUserData()->current_charges; + } + + /** + * Billing overview of the current user: current_balance, current_charges, vat_rate, + * has_billing_address, has_default_payment_method, open_orders and billing_limit. + * + * billing_limit is the user's monthly billing limit {object: "billing_limit", user_id, + * currency, basis, limit, used, remaining, remaining_net, vat_rate, reached, resets_at, + * version} (`limit`, `remaining` and `remaining_net` null without a limit; wrap it in + * `new \Anikeen\Id\Resources\BillingLimit(…)` for its helpers), or null while the user has no + * limit and can't set one yet. Older Anikeen ID releases don't send the key. + * + * @throws Throwable + */ + public function billingOverview(): object + { + return $this->anikeenId()->request('GET', 'v1/billing')->data; + } + + /** + * Charge given amount (deposit) from one of the current user's payment methods. + * + * @param float|string $amount Amount in euros (0.50 to 10,000, at most 2 decimals). + * @param string $paymentMethodId Stripe payment method ID (pm_…). + * @param array $options Ignored; Stripe options can no longer be passed through. + * @throws Throwable + */ + public function charge(float|string $amount, string $paymentMethodId, array $options = []): Transaction + { + return (new Transaction(fn() => $this->anikeenId() + ->request('POST', 'v1/billing/charge', [ + 'amount' => $amount, + 'payment_method_id' => $paymentMethodId, + ]))) + ->setBillable($this); + } +} \ No newline at end of file