From 5a291965f854d828f2f71b0d23e6732657bc5a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 30 Aug 2023 22:13:01 +0200 Subject: [PATCH 01/12] Enhancement: Use PHP 8.2 as leading PHP version --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47bb86a67..9ad752f5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,7 +40,7 @@ jobs: strategy: matrix: php-version: - - "8.1" + - "8.2" steps: - uses: actions/checkout@v3 @@ -136,7 +136,7 @@ jobs: - name: Coveralls run: vendor/bin/php-coveralls -v --coverage_clover='clover.xml' --json_path='coveralls-upload.json' - if: env.COVERALLS_REPO_TOKEN && matrix.php-version == '8.1' && matrix.env == 'AUTOLOAD=1' + if: env.COVERALLS_REPO_TOKEN && matrix.php-version == '8.2' && matrix.env == 'AUTOLOAD=1' env: COVERALLS_RUN_LOCALLY: 1 COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} From 9ca40138457eff85535c7ef28e594bbe373cc13a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Thu, 31 Aug 2023 15:12:16 +0200 Subject: [PATCH 02/12] Enhancement: Reference phpunit.xsd as installed with composer --- phpunit.no_autoload.xml | 7 ++++++- phpunit.xml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/phpunit.no_autoload.xml b/phpunit.no_autoload.xml index cf54b8d8f..71606e4e4 100644 --- a/phpunit.no_autoload.xml +++ b/phpunit.no_autoload.xml @@ -1,4 +1,9 @@ - + diff --git a/phpunit.xml b/phpunit.xml index 506e8b1b8..badf860b6 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,4 +1,9 @@ - + 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 03/12] 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 ca2b1285d..e9281bf5d 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 dbe93336b..502cfd851 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 6115899e5..da8158f5a 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 b1ed61e5d..302191c6f 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 7d3f8983c..3e2855906 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 62c99c15a..55cc06a5a 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 77354f3b4..e01074ae9 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 563521df6..661d34902 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 000000000..e2df26214 --- /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 2082398b9..b656a355b 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 000000000..8bdf4e8e7 --- /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 8b37aeeba..ddcc45e14 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 8d3eb413d..3540b6662 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 b1e4b5098..14e001a00 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 ea37f68a6..a693ad1c1 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 04/12] 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 a6411111d..abe0d6e04 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 685332623..4d23cb8e0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -12.2.0 +12.3.0 diff --git a/lib/Stripe.php b/lib/Stripe.php index 0b4c1811c..c90e4a761 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 From d48d70a52bdcb10437460025743c47ee7ff3f6c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Mon, 18 Sep 2023 19:55:42 +0200 Subject: [PATCH 05/12] Fix: Remove squizlabs/php_codesniffer (#1566) --- composer.json | 1 - 1 file changed, 1 deletion(-) diff --git a/composer.json b/composer.json index d9ab9adfd..8cda6ef6c 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ }, "require-dev": { "phpunit/phpunit": "^5.7 || ^9.0", - "squizlabs/php_codesniffer": "^3.3", "friendsofphp/php-cs-fixer": "3.5.0", "phpstan/phpstan": "^1.2", "php-coveralls/php-coveralls": "^2.5" From a38ff2913c1cf2c43a89aedeb803560407cb7260 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 23:43:18 +0000 Subject: [PATCH 06/12] Update generated code for v535 --- OPENAPI_VERSION | 2 +- lib/Service/Issuing/AuthorizationService.php | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c5b7f77be..8a42724f2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v533 \ No newline at end of file +v535 \ No newline at end of file diff --git a/lib/Service/Issuing/AuthorizationService.php b/lib/Service/Issuing/AuthorizationService.php index 60d78b7cc..c3bcbc57f 100644 --- a/lib/Service/Issuing/AuthorizationService.php +++ b/lib/Service/Issuing/AuthorizationService.php @@ -24,12 +24,12 @@ public function all($params = null, $opts = null) } /** - * Approves a pending Issuing Authorization object. This request - * should be made within the timeout window of the Authorization object. This + * request should be made within the timeout window of the real-time - * authorization flow. You can also respond directly to the webhook request to - * approve an authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to approve an authorization. * * @param string $id * @param null|array $params @@ -45,12 +45,12 @@ public function approve($id, $params = null, $opts = null) } /** - * Declines a pending Issuing Authorization object. This request - * should be made within the timeout window of the Authorization object. This + * request should be made within the timeout window of the real time - * authorization flow. You can also respond directly to the webhook request to - * decline an authorization (preferred). More details can be found here. + * authorization flow. This method is deprecated. Instead, respond + * directly to the webhook request to decline an authorization. * * @param string $id * @param null|array $params From f7fed04713f56ba8a6e08258e34cb76557250e22 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 19 Sep 2023 23:52:52 +0000 Subject: [PATCH 07/12] Update generated code for v536 --- OPENAPI_VERSION | 2 +- lib/File.php | 20 ++++++++++---------- lib/FileLink.php | 6 +++--- lib/Service/FileService.php | 13 ++++++------- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8a42724f2..bb583f4b8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v535 \ No newline at end of file +v536 \ No newline at end of file diff --git a/lib/File.php b/lib/File.php index 59790da0c..a5d2b9e27 100644 --- a/lib/File.php +++ b/lib/File.php @@ -5,10 +5,10 @@ namespace Stripe; /** - * This is an object representing a file hosted on Stripe's servers. The - * file may have been uploaded by yourself using the create file - * request (for example, when uploading dispute evidence) or it may have - * been created by Stripe (for example, the results of a Sigma scheduled + * This object represents files hosted on Stripe's servers. You can upload + * files with the create file request + * (for example, when uploading dispute evidence). Stripe also + * creates files independetly (for example, the results of a Sigma scheduled * query). * * Related guide: File upload guide @@ -16,14 +16,14 @@ * @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 $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property null|int $expires_at The time at which the file expires and is no longer available in epoch seconds. - * @property null|string $filename A filename for the file, suitable for saving to a filesystem. + * @property null|int $expires_at The file expires and isn't available at this time in epoch seconds. + * @property null|string $filename The suitable name for saving the file to a filesystem. * @property null|\Stripe\Collection<\Stripe\FileLink> $links A list of file links that point at this file. * @property string $purpose The purpose of the uploaded file. - * @property int $size The size in bytes of the file object. - * @property null|string $title A user friendly title for the document. - * @property null|string $type The type of the file returned (e.g., csv, pdf, jpg, or png). - * @property null|string $url The URL from which the file can be downloaded using your live secret API key. + * @property int $size The size of the file object in bytes. + * @property null|string $title A suitable title for the document. + * @property null|string $type The returned file type (for example, csv, pdf, jpg, or png). + * @property null|string $url Use your live secret API key to download the file from this URL. */ class File extends ApiResource { diff --git a/lib/FileLink.php b/lib/FileLink.php index bb6ed6488..cab855eb6 100644 --- a/lib/FileLink.php +++ b/lib/FileLink.php @@ -6,14 +6,14 @@ /** * To share the contents of a File object with non-Stripe users, you can - * create a FileLink. FileLinks contain a URL that can be used to + * create a FileLink. FileLinks contain a URL that you can use to * retrieve the contents of the file without authentication. * * @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 $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property bool $expired Whether this link is already expired. - * @property null|int $expires_at Time at which the link expires. + * @property bool $expired Returns if the link is already expired. + * @property null|int $expires_at Time that the link expires. * @property string|\Stripe\File $file The file object this link points to. * @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. diff --git a/lib/Service/FileService.php b/lib/Service/FileService.php index 82ef0e500..ef76f8f77 100644 --- a/lib/Service/FileService.php +++ b/lib/Service/FileService.php @@ -7,9 +7,9 @@ class FileService extends \Stripe\Service\AbstractService { /** - * Returns a list of the files that your account has access to. The files are - * returned sorted by creation date, with the most recently created files appearing - * first. + * Returns a list of the files that your account has access to. Stripe sorts and + * returns the files by their creation dates, placing the most recently created + * files at the top. * * @param null|array $params * @param null|array|\Stripe\Util\RequestOptions $opts @@ -24,10 +24,9 @@ public function all($params = null, $opts = null) } /** - * Retrieves the details of an existing file object. Supply the unique file ID from - * a file, and Stripe will return the corresponding file object. To access file - * contents, see the File Upload - * Guide. + * Retrieves the details of an existing file object. After you supply a unique file + * ID, Stripe returns the corresponding file object. Learn how to access file contents. * * @param string $id * @param null|array $params From eedc4ae2d326f43fdd09d4bad71e82ca2093199a Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 07:32:56 +0000 Subject: [PATCH 08/12] Update generated code for v537 --- OPENAPI_VERSION | 2 +- lib/Invoice.php | 1 + lib/QuotePreviewInvoice.php | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index bb583f4b8..dbf32bd64 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v536 \ No newline at end of file +v537 \ No newline at end of file diff --git a/lib/Invoice.php b/lib/Invoice.php index 9f87f479c..4cfbbc0d1 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -80,6 +80,7 @@ * @property null|\Stripe\StripeObject $from_invoice Details of the invoice that was cloned. See the revision documentation for more details. * @property null|string $hosted_invoice_url The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. * @property null|string $invoice_pdf The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + * @property null|\Stripe\StripeObject $issuer The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. * @property null|\Stripe\StripeObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. * @property null|string|\Stripe\Invoice $latest_revision The ID of the most recent non-draft revision of this invoice * @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. diff --git a/lib/QuotePreviewInvoice.php b/lib/QuotePreviewInvoice.php index d814aa2db..71b7bcaca 100644 --- a/lib/QuotePreviewInvoice.php +++ b/lib/QuotePreviewInvoice.php @@ -76,6 +76,7 @@ * @property null|int $ending_balance Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. * @property null|string $footer Footer displayed on the invoice. * @property null|\Stripe\StripeObject $from_invoice Details of the invoice that was cloned. See the revision documentation for more details. + * @property null|\Stripe\StripeObject $issuer The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. * @property null|\Stripe\StripeObject $last_finalization_error The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. * @property null|string|\Stripe\Invoice $latest_revision The ID of the most recent non-draft revision of this invoice * @property \Stripe\Collection<\Stripe\InvoiceLineItem> $lines The individual line items that make up the invoice. lines is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. From 2b99592392155770776afd121a1f234dd9f69677 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 16:07:42 +0000 Subject: [PATCH 09/12] Update generated code for v538 --- OPENAPI_VERSION | 2 +- lib/ConfirmationToken.php | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dbf32bd64..ddda57be8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v537 \ No newline at end of file +v538 \ No newline at end of file diff --git a/lib/ConfirmationToken.php b/lib/ConfirmationToken.php index 5d6a43b91..2d9fbacef 100644 --- a/lib/ConfirmationToken.php +++ b/lib/ConfirmationToken.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 int $created Time at which the object was created. Measured in seconds since the Unix epoch. - * @property null|string $customer ID of the Customer this ConfirmationToken belongs to. * @property null|int $expires_at Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. This is set to null once this ConfirmationToken has been used. * @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 $mandate_data Data used for generating a Mandate. From d7975d89f648f6aad7846aa7897659e6633a4e6e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 20 Sep 2023 21:45:41 +0000 Subject: [PATCH 10/12] Update generated code for v539 --- OPENAPI_VERSION | 2 +- lib/Service/PaymentIntentService.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index ddda57be8..63aa4cce7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v538 \ No newline at end of file +v539 \ No newline at end of file diff --git a/lib/Service/PaymentIntentService.php b/lib/Service/PaymentIntentService.php index a3fd8d133..f7cc083b2 100644 --- a/lib/Service/PaymentIntentService.php +++ b/lib/Service/PaymentIntentService.php @@ -239,10 +239,10 @@ public function search($params = null, $opts = null) /** * Updates properties on a PaymentIntent object without confirming. * - * Depending on which properties you update, you may need to confirm the - * PaymentIntent again. For example, updating the payment_method will - * always require you to confirm the PaymentIntent again. If you prefer to update - * and confirm at the same time, we recommend updating properties via the payment_method + * always requires you to confirm the PaymentIntent again. If you prefer to update + * and confirm at the same time, we recommend updating properties through the confirm API instead. * * @param string $id From e17b0aa73cd95c81c8fa61e52c756633e3d9d8d6 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 06:13:13 +0000 Subject: [PATCH 11/12] Update generated code for v540 --- OPENAPI_VERSION | 2 +- lib/Account.php | 2 +- lib/Person.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 63aa4cce7..a98b1d0aa 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v539 \ No newline at end of file +v540 \ No newline at end of file diff --git a/lib/Account.php b/lib/Account.php index ba060664d..13cd0bcaf 100644 --- a/lib/Account.php +++ b/lib/Account.php @@ -29,7 +29,7 @@ * @property null|string $email An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. * @property null|\Stripe\Collection<\Stripe\BankAccount|\Stripe\Card> $external_accounts External accounts (bank accounts and debit cards) currently attached to this account * @property null|\Stripe\StripeObject $future_requirements - * @property null|\Stripe\Person $individual

This is an object representing a person associated with a Stripe account.

A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform prefilling and account onboarding steps.

Related guide: Handling identity verification with the API

+ * @property null|\Stripe\Person $individual

This is an object representing a person associated with a Stripe account.

A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. See the Standard onboarding or Express onboarding documentation for information about platform prefilling and account onboarding steps.

Related guide: Handling identity verification with the API

* @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|bool $payouts_enabled Whether Stripe can send payouts to this account. * @property null|\Stripe\StripeObject $requirements diff --git a/lib/Person.php b/lib/Person.php index d026788a8..f357d0be8 100644 --- a/lib/Person.php +++ b/lib/Person.php @@ -10,7 +10,7 @@ * A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. * See the Standard onboarding or Express onboarding documentation for information about platform prefilling and account onboarding steps. * - * Related guide: Handling identity verification with the API + * Related guide: Handling identity verification with the API * * @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. From 9ee8deaf30f294f9788151e659f0c7aaf32c5b84 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 21 Sep 2023 14:02:24 +0000 Subject: [PATCH 12/12] Update generated code for v540 --- lib/Event.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Event.php b/lib/Event.php index ef425eb83..5d3d0308b 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -146,6 +146,7 @@ class Event extends ApiResource const IDENTITY_VERIFICATION_SESSION_VERIFIED = 'identity.verification_session.verified'; const INVOICEITEM_CREATED = 'invoiceitem.created'; const INVOICEITEM_DELETED = 'invoiceitem.deleted'; + const INVOICEITEM_UPDATED = 'invoiceitem.updated'; const INVOICE_CREATED = 'invoice.created'; const INVOICE_DELETED = 'invoice.deleted'; const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed';