From 67c1edcc88789879f56c8da8592103afd80c9703 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 08:30:48 -0700 Subject: [PATCH 1/3] Update generated code (#1573) * Update generated code for v515 * Update generated code for v517 * Update generated code for v519 * Update generated code for v522 * Update generated code for v522 * Update generated code for v524 * Update generated code for v525 * Update generated code for v525 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- init.php | 2 + lib/Balance.php | 8 +- lib/ErrorObject.php | 1 + lib/Service/CustomerService.php | 6 +- lib/Service/PaymentIntentService.php | 10 +- .../Issuing/AuthorizationService.php | 87 ++++++ .../Issuing/IssuingServiceFactory.php | 4 + .../Issuing/TransactionService.php | 54 ++++ tests/Stripe/GeneratedExamplesTest.php | 264 ++++++++++++++---- 10 files changed, 371 insertions(+), 67 deletions(-) create mode 100644 lib/Service/TestHelpers/Issuing/AuthorizationService.php create mode 100644 lib/Service/TestHelpers/Issuing/TransactionService.php diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8114987932..ca2b1285d7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v510 \ No newline at end of file +v525 \ No newline at end of file diff --git a/init.php b/init.php index 2fc4169390..dbe93336b2 100644 --- a/init.php +++ b/init.php @@ -229,8 +229,10 @@ require __DIR__ . '/lib/Service/Terminal/ReaderService.php'; require __DIR__ . '/lib/Service/Terminal/TerminalServiceFactory.php'; require __DIR__ . '/lib/Service/TestHelpers/CustomerService.php'; +require __DIR__ . '/lib/Service/TestHelpers/Issuing/AuthorizationService.php'; require __DIR__ . '/lib/Service/TestHelpers/Issuing/CardService.php'; require __DIR__ . '/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php'; +require __DIR__ . '/lib/Service/TestHelpers/Issuing/TransactionService.php'; require __DIR__ . '/lib/Service/TestHelpers/RefundService.php'; require __DIR__ . '/lib/Service/TestHelpers/Terminal/ReaderService.php'; require __DIR__ . '/lib/Service/TestHelpers/Terminal/TerminalServiceFactory.php'; diff --git a/lib/Balance.php b/lib/Balance.php index 05a94ccfa9..8243f9a9fc 100644 --- a/lib/Balance.php +++ b/lib/Balance.php @@ -18,12 +18,12 @@ * Related guide: Understanding Connect account balances * * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property \Stripe\StripeObject[] $available Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the Transfers API or Payouts API. The available balance for each currency and payment type can be found in the source_types property. - * @property null|\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the source_types property. - * @property null|\Stripe\StripeObject[] $instant_available Funds that can be paid out using Instant Payouts. + * @property \Stripe\StripeObject[] $available Available funds that you can transfer or pay out automatically by Stripe or explicitly through the Transfers API or Payouts API. You can find the available balance for each currency and payment type in the source_types property. + * @property null|\Stripe\StripeObject[] $connect_reserved Funds held due to negative balances on connected Custom accounts. You can find the connect reserve balance for each currency and payment type in the source_types property. + * @property null|\Stripe\StripeObject[] $instant_available Funds that you can pay out using Instant Payouts. * @property null|\Stripe\StripeObject $issuing * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. - * @property \Stripe\StripeObject[] $pending Funds that are not yet available in the balance. The pending balance for each currency, and for each payment type, can be found in the source_types property. + * @property \Stripe\StripeObject[] $pending Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the source_types property. */ class Balance extends SingletonApiResource { diff --git a/lib/ErrorObject.php b/lib/ErrorObject.php index c5a8cfa688..ec0ed43178 100644 --- a/lib/ErrorObject.php +++ b/lib/ErrorObject.php @@ -186,6 +186,7 @@ class ErrorObject extends StripeObject const CODE_SKU_INACTIVE = 'sku_inactive'; const CODE_STATE_UNSUPPORTED = 'state_unsupported'; const CODE_STATUS_TRANSITION_INVALID = 'status_transition_invalid'; + const CODE_STRIPE_TAX_INACTIVE = 'stripe_tax_inactive'; const CODE_TAX_ID_INVALID = 'tax_id_invalid'; const CODE_TAXES_CALCULATION_FAILED = 'taxes_calculation_failed'; const CODE_TERMINAL_LOCATION_COUNTRY_UNSUPPORTED = 'terminal_location_country_unsupported'; diff --git a/lib/Service/CustomerService.php b/lib/Service/CustomerService.php index 3c13d008c0..34346a1eb7 100644 --- a/lib/Service/CustomerService.php +++ b/lib/Service/CustomerService.php @@ -179,7 +179,7 @@ public function createSource($parentId, $params = null, $opts = null) } /** - * Creates a new TaxID object for a customer. + * Creates a new tax_id object for a customer. * * @param string $parentId * @param null|array $params @@ -245,7 +245,7 @@ public function deleteSource($parentId, $id, $params = null, $opts = null) } /** - * Deletes an existing TaxID object. + * Deletes an existing tax_id object. * * @param string $parentId * @param string $id @@ -364,7 +364,7 @@ public function retrieveSource($parentId, $id, $params = null, $opts = null) } /** - * Retrieves the TaxID object with the given identifier. + * Retrieves the tax_id object with the given identifier. * * @param string $parentId * @param string $id diff --git a/lib/Service/PaymentIntentService.php b/lib/Service/PaymentIntentService.php index a276519575..a3fd8d133b 100644 --- a/lib/Service/PaymentIntentService.php +++ b/lib/Service/PaymentIntentService.php @@ -196,12 +196,12 @@ public function incrementAuthorization($id, $params = null, $opts = null) /** * Retrieves the details of a PaymentIntent that has previously been created. * - * Client-side retrieval using a publishable key is allowed when the - * client_secret is provided in the query string. + * You can retrieve a PaymentIntent client-side using a publishable key when the + * client_secret is in the query string. * - * When retrieved with a publishable key, only a subset of properties will be - * returned. Please refer to the payment - * intent object reference for more details. + * If you retrieve a PaymentIntent with a publishable key, it only returns a subset + * of properties. Refer to the payment intent + * object reference for more details. * * @param string $id * @param null|array $params diff --git a/lib/Service/TestHelpers/Issuing/AuthorizationService.php b/lib/Service/TestHelpers/Issuing/AuthorizationService.php new file mode 100644 index 0000000000..73de27cb99 --- /dev/null +++ b/lib/Service/TestHelpers/Issuing/AuthorizationService.php @@ -0,0 +1,87 @@ +request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/capture', $id), $params, $opts); + } + + /** + * Create a test-mode authorization. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Authorization + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/test_helpers/issuing/authorizations', $params, $opts); + } + + /** + * Expire a test-mode Authorization. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Authorization + */ + public function expire($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/expire', $id), $params, $opts); + } + + /** + * Increment a test-mode Authorization. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Authorization + */ + public function increment($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/increment', $id), $params, $opts); + } + + /** + * Reverse a test-mode Authorization. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Authorization + */ + public function reverse($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/authorizations/%s/reverse', $id), $params, $opts); + } +} diff --git a/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php b/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php index a202ec33f0..e15a7c87c8 100644 --- a/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php +++ b/lib/Service/TestHelpers/Issuing/IssuingServiceFactory.php @@ -7,7 +7,9 @@ /** * Service factory class for API resources in the Issuing namespace. * + * @property AuthorizationService $authorizations * @property CardService $cards + * @property TransactionService $transactions */ class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory { @@ -15,7 +17,9 @@ class IssuingServiceFactory extends \Stripe\Service\AbstractServiceFactory * @var array */ private static $classMap = [ + 'authorizations' => AuthorizationService::class, 'cards' => CardService::class, + 'transactions' => TransactionService::class, ]; protected function getServiceClass($name) diff --git a/lib/Service/TestHelpers/Issuing/TransactionService.php b/lib/Service/TestHelpers/Issuing/TransactionService.php new file mode 100644 index 0000000000..5fb2965db5 --- /dev/null +++ b/lib/Service/TestHelpers/Issuing/TransactionService.php @@ -0,0 +1,54 @@ +request('post', '/v1/test_helpers/issuing/transactions/create_force_capture', $params, $opts); + } + + /** + * Allows the user to refund an arbitrary amount, also known as a unlinked refund. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Transaction + */ + public function createUnlinkedRefund($params = null, $opts = null) + { + return $this->request('post', '/v1/test_helpers/issuing/transactions/create_unlinked_refund', $params, $opts); + } + + /** + * Refund a test-mode Transaction. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Issuing\Transaction + */ + public function refund($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/test_helpers/issuing/transactions/%s/refund', $id), $params, $opts); + } +} diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php index ef5f49425a..ea37f68a69 100644 --- a/tests/Stripe/GeneratedExamplesTest.php +++ b/tests/Stripe/GeneratedExamplesTest.php @@ -101,8 +101,14 @@ public function testExpireSession() public function testListLineItemsSession() { - $this->expectsRequest('get', '/v1/checkout/sessions/sess_xyz/line_items'); - $result = $this->client->checkout->sessions->allLineItems('sess_xyz', []); + $this->expectsRequest( + 'get', + '/v1/checkout/sessions/sess_xyz/line_items' + ); + $result = $this->client->checkout->sessions->allLineItems( + 'sess_xyz', + [] + ); static::assertInstanceOf(\Stripe\Collection::class, $result); static::assertInstanceOf(\Stripe\LineItem::class, $result->data[0]); } @@ -126,7 +132,10 @@ public function testUpdateCashBalance() public function testCreateFundingInstructionsCustomer() { - $this->expectsRequest('post', '/v1/customers/cus_123/funding_instructions'); + $this->expectsRequest( + 'post', + '/v1/customers/cus_123/funding_instructions' + ); $result = $this->client->customers->createFundingInstructions( 'cus_123', [ @@ -151,7 +160,10 @@ public function testListAccount() public function testRetrieveAccount() { - $this->expectsRequest('get', '/v1/financial_connections/accounts/fca_xyz'); + $this->expectsRequest( + 'get', + '/v1/financial_connections/accounts/fca_xyz' + ); $result = $this->client->financialConnections->accounts->retrieve( 'fca_xyz', [] @@ -367,7 +379,10 @@ public function testDeleteConfiguration() public function testRetrieveConfiguration() { $this->expectsRequest('get', '/v1/terminal/configurations/uc_123'); - $result = $this->client->terminal->configurations->retrieve('uc_123', []); + $result = $this->client->terminal->configurations->retrieve( + 'uc_123', + [] + ); static::assertInstanceOf(\Stripe\Terminal\Configuration::class, $result); } @@ -476,15 +491,24 @@ public function testCreateTestClock() public function testDeleteTestClock() { - $this->expectsRequest('delete', '/v1/test_helpers/test_clocks/clock_xyz'); - $result = $this->client->testHelpers->testClocks->delete('clock_xyz', []); + $this->expectsRequest( + 'delete', + '/v1/test_helpers/test_clocks/clock_xyz' + ); + $result = $this->client->testHelpers->testClocks->delete( + 'clock_xyz', + [] + ); static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result); } public function testRetrieveTestClock() { $this->expectsRequest('get', '/v1/test_helpers/test_clocks/clock_xyz'); - $result = $this->client->testHelpers->testClocks->retrieve('clock_xyz', []); + $result = $this->client->testHelpers->testClocks->retrieve( + 'clock_xyz', + [] + ); static::assertInstanceOf(\Stripe\TestHelpers\TestClock::class, $result); } @@ -581,7 +605,10 @@ public function testReturnOutboundTransferOutboundTransfer() public function testCreateReceivedCredit() { - $this->expectsRequest('post', '/v1/test_helpers/treasury/received_credits'); + $this->expectsRequest( + 'post', + '/v1/test_helpers/treasury/received_credits' + ); $result = $this->client->testHelpers->treasury->receivedCredits->create([ 'financial_account' => 'fa_123', 'network' => 'ach', @@ -593,7 +620,10 @@ public function testCreateReceivedCredit() public function testCreateReceivedDebit() { - $this->expectsRequest('post', '/v1/test_helpers/treasury/received_debits'); + $this->expectsRequest( + 'post', + '/v1/test_helpers/treasury/received_debits' + ); $result = $this->client->testHelpers->treasury->receivedDebits->create([ 'financial_account' => 'fa_123', 'network' => 'ach', @@ -754,7 +784,10 @@ public function testListPerson() public function testCreatePerson() { - $this->expectsRequest('post', '/v1/accounts/acct_xxxxxxxxxxxxx/persons'); + $this->expectsRequest( + 'post', + '/v1/accounts/acct_xxxxxxxxxxxxx/persons' + ); $result = $this->client->accounts->createPerson( 'acct_xxxxxxxxxxxxx', [ @@ -818,7 +851,10 @@ public function testListApplicationFee() public function testRetrieveApplicationFee() { $this->expectsRequest('get', '/v1/application_fees/fee_xxxxxxxxxxxxx'); - $result = $this->client->applicationFees->retrieve('fee_xxxxxxxxxxxxx', []); + $result = $this->client->applicationFees->retrieve( + 'fee_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\ApplicationFee::class, $result); } @@ -909,7 +945,10 @@ public function testListBalanceTransaction() public function testRetrieveBalanceTransaction() { - $this->expectsRequest('get', '/v1/balance_transactions/txn_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'get', + '/v1/balance_transactions/txn_xxxxxxxxxxxxx' + ); $result = $this->client->balanceTransactions->retrieve( 'txn_xxxxxxxxxxxxx', [] @@ -920,7 +959,9 @@ public function testRetrieveBalanceTransaction() public function testListConfiguration2() { $this->expectsRequest('get', '/v1/billing_portal/configurations'); - $result = $this->client->billingPortal->configurations->all(['limit' => 3]); + $result = $this->client->billingPortal->configurations->all([ + 'limit' => 3, + ]); static::assertInstanceOf(\Stripe\Collection::class, $result); static::assertInstanceOf(\Stripe\BillingPortal\Configuration::class, $result->data[0]); } @@ -1046,7 +1087,10 @@ public function testCreateSession4() public function testRetrieveSession2() { - $this->expectsRequest('get', '/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'get', + '/v1/checkout/sessions/cs_test_xxxxxxxxxxxxx' + ); $result = $this->client->checkout->sessions->retrieve( 'cs_test_xxxxxxxxxxxxx', [] @@ -1306,7 +1350,10 @@ public function testListTaxId() public function testCreateTaxId() { - $this->expectsRequest('post', '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids'); + $this->expectsRequest( + 'post', + '/v1/customers/cus_xxxxxxxxxxxxx/tax_ids' + ); $result = $this->client->customers->createTaxId( 'cus_xxxxxxxxxxxxx', [ @@ -1544,7 +1591,9 @@ public function testRetrieveSession3() public function testListVerificationReport() { $this->expectsRequest('get', '/v1/identity/verification_reports'); - $result = $this->client->identity->verificationReports->all(['limit' => 3]); + $result = $this->client->identity->verificationReports->all([ + 'limit' => 3, + ]); static::assertInstanceOf(\Stripe\Collection::class, $result); static::assertInstanceOf(\Stripe\Identity\VerificationReport::class, $result->data[0]); } @@ -1729,7 +1778,10 @@ public function testUpdateInvoice() public function testFinalizeInvoiceInvoice() { $this->expectsRequest('post', '/v1/invoices/in_xxxxxxxxxxxxx/finalize'); - $result = $this->client->invoices->finalizeInvoice('in_xxxxxxxxxxxxx', []); + $result = $this->client->invoices->finalizeInvoice( + 'in_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\Invoice::class, $result); } @@ -1868,7 +1920,10 @@ public function testCreateCardholder() public function testRetrieveCardholder() { - $this->expectsRequest('get', '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'get', + '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx' + ); $result = $this->client->issuing->cardholders->retrieve( 'ich_xxxxxxxxxxxxx', [] @@ -1878,7 +1933,10 @@ public function testRetrieveCardholder() public function testUpdateCardholder() { - $this->expectsRequest('post', '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'post', + '/v1/issuing/cardholders/ich_xxxxxxxxxxxxx' + ); $result = $this->client->issuing->cardholders->update( 'ich_xxxxxxxxxxxxx', ['metadata' => ['order_id' => '6735']] @@ -1908,7 +1966,10 @@ public function testCreateCard() public function testRetrieveCard() { $this->expectsRequest('get', '/v1/issuing/cards/ic_xxxxxxxxxxxxx'); - $result = $this->client->issuing->cards->retrieve('ic_xxxxxxxxxxxxx', []); + $result = $this->client->issuing->cards->retrieve( + 'ic_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\Issuing\Card::class, $result); } @@ -1959,7 +2020,10 @@ public function testSubmitDispute() 'post', '/v1/issuing/disputes/idp_xxxxxxxxxxxxx/submit' ); - $result = $this->client->issuing->disputes->submit('idp_xxxxxxxxxxxxx', []); + $result = $this->client->issuing->disputes->submit( + 'idp_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\Issuing\Dispute::class, $result); } @@ -1973,7 +2037,10 @@ public function testListTransaction() public function testRetrieveTransaction() { - $this->expectsRequest('get', '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'get', + '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx' + ); $result = $this->client->issuing->transactions->retrieve( 'ipi_xxxxxxxxxxxxx', [] @@ -1983,7 +2050,10 @@ public function testRetrieveTransaction() public function testUpdateTransaction() { - $this->expectsRequest('post', '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'post', + '/v1/issuing/transactions/ipi_xxxxxxxxxxxxx' + ); $result = $this->client->issuing->transactions->update( 'ipi_xxxxxxxxxxxxx', ['metadata' => ['order_id' => '6735']] @@ -1994,7 +2064,10 @@ public function testUpdateTransaction() public function testRetrieveMandate() { $this->expectsRequest('get', '/v1/mandates/mandate_xxxxxxxxxxxxx'); - $result = $this->client->mandates->retrieve('mandate_xxxxxxxxxxxxx', []); + $result = $this->client->mandates->retrieve( + 'mandate_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\Mandate::class, $result); } @@ -2020,7 +2093,10 @@ public function testCreatePaymentIntent2() public function testRetrievePaymentIntent() { $this->expectsRequest('get', '/v1/payment_intents/pi_xxxxxxxxxxxxx'); - $result = $this->client->paymentIntents->retrieve('pi_xxxxxxxxxxxxx', []); + $result = $this->client->paymentIntents->retrieve( + 'pi_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\PaymentIntent::class, $result); } @@ -2063,7 +2139,10 @@ public function testCapturePaymentIntent() 'post', '/v1/payment_intents/pi_xxxxxxxxxxxxx/capture' ); - $result = $this->client->paymentIntents->capture('pi_xxxxxxxxxxxxx', []); + $result = $this->client->paymentIntents->capture( + 'pi_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\PaymentIntent::class, $result); } @@ -2141,7 +2220,10 @@ public function testCreatePaymentLink2() public function testRetrievePaymentLink2() { $this->expectsRequest('get', '/v1/payment_links/plink_xxxxxxxxxxxxx'); - $result = $this->client->paymentLinks->retrieve('plink_xxxxxxxxxxxxx', []); + $result = $this->client->paymentLinks->retrieve( + 'plink_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\PaymentLink::class, $result); } @@ -2184,7 +2266,10 @@ public function testCreatePaymentMethod() public function testRetrievePaymentMethod() { $this->expectsRequest('get', '/v1/payment_methods/pm_xxxxxxxxxxxxx'); - $result = $this->client->paymentMethods->retrieve('pm_xxxxxxxxxxxxx', []); + $result = $this->client->paymentMethods->retrieve( + 'pm_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\PaymentMethod::class, $result); } @@ -2433,7 +2518,9 @@ public function testListPromotionCode() public function testCreatePromotionCode() { $this->expectsRequest('post', '/v1/promotion_codes'); - $result = $this->client->promotionCodes->create(['coupon' => 'Z4OV52SU']); + $result = $this->client->promotionCodes->create([ + 'coupon' => 'Z4OV52SU', + ]); static::assertInstanceOf(\Stripe\PromotionCode::class, $result); } @@ -2449,7 +2536,10 @@ public function testRetrievePromotionCode() public function testUpdatePromotionCode() { - $this->expectsRequest('post', '/v1/promotion_codes/promo_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'post', + '/v1/promotion_codes/promo_xxxxxxxxxxxxx' + ); $result = $this->client->promotionCodes->update( 'promo_xxxxxxxxxxxxx', ['metadata' => ['order_id' => '6735']] @@ -2607,8 +2697,14 @@ public function testCreateValueList() public function testDeleteValueList() { - $this->expectsRequest('delete', '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx'); - $result = $this->client->radar->valueLists->delete('rsl_xxxxxxxxxxxxx', []); + $this->expectsRequest( + 'delete', + '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx' + ); + $result = $this->client->radar->valueLists->delete( + 'rsl_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\Radar\ValueList::class, $result); } @@ -2624,7 +2720,10 @@ public function testRetrieveValueList() public function testUpdateValueList() { - $this->expectsRequest('post', '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'post', + '/v1/radar/value_lists/rsl_xxxxxxxxxxxxx' + ); $result = $this->client->radar->valueLists->update( 'rsl_xxxxxxxxxxxxx', ['name' => 'Updated IP Block List'] @@ -2643,7 +2742,9 @@ public function testListRefund() public function testCreateRefund() { $this->expectsRequest('post', '/v1/refunds'); - $result = $this->client->refunds->create(['charge' => 'ch_xxxxxxxxxxxxx']); + $result = $this->client->refunds->create([ + 'charge' => 'ch_xxxxxxxxxxxxx', + ]); static::assertInstanceOf(\Stripe\Refund::class, $result); } @@ -2694,7 +2795,10 @@ public function testCreateReportRun() public function testRetrieveReportRun() { - $this->expectsRequest('get', '/v1/reporting/report_runs/frr_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'get', + '/v1/reporting/report_runs/frr_xxxxxxxxxxxxx' + ); $result = $this->client->reporting->reportRuns->retrieve( 'frr_xxxxxxxxxxxxx', [] @@ -2765,7 +2869,10 @@ public function testCreateSetupIntent() public function testRetrieveSetupIntent() { $this->expectsRequest('get', '/v1/setup_intents/seti_xxxxxxxxxxxxx'); - $result = $this->client->setupIntents->retrieve('seti_xxxxxxxxxxxxx', []); + $result = $this->client->setupIntents->retrieve( + 'seti_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\SetupIntent::class, $result); } @@ -2840,7 +2947,10 @@ public function testCreateShippingRate2() public function testRetrieveShippingRate() { $this->expectsRequest('get', '/v1/shipping_rates/shr_xxxxxxxxxxxxx'); - $result = $this->client->shippingRates->retrieve('shr_xxxxxxxxxxxxx', []); + $result = $this->client->shippingRates->retrieve( + 'shr_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\ShippingRate::class, $result); } @@ -2922,8 +3032,14 @@ public function testCreateSubscriptionItem() public function testDeleteSubscriptionItem() { - $this->expectsRequest('delete', '/v1/subscription_items/si_xxxxxxxxxxxxx'); - $result = $this->client->subscriptionItems->delete('si_xxxxxxxxxxxxx', []); + $this->expectsRequest( + 'delete', + '/v1/subscription_items/si_xxxxxxxxxxxxx' + ); + $result = $this->client->subscriptionItems->delete( + 'si_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\SubscriptionItem::class, $result); } @@ -2939,7 +3055,10 @@ public function testRetrieveSubscriptionItem() public function testUpdateSubscriptionItem() { - $this->expectsRequest('post', '/v1/subscription_items/si_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'post', + '/v1/subscription_items/si_xxxxxxxxxxxxx' + ); $result = $this->client->subscriptionItems->update( 'si_xxxxxxxxxxxxx', ['metadata' => ['order_id' => '6735']] @@ -3087,7 +3206,10 @@ public function testCancelSubscription() public function testRetrieveSubscription() { $this->expectsRequest('get', '/v1/subscriptions/sub_xxxxxxxxxxxxx'); - $result = $this->client->subscriptions->retrieve('sub_xxxxxxxxxxxxx', []); + $result = $this->client->subscriptions->retrieve( + 'sub_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\Subscription::class, $result); } @@ -3244,7 +3366,10 @@ public function testCreateLocation() public function testDeleteLocation() { - $this->expectsRequest('delete', '/v1/terminal/locations/tml_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'delete', + '/v1/terminal/locations/tml_xxxxxxxxxxxxx' + ); $result = $this->client->terminal->locations->delete( 'tml_xxxxxxxxxxxxx', [] @@ -3254,7 +3379,10 @@ public function testDeleteLocation() public function testRetrieveLocation() { - $this->expectsRequest('get', '/v1/terminal/locations/tml_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'get', + '/v1/terminal/locations/tml_xxxxxxxxxxxxx' + ); $result = $this->client->terminal->locations->retrieve( 'tml_xxxxxxxxxxxxx', [] @@ -3264,7 +3392,10 @@ public function testRetrieveLocation() public function testUpdateLocation() { - $this->expectsRequest('post', '/v1/terminal/locations/tml_xxxxxxxxxxxxx'); + $this->expectsRequest( + 'post', + '/v1/terminal/locations/tml_xxxxxxxxxxxxx' + ); $result = $this->client->terminal->locations->update( 'tml_xxxxxxxxxxxxx', ['display_name' => 'My First Store'] @@ -3293,8 +3424,14 @@ public function testCreateReader() public function testDeleteReader() { - $this->expectsRequest('delete', '/v1/terminal/readers/tmr_xxxxxxxxxxxxx'); - $result = $this->client->terminal->readers->delete('tmr_xxxxxxxxxxxxx', []); + $this->expectsRequest( + 'delete', + '/v1/terminal/readers/tmr_xxxxxxxxxxxxx' + ); + $result = $this->client->terminal->readers->delete( + 'tmr_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\Terminal\Reader::class, $result); } @@ -3472,7 +3609,9 @@ public function testCreateToken5() public function testCreateToken6() { $this->expectsRequest('post', '/v1/tokens'); - $result = $this->client->tokens->create(['cvc_update' => ['cvc' => '123']]); + $result = $this->client->tokens->create([ + 'cvc_update' => ['cvc' => '123'], + ]); static::assertInstanceOf(\Stripe\Token::class, $result); } @@ -3566,7 +3705,10 @@ public function testUpdateTransfer() public function testListTransferReversal() { - $this->expectsRequest('get', '/v1/transfers/tr_xxxxxxxxxxxxx/reversals'); + $this->expectsRequest( + 'get', + '/v1/transfers/tr_xxxxxxxxxxxxx/reversals' + ); $result = $this->client->transfers->allReversals( 'tr_xxxxxxxxxxxxx', ['limit' => 3] @@ -3577,7 +3719,10 @@ public function testListTransferReversal() public function testCreateTransferReversal() { - $this->expectsRequest('post', '/v1/transfers/tr_xxxxxxxxxxxxx/reversals'); + $this->expectsRequest( + 'post', + '/v1/transfers/tr_xxxxxxxxxxxxx/reversals' + ); $result = $this->client->transfers->createReversal( 'tr_xxxxxxxxxxxxx', ['amount' => 100] @@ -3682,7 +3827,9 @@ public function testRetrieveDebitReversal() public function testListFinancialAccount() { $this->expectsRequest('get', '/v1/treasury/financial_accounts'); - $result = $this->client->treasury->financialAccounts->all(['limit' => 3]); + $result = $this->client->treasury->financialAccounts->all([ + 'limit' => 3, + ]); static::assertInstanceOf(\Stripe\Collection::class, $result); static::assertInstanceOf(\Stripe\Treasury\FinancialAccount::class, $result->data[0]); } @@ -3993,15 +4140,24 @@ public function testListWebhookEndpoint() public function testDeleteWebhookEndpoint() { - $this->expectsRequest('delete', '/v1/webhook_endpoints/we_xxxxxxxxxxxxx'); - $result = $this->client->webhookEndpoints->delete('we_xxxxxxxxxxxxx', []); + $this->expectsRequest( + 'delete', + '/v1/webhook_endpoints/we_xxxxxxxxxxxxx' + ); + $result = $this->client->webhookEndpoints->delete( + 'we_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result); } public function testRetrieveWebhookEndpoint() { $this->expectsRequest('get', '/v1/webhook_endpoints/we_xxxxxxxxxxxxx'); - $result = $this->client->webhookEndpoints->retrieve('we_xxxxxxxxxxxxx', []); + $result = $this->client->webhookEndpoints->retrieve( + 'we_xxxxxxxxxxxxx', + [] + ); static::assertInstanceOf(\Stripe\WebhookEndpoint::class, $result); } From ce9445fdeef2fccde5740d463d3147b6663982a6 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 14 Sep 2023 17:50:30 -0700 Subject: [PATCH 2/3] Update generated code (#1577) * Update generated code for v527 * Update generated code for v530 * Update generated code for v531 * Update generated code for v532 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- init.php | 2 + lib/BalanceTransaction.php | 18 +- lib/Checkout/Session.php | 1 + lib/Customer.php | 18 +- lib/Dispute.php | 16 +- lib/Event.php | 43 +-- lib/PaymentIntent.php | 1 + lib/PaymentMethodConfiguration.php | 64 ++++ lib/Service/CoreServiceFactory.php | 2 + .../PaymentMethodConfigurationService.php | 70 ++++ lib/SetupIntent.php | 1 + lib/StripeClient.php | 1 + lib/Util/ObjectTypes.php | 1 + tests/Stripe/GeneratedExamplesTest.php | 308 ++++++++++++++++++ 15 files changed, 499 insertions(+), 49 deletions(-) create mode 100644 lib/PaymentMethodConfiguration.php create mode 100644 lib/Service/PaymentMethodConfigurationService.php diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ca2b1285d7..e9281bf5d6 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v525 \ No newline at end of file +v532 \ No newline at end of file diff --git a/init.php b/init.php index dbe93336b2..502cfd8511 100644 --- a/init.php +++ b/init.php @@ -132,6 +132,7 @@ require __DIR__ . '/lib/PaymentIntent.php'; require __DIR__ . '/lib/PaymentLink.php'; require __DIR__ . '/lib/PaymentMethod.php'; +require __DIR__ . '/lib/PaymentMethodConfiguration.php'; require __DIR__ . '/lib/PaymentMethodDomain.php'; require __DIR__ . '/lib/Payout.php'; require __DIR__ . '/lib/Person.php'; @@ -191,6 +192,7 @@ require __DIR__ . '/lib/Service/MandateService.php'; require __DIR__ . '/lib/Service/PaymentIntentService.php'; require __DIR__ . '/lib/Service/PaymentLinkService.php'; +require __DIR__ . '/lib/Service/PaymentMethodConfigurationService.php'; require __DIR__ . '/lib/Service/PaymentMethodDomainService.php'; require __DIR__ . '/lib/Service/PaymentMethodService.php'; require __DIR__ . '/lib/Service/PayoutService.php'; diff --git a/lib/BalanceTransaction.php b/lib/BalanceTransaction.php index 6115899e5d..da8158f5ab 100644 --- a/lib/BalanceTransaction.php +++ b/lib/BalanceTransaction.php @@ -6,25 +6,25 @@ /** * Balance transactions represent funds moving through your Stripe account. - * They're created for every type of transaction that comes into or flows out of your Stripe account balance. + * Stripe creates them for every type of transaction that enters or leaves your Stripe account balance. * * Related guide: Balance transaction types * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount Gross amount of the transaction, in cents (or local equivalent). - * @property int $available_on The date the transaction's net funds will become available in the Stripe balance. + * @property int $amount Gross amount of the transaction (in cents (or local equivalent)). + * @property int $available_on The date that the transaction's net funds become available in the Stripe balance. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. - * @property null|float $exchange_rate The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the amount in currency A, times exchange_rate, would be the amount in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's amount would be 1000 and currency would be eur. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's amount would be 1234, currency would be usd, and exchange_rate would be 1.234. + * @property null|float $exchange_rate If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the amount in currency A, multipled by the exchange_rate, equals the amount in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's amount is 1000 and currency is eur. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's amount is 1234, its currency is usd, and the exchange_rate is 1.234. * @property int $fee Fees (in cents (or local equivalent)) paid for this transaction. * @property \Stripe\StripeObject[] $fee_details Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. - * @property int $net Net amount of the transaction, in cents (or local equivalent). - * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective. - * @property null|string|\Stripe\StripeObject $source The Stripe object to which this transaction is related. - * @property string $status If the transaction's net funds are available in the Stripe balance yet. Either available or pending. - * @property string $type Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, obligation_inbound, obligation_outbound, obligation_reversal_inbound, obligation_reversal_outbound, obligation_payout, obligation_payout_failure, payment, payment_failure_refund, payment_refund, payment_reversal, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider reporting_category instead. + * @property int $net Net amount of the transaction (in cents (or local equivalent)). + * @property string $reporting_category Learn more about how [reporting categories] (https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. + * @property null|string|\Stripe\StripeObject $source This transaction relates to the Stripe object. + * @property string $status The transaction's net funds status in the Stripe balance, which are either available or pending. + * @property string $type Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, connect_collection_transfer, contribution, issuing_authorization_hold, issuing_authorization_release, issuing_dispute, issuing_transaction, obligation_inbound, obligation_outbound, obligation_reversal_inbound, obligation_reversal_outbound, obligation_payout, obligation_payout_failure, payment, payment_failure_refund, payment_refund, payment_reversal, payout, payout_cancel, payout_failure, refund, refund_failure, reserve_transaction, reserved_funds, stripe_fee, stripe_fx_fee, tax_fee, topup, topup_reversal, transfer, transfer_cancel, transfer_failure, or transfer_refund. Learn more about balance transaction types and what they represent. To classify transactions for accounting purposes, consider reporting_category instead. */ class BalanceTransaction extends ApiResource { diff --git a/lib/Checkout/Session.php b/lib/Checkout/Session.php index b1ed61e5d7..302191c6f5 100644 --- a/lib/Checkout/Session.php +++ b/lib/Checkout/Session.php @@ -52,6 +52,7 @@ * @property null|string|\Stripe\PaymentIntent $payment_intent The ID of the PaymentIntent for Checkout Sessions in payment mode. * @property null|string|\Stripe\PaymentLink $payment_link The ID of the Payment Link that created this Session. * @property null|string $payment_method_collection Configure whether a Checkout Session should collect a payment method. + * @property null|\Stripe\StripeObject $payment_method_configuration_details Information about the payment method configuration used for this Checkout session if using dynamic payment methods. * @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. * @property string[] $payment_method_types A list of the types of payment methods (e.g. card) this Checkout Session is allowed to accept. * @property string $payment_status The payment status of the Checkout Session, one of paid, unpaid, or no_payment_required. You can use this value to decide when to fulfill your customer's order. diff --git a/lib/Customer.php b/lib/Customer.php index 7d3f8983c7..3e2855906e 100644 --- a/lib/Customer.php +++ b/lib/Customer.php @@ -5,38 +5,38 @@ namespace Stripe; /** - * This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer. + * This object represents a customer of your business. Use it to create recurring charges and track payments that belong to the same customer. * * Related guide: Save a card during payment * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|\Stripe\StripeObject $address The customer's address. - * @property null|int $balance Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. - * @property null|\Stripe\CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance". The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically. + * @property null|int $balance The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. + * @property null|\Stripe\CashBalance $cash_balance The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The settings[reconciliation_mode] field describes if these funds apply to these payment intents manually or automatically. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property null|string $currency Three-letter ISO code for the currency the customer can be charged in for recurring billing purposes. - * @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $default_source

ID of the default payment source for the customer.

If you are using payment methods created via the PaymentMethods API, see the invoice_settings.default_payment_method field instead.

- * @property null|bool $delinquent

When the customer's latest invoice is billed by charging automatically, delinquent is true if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, delinquent is true if the invoice isn't paid by its due date.

If an invoice is marked uncollectible by dunning, delinquent doesn't get reset to false.

+ * @property null|string|\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source $default_source

ID of the default payment source for the customer.

If you use payment methods created through the PaymentMethods API, see the invoice_settings.default_payment_method field instead.

+ * @property null|bool $delinquent

If Stripe bills the customer's latest invoice by automatically charging and the latest charge fails, it sets delinquent`` to true. If Stripe bills the invoice by sending it, and the invoice isn't paid by the due date, it also sets `delinquent to true.

If an invoice becomes uncollectible by dunning, delinquent doesn't reset to false.

* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|\Stripe\Discount $discount Describes the current discount active on the customer, if there is one. * @property null|string $email The customer's email address. - * @property null|\Stripe\StripeObject $invoice_credit_balance The current multi-currency balances, if any, being stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices. They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized. + * @property null|\Stripe\StripeObject $invoice_credit_balance The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. * @property null|string $invoice_prefix The prefix for the customer used to generate unique invoice numbers. * @property null|\Stripe\StripeObject $invoice_settings * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property null|\Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $name The customer's full name or business name. - * @property null|int $next_invoice_sequence The suffix of the customer's next invoice number, e.g., 0001. + * @property null|int $next_invoice_sequence The suffix of the customer's next invoice number (for example, 0001). * @property null|string $phone The customer's phone number. * @property null|string[] $preferred_locales The customer's preferred locales (languages), ordered by preference. * @property null|\Stripe\StripeObject $shipping Mailing and shipping address for the customer. Appears on invoices emailed to this customer. * @property null|\Stripe\Collection<\Stripe\Account|\Stripe\BankAccount|\Stripe\Card|\Stripe\Source> $sources The customer's payment sources, if any. * @property null|\Stripe\Collection<\Stripe\Subscription> $subscriptions The customer's current subscriptions, if any. * @property null|\Stripe\StripeObject $tax - * @property null|string $tax_exempt Describes the customer's tax exemption status. One of none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the text "Reverse charge". + * @property null|string $tax_exempt Describes the customer's tax exemption status, which is none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the following text: "Reverse charge". * @property null|\Stripe\Collection<\Stripe\TaxId> $tax_ids The customer's tax IDs. - * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock this customer belongs to. + * @property null|string|\Stripe\TestHelpers\TestClock $test_clock ID of the test clock that this customer belongs to. */ class Customer extends ApiResource { diff --git a/lib/Dispute.php b/lib/Dispute.php index 62c99c15a3..55cc06a5a6 100644 --- a/lib/Dispute.php +++ b/lib/Dispute.php @@ -6,29 +6,27 @@ /** * A dispute occurs when a customer questions your charge with their card issuer. - * When this happens, you're given the opportunity to respond to the dispute with - * evidence that shows that the charge is legitimate. You can find more - * information about the dispute process in our Disputes and - * Fraud documentation. + * When this happens, you have the opportunity to respond to the dispute with + * evidence that shows that the charge is legitimate. * * Related guide: Disputes and fraud * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property int $amount Disputed amount. Usually the amount of the charge, but can differ (usually because of currency fluctuation or because only part of the order is disputed). + * @property int $amount Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). * @property \Stripe\BalanceTransaction[] $balance_transactions List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. - * @property string|\Stripe\Charge $charge ID of the charge that was disputed. + * @property string|\Stripe\Charge $charge ID of the charge that's disputed. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property \Stripe\StripeObject $evidence * @property \Stripe\StripeObject $evidence_details - * @property bool $is_charge_refundable If true, it is still possible to refund the disputed payment. Once the payment has been fully refunded, no further funds will be withdrawn from your Stripe account as a result of this dispute. + * @property bool $is_charge_refundable If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. * @property \Stripe\StripeObject $metadata Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. * @property null|string $network_reason_code Network-dependent reason code for the dispute. - * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was disputed. + * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that's disputed. * @property null|\Stripe\StripeObject $payment_method_details - * @property string $reason Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Read more about dispute reasons. + * @property string $reason Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Learn more about dispute reasons. * @property string $status Current status of dispute. Possible values are warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, won, or lost. */ class Dispute extends ApiResource diff --git a/lib/Event.php b/lib/Event.php index 77354f3b4d..e01074ae95 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -8,46 +8,47 @@ * Events are our way of letting you know when something interesting happens in * your account. When an interesting event occurs, we create a new Event * object. For example, when a charge succeeds, we create a charge.succeeded - * event; and when an invoice payment attempt fails, we create an - * invoice.payment_failed event. Note that many API requests may cause multiple - * events to be created. For example, if you create a new subscription for a - * customer, you will receive both a customer.subscription.created event and a + * event, and when an invoice payment attempt fails, we create an + * invoice.payment_failed event. Certain API requests might create multiple + * events. For example, if you create a new subscription for a + * customer, you receive both a customer.subscription.created event and a * charge.succeeded event. * - * Events occur when the state of another API resource changes. The state of that - * resource at the time of the change is embedded in the event's data field. For - * example, a charge.succeeded event will contain a charge, and an - * invoice.payment_failed event will contain an invoice. + * Events occur when the state of another API resource changes. The event's data + * field embeds the resource's state at the time of the change. For + * example, a charge.succeeded event contains a charge, and an + * invoice.payment_failed event contains an invoice. * * As with other API resources, you can use endpoints to retrieve an * individual event or a list of events * from the API. We also have a separate * webhooks system for sending the - * Event objects directly to an endpoint on your server. Webhooks are managed - * in your - * account settings, - * and our Using Webhooks guide will help you get set up. + * Event objects directly to an endpoint on your server. You can manage + * webhooks in your + * account settings. Learn how + * to [listen for events] + * (/docs/webhooks) so that your integration can automatically trigger reactions. * - * When using Connect, you can also receive notifications of - * events that occur in connected accounts. For these events, there will be an + * When using Connect, you can also receive event notifications + * that occur in connected accounts. For these events, there's an * additional account attribute in the received Event object. * - * NOTE: Right now, access to events through the Retrieve Event API is - * guaranteed only for 30 days. + * We only guarantee access to events through the Retrieve Event API + * for 30 days. * * This class includes constants for the possible string representations of * event types. See https://stripe.com/docs/api#event_types for more details. * * @property string $id Unique identifier for the object. * @property string $object String representing the object's type. Objects of the same type share the same value. - * @property null|string $account The connected account that originated the event. - * @property null|string $api_version The Stripe API version used to render data. Note: This property is populated only for events on or after October 31, 2014. + * @property null|string $account The connected account that originates the event. + * @property null|string $api_version The Stripe API version used to render data. This property is populated only for events on or after October 31, 2014. * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. * @property \Stripe\StripeObject $data * @property bool $livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode. - * @property int $pending_webhooks Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified. - * @property null|\Stripe\StripeObject $request Information on the API request that instigated the event. - * @property string $type Description of the event (e.g., invoice.created or charge.refunded). + * @property int $pending_webhooks Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. + * @property null|\Stripe\StripeObject $request Information on the API request that triggers the event. + * @property string $type Description of the event (for example, invoice.created or charge.refunded). */ class Event extends ApiResource { diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php index 563521df6b..661d349026 100644 --- a/lib/PaymentIntent.php +++ b/lib/PaymentIntent.php @@ -43,6 +43,7 @@ * @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. * @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents use case for connected accounts for details. * @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used in this PaymentIntent. + * @property null|\Stripe\StripeObject $payment_method_configuration_details Information about the payment method configuration used for this PaymentIntent. * @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this PaymentIntent. * @property string[] $payment_method_types The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. * @property null|\Stripe\StripeObject $processing If present, this property tells you about the processing state of the payment. diff --git a/lib/PaymentMethodConfiguration.php b/lib/PaymentMethodConfiguration.php new file mode 100644 index 0000000000..e2df262148 --- /dev/null +++ b/lib/PaymentMethodConfiguration.php @@ -0,0 +1,64 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property null|\Stripe\StripeObject $multibanco + * @property string $name Configuration name. + * @property null|\Stripe\StripeObject $netbanking + * @property null|\Stripe\StripeObject $oxxo + * @property null|\Stripe\StripeObject $p24 + * @property null|string $parent The configuration's parent configuration. + * @property null|\Stripe\StripeObject $pay_by_bank + * @property null|\Stripe\StripeObject $paynow + * @property null|\Stripe\StripeObject $paypal + * @property null|\Stripe\StripeObject $promptpay + * @property null|\Stripe\StripeObject $sepa_debit + * @property null|\Stripe\StripeObject $sofort + * @property null|\Stripe\StripeObject $upi + * @property null|\Stripe\StripeObject $us_bank_account + * @property null|\Stripe\StripeObject $wechat_pay + */ +class PaymentMethodConfiguration extends ApiResource +{ + const OBJECT_NAME = 'payment_method_configuration'; + + use ApiOperations\All; + use ApiOperations\Create; + use ApiOperations\Retrieve; + use ApiOperations\Update; +} diff --git a/lib/Service/CoreServiceFactory.php b/lib/Service/CoreServiceFactory.php index 2082398b95..b656a355b3 100644 --- a/lib/Service/CoreServiceFactory.php +++ b/lib/Service/CoreServiceFactory.php @@ -37,6 +37,7 @@ * @property OAuthService $oauth * @property PaymentIntentService $paymentIntents * @property PaymentLinkService $paymentLinks + * @property PaymentMethodConfigurationService $paymentMethodConfigurations * @property PaymentMethodDomainService $paymentMethodDomains * @property PaymentMethodService $paymentMethods * @property PayoutService $payouts @@ -104,6 +105,7 @@ class CoreServiceFactory extends \Stripe\Service\AbstractServiceFactory 'oauth' => OAuthService::class, 'paymentIntents' => PaymentIntentService::class, 'paymentLinks' => PaymentLinkService::class, + 'paymentMethodConfigurations' => PaymentMethodConfigurationService::class, 'paymentMethodDomains' => PaymentMethodDomainService::class, 'paymentMethods' => PaymentMethodService::class, 'payouts' => PayoutService::class, diff --git a/lib/Service/PaymentMethodConfigurationService.php b/lib/Service/PaymentMethodConfigurationService.php new file mode 100644 index 0000000000..8bdf4e8e7f --- /dev/null +++ b/lib/Service/PaymentMethodConfigurationService.php @@ -0,0 +1,70 @@ + + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/payment_method_configurations', $params, $opts); + } + + /** + * Creates a payment method configuration. + * + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentMethodConfiguration + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/payment_method_configurations', $params, $opts); + } + + /** + * Retrieve payment method configuration. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentMethodConfiguration + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/payment_method_configurations/%s', $id), $params, $opts); + } + + /** + * Update payment method configuration. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\PaymentMethodConfiguration + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/payment_method_configurations/%s', $id), $params, $opts); + } +} diff --git a/lib/SetupIntent.php b/lib/SetupIntent.php index 8b37aeeba7..ddcc45e146 100644 --- a/lib/SetupIntent.php +++ b/lib/SetupIntent.php @@ -47,6 +47,7 @@ * @property null|\Stripe\StripeObject $next_action If present, this property tells you what actions you need to take in order for your customer to continue payment setup. * @property null|string|\Stripe\Account $on_behalf_of The account (if any) for which the setup is intended. * @property null|string|\Stripe\PaymentMethod $payment_method ID of the payment method used with this SetupIntent. + * @property null|\Stripe\StripeObject $payment_method_configuration_details Information about the payment method configuration used for this Setup Intent. * @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this SetupIntent. * @property string[] $payment_method_types The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. * @property null|string|\Stripe\Mandate $single_use_mandate ID of the single_use Mandate generated by the SetupIntent. diff --git a/lib/StripeClient.php b/lib/StripeClient.php index 8d3eb413db..3540b6662d 100644 --- a/lib/StripeClient.php +++ b/lib/StripeClient.php @@ -37,6 +37,7 @@ * @property \Stripe\Service\OAuthService $oauth * @property \Stripe\Service\PaymentIntentService $paymentIntents * @property \Stripe\Service\PaymentLinkService $paymentLinks + * @property \Stripe\Service\PaymentMethodConfigurationService $paymentMethodConfigurations * @property \Stripe\Service\PaymentMethodDomainService $paymentMethodDomains * @property \Stripe\Service\PaymentMethodService $paymentMethods * @property \Stripe\Service\PayoutService $payouts diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php index b1e4b50987..14e001a00f 100644 --- a/lib/Util/ObjectTypes.php +++ b/lib/Util/ObjectTypes.php @@ -65,6 +65,7 @@ class ObjectTypes \Stripe\PaymentIntent::OBJECT_NAME => \Stripe\PaymentIntent::class, \Stripe\PaymentLink::OBJECT_NAME => \Stripe\PaymentLink::class, \Stripe\PaymentMethod::OBJECT_NAME => \Stripe\PaymentMethod::class, + \Stripe\PaymentMethodConfiguration::OBJECT_NAME => \Stripe\PaymentMethodConfiguration::class, \Stripe\PaymentMethodDomain::OBJECT_NAME => \Stripe\PaymentMethodDomain::class, \Stripe\Payout::OBJECT_NAME => \Stripe\Payout::class, \Stripe\Person::OBJECT_NAME => \Stripe\Person::class, diff --git a/tests/Stripe/GeneratedExamplesTest.php b/tests/Stripe/GeneratedExamplesTest.php index ea37f68a69..a693ad1c14 100644 --- a/tests/Stripe/GeneratedExamplesTest.php +++ b/tests/Stripe/GeneratedExamplesTest.php @@ -4260,4 +4260,312 @@ function () {}, ); // TODO: assert proper instance, {"shape":"file"} } + + public function testListPaymentMethodConfiguration() + { + $this->expectsRequest('get', '/v1/payment_method_configurations'); + $result = $this->client->paymentMethodConfigurations->all([ + 'application' => 'foo', + ]); + static::assertInstanceOf(\Stripe\Collection::class, $result); + static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result->data[0]); + } + + public function testCreatePaymentMethodConfiguration() + { + $this->expectsRequest('post', '/v1/payment_method_configurations'); + $result = $this->client->paymentMethodConfigurations->create([ + 'acss_debit' => ['display_preference' => ['preference' => 'none']], + 'affirm' => ['display_preference' => ['preference' => 'none']], + ]); + static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result); + } + + public function testRetrievePaymentMethodConfiguration() + { + $this->expectsRequest('get', '/v1/payment_method_configurations/foo'); + $result = $this->client->paymentMethodConfigurations->retrieve( + 'foo', + [] + ); + static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result); + } + + public function testUpdatePaymentMethodConfiguration() + { + $this->expectsRequest('post', '/v1/payment_method_configurations/foo'); + $result = $this->client->paymentMethodConfigurations->update( + 'foo', + ['acss_debit' => ['display_preference' => ['preference' => 'on']]] + ); + static::assertInstanceOf(\Stripe\PaymentMethodConfiguration::class, $result); + } + + public function testCreateAuthorization() + { + $this->expectsRequest( + 'post', + '/v1/test_helpers/issuing/authorizations' + ); + $result = $this->client->testHelpers->issuing->authorizations->create([ + 'amount' => 100, + 'amount_details' => [ + 'atm_fee' => 10, + 'cashback_amount' => 5, + ], + 'authorization_method' => 'chip', + 'card' => 'foo', + 'currency' => 'usd', + 'is_amount_controllable' => true, + 'merchant_data' => [ + 'category' => 'ac_refrigeration_repair', + 'city' => 'foo', + 'country' => 'bar', + 'name' => 'foo', + 'network_id' => 'bar', + 'postal_code' => 'foo', + 'state' => 'bar', + 'terminal_id' => 'foo', + ], + 'network_data' => ['acquiring_institution_id' => 'foo'], + 'verification_data' => [ + 'address_line1_check' => 'mismatch', + 'address_postal_code_check' => 'match', + 'cvc_check' => 'match', + 'expiry_check' => 'mismatch', + ], + 'wallet' => 'apple_pay', + ]); + static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result); + } + + public function testCaptureAuthorization() + { + $this->expectsRequest( + 'post', + '/v1/test_helpers/issuing/authorizations/example_authorization/capture' + ); + $result = $this->client->testHelpers->issuing->authorizations->capture( + 'example_authorization', + [ + 'capture_amount' => 100, + 'close_authorization' => true, + 'purchase_details' => [ + 'flight' => [ + 'departure_at' => 1633651200, + 'passenger_name' => 'John Doe', + 'refundable' => true, + 'segments' => [ + [ + 'arrival_airport_code' => 'SFO', + 'carrier' => 'Delta', + 'departure_airport_code' => 'LAX', + 'flight_number' => 'DL100', + 'service_class' => 'Economy', + 'stopover_allowed' => true, + ], + ], + 'travel_agency' => 'Orbitz', + ], + 'fuel' => [ + 'type' => 'diesel', + 'unit' => 'liter', + 'unit_cost_decimal' => '3.5', + 'volume_decimal' => '10', + ], + 'lodging' => [ + 'check_in_at' => 1633651200, + 'nights' => 2, + ], + 'receipt' => [ + [ + 'description' => 'Room charge', + 'quantity' => '1', + 'total' => 200, + 'unit_cost' => 200, + ], + ], + 'reference' => 'foo', + ], + ] + ); + static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result); + } + + public function testExpireAuthorization() + { + $this->expectsRequest( + 'post', + '/v1/test_helpers/issuing/authorizations/example_authorization/expire' + ); + $result = $this->client->testHelpers->issuing->authorizations->expire( + 'example_authorization', + [] + ); + static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result); + } + + public function testIncrementAuthorization() + { + $this->expectsRequest( + 'post', + '/v1/test_helpers/issuing/authorizations/example_authorization/increment' + ); + $result = $this->client->testHelpers->issuing->authorizations->increment( + 'example_authorization', + [ + 'increment_amount' => 50, + 'is_amount_controllable' => true, + ] + ); + static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result); + } + + public function testReverseAuthorization() + { + $this->expectsRequest( + 'post', + '/v1/test_helpers/issuing/authorizations/example_authorization/reverse' + ); + $result = $this->client->testHelpers->issuing->authorizations->reverse( + 'example_authorization', + ['reverse_amount' => 20] + ); + static::assertInstanceOf(\Stripe\Issuing\Authorization::class, $result); + } + + public function testCreateForceCaptureTransaction() + { + $this->expectsRequest( + 'post', + '/v1/test_helpers/issuing/transactions/create_force_capture' + ); + $result = $this->client->testHelpers->issuing->transactions->createForceCapture([ + 'amount' => 100, + 'card' => 'foo', + 'currency' => 'usd', + 'merchant_data' => [ + 'category' => 'ac_refrigeration_repair', + 'city' => 'foo', + 'country' => 'US', + 'name' => 'foo', + 'network_id' => 'bar', + 'postal_code' => '10001', + 'state' => 'NY', + 'terminal_id' => 'foo', + ], + 'purchase_details' => [ + 'flight' => [ + 'departure_at' => 1633651200, + 'passenger_name' => 'John Doe', + 'refundable' => true, + 'segments' => [ + [ + 'arrival_airport_code' => 'SFO', + 'carrier' => 'Delta', + 'departure_airport_code' => 'LAX', + 'flight_number' => 'DL100', + 'service_class' => 'Economy', + 'stopover_allowed' => true, + ], + ], + 'travel_agency' => 'Orbitz', + ], + 'fuel' => [ + 'type' => 'diesel', + 'unit' => 'liter', + 'unit_cost_decimal' => '3.5', + 'volume_decimal' => '10', + ], + 'lodging' => [ + 'check_in_at' => 1533651200, + 'nights' => 2, + ], + 'receipt' => [ + [ + 'description' => 'Room charge', + 'quantity' => '1', + 'total' => 200, + 'unit_cost' => 200, + ], + ], + 'reference' => 'foo', + ], + ]); + static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result); + } + + public function testCreateUnlinkedRefundTransaction() + { + $this->expectsRequest( + 'post', + '/v1/test_helpers/issuing/transactions/create_unlinked_refund' + ); + $result = $this->client->testHelpers->issuing->transactions->createUnlinkedRefund([ + 'amount' => 100, + 'card' => 'foo', + 'currency' => 'usd', + 'merchant_data' => [ + 'category' => 'ac_refrigeration_repair', + 'city' => 'foo', + 'country' => 'bar', + 'name' => 'foo', + 'network_id' => 'bar', + 'postal_code' => 'foo', + 'state' => 'bar', + 'terminal_id' => 'foo', + ], + 'purchase_details' => [ + 'flight' => [ + 'departure_at' => 1533651200, + 'passenger_name' => 'John Doe', + 'refundable' => true, + 'segments' => [ + [ + 'arrival_airport_code' => 'SFO', + 'carrier' => 'Delta', + 'departure_airport_code' => 'LAX', + 'flight_number' => 'DL100', + 'service_class' => 'Economy', + 'stopover_allowed' => true, + ], + ], + 'travel_agency' => 'Orbitz', + ], + 'fuel' => [ + 'type' => 'diesel', + 'unit' => 'liter', + 'unit_cost_decimal' => '3.5', + 'volume_decimal' => '10', + ], + 'lodging' => [ + 'check_in_at' => 1533651200, + 'nights' => 2, + ], + 'receipt' => [ + [ + 'description' => 'Room charge', + 'quantity' => '1', + 'total' => 200, + 'unit_cost' => 200, + ], + ], + 'reference' => 'foo', + ], + ]); + static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result); + } + + public function testRefundTransaction() + { + $this->expectsRequest( + 'post', + '/v1/test_helpers/issuing/transactions/example_transaction/refund' + ); + $result = $this->client->testHelpers->issuing->transactions->refund( + 'example_transaction', + ['refund_amount' => 50] + ); + static::assertInstanceOf(\Stripe\Issuing\Transaction::class, $result); + } } From 260aad072f92ddb05e03d47af13b3616d99b3444 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Thu, 14 Sep 2023 17:57:14 -0700 Subject: [PATCH 3/3] Bump version to 12.3.0 --- CHANGELOG.md | 10 ++++++++++ VERSION | 2 +- lib/Stripe.php | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6411111d9..abe0d6e04b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 12.3.0 - 2023-09-14 +* [#1577](https://github.com/stripe/stripe-php/pull/1577) Update generated code + * Add support for new resource `PaymentMethodConfiguration` + * Add support for `all`, `create`, `retrieve`, and `update` methods on resource `PaymentMethodConfiguration` + * Add support for `payment_method_configuration_details` on `Checkout.Session`, `PaymentIntent`, and `SetupIntent` +* [#1573](https://github.com/stripe/stripe-php/pull/1573) Update generated code + * Add support for `capture`, `create`, `expire`, `increment`, and `reverse` test helper methods on resource `Issuing.Authorization` + * Add support for `create_force_capture`, `create_unlinked_refund`, and `refund` test helper methods on resource `Issuing.Transaction` + * Add support for new value `stripe_tax_inactive` on enum `StripeError.code` + ## 12.2.0 - 2023-09-07 * [#1571](https://github.com/stripe/stripe-php/pull/1571) Update generated code * Add support for new resource `PaymentMethodDomain` diff --git a/VERSION b/VERSION index 685332623b..4d23cb8e0b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.2.0 +12.3.0 diff --git a/lib/Stripe.php b/lib/Stripe.php index 0b4c1811c8..c90e4a7614 100644 --- a/lib/Stripe.php +++ b/lib/Stripe.php @@ -58,7 +58,7 @@ class Stripe /** @var float Initial delay between retries, in seconds */ private static $initialNetworkRetryDelay = 0.5; - const VERSION = '12.2.0'; + const VERSION = '12.3.0'; /** * @return string the API key used for requests