diff --git a/README.md b/README.md index a99298e..4eb2e41 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,12 @@ the names of resources _should_ match what's in this package. | [Tokens](https://stripe.com/docs/api/tokens) | `stripeCoreTokenId()` | `tok_q1KiYddcC48Tqney3T8Vnkzu` | ### Payment Methods -| API Resource | Method | Example | -|---------------------------------------------------------------------|--------------------------------------|---------------------------------| -| [Payment Methods](https://stripe.com/docs/api/payment_methods) | `stripePaymentMethodId()` | `pm_jkztRiUi5yqTNqHJTzTAVolI` | -| [Bank Accounts](https://stripe.com/docs/api/customer_bank_accounts) | `stripePaymentMethodBankAccountId()` | `ba_gkcmh6gu31nALx6PJDJckqPn` | -| [Cards](https://stripe.com/docs/api/cards) | `stripePaymentMethodCardId()` | `card_A56nkfbrHtdQ7bv8I9eeQOtW` | +| API Resource | Method | Example | +|---------------------------------------------------------------------|--------------------------------------|------------------------------------| +| [Payment Methods](https://stripe.com/docs/api/payment_methods) | `stripePaymentMethodId()` | `pm_jkztRiUi5yqTNqHJTzTAVolI` | +| [Bank Accounts](https://stripe.com/docs/api/customer_bank_accounts) | `stripePaymentMethodBankAccountId()` | `ba_gkcmh6gu31nALx6PJDJckqPn` | +| [Cash Balance](https://stripe.com/docs/api/cash_balance) | `stripeCashBalanceTransactionId()` | `ccsbtxn_6sKoup9yicpuPC7MykObBsjq` | +| [Cards](https://stripe.com/docs/api/cards) | `stripePaymentMethodCardId()` | `card_A56nkfbrHtdQ7bv8I9eeQOtW` | ### Products | API Resource | Method | Example | diff --git a/src/Stripe.php b/src/Stripe.php index 8b28f01..5b199f5 100644 --- a/src/Stripe.php +++ b/src/Stripe.php @@ -480,4 +480,9 @@ public function stripeConnectCapabilityId(): string { return 'acap_' . $this->generateRandomString(); } + + public function stripeCashBalanceTransactionId(): string + { + return 'ccsbtxn_' . $this->generateRandomString(); + } } \ No newline at end of file diff --git a/tests/StripeTest.php b/tests/StripeTest.php index 6ef839a..67cd059 100644 --- a/tests/StripeTest.php +++ b/tests/StripeTest.php @@ -374,4 +374,8 @@ it('generates a connect capability id', function () { expect($this->fake->stripeConnectCapabilityId())->toStartWith('acap_')->toHaveLength(29)->toBeString(); +})->repeat(2); + +it('generates a cash balance transaction id', function () { + expect($this->fake->stripeCashBalanceTransactionId())->toStartWith('ccsbtxn_')->toHaveLength(32)->toBeString(); })->repeat(2); \ No newline at end of file