diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9757307ba..457317b51 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,27 +1,37 @@
# Changelog
+## 12.0.0 - 2023-08-18
+**⚠️ ACTION REQUIRED: the breaking change in this release likely affects you ⚠️**
+
+## 11.0.0 - 2023-08-16
+Please do not use stripe-php v11. It did not correctly apply the pinning behavior and was removed from packagist
+
## 10.22.0-beta.1 - 2023-08-10
-* [#1545](https://github.com/stripe/stripe-php/pull/1545) Update generated code for beta
+* [#1545](https://github.com/stripe/stripe-php/pull/1545) Update generated code for beta
* Add support for `paypal` on `PaymentMethodConfiguration`
+## 10.21.0 - 2023-08-10
+* [#1546](https://github.com/stripe/stripe-php/pull/1546) Update generated code
+ * Add support for new value `payment_reversal` on enum `BalanceTransaction.type`
+ * Add support for new value `adjusted_for_overdraft` on enum `CustomerBalanceTransaction.type`
+
## 10.21.0-beta.1 - 2023-08-03
* [#1541](https://github.com/stripe/stripe-php/pull/1541) Update generated code for beta
* Add support for `submit_card` test helper method on resource `Issuing.Card`
## 10.20.0 - 2023-08-03
-* [#1544](https://github.com/stripe/stripe-php/pull/1544) Update generated code
* [#1539](https://github.com/stripe/stripe-php/pull/1539) Update generated code
* Add support for `subscription_details` on `Invoice`
* Add support for new values `sepa_debit_fingerprint` and `us_bank_account_fingerprint` on enum `Radar.ValueList.item_type`
## 10.20.0-beta.2 - 2023-07-28
-* [#1537](https://github.com/stripe/stripe-php/pull/1537) Update generated code for beta
- * Release specs are identical.
-* [#1535](https://github.com/stripe/stripe-php/pull/1535) Update generated code for beta
- * Add support for new resource `Tax.Form`
- * Add support for `all`, `pdf`, and `retrieve` methods on resource `Form`
- * Add support for `payment_method_configuration_details` on `Checkout.Session` and `SetupIntent`
-* [#1532](https://github.com/stripe/stripe-php/pull/1532) Update generated code for beta
+* [#1537](https://github.com/stripe/stripe-php/pull/1537) Update generated code for beta
+ * Release specs are identical.
+* [#1535](https://github.com/stripe/stripe-php/pull/1535) Update generated code for beta
+ * Add support for new resource `Tax.Form`
+ * Add support for `all`, `pdf`, and `retrieve` methods on resource `Form`
+ * Add support for `payment_method_configuration_details` on `Checkout.Session` and `SetupIntent`
+* [#1532](https://github.com/stripe/stripe-php/pull/1532) Update generated code for beta
* [#1531](https://github.com/stripe/stripe-php/pull/1531) Merge master into beta
## 10.20.0-beta.1 - 2023-07-27
@@ -43,14 +53,14 @@
* [#1487](https://github.com/stripe/stripe-php/pull/1487) PHPDoc: use union of literals for $method parameter throughout
## 10.18.0-beta.1 - 2023-07-13
-* [#1527](https://github.com/stripe/stripe-php/pull/1527) Update generated code for beta
- Release specs are identical.
-* [#1524](https://github.com/stripe/stripe-php/pull/1524) Update generated code for beta
- * 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 `PaymentIntent`
- * Rename `Tax.SettingService` -> `Tax.SettingsService` (parity with main release)
-* [#1519](https://github.com/stripe/stripe-php/pull/1519) Update generated code for beta
+* [#1527](https://github.com/stripe/stripe-php/pull/1527) Update generated code for beta
+ Release specs are identical.
+* [#1524](https://github.com/stripe/stripe-php/pull/1524) Update generated code for beta
+ * 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 `PaymentIntent`
+ * Rename `Tax.SettingService` -> `Tax.SettingsService` (parity with main release)
+* [#1519](https://github.com/stripe/stripe-php/pull/1519) Update generated code for beta
* Rename `Tax.SettingsService` -> `Tax.SettingService`
## 10.17.0 - 2023-07-13
@@ -74,11 +84,11 @@
* Change type of `Checkout.Session.success_url` from `string` to `nullable(string)`
## 10.16.0-beta.1 - 2023-06-22
-* [#1515](https://github.com/stripe/stripe-php/pull/1515) Update generated code for beta
- * Add support for new resource `CustomerSession`
- * Add support for `create` method on resource `CustomerSession`
-* [#1513](https://github.com/stripe/stripe-php/pull/1513) Update generated code for beta
- * Add support for `payment_details` on `PaymentIntent`
+* [#1515](https://github.com/stripe/stripe-php/pull/1515) Update generated code for beta
+ * Add support for new resource `CustomerSession`
+ * Add support for `create` method on resource `CustomerSession`
+* [#1513](https://github.com/stripe/stripe-php/pull/1513) Update generated code for beta
+ * Add support for `payment_details` on `PaymentIntent`
* [#1510](https://github.com/stripe/stripe-php/pull/1510) Update generated code for beta
## 10.15.0 - 2023-06-08
@@ -86,14 +96,14 @@
* Add support for `preferred_locales` on `Issuing.Cardholder`
## 10.15.0-beta.2 - 2023-06-01
-* [#1507](https://github.com/stripe/stripe-php/pull/1507) Update generated code for beta
- * Add support for `subscription_details` on `Invoice`
- * Add support for `set_pause_collection` on `QuoteLine`
+* [#1507](https://github.com/stripe/stripe-php/pull/1507) Update generated code for beta
+ * Add support for `subscription_details` on `Invoice`
+ * Add support for `set_pause_collection` on `QuoteLine`
* Remove support for `locations` on `Tax.Settings`
## 10.15.0-beta.1 - 2023-05-25
-* [#1500](https://github.com/stripe/stripe-php/pull/1500) Update generated code for beta
-* [#1505](https://github.com/stripe/stripe-php/pull/1505) Handle developer message in preview error responses
+* [#1500](https://github.com/stripe/stripe-php/pull/1500) Update generated code for beta
+* [#1505](https://github.com/stripe/stripe-php/pull/1505) Handle developer message in preview error responses
* [#1504](https://github.com/stripe/stripe-php/pull/1504) Add default values for preview and raw_request parameters
## 10.14.0 - 2023-05-25
@@ -107,15 +117,15 @@
* Add support for new values `amusement_tax` and `communications_tax` on enum `TaxRate.tax_type`
## 10.14.0-beta.2 - 2023-05-19
-* [#1498](https://github.com/stripe/stripe-php/pull/1498) Update generated code for beta
- * Add support for `subscribe` and `unsubscribe` methods on resource `FinancialConnections.Account`
- * Add support for `status_details` and `status` on `Tax.Settings`
+* [#1498](https://github.com/stripe/stripe-php/pull/1498) Update generated code for beta
+ * Add support for `subscribe` and `unsubscribe` methods on resource `FinancialConnections.Account`
+ * Add support for `status_details` and `status` on `Tax.Settings`
* [#1486](https://github.com/stripe/stripe-php/pull/1486) Add $stripe->rawRequest
## 10.14.0-beta.1 - 2023-05-11
-* [#1489](https://github.com/stripe/stripe-php/pull/1489) Update generated code for beta
- * Add support for `head_office` on `Tax.Settings`
-* [#1497](https://github.com/stripe/stripe-php/pull/1497) Fix phpstan errors
+* [#1489](https://github.com/stripe/stripe-php/pull/1489) Update generated code for beta
+ * Add support for `head_office` on `Tax.Settings`
+* [#1497](https://github.com/stripe/stripe-php/pull/1497) Fix phpstan errors
* [#1484](https://github.com/stripe/stripe-php/pull/1484) Update generated code for beta
## 10.13.0 - 2023-05-11
@@ -133,20 +143,20 @@
* [#1475](https://github.com/stripe/stripe-php/pull/1475) Update generated code
## 10.13.0-beta.4 - 2023-04-20
-* [#1481](https://github.com/stripe/stripe-php/pull/1481) Update generated code for beta
- * Add support for `country_options` on `Tax.Registration`
+* [#1481](https://github.com/stripe/stripe-php/pull/1481) Update generated code for beta
+ * Add support for `country_options` on `Tax.Registration`
* Remove support for `state` and `type` on `Tax.Registration`
## 10.13.0-beta.3 - 2023-04-13
-* [#1477](https://github.com/stripe/stripe-php/pull/1477) Update generated code for beta
+* [#1477](https://github.com/stripe/stripe-php/pull/1477) Update generated code for beta
* Add support for `collect_payment_method` and `confirm_payment_intent` methods on resource `Terminal.Reader`
## 10.13.0-beta.2 - 2023-04-06
-* [#1472](https://github.com/stripe/stripe-php/pull/1472) Update generated code for beta
+* [#1472](https://github.com/stripe/stripe-php/pull/1472) Update generated code for beta
* Updated stable APIs to the latest version
## 10.13.0-beta.1 - 2023-03-30
-* [#1469](https://github.com/stripe/stripe-php/pull/1469) Update generated code
+* [#1469](https://github.com/stripe/stripe-php/pull/1469) Update generated code
* Add support for new value `ioss` on enum `Tax.Registration.type`
## 10.12.1 - 2023-04-04
@@ -164,11 +174,11 @@
* Release specs are identical.
## 10.12.0-beta.1 - 2023-03-23
-* [#1459](https://github.com/stripe/stripe-php/pull/1459) Update generated code for beta (new)
- * Add support for new resources `Tax.CalculationLineItem` and `Tax.TransactionLineItem`
- * Add support for `collect_inputs` method on resource `Terminal.Reader`
- * Add support for `financing_offer` on `Capital.FinancingSummary`
- * Add support for new value `link` on enum `PaymentLink.payment_method_types[]`
+* [#1459](https://github.com/stripe/stripe-php/pull/1459) Update generated code for beta (new)
+ * Add support for new resources `Tax.CalculationLineItem` and `Tax.TransactionLineItem`
+ * Add support for `collect_inputs` method on resource `Terminal.Reader`
+ * Add support for `financing_offer` on `Capital.FinancingSummary`
+ * Add support for new value `link` on enum `PaymentLink.payment_method_types[]`
* Add support for `automatic_payment_methods` on `SetupIntent`
## 10.11.0 - 2023-03-23
@@ -182,11 +192,11 @@
* Add support for `automatic_payment_methods` on `SetupIntent`
## 10.11.0-beta.1 - 2023-03-16
-* [#1456](https://github.com/stripe/stripe-php/pull/1456) API Updates
- * Add support for `create_from_calculation` method on resource `Tax.Transaction`
- * Change type of `Invoice.applies_to` from `nullable(QuotesResourceQuoteLinesAppliesTo)` to `QuotesResourceQuoteLinesAppliesTo`
- * Add support for `shipping_cost` on `Tax.Calculation` and `Tax.Transaction`
- * Add support for `tax_breakdown` on `Tax.Calculation`
+* [#1456](https://github.com/stripe/stripe-php/pull/1456) API Updates
+ * Add support for `create_from_calculation` method on resource `Tax.Transaction`
+ * Change type of `Invoice.applies_to` from `nullable(QuotesResourceQuoteLinesAppliesTo)` to `QuotesResourceQuoteLinesAppliesTo`
+ * Add support for `shipping_cost` on `Tax.Calculation` and `Tax.Transaction`
+ * Add support for `tax_breakdown` on `Tax.Calculation`
* Remove support for `tax_summary` on `Tax.Calculation`
## 10.10.0 - 2023-03-16
@@ -202,11 +212,11 @@
* Add support for new value `cashapp` on enum `PaymentMethod.type`
## 10.10.0-beta.1 - 2023-03-09
-* [#1451](https://github.com/stripe/stripe-php/pull/1451) API Updates for beta branch
- * Updated stable APIs to the latest version
- * Remove support for `list_transactions` method on resource `Tax.Transaction`
- * Change type of `SubscriptionSchedule.applies_to` from `nullable(QuotesResourceQuoteLinesAppliesTo)` to `QuotesResourceQuoteLinesAppliesTo`
- * Add support for `tax_summary` on `Tax.Calculation`
+* [#1451](https://github.com/stripe/stripe-php/pull/1451) API Updates for beta branch
+ * Updated stable APIs to the latest version
+ * Remove support for `list_transactions` method on resource `Tax.Transaction`
+ * Change type of `SubscriptionSchedule.applies_to` from `nullable(QuotesResourceQuoteLinesAppliesTo)` to `QuotesResourceQuoteLinesAppliesTo`
+ * Add support for `tax_summary` on `Tax.Calculation`
* Remove support for `tax_breakdown` on `Tax.Calculation`
## 10.9.1 - 2023-03-14
@@ -220,11 +230,11 @@
* [#1446](https://github.com/stripe/stripe-php/pull/1446) stripe->customers->retrievePaymentMethod returns the wrong class (type hint)
## 10.9.0-beta.1 - 2023-03-02
-* [#1448](https://github.com/stripe/stripe-php/pull/1448) API Updates for beta branch
- * Updated stable APIs to the latest version
- * Add support for new resources `Issuing.CardBundle` and `Issuing.CardDesign`
- * Add support for `all` and `retrieve` methods on resource `CardBundle`
- * Add support for `all`, `retrieve`, and `update` methods on resource `CardDesign`
+* [#1448](https://github.com/stripe/stripe-php/pull/1448) API Updates for beta branch
+ * Updated stable APIs to the latest version
+ * Add support for new resources `Issuing.CardBundle` and `Issuing.CardDesign`
+ * Add support for `all` and `retrieve` methods on resource `CardBundle`
+ * Add support for `all`, `retrieve`, and `update` methods on resource `CardDesign`
* Add support for `card_design` on `Issuing.Card`
## 10.8.0 - 2023-03-02
@@ -233,7 +243,7 @@
* Add support for new value `lease_tax` on enum `TaxRate.tax_type`
## 10.8.0-beta.1 - 2023-02-23
-* [#1445](https://github.com/stripe/stripe-php/pull/1445) API Updates for beta branch
+* [#1445](https://github.com/stripe/stripe-php/pull/1445) API Updates for beta branch
* Updated stable APIs to the latest version
## 10.7.0 - 2023-02-23
@@ -241,10 +251,10 @@
* Add support for new value `igst` on enum `TaxRate.tax_type`
## 10.7.0-beta.1 - 2023-02-16
-* [#1442](https://github.com/stripe/stripe-php/pull/1442) API Updates for beta branch
- * Updated stable APIs to the latest version
- * Add support for `currency_conversion` on `Checkout.Session`
- * Add support for `limits` on `FinancialConnections.Session`
+* [#1442](https://github.com/stripe/stripe-php/pull/1442) API Updates for beta branch
+ * Updated stable APIs to the latest version
+ * Add support for `currency_conversion` on `Checkout.Session`
+ * Add support for `limits` on `FinancialConnections.Session`
* Remove support for `reference` on `Tax.Calculation`
## 10.6.1 - 2023-02-21
@@ -263,11 +273,11 @@
* [#1438](https://github.com/stripe/stripe-php/pull/1438) Update .gitattributes
## 10.6.0-beta.1 - 2023-02-02
-* [#1440](https://github.com/stripe/stripe-php/pull/1440) API Updates for beta branch
- * Updated stable APIs to the latest version
- * Add support for `all` method on resource `Transaction`
- * Add support for `inferred_balances_refresh`, `subscriptions`, and `transaction_refresh` on `FinancialConnections.Account`
- * Add support for `manual_entry`, `prefetch`, `status_details`, and `status` on `FinancialConnections.Session`
+* [#1440](https://github.com/stripe/stripe-php/pull/1440) API Updates for beta branch
+ * Updated stable APIs to the latest version
+ * Add support for `all` method on resource `Transaction`
+ * Add support for `inferred_balances_refresh`, `subscriptions`, and `transaction_refresh` on `FinancialConnections.Account`
+ * Add support for `manual_entry`, `prefetch`, `status_details`, and `status` on `FinancialConnections.Session`
* Add support for new resource `FinancialConnections.Transaction`
## 10.5.0 - 2023-02-02
@@ -280,13 +290,13 @@
* Add support for new value `paused` on enum `Subscription.status`
## 10.5.0-beta.2 - 2023-01-26
-* [#1429](https://github.com/stripe/stripe-php/pull/1429) API Updates for beta branch
- * Updated stable APIs to the latest version
+* [#1429](https://github.com/stripe/stripe-php/pull/1429) API Updates for beta branch
+ * Updated stable APIs to the latest version
* Add support for `list_transactions` method on resource `Tax.Transaction`
## 10.5.0-beta.1 - 2023-01-19
-* [#1427](https://github.com/stripe/stripe-php/pull/1427) API Updates for beta branch
- * Updated stable APIs to the latest version
+* [#1427](https://github.com/stripe/stripe-php/pull/1427) API Updates for beta branch
+ * Updated stable APIs to the latest version
* Add support for `Tax.Settings` resource.
## 10.4.0 - 2023-01-19
@@ -299,19 +309,19 @@
* [#1418](https://github.com/stripe/stripe-php/pull/1418) Switch to mb_convert_encoding to fix utf8_encode deprecation warning
## 10.4.0-beta.3 - 2023-01-12
-* [#1423](https://github.com/stripe/stripe-php/pull/1423) API Updates for beta branch
- * Updated stable APIs to the latest version
- * Add support for `Tax.Registration` resource.
+* [#1423](https://github.com/stripe/stripe-php/pull/1423) API Updates for beta branch
+ * Updated stable APIs to the latest version
+ * Add support for `Tax.Registration` resource.
* Change `draft_quote` method implementation from hitting `/v1/quotes/{quotes}/draft` to `/v1/quotes/{quotes}/mark_draft`
## 10.4.0-beta.2 - 2023-01-05
-* [#1420](https://github.com/stripe/stripe-php/pull/1420) API Updates for beta branch
- * Updated stable APIs to the latest version
+* [#1420](https://github.com/stripe/stripe-php/pull/1420) API Updates for beta branch
+ * Updated stable APIs to the latest version
* Add support for `mark_stale_quote` method on resource `Quote`
## 10.4.0-beta.1 - 2022-12-22
-* [#1414](https://github.com/stripe/stripe-php/pull/1414) API Updates for beta branch
- * Updated stable APIs to the latest version
+* [#1414](https://github.com/stripe/stripe-php/pull/1414) API Updates for beta branch
+ * Updated stable APIs to the latest version
* Move `$stripe->taxCalculations` to `$stripe->tax->calculations` and `$stripe->taxTransactions` to `$stripe->tax->transactions`
## 10.3.0 - 2022-12-22
@@ -319,10 +329,10 @@
Change `CheckoutSession.cancel_url` to be nullable.
## 10.3.0-beta.1 - 2022-12-15
-* [#1412](https://github.com/stripe/stripe-php/pull/1412) API Updates for beta branch
- * Updated stable APIs to the latest version
- * Add support for new resources `QuoteLine`, `TaxCalculation`, and `TaxTransaction`
- * Add support for `create` and `list_line_items` methods on resource `TaxCalculation`
+* [#1412](https://github.com/stripe/stripe-php/pull/1412) API Updates for beta branch
+ * Updated stable APIs to the latest version
+ * Add support for new resources `QuoteLine`, `TaxCalculation`, and `TaxTransaction`
+ * Add support for `create` and `list_line_items` methods on resource `TaxCalculation`
* Add support for `create_reversal`, `create`, and `retrieve` methods on resource `TaxTransaction`
## 10.2.0 - 2022-12-15
@@ -331,11 +341,11 @@
* [#1407](https://github.com/stripe/stripe-php/pull/1407) API Updates
## 10.2.0-beta.1 - 2022-12-08
-* [#1408](https://github.com/stripe/stripe-php/pull/1408) API Updates for beta branch
- * Updated stable APIs to the latest version
-* [#1406](https://github.com/stripe/stripe-php/pull/1406) API Updates for beta branch
- * Updated stable APIs to the latest version
-* [#1398](https://github.com/stripe/stripe-php/pull/1398) API Updates for beta branch
+* [#1408](https://github.com/stripe/stripe-php/pull/1408) API Updates for beta branch
+ * Updated stable APIs to the latest version
+* [#1406](https://github.com/stripe/stripe-php/pull/1406) API Updates for beta branch
+ * Updated stable APIs to the latest version
+* [#1398](https://github.com/stripe/stripe-php/pull/1398) API Updates for beta branch
* Updated stable APIs to the latest version
## 10.1.0 - 2022-12-06
@@ -366,14 +376,14 @@ Breaking changes that arose during code generation of the library that we postpo
* [#1379](https://github.com/stripe/stripe-php/pull/1379) Do not run Coveralls in PR-s
## 9.9.0-beta.2 - 2022-11-02
-* [#1390](https://github.com/stripe/stripe-php/pull/1390) API Updates for beta branch
+* [#1390](https://github.com/stripe/stripe-php/pull/1390) API Updates for beta branch
* Updated beta APIs to the latest stable version
## 9.9.0-beta.1 - 2022-10-21
-* [#1384](https://github.com/stripe/stripe-php/pull/1384) API Updates for beta branch
- * Updated stable APIs to the latest version
- * Add support for `network_data` on `Issuing.Transaction`
- * Add support for `paypal` on `Source`
+* [#1384](https://github.com/stripe/stripe-php/pull/1384) API Updates for beta branch
+ * Updated stable APIs to the latest version
+ * Add support for `network_data` on `Issuing.Transaction`
+ * Add support for `paypal` on `Source`
* Add support for new value `paypal` on enum `Source.type`
## 9.8.0 - 2022-10-20
@@ -390,12 +400,12 @@ Breaking changes that arose during code generation of the library that we postpo
* Add support for `created` on `Checkout.Session`
## 9.7.0-beta.2 - 2022-10-07
-* [#1373](https://github.com/stripe/stripe-php/pull/1373) API Updates for beta branch
+* [#1373](https://github.com/stripe/stripe-php/pull/1373) API Updates for beta branch
* Updated stable APIs to the latest version
## 9.7.0-beta.1 - 2022-09-26
-* [#1368](https://github.com/stripe/stripe-php/pull/1368) API Updates for beta branch
- * Updated stable APIs to the latest version
+* [#1368](https://github.com/stripe/stripe-php/pull/1368) API Updates for beta branch
+ * Updated stable APIs to the latest version
* Add `FinancingOffer`, `FinancingSummary` and `FinancingTransaction` resources.
## 9.6.0 - 2022-09-15
@@ -421,8 +431,8 @@ Breaking changes that arose during code generation of the library that we postpo
* [#1356](https://github.com/stripe/stripe-php/pull/1356) Add beta readme.md section
## 9.4.0-beta.1 - 2022-08-26
-* [#1358](https://github.com/stripe/stripe-php/pull/1358) API Updates for beta branch
- * Updated stable APIs to the latest version
+* [#1358](https://github.com/stripe/stripe-php/pull/1358) API Updates for beta branch
+ * Updated stable APIs to the latest version
* Add support for the beta [Gift Card API](https://stripe.com/docs/gift-cards).
## 9.3.0 - 2022-08-23
@@ -432,8 +442,8 @@ Breaking changes that arose during code generation of the library that we postpo
* This would generally be considered a breaking change, but we've worked with all existing users to migrate and are comfortable releasing this as a minor as it is solely a test helper method. This was essentially broken prior to this change.
## 9.3.0-beta.1 - 2022-08-23
-* [#1354](https://github.com/stripe/stripe-php/pull/1354) API Updates for beta branch
- - Updated stable APIs to the latest version
+* [#1354](https://github.com/stripe/stripe-php/pull/1354) API Updates for beta branch
+ - Updated stable APIs to the latest version
- `Stripe-Version` beta headers are not pinned by-default and need to be manually specified, please refer to [beta SDKs README section](https://github.com/stripe/stripe-php/blob/master/README.md#beta-sdks)
## 9.2.0 - 2022-08-19
@@ -445,8 +455,8 @@ Breaking changes that arose during code generation of the library that we postpo
* [#1304](https://github.com/stripe/stripe-php/pull/1304) Allow passing PSR-3 loggers to setLogger as they are compatible
## 9.2.0-beta.1 - 2022-08-11
-* [#1349](https://github.com/stripe/stripe-php/pull/1349) API Updates for beta branch
- - Updated stable APIs to the latest version
+* [#1349](https://github.com/stripe/stripe-php/pull/1349) API Updates for beta branch
+ - Updated stable APIs to the latest version
- Add `refundPayment` method to Terminal resource
## 9.1.0 - 2022-08-11
@@ -457,8 +467,8 @@ Breaking changes that arose during code generation of the library that we postpo
* Add support for `expires_at` on `Apps.Secret`
## 9.1.0-beta.1 - 2022-08-03
-* [#1345](https://github.com/stripe/stripe-php/pull/1345) API Updates for beta branch
- - Updated stable APIs to the latest version
+* [#1345](https://github.com/stripe/stripe-php/pull/1345) API Updates for beta branch
+ - Updated stable APIs to the latest version
- Added the `Order` resource support
## 9.0.0 - 2022-08-02
@@ -477,24 +487,24 @@ Breaking changes that arose during code generation of the library that we postpo
* Add support for `default_currency` and `invoice_credit_balance` on `Customer`
## 8.12.0-beta.1 - 2022-07-22
-* [#1331](https://github.com/stripe/stripe-php/pull/1331) API Updates for beta branch
- - Updated stable APIs to the latest version
-* [#1328](https://github.com/stripe/stripe-php/pull/1328) API Updates for beta branch
- - Updated stable APIs to the latest version
- - Add `QuotePhase` resource
-* [#1325](https://github.com/stripe/stripe-php/pull/1325) API Updates for beta branch
- - Updated stable APIs to the latest version
- - Add `QuotePhaseConfiguration` service.
- - Add `Price.migrate_to` property
- - Add `SubscriptionSchedule.amend` method.
- - Add `Discount.subscription_item` property.
- - Add `Quote.subscription_data.billing_behavior`, `billing_cycle_anchor`, `end_behavior`, `from_schedule`, `from_subscription`, `prebilling`, `proration_behavior` properties.
- - Add `phases` parameter to `Quote.create`
- - Add `Subscription.discounts`, `prebilling` properties.
-* [#1320](https://github.com/stripe/stripe-php/pull/1320) API Updates for beta branch
- - Include `server_side_confirmation_beta=v1` beta
- - Add `secretKeyConfirmation` to `PaymentIntent`
-* [#1317](https://github.com/stripe/stripe-php/pull/1317) API Updates for beta branch
+* [#1331](https://github.com/stripe/stripe-php/pull/1331) API Updates for beta branch
+ - Updated stable APIs to the latest version
+* [#1328](https://github.com/stripe/stripe-php/pull/1328) API Updates for beta branch
+ - Updated stable APIs to the latest version
+ - Add `QuotePhase` resource
+* [#1325](https://github.com/stripe/stripe-php/pull/1325) API Updates for beta branch
+ - Updated stable APIs to the latest version
+ - Add `QuotePhaseConfiguration` service.
+ - Add `Price.migrate_to` property
+ - Add `SubscriptionSchedule.amend` method.
+ - Add `Discount.subscription_item` property.
+ - Add `Quote.subscription_data.billing_behavior`, `billing_cycle_anchor`, `end_behavior`, `from_schedule`, `from_subscription`, `prebilling`, `proration_behavior` properties.
+ - Add `phases` parameter to `Quote.create`
+ - Add `Subscription.discounts`, `prebilling` properties.
+* [#1320](https://github.com/stripe/stripe-php/pull/1320) API Updates for beta branch
+ - Include `server_side_confirmation_beta=v1` beta
+ - Add `secretKeyConfirmation` to `PaymentIntent`
+* [#1317](https://github.com/stripe/stripe-php/pull/1317) API Updates for beta branch
- Updated stable APIs to the latest version
## 8.11.0 - 2022-07-18
diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION
index a21df3b6d..e04277430 100644
--- a/OPENAPI_VERSION
+++ b/OPENAPI_VERSION
@@ -1 +1 @@
-v458
\ No newline at end of file
+v466
\ No newline at end of file
diff --git a/lib/ApiRequestor.php b/lib/ApiRequestor.php
index b594cf9d0..49ac94be8 100644
--- a/lib/ApiRequestor.php
+++ b/lib/ApiRequestor.php
@@ -351,6 +351,7 @@ private static function _defaultHeaders($apiKey, $clientInfo = null)
'X-Stripe-Client-User-Agent' => \json_encode($ua),
'User-Agent' => $uaString,
'Authorization' => 'Bearer ' . $apiKey,
+ 'Stripe-Version' => Stripe::getApiVersion(),
];
}
@@ -406,12 +407,6 @@ function ($key) use ($params) {
}
$defaultHeaders = $this->_defaultHeaders($myApiKey, $clientUAInfo);
- if ('preview' === $apiMode && !isset($headers['Stripe-Version'])) {
- $headers['Stripe-Version'] = \Stripe\Util\ApiVersion::PREVIEW;
- } elseif (Stripe::$apiVersion) {
- $headers['Stripe-Version'] = Stripe::$apiVersion;
- }
-
if (Stripe::$accountId) {
$defaultHeaders['Stripe-Account'] = Stripe::$accountId;
}
diff --git a/lib/BaseStripeClient.php b/lib/BaseStripeClient.php
index 5d918198f..76d52ea25 100644
--- a/lib/BaseStripeClient.php
+++ b/lib/BaseStripeClient.php
@@ -18,7 +18,7 @@ class BaseStripeClient implements StripeClientInterface, StripeStreamingClientIn
'api_key' => null,
'client_id' => null,
'stripe_account' => null,
- 'stripe_version' => null,
+ 'stripe_version' => \Stripe\Util\ApiVersion::CURRENT,
'api_base' => self::DEFAULT_API_BASE,
'connect_base' => self::DEFAULT_CONNECT_BASE,
'files_base' => self::DEFAULT_FILES_BASE,
@@ -186,7 +186,14 @@ public function rawRequest($method, $path, $params = null, $opts = [])
$headers['Stripe-Context'] = $opts['stripe_context'];
unset($opts['stripe_context']);
}
- $opts = $this->defaultOpts->merge($opts, true);
+
+ $defaultRawRequestOpts = $this->defaultOpts;
+ if ('preview' === $apiMode) {
+ $defaultRawRequestOpts = $defaultRawRequestOpts->merge(['stripe_version' => \Stripe\Util\ApiVersion::PREVIEW], true);
+ }
+
+ $opts = $defaultRawRequestOpts->merge($opts, true);
+
// Concatenate $headers to $opts->headers, removing duplicates.
$opts->headers = \array_merge($opts->headers, $headers);
$baseUrl = $opts->apiBase ?: $this->getApiBase();
diff --git a/lib/Charge.php b/lib/Charge.php
index 8100255c4..7dc7ebeb8 100644
--- a/lib/Charge.php
+++ b/lib/Charge.php
@@ -12,7 +12,6 @@
*
* @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 $alternate_statement_descriptors
* @property int $amount Amount intended to be collected by this payment. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
* @property int $amount_captured Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
* @property int $amount_refunded Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).
@@ -28,8 +27,6 @@
* @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency.
* @property null|string|\Stripe\Customer $customer ID of the customer this charge is for if one exists.
* @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users.
- * @property null|string|\Stripe\Account $destination ID of an existing, connected Stripe account to transfer funds to if transfer_data
was specified in the charge request.
- * @property null|string|\Stripe\Dispute $dispute Details about the dispute if the charge has been disputed.
* @property bool $disputed Whether the charge has been disputed.
* @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction ID of the balance transaction that describes the reversal of the balance on your account due to payment failure.
* @property null|string $failure_code Error code explaining reason for charge failure if available (see the errors section for a list of codes).
diff --git a/lib/Dispute.php b/lib/Dispute.php
index 65f66a6d0..9da97342e 100644
--- a/lib/Dispute.php
+++ b/lib/Dispute.php
@@ -28,7 +28,7 @@
* @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 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 $status Current status of dispute. Possible values are warning_needs_response
, warning_under_review
, warning_closed
, needs_response
, under_review
, charge_refunded
, won
, or lost
.
+ * @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
{
@@ -53,7 +53,6 @@ class Dispute extends ApiResource
const REASON_SUBSCRIPTION_CANCELED = 'subscription_canceled';
const REASON_UNRECOGNIZED = 'unrecognized';
- const STATUS_CHARGE_REFUNDED = 'charge_refunded';
const STATUS_LOST = 'lost';
const STATUS_NEEDS_RESPONSE = 'needs_response';
const STATUS_UNDER_REVIEW = 'under_review';
diff --git a/lib/Invoice.php b/lib/Invoice.php
index 8ef47c721..bf9881e87 100644
--- a/lib/Invoice.php
+++ b/lib/Invoice.php
@@ -159,9 +159,6 @@ class Invoice extends ApiResource
const BILLING_CHARGE_AUTOMATICALLY = 'charge_automatically';
const BILLING_SEND_INVOICE = 'send_invoice';
- /** @deprecated */
- const STATUS_DELETED = 'deleted';
-
/**
* @param null|array $params
* @param null|array|string $opts
diff --git a/lib/Product.php b/lib/Product.php
index 8bcbd3abd..b5b017c48 100644
--- a/lib/Product.php
+++ b/lib/Product.php
@@ -17,10 +17,7 @@
* @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 bool $active Whether the product is currently available for purchase.
- * @property null|string[] $attributes A list of up to 5 attributes that each SKU can provide values for (e.g., ["color", "size"]
).
- * @property null|string $caption A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of type=good
.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch.
- * @property null|string[] $deactivate_on An array of connect application identifiers that cannot purchase this product. Only applicable to products of type=good
.
* @property null|string|\Stripe\Price $default_price The ID of the Price object that is the default price for this product.
* @property null|string $description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
* @property string[] $images A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
diff --git a/lib/SetupIntent.php b/lib/SetupIntent.php
index be8d8bdef..ddcc45e14 100644
--- a/lib/SetupIntent.php
+++ b/lib/SetupIntent.php
@@ -32,7 +32,7 @@
* @property string $object String representing the object's type. Objects of the same type share the same value.
* @property null|string|\Stripe\StripeObject $application ID of the Connect application that created the SetupIntent.
* @property null|bool $attach_to_self
If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.
It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.
- * @property null|\Stripe\StripeObject $automatic_payment_methods Settings for automatic payment methods compatible with this Setup Intent + * @property null|\Stripe\StripeObject $automatic_payment_methods Settings for dynamic payment methods compatible with this Setup Intent * @property null|string $cancellation_reason Reason for cancellation of this SetupIntent, one ofabandoned
, requested_by_customer
, or duplicate
.
* @property null|string $client_secret The client secret of this SetupIntent. Used for client-side retrieval using a publishable key.
The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret.
* @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. diff --git a/lib/Stripe.php b/lib/Stripe.php index 30d036e40..1f980422e 100644 --- a/lib/Stripe.php +++ b/lib/Stripe.php @@ -22,8 +22,8 @@ class Stripe /** @var string The base URL for the Stripe API uploads endpoint. */ public static $apiUploadBase = 'https://files.stripe.com'; - /** @var null|string The version of the Stripe API to use for requests. */ - public static $apiVersion = null; + /** @var string The version of the Stripe API to use for requests. */ + public static $apiVersion = \Stripe\Util\ApiVersion::CURRENT; /** @var null|string The account ID for connected accounts requests. */ public static $accountId = null; @@ -119,8 +119,7 @@ public static function setClientId($clientId) } /** - * @return string The API version used for requests. null if we're using the - * latest version. + * @return string the API version used for requests */ public static function getApiVersion() { diff --git a/lib/Util/ApiVersion.php b/lib/Util/ApiVersion.php index 3c364ac95..e17ca35c2 100644 --- a/lib/Util/ApiVersion.php +++ b/lib/Util/ApiVersion.php @@ -6,6 +6,6 @@ class ApiVersion { - const CURRENT = '2022-11-15'; - const PREVIEW = '2023-07-13.preview-v2'; + const CURRENT = '2023-08-16'; + const PREVIEW = '2023-08-11.preview-v2'; } diff --git a/tests/Stripe/ApiRequestorTest.php b/tests/Stripe/ApiRequestorTest.php index 6b4ef0018..70239b13e 100644 --- a/tests/Stripe/ApiRequestorTest.php +++ b/tests/Stripe/ApiRequestorTest.php @@ -82,6 +82,11 @@ public function testDefaultHeaders() 'Stripe/v1 PhpBindings/' . Stripe::VERSION . ' MyTestApp/1.2.34 (https://mytestapp.example)' ); + static::assertSame( + $headers['Stripe-Version'], + Stripe::getApiVersion() + ); + static::assertSame($headers['Authorization'], 'Bearer ' . $apiKey); } diff --git a/tests/Stripe/BaseStripeClientTest.php b/tests/Stripe/BaseStripeClientTest.php index 8be7b8880..815f082f0 100644 --- a/tests/Stripe/BaseStripeClientTest.php +++ b/tests/Stripe/BaseStripeClientTest.php @@ -2,12 +2,15 @@ namespace Stripe; +use Stripe\Util\ApiVersion; + /** * @internal * @covers \Stripe\BaseStripeClient */ final class BaseStripeClientTest extends \Stripe\TestCase { + use TestHelper; /** @var \ReflectionProperty */ private $optsReflector; @@ -208,6 +211,23 @@ public function testRequestWithOptsInParamsWarns() static::assertSame('acct_456', $this->optsReflector->getValue($charge)->headers['Stripe-Account']); } + public function testRequestWithNoVersionDefaultsToPinnedVersion() + { + $client = new BaseStripeClient([ + 'api_key' => 'sk_test_client', + 'api_base' => MOCK_URL, + ]); + $this->expectsRequest('get', '/v1/charges/ch_123', null, [ + 'Stripe-Version: ' . \Stripe\Util\ApiVersion::CURRENT, + ]); + $charge = $client->request( + 'get', + '/v1/charges/ch_123', + [], + [] + ); + } + public function testJsonRawRequestGetWithURLParams() { $curlClientStub = $this->getMockBuilder(\Stripe\HttpClient\CurlClient::class) @@ -238,14 +258,19 @@ public function testJsonRawRequestGetWithURLParams() static::assertArrayNotHasKey(\CURLOPT_POST, $opts); static::assertArrayNotHasKey(\CURLOPT_POSTFIELDS, $opts); $content_type = null; + $stripe_version = null; foreach ($opts[\CURLOPT_HTTPHEADER] as $header) { if (self::headerStartsWith($header, 'Content-Type:')) { $content_type = $header; } + if (self::headerStartsWith($header, 'Stripe-Version:')) { + $stripe_version = $header; + } } // The library sends Content-Type even with no body, so assert this // But it would be more correct to not send Content-Type static::assertSame('Content-Type: application/x-www-form-urlencoded', $content_type); + static::assertSame('Stripe-Version: ' . ApiVersion::CURRENT, $stripe_version); } public function testJsonRawRequestPost() diff --git a/tests/TestHelper.php b/tests/TestHelper.php index 95e4ec64b..06319c7c0 100644 --- a/tests/TestHelper.php +++ b/tests/TestHelper.php @@ -43,7 +43,6 @@ protected function setUpConfig() Stripe::$apiUploadBase = \defined('MOCK_URL') ? MOCK_URL : 'http://localhost:12111'; Stripe::setApiKey('sk_test_123'); Stripe::setClientId('ca_123'); - Stripe::setApiVersion(null); Stripe::setAccountId(null); // Set up the HTTP client mocker @@ -63,7 +62,6 @@ protected function tearDownConfig() Stripe::setEnableTelemetry(false); Stripe::setApiKey($this->origApiKey); Stripe::setClientId($this->origClientId); - Stripe::setApiVersion($this->origApiVersion); Stripe::setAccountId($this->origAccountId); }