diff --git a/README.md b/README.md index 20a140a..3666a37 100644 --- a/README.md +++ b/README.md @@ -169,6 +169,12 @@ the names of resources _should_ match what's in this package. | [VerificationSessions](https://stripe.com/docs/api/identity/verification_sessions) | `stripeIdentityVerificationSessionId()` | `vs_j8AvYT7Tbmjz26tASmjdcyNt` | | [Transactions](https://stripe.com/docs/api/identity/verification_reports) | `stripeIdentityVerificationReportId()` | `vr_IwuD3wV5qfD4t4fbTOzWwUm6` | +### Crypto +| API Resource | Method | Example ID | +|-----------------------------------------------------------------------|---------------------------------|--------------------------------| +| [Onramp Sessions](https://stripe.com/docs/api/crypto/onramp_sessions) | `stripeCryptoOnrampSessionId()` | `cos_wlo5PYZC2j8lFHnMaxbuFBK8` | + + ### Webhooks | API Resource | Method | Example ID | |----------------------------------------------------------------------|--------------------------------|---------------------------------------| diff --git a/src/Stripe.php b/src/Stripe.php index 0691596..dbe6841 100644 --- a/src/Stripe.php +++ b/src/Stripe.php @@ -461,4 +461,8 @@ public function stripeWebhookApplicationId(): string return 'ca_' . $this->generateRandomString(32); } + public function stripeCryptoOnrampSessionId(): string + { + return 'cos_' . $this->generateRandomString(); + } } \ No newline at end of file diff --git a/tests/StripeTest.php b/tests/StripeTest.php index 25e652f..5dbccfb 100644 --- a/tests/StripeTest.php +++ b/tests/StripeTest.php @@ -358,4 +358,8 @@ it('generates a webhook application id', function () { expect($this->fake->stripeWebhookApplicationId())->toStartWith('ca_')->toHaveLength(35); +}); + +it('generates a crypto onramp session id', function () { + expect($this->fake->stripeCryptoOnrampSessionId())->toStartWith('cdos_')->toHaveLength(28); }); \ No newline at end of file