From 27557e032fd074ae0ee989043863400b26559b7b Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 30 Mar 2023 13:18:10 -0700 Subject: [PATCH 01/10] Update generated code (#1470) * Update generated code for v279 * Update generated code for v281 * Update generated code for v285 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- lib/BankAccount.php | 2 +- lib/Invoice.php | 1 - lib/Service/Tax/TransactionService.php | 15 --------------- lib/Tax/Transaction.php | 1 - 5 files changed, 2 insertions(+), 19 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ccddf6542..91bb63fb5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v277 \ No newline at end of file +v285 \ No newline at end of file diff --git a/lib/BankAccount.php b/lib/BankAccount.php index 5203cdf33..e15e2eb53 100644 --- a/lib/BankAccount.php +++ b/lib/BankAccount.php @@ -36,7 +36,7 @@ * @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|\Stripe\StripeObject $requirements Information about the requirements for the bank account, including what information needs to be collected. * @property null|string $routing_number The routing transit number for the bank account. - * @property string $status

For bank accounts, possible values are new, validated, verified, verification_failed, or errored. A bank account that hasn't had any activity or validation performed is new. If Stripe can determine that the bank account exists, its status will be validated. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed. If a transfer sent to this bank account fails, we'll set the status to errored and will not continue to send transfers until the bank details are updated.

For external accounts, possible values are new and errored. Validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated.

+ * @property string $status

For bank accounts, possible values are new, validated, verified, verification_failed, or errored. A bank account that hasn't had any activity or validation performed is new. If Stripe can determine that the bank account exists, its status will be validated. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed. If a transfer sent to this bank account fails, we'll set the status to errored and will not continue to send transfers until the bank details are updated.

For external accounts, possible values are new, errored and verification_failed. If a transfer fails, the status is set to errored and transfers are stopped until account details are updated. In India, if we can't verify the owner of the bank account, we'll set the status to verification_failed. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.

*/ class BankAccount extends ApiResource { diff --git a/lib/Invoice.php b/lib/Invoice.php index 1849ea062..df3ef2aa5 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -149,7 +149,6 @@ class Invoice extends ApiResource const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; - const STATUS_DELETED = 'deleted'; const STATUS_DRAFT = 'draft'; const STATUS_OPEN = 'open'; const STATUS_PAID = 'paid'; diff --git a/lib/Service/Tax/TransactionService.php b/lib/Service/Tax/TransactionService.php index f8e65fd32..5374b5665 100644 --- a/lib/Service/Tax/TransactionService.php +++ b/lib/Service/Tax/TransactionService.php @@ -22,21 +22,6 @@ public function allLineItems($id, $params = null, $opts = null) return $this->requestCollection('get', $this->buildPath('/v1/tax/transactions/%s/line_items', $id), $params, $opts); } - /** - * Creates a Tax Transaction from a calculation. - * - * @param null|array $params - * @param null|array|\Stripe\Util\RequestOptions $opts - * - * @throws \Stripe\Exception\ApiErrorException if the request fails - * - * @return \Stripe\Tax\Transaction - */ - public function create($params = null, $opts = null) - { - return $this->request('post', '/v1/tax/transactions', $params, $opts); - } - /** * Creates a Tax Transaction from a calculation. * diff --git a/lib/Tax/Transaction.php b/lib/Tax/Transaction.php index 38fc6801f..2b273a890 100644 --- a/lib/Tax/Transaction.php +++ b/lib/Tax/Transaction.php @@ -26,7 +26,6 @@ class Transaction extends \Stripe\ApiResource { const OBJECT_NAME = 'tax.transaction'; - use \Stripe\ApiOperations\Create; use \Stripe\ApiOperations\Retrieve; const TYPE_REVERSAL = 'reversal'; From ef2b761e4c69de59892c95d0453e2caa25162faf Mon Sep 17 00:00:00 2001 From: Annie Li Date: Thu, 30 Mar 2023 13:27:06 -0700 Subject: [PATCH 02/10] Bump version to 10.12.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 8b14925c8..0806c8222 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 10.12.0 - 2023-03-30 +* [#1470](https://github.com/stripe/stripe-php/pull/1470) Update generated code + * Remove support for `create` method on resource `Tax.Transaction` + * This is not a breaking change, as this method was deprecated before the Tax Transactions API was released in favor of the `createFromCalculation` method. + * Remove support for value `deleted` from enum `Invoice.status` + * This is not a breaking change, as the value was never returned or accepted as input. +* [#1468](https://github.com/stripe/stripe-php/pull/1468) Trigger workflow for tags +* [#1467](https://github.com/stripe/stripe-php/pull/1467) Update generated code (new) + * Release specs are identical. + ## 10.11.0 - 2023-03-23 * [#1458](https://github.com/stripe/stripe-php/pull/1458) Update generated code * Add support for new resources `Tax.CalculationLineItem`, `Tax.Calculation`, `Tax.TransactionLineItem`, and `Tax.Transaction` diff --git a/VERSION b/VERSION index 725870228..c4d592e16 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.11.0 +10.12.0 diff --git a/lib/Stripe.php b/lib/Stripe.php index bde53747a..5165a4614 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 = '10.11.0'; + const VERSION = '10.12.0'; /** * @return string the API key used for requests From d7f042cbf94e75edaa3748c4c5ffe80a95416a4c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 31 Mar 2023 15:27:33 +0000 Subject: [PATCH 03/10] Update generated code for v289 --- OPENAPI_VERSION | 2 +- lib/Refund.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 91bb63fb5..ec996dd02 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v285 \ No newline at end of file +v289 \ No newline at end of file diff --git a/lib/Refund.php b/lib/Refund.php index 8692f03a4..0db94749b 100644 --- a/lib/Refund.php +++ b/lib/Refund.php @@ -21,7 +21,7 @@ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) * @property null|string|\Stripe\BalanceTransaction $failure_balance_transaction If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. * @property null|string $failure_reason If the refund failed, the reason for refund failure if known. Possible values are lost_or_stolen_card, expired_or_canceled_card, charge_for_pending_refund_disputed, insufficient_funds, declined, merchant_request or unknown. - * @property null|string $instructions_email Email to which refund instructions, if required, are sent to. + * @property null|string $instructions_email For payment methods without native refund support (e.g., Konbini, PromptPay), email for the customer to receive refund instructions. * @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|\Stripe\StripeObject $next_action * @property null|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent that was refunded. From df9b0b068b9c77713e7091119bfab30def972991 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 15:23:51 +0000 Subject: [PATCH 04/10] Update generated code for v291 --- OPENAPI_VERSION | 2 +- lib/Tax/Calculation.php | 6 ++++-- lib/Tax/Transaction.php | 6 +++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ec996dd02..02b98f78e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v289 \ No newline at end of file +v291 \ No newline at end of file diff --git a/lib/Tax/Calculation.php b/lib/Tax/Calculation.php index c8ab80d5a..ac0ba8676 100644 --- a/lib/Tax/Calculation.php +++ b/lib/Tax/Calculation.php @@ -5,8 +5,10 @@ namespace Stripe\Tax; /** - * A Tax Calculation allows you to calculate the tax to collect from - * your customer. + * A Tax Calculation allows you to calculate the tax to collect from your customer. + * + * Related guide: Calculate tax in + * your custom payment flow. * * @property null|string $id Unique identifier for the calculation. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Tax/Transaction.php b/lib/Tax/Transaction.php index 2b273a890..b3c816761 100644 --- a/lib/Tax/Transaction.php +++ b/lib/Tax/Transaction.php @@ -5,7 +5,11 @@ namespace Stripe\Tax; /** - * A Tax transaction records the tax collected from or refunded to your customer. + * A Tax Transaction records the tax collected from or refunded to your customer. + * + * Related guide: Calculate tax in your + * custom payment flow. * * @property string $id Unique identifier for the transaction. * @property string $object String representing the object's type. Objects of the same type share the same value. From 8d2f1edbfbab696a96d29bca4bf68696cf2d9c56 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 15:23:56 +0000 Subject: [PATCH 05/10] Update generated code for v291 --- OPENAPI_VERSION | 2 +- lib/Tax/Calculation.php | 6 ++++-- lib/Tax/Transaction.php | 6 +++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ec996dd02..02b98f78e 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v289 \ No newline at end of file +v291 \ No newline at end of file diff --git a/lib/Tax/Calculation.php b/lib/Tax/Calculation.php index c8ab80d5a..ac0ba8676 100644 --- a/lib/Tax/Calculation.php +++ b/lib/Tax/Calculation.php @@ -5,8 +5,10 @@ namespace Stripe\Tax; /** - * A Tax Calculation allows you to calculate the tax to collect from - * your customer. + * A Tax Calculation allows you to calculate the tax to collect from your customer. + * + * Related guide: Calculate tax in + * your custom payment flow. * * @property null|string $id Unique identifier for the calculation. * @property string $object String representing the object's type. Objects of the same type share the same value. diff --git a/lib/Tax/Transaction.php b/lib/Tax/Transaction.php index 2b273a890..b3c816761 100644 --- a/lib/Tax/Transaction.php +++ b/lib/Tax/Transaction.php @@ -5,7 +5,11 @@ namespace Stripe\Tax; /** - * A Tax transaction records the tax collected from or refunded to your customer. + * A Tax Transaction records the tax collected from or refunded to your customer. + * + * Related guide: Calculate tax in your + * custom payment flow. * * @property string $id Unique identifier for the transaction. * @property string $object String representing the object's type. Objects of the same type share the same value. From a18d3564471145cc62b58bc8fe76fe5bd41acd8d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 16:57:51 +0000 Subject: [PATCH 06/10] Update generated code for v292 --- OPENAPI_VERSION | 2 +- lib/AccountSession.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 02b98f78e..ac9c9a114 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v291 \ No newline at end of file +v292 \ No newline at end of file diff --git a/lib/AccountSession.php b/lib/AccountSession.php index cc388bacb..d70056475 100644 --- a/lib/AccountSession.php +++ b/lib/AccountSession.php @@ -6,19 +6,19 @@ /** * An AccountSession allows a Connect platform to grant access to a connected - * account in Connect embedded UIs. + * account in Connect embedded components. * * We recommend that you create an AccountSession each time you need to display an - * embedded UI to your user. Do not save AccountSessions to your database as they - * expire relatively quickly, and cannot be used more than once. + * embedded component to your user. Do not save AccountSessions to your database as + * they expire relatively quickly, and cannot be used more than once. * * Related guide: Connect - * embedded UIs. + * href="https://stripe.com/docs/connect/get-started-connect-embedded-components">Connect + * embedded components. * * @property string $object String representing the object's type. Objects of the same type share the same value. * @property string $account The ID of the account the AccountSession was created for - * @property string $client_secret

The client secret of this AccountSession. Used on the client to set up secure access to the given account.

The client secret can be used to provide access to account from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.

Refer to our docs to setup Connect embedded UIs and learn about how client_secret should be handled.

+ * @property string $client_secret

The client secret of this AccountSession. Used on the client to set up secure access to the given account.

The client secret can be used to provide access to account from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret.

Refer to our docs to setup Connect embedded components and learn about how client_secret should be handled.

* @property int $expires_at The timestamp at which this AccountSession will expire. * @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. */ From d9214c375e6439556cfd66dbabc877783f04769a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 18:57:51 +0000 Subject: [PATCH 07/10] Update generated code for v293 --- OPENAPI_VERSION | 2 +- lib/Invoice.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 02b98f78e..6ed31bffd 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v291 \ No newline at end of file +v293 \ No newline at end of file diff --git a/lib/Invoice.php b/lib/Invoice.php index df3ef2aa5..e1be77f70 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -149,6 +149,8 @@ class Invoice extends ApiResource const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; + /** @deprecated */ + const STATUS_DELETED = 'deleted'; const STATUS_DRAFT = 'draft'; const STATUS_OPEN = 'open'; const STATUS_PAID = 'paid'; From b2359896f3555f1c555368014d4eab9d7ba4ccc5 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 18:58:29 +0000 Subject: [PATCH 08/10] Update generated code for v293 --- OPENAPI_VERSION | 2 +- lib/Invoice.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ac9c9a114..6ed31bffd 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v292 \ No newline at end of file +v293 \ No newline at end of file diff --git a/lib/Invoice.php b/lib/Invoice.php index 86fcb37e3..a2cfeb86d 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -150,6 +150,8 @@ class Invoice extends ApiResource const COLLECTION_METHOD_CHARGE_AUTOMATICALLY = 'charge_automatically'; const COLLECTION_METHOD_SEND_INVOICE = 'send_invoice'; + /** @deprecated */ + const STATUS_DELETED = 'deleted'; const STATUS_DRAFT = 'draft'; const STATUS_OPEN = 'open'; const STATUS_PAID = 'paid'; From 9e8055d55e8212ad844f48d7cf525b630689be35 Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Tue, 4 Apr 2023 12:13:21 -0700 Subject: [PATCH 09/10] Bump version to 10.12.1 --- CHANGELOG.md | 4 ++++ VERSION | 2 +- lib/Stripe.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0806c8222..3bc9b4ac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 10.12.1 - 2023-04-04 +* [#1473](https://github.com/stripe/stripe-php/pull/1473) Update generated code + * Add back `deleted` from `Invoice.status`. + ## 10.12.0 - 2023-03-30 * [#1470](https://github.com/stripe/stripe-php/pull/1470) Update generated code * Remove support for `create` method on resource `Tax.Transaction` diff --git a/VERSION b/VERSION index c4d592e16..ef715b96c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.12.0 +10.12.1 diff --git a/lib/Stripe.php b/lib/Stripe.php index 5165a4614..dce3b20a8 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 = '10.12.0'; + const VERSION = '10.12.1'; /** * @return string the API key used for requests From b7d6d765cf8f778b533671f31cec0823d06e4444 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 6 Apr 2023 18:35:15 +0000 Subject: [PATCH 10/10] Update generated code for v294 --- OPENAPI_VERSION | 2 +- lib/Card.php | 2 +- lib/Issuing/Cardholder.php | 2 +- lib/Price.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6ed31bffd..0e2fd6c97 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v293 \ No newline at end of file +v294 \ No newline at end of file diff --git a/lib/Card.php b/lib/Card.php index 939523b14..622cc4282 100644 --- a/lib/Card.php +++ b/lib/Card.php @@ -24,7 +24,7 @@ * @property null|string $address_zip ZIP or postal code. * @property null|string $address_zip_check If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked. * @property null|string[] $available_payout_methods A set of available payout methods for this card. Only values from this set should be passed as the method when creating a payout. - * @property string $brand Card brand. Can be American Express, Diners Club, Discover, JCB, MasterCard, UnionPay, Visa, or Unknown. + * @property string $brand Card brand. Can be American Express, Diners Club, Discover, Eftpos Australia, JCB, MasterCard, UnionPay, Visa, or Unknown. * @property null|string $country Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. * @property null|string $currency Three-letter ISO code for currency. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. * @property null|string|\Stripe\Customer $customer The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. diff --git a/lib/Issuing/Cardholder.php b/lib/Issuing/Cardholder.php index 1e220d23c..98f38fe2c 100644 --- a/lib/Issuing/Cardholder.php +++ b/lib/Issuing/Cardholder.php @@ -26,7 +26,7 @@ * @property \Stripe\StripeObject $requirements * @property null|\Stripe\StripeObject $spending_controls Rules that control spending across this cardholder's cards. Refer to our documentation for more details. * @property string $status Specifies whether to permit authorizations on this cardholder's cards. - * @property string $type One of individual or company. + * @property string $type One of individual or company. See Choose a cardholder type for more details. */ class Cardholder extends \Stripe\ApiResource { diff --git a/lib/Price.php b/lib/Price.php index ed40a5cd9..76cd50356 100644 --- a/lib/Price.php +++ b/lib/Price.php @@ -38,7 +38,7 @@ * @property null|string $nickname A brief description of the price, hidden from customers. * @property string|\Stripe\Product $product The ID of the product this price is associated with. * @property null|\Stripe\StripeObject $recurring The recurring components of a price such as interval and usage_type. - * @property null|string $tax_behavior Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed. + * @property null|string $tax_behavior Only required if a default tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of inclusive, exclusive, or unspecified. Once specified as either inclusive or exclusive, it cannot be changed. * @property null|\Stripe\StripeObject[] $tiers Each element represents a pricing tier. This parameter requires billing_scheme to be set to tiered. See also the documentation for billing_scheme. * @property null|string $tiers_mode Defines if the tiering price should be graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In graduated tiering, pricing can change as the quantity grows. * @property null|\Stripe\StripeObject $transform_quantity Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with tiers.