From 7d26a70caa185a57ee66fe7a05b0ed9f558d816f Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:30:15 -0700 Subject: [PATCH 01/24] Update generated code (#1721) * Update generated code for v1117 * Update generated code for v1120 * Update generated code for v1121 * Update generated code for v1123 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- lib/BillingPortal/Session.php | 2 +- lib/ConfirmationToken.php | 1 + lib/ErrorObject.php | 5 ----- lib/Service/SubscriptionService.php | 11 +++++++---- lib/Subscription.php | 11 +++++++---- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dbdf3c1cb..af6e36838 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1116 \ No newline at end of file +v1123 \ No newline at end of file diff --git a/lib/BillingPortal/Session.php b/lib/BillingPortal/Session.php index a6554278c..a94d5f9af 100644 --- a/lib/BillingPortal/Session.php +++ b/lib/BillingPortal/Session.php @@ -18,7 +18,7 @@ * Create sessions on-demand when customers intend to manage their subscriptions * and billing details. * - * Learn more in the integration guide. + * Related guide: Customer management * * @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. diff --git a/lib/ConfirmationToken.php b/lib/ConfirmationToken.php index ee78a3131..0ef4b8a99 100644 --- a/lib/ConfirmationToken.php +++ b/lib/ConfirmationToken.php @@ -20,6 +20,7 @@ * @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. * @property null|string $payment_intent ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + * @property null|\Stripe\StripeObject $payment_method_options Payment-method-specific configuration for this ConfirmationToken. * @property null|\Stripe\StripeObject $payment_method_preview Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. * @property null|string $return_url Return URL used to confirm the Intent. * @property null|string $setup_future_usage

Indicates that you intend to make future payments with this ConfirmationToken's payment method.

The presence of this property will attach the payment method to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete.

diff --git a/lib/ErrorObject.php b/lib/ErrorObject.php index 47ffa0cbe..6aa55fafa 100644 --- a/lib/ErrorObject.php +++ b/lib/ErrorObject.php @@ -66,10 +66,6 @@ class ErrorObject extends StripeObject const CODE_BANK_ACCOUNT_UNVERIFIED = 'bank_account_unverified'; const CODE_BANK_ACCOUNT_VERIFICATION_FAILED = 'bank_account_verification_failed'; const CODE_BILLING_INVALID_MANDATE = 'billing_invalid_mandate'; - const CODE_BILLING_POLICY_REMOTE_FUNCTION_RESPONSE_INVALID = 'billing_policy_remote_function_response_invalid'; - const CODE_BILLING_POLICY_REMOTE_FUNCTION_TIMEOUT = 'billing_policy_remote_function_timeout'; - const CODE_BILLING_POLICY_REMOTE_FUNCTION_UNEXPECTED_STATUS_CODE = 'billing_policy_remote_function_unexpected_status_code'; - const CODE_BILLING_POLICY_REMOTE_FUNCTION_UNREACHABLE = 'billing_policy_remote_function_unreachable'; const CODE_BITCOIN_UPGRADE_REQUIRED = 'bitcoin_upgrade_required'; const CODE_CAPTURE_CHARGE_AUTHORIZATION_EXPIRED = 'capture_charge_authorization_expired'; const CODE_CAPTURE_UNAUTHORIZED_PAYMENT = 'capture_unauthorized_payment'; @@ -143,7 +139,6 @@ class ErrorObject extends StripeObject const CODE_PARAMETERS_EXCLUSIVE = 'parameters_exclusive'; const CODE_PAYMENT_INTENT_ACTION_REQUIRED = 'payment_intent_action_required'; const CODE_PAYMENT_INTENT_AUTHENTICATION_FAILURE = 'payment_intent_authentication_failure'; - const CODE_PAYMENT_INTENT_FX_QUOTE_INVALID = 'payment_intent_fx_quote_invalid'; const CODE_PAYMENT_INTENT_INCOMPATIBLE_PAYMENT_METHOD = 'payment_intent_incompatible_payment_method'; const CODE_PAYMENT_INTENT_INVALID_PARAMETER = 'payment_intent_invalid_parameter'; const CODE_PAYMENT_INTENT_KONBINI_REJECTED_CONFIRMATION_NUMBER = 'payment_intent_konbini_rejected_confirmation_number'; diff --git a/lib/Service/SubscriptionService.php b/lib/Service/SubscriptionService.php index ba7dcc729..fae6df831 100644 --- a/lib/Service/SubscriptionService.php +++ b/lib/Service/SubscriptionService.php @@ -162,8 +162,8 @@ public function search($params = null, $opts = null) * Updates an existing subscription to match the specified parameters. When * changing prices or quantities, we optionally prorate the price we charge next * month to make up for any price changes. To preview how the proration is - * calculated, use the upcoming invoice - * endpoint. + * calculated, use the create + * preview endpoint. * * By default, we prorate subscription changes. For example, if a customer signs up * on May 1 for a 100 price, they’ll be billed @@ -179,11 +179,14 @@ public function search($params = null, $opts = null) * immediate charge unless: * * + * yearly).
  • The subscription moves from free to paid.
  • A trial + * starts or ends.
  • * * In these cases, we apply a credit for the unused time on the previous price, * immediately charge the customer using the new price, and reset the billing date. + * Learn about how Stripe + * immediately attempts payment for subscription changes. * * If you want to charge for an upgrade immediately, pass * proration_behavior as always_invoice to create diff --git a/lib/Subscription.php b/lib/Subscription.php index 89233a9b0..1dae9385a 100644 --- a/lib/Subscription.php +++ b/lib/Subscription.php @@ -149,8 +149,8 @@ public static function retrieve($id, $opts = null) * Updates an existing subscription to match the specified parameters. When * changing prices or quantities, we optionally prorate the price we charge next * month to make up for any price changes. To preview how the proration is - * calculated, use the upcoming invoice - * endpoint. + * calculated, use the create + * preview endpoint. * * By default, we prorate subscription changes. For example, if a customer signs up * on May 1 for a 100 price, they’ll be billed @@ -166,11 +166,14 @@ public static function retrieve($id, $opts = null) * immediate charge unless: * * + * yearly).
  • The subscription moves from free to paid.
  • A trial + * starts or ends.
  • * * In these cases, we apply a credit for the unused time on the previous price, * immediately charge the customer using the new price, and reset the billing date. + * Learn about how Stripe + * immediately attempts payment for subscription changes. * * If you want to charge for an upgrade immediately, pass * proration_behavior as always_invoice to create From 29a28251d35dba236ad6e860e1927b3f35cc1b2e Mon Sep 17 00:00:00 2001 From: David Brownman Date: Thu, 11 Jul 2024 11:46:58 -0700 Subject: [PATCH 02/24] Bump version to 15.2.0 --- CHANGELOG.md | 5 +++++ VERSION | 2 +- lib/Stripe.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23e7a4a1a..5af67f56d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 15.2.0 - 2024-07-11 +* [#1721](https://github.com/stripe/stripe-php/pull/1721) Update generated code + * Remove support for values `billing_policy_remote_function_response_invalid`, `billing_policy_remote_function_timeout`, `billing_policy_remote_function_unexpected_status_code`, `billing_policy_remote_function_unreachable`, and `payment_intent_fx_quote_invalid` from enum `StripeError.code` + * Add support for `payment_method_options` on `ConfirmationToken` + ## 15.1.0 - 2024-07-05 * [#1718](https://github.com/stripe/stripe-php/pull/1718) Update generated code * Add support for `add_lines`, `remove_lines`, and `update_lines` methods on resource `Invoice` diff --git a/VERSION b/VERSION index d14dfbac3..6c43fc8ae 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -15.1.0 +15.2.0 diff --git a/lib/Stripe.php b/lib/Stripe.php index 29ce2a72c..6a3b5a820 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 = '15.1.0'; + const VERSION = '15.2.0'; /** * @return string the API key used for requests From dbcb2820703dd36f6375c7b3c5bf696bd0cff260 Mon Sep 17 00:00:00 2001 From: prathmesh-stripe <165320323+prathmesh-stripe@users.noreply.github.com> Date: Thu, 11 Jul 2024 16:54:24 -0400 Subject: [PATCH 03/24] Update changelog (#1722) --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af67f56d..4ab91a7dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,8 +2,9 @@ ## 15.2.0 - 2024-07-11 * [#1721](https://github.com/stripe/stripe-php/pull/1721) Update generated code - * Remove support for values `billing_policy_remote_function_response_invalid`, `billing_policy_remote_function_timeout`, `billing_policy_remote_function_unexpected_status_code`, `billing_policy_remote_function_unreachable`, and `payment_intent_fx_quote_invalid` from enum `StripeError.code` - * Add support for `payment_method_options` on `ConfirmationToken` + * ⚠️ Remove support for values `billing_policy_remote_function_response_invalid`, `billing_policy_remote_function_timeout`, `billing_policy_remote_function_unexpected_status_code`, and `billing_policy_remote_function_unreachable` from enum `StripeError.code`. + * ⚠️ Remove support for value `payment_intent_fx_quote_invalid` from enum `StripeError.code`. The was mistakenly released last week. + * Add support for `payment_method_options` on `ConfirmationToken` ## 15.1.0 - 2024-07-05 * [#1718](https://github.com/stripe/stripe-php/pull/1718) Update generated code From e9ab21afe1ef40f87e86f18ea5be71b4a9de3d39 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 05:08:24 +0000 Subject: [PATCH 04/24] Update generated code for v1126 --- OPENAPI_VERSION | 2 +- lib/Identity/VerificationReport.php | 2 +- lib/PaymentMethodDomain.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index d8e31113a..c903c3517 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1125 \ No newline at end of file +v1126 \ No newline at end of file diff --git a/lib/Identity/VerificationReport.php b/lib/Identity/VerificationReport.php index 77fa02c68..6ecfa3f0d 100644 --- a/lib/Identity/VerificationReport.php +++ b/lib/Identity/VerificationReport.php @@ -15,7 +15,7 @@ * API. To configure and create VerificationReports, use the * VerificationSession API. * - * Related guides: Accessing verification results. + * Related guide: Accessing verification results. * * @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. diff --git a/lib/PaymentMethodDomain.php b/lib/PaymentMethodDomain.php index 2121adcc0..810ccb4de 100644 --- a/lib/PaymentMethodDomain.php +++ b/lib/PaymentMethodDomain.php @@ -8,7 +8,7 @@ * A payment method domain represents a web domain that you have registered with Stripe. * Stripe Elements use registered payment method domains to control where certain payment methods are shown. * - * Related guides: Payment method domains. + * Related guide: Payment method domains. * * @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 c1ec2aaf162d9d013a11f620b513ed28a232598c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 08:40:40 +0000 Subject: [PATCH 05/24] Update generated code for v1130 --- OPENAPI_VERSION | 2 +- init.php | 2 ++ lib/PaymentIntent.php | 1 + lib/Service/Tax/AssociationService.php | 27 ++++++++++++++++++++++++++ lib/Service/Tax/TaxServiceFactory.php | 2 ++ lib/Tax/Association.php | 23 ++++++++++++++++++++++ lib/Util/ObjectTypes.php | 1 + 7 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 lib/Service/Tax/AssociationService.php create mode 100644 lib/Tax/Association.php diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c903c3517..0233d4f05 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1126 \ No newline at end of file +v1130 \ No newline at end of file diff --git a/init.php b/init.php index d90169cc4..c47fd0b37 100644 --- a/init.php +++ b/init.php @@ -289,6 +289,7 @@ require __DIR__ . '/lib/Service/SubscriptionItemService.php'; require __DIR__ . '/lib/Service/SubscriptionScheduleService.php'; require __DIR__ . '/lib/Service/SubscriptionService.php'; +require __DIR__ . '/lib/Service/Tax/AssociationService.php'; require __DIR__ . '/lib/Service/Tax/CalculationService.php'; require __DIR__ . '/lib/Service/Tax/FormService.php'; require __DIR__ . '/lib/Service/Tax/RegistrationService.php'; @@ -346,6 +347,7 @@ require __DIR__ . '/lib/Subscription.php'; require __DIR__ . '/lib/SubscriptionItem.php'; require __DIR__ . '/lib/SubscriptionSchedule.php'; +require __DIR__ . '/lib/Tax/Association.php'; require __DIR__ . '/lib/Tax/Calculation.php'; require __DIR__ . '/lib/Tax/CalculationLineItem.php'; require __DIR__ . '/lib/Tax/Form.php'; diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php index 9d6cf0e5b..65ac871fc 100644 --- a/lib/PaymentIntent.php +++ b/lib/PaymentIntent.php @@ -25,6 +25,7 @@ * @property int $amount_received Amount that this PaymentIntent collects. * @property null|string|\Stripe\Application $application ID of the Connect application that created the PaymentIntent. * @property null|int $application_fee_amount The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents use case for connected accounts. + * @property null|\Stripe\StripeObject $async_workflows * @property null|\Stripe\StripeObject $automatic_payment_methods Settings to configure compatible payment methods from the Stripe Dashboard * @property null|int $canceled_at Populated when status is canceled, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. * @property null|string $cancellation_reason Reason for cancellation of this PaymentIntent, either user-provided (duplicate, fraudulent, requested_by_customer, or abandoned) or generated by Stripe internally (failed_invoice, void_invoice, or automatic). diff --git a/lib/Service/Tax/AssociationService.php b/lib/Service/Tax/AssociationService.php new file mode 100644 index 000000000..95307cab5 --- /dev/null +++ b/lib/Service/Tax/AssociationService.php @@ -0,0 +1,27 @@ +request('get', '/v1/tax/associations/find', $params, $opts); + } +} diff --git a/lib/Service/Tax/TaxServiceFactory.php b/lib/Service/Tax/TaxServiceFactory.php index f0f33d853..3965b641f 100644 --- a/lib/Service/Tax/TaxServiceFactory.php +++ b/lib/Service/Tax/TaxServiceFactory.php @@ -7,6 +7,7 @@ /** * Service factory class for API resources in the Tax namespace. * + * @property AssociationService $associations * @property CalculationService $calculations * @property FormService $forms * @property RegistrationService $registrations @@ -19,6 +20,7 @@ class TaxServiceFactory extends \Stripe\Service\AbstractServiceFactory * @var array */ private static $classMap = [ + 'associations' => AssociationService::class, 'calculations' => CalculationService::class, 'forms' => FormService::class, 'registrations' => RegistrationService::class, diff --git a/lib/Tax/Association.php b/lib/Tax/Association.php new file mode 100644 index 000000000..abe07dff7 --- /dev/null +++ b/lib/Tax/Association.php @@ -0,0 +1,23 @@ +Tax Calculation that was included in PaymentIntent. + * @property string $payment_intent The PaymentIntent that this Tax Association is tracking. + * @property string $status Status of the Tax Association. + * @property \Stripe\StripeObject $status_details + */ +class Association extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'tax.association'; + + const STATUS_COMMITTED = 'committed'; + const STATUS_ERRORED = 'errored'; +} diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php index 8fe1b0d05..1daad948c 100644 --- a/lib/Util/ObjectTypes.php +++ b/lib/Util/ObjectTypes.php @@ -129,6 +129,7 @@ class ObjectTypes \Stripe\Subscription::OBJECT_NAME => \Stripe\Subscription::class, \Stripe\SubscriptionItem::OBJECT_NAME => \Stripe\SubscriptionItem::class, \Stripe\SubscriptionSchedule::OBJECT_NAME => \Stripe\SubscriptionSchedule::class, + \Stripe\Tax\Association::OBJECT_NAME => \Stripe\Tax\Association::class, \Stripe\Tax\Calculation::OBJECT_NAME => \Stripe\Tax\Calculation::class, \Stripe\Tax\CalculationLineItem::OBJECT_NAME => \Stripe\Tax\CalculationLineItem::class, \Stripe\Tax\Form::OBJECT_NAME => \Stripe\Tax\Form::class, From bfc436aa166fc687cf079ae68f130402df863618 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 16 Jul 2024 16:46:50 +0000 Subject: [PATCH 06/24] Update generated code for v1131 --- OPENAPI_VERSION | 2 +- lib/Event.php | 4 ++-- lib/Service/EventService.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 0233d4f05..87ed6dbb7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1130 \ No newline at end of file +v1131 \ No newline at end of file diff --git a/lib/Event.php b/lib/Event.php index 50f3eb26c..15b9de1cb 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -595,8 +595,8 @@ public static function all($params = null, $opts = null) } /** - * Retrieves the details of an event. Supply the unique identifier of the event, - * which you might have received in a webhook. + * Retrieves the details of an event if it was created in the last 30 days. Supply + * the unique identifier of the event, which you might have received in a webhook. * * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key * @param null|array|string $opts diff --git a/lib/Service/EventService.php b/lib/Service/EventService.php index 0901293af..7b02e408f 100644 --- a/lib/Service/EventService.php +++ b/lib/Service/EventService.php @@ -30,8 +30,8 @@ public function all($params = null, $opts = null) } /** - * Retrieves the details of an event. Supply the unique identifier of the event, - * which you might have received in a webhook. + * Retrieves the details of an event if it was created in the last 30 days. Supply + * the unique identifier of the event, which you might have received in a webhook. * * @param string $id * @param null|array $params From 2729a68606b7dd47c1d6f6cebffdb144f161cac9 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 16:14:11 +0000 Subject: [PATCH 07/24] Update generated code for v1134 --- OPENAPI_VERSION | 2 +- lib/Terminal/Reader.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 87ed6dbb7..7a33bf614 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1131 \ No newline at end of file +v1134 \ No newline at end of file diff --git a/lib/Terminal/Reader.php b/lib/Terminal/Reader.php index 497fc81bc..97a33ac28 100644 --- a/lib/Terminal/Reader.php +++ b/lib/Terminal/Reader.php @@ -13,7 +13,7 @@ * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|\Stripe\StripeObject $action The most recent action performed by the reader. * @property null|string $device_sw_version The current software version of the reader. - * @property string $device_type Type of reader, one of bbpos_wisepad3, stripe_m2, bbpos_chipper2x, bbpos_wisepos_e, verifone_P400, simulated_wisepos_e, or mobile_phone_reader. + * @property string $device_type Type of reader, one of bbpos_wisepad3, stripe_m2, stripe_s700, bbpos_chipper2x, bbpos_wisepos_e, verifone_P400, simulated_wisepos_e, or mobile_phone_reader. * @property null|string $ip_address The local IP address of the reader. * @property string $label Custom label given to the reader for easier identification. * @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. @@ -34,6 +34,7 @@ class Reader extends \Stripe\ApiResource const DEVICE_TYPE_MOBILE_PHONE_READER = 'mobile_phone_reader'; const DEVICE_TYPE_SIMULATED_WISEPOS_E = 'simulated_wisepos_e'; const DEVICE_TYPE_STRIPE_M2 = 'stripe_m2'; + const DEVICE_TYPE_STRIPE_S700 = 'stripe_s700'; const DEVICE_TYPE_VERIFONE_P400 = 'verifone_P400'; const STATUS_OFFLINE = 'offline'; From 195c9635338d15028bb7a1ae963c389e866b3e5b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 22:47:53 +0000 Subject: [PATCH 08/24] Update generated code for v1135 --- OPENAPI_VERSION | 2 +- lib/Event.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7a33bf614..6e73fe685 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1134 \ No newline at end of file +v1135 \ No newline at end of file diff --git a/lib/Event.php b/lib/Event.php index 15b9de1cb..be9f3f40f 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -179,6 +179,7 @@ class Event extends ApiResource const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed'; const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created'; const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated'; + const ISSUING_DISPUTE_FUNDS_RESCINDED = 'issuing_dispute.funds_rescinded'; const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted'; const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated'; const ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated'; @@ -438,6 +439,7 @@ class Event extends ApiResource const TYPE_ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed'; const TYPE_ISSUING_DISPUTE_CREATED = 'issuing_dispute.created'; const TYPE_ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated'; + const TYPE_ISSUING_DISPUTE_FUNDS_RESCINDED = 'issuing_dispute.funds_rescinded'; const TYPE_ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted'; const TYPE_ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated'; const TYPE_ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated'; From 40ed61f2d0479ff567a53853660c9f867b57208e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:26:59 +0000 Subject: [PATCH 09/24] Update generated code for v1136 --- OPENAPI_VERSION | 2 +- lib/PaymentMethodConfiguration.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6e73fe685..73bccee5b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1135 \ No newline at end of file +v1136 \ No newline at end of file diff --git a/lib/PaymentMethodConfiguration.php b/lib/PaymentMethodConfiguration.php index ec8d60e8d..a3aa25075 100644 --- a/lib/PaymentMethodConfiguration.php +++ b/lib/PaymentMethodConfiguration.php @@ -59,6 +59,7 @@ * @property null|string $parent For child configs, the configuration's parent configuration. * @property null|\Stripe\StripeObject $paynow * @property null|\Stripe\StripeObject $paypal + * @property null|\Stripe\StripeObject $payto * @property null|\Stripe\StripeObject $promptpay * @property null|\Stripe\StripeObject $revolut_pay * @property null|\Stripe\StripeObject $sepa_debit From 5f20a9ab1f544bc32130ba25cf49346fa01b015a Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 15:54:23 -0400 Subject: [PATCH 10/24] Update generated code (#1724) * Update generated code for v1126 * Update generated code for v1131 * Update generated code for v1134 * Update generated code for v1135 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- lib/Event.php | 6 ++++-- lib/Identity/VerificationReport.php | 2 +- lib/PaymentMethodDomain.php | 2 +- lib/Service/EventService.php | 4 ++-- lib/Terminal/Reader.php | 3 ++- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index af6e36838..6e73fe685 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1123 \ No newline at end of file +v1135 \ No newline at end of file diff --git a/lib/Event.php b/lib/Event.php index 936c8f1a2..e2b38e0e7 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -161,6 +161,7 @@ class Event extends ApiResource const ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed'; const ISSUING_DISPUTE_CREATED = 'issuing_dispute.created'; const ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated'; + const ISSUING_DISPUTE_FUNDS_RESCINDED = 'issuing_dispute.funds_rescinded'; const ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted'; const ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated'; const ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated'; @@ -395,6 +396,7 @@ class Event extends ApiResource const TYPE_ISSUING_DISPUTE_CLOSED = 'issuing_dispute.closed'; const TYPE_ISSUING_DISPUTE_CREATED = 'issuing_dispute.created'; const TYPE_ISSUING_DISPUTE_FUNDS_REINSTATED = 'issuing_dispute.funds_reinstated'; + const TYPE_ISSUING_DISPUTE_FUNDS_RESCINDED = 'issuing_dispute.funds_rescinded'; const TYPE_ISSUING_DISPUTE_SUBMITTED = 'issuing_dispute.submitted'; const TYPE_ISSUING_DISPUTE_UPDATED = 'issuing_dispute.updated'; const TYPE_ISSUING_PERSONALIZATION_DESIGN_ACTIVATED = 'issuing_personalization_design.activated'; @@ -544,8 +546,8 @@ public static function all($params = null, $opts = null) } /** - * Retrieves the details of an event. Supply the unique identifier of the event, - * which you might have received in a webhook. + * Retrieves the details of an event if it was created in the last 30 days. Supply + * the unique identifier of the event, which you might have received in a webhook. * * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key * @param null|array|string $opts diff --git a/lib/Identity/VerificationReport.php b/lib/Identity/VerificationReport.php index 77fa02c68..6ecfa3f0d 100644 --- a/lib/Identity/VerificationReport.php +++ b/lib/Identity/VerificationReport.php @@ -15,7 +15,7 @@ * API. To configure and create VerificationReports, use the * VerificationSession API. * - * Related guides: Accessing verification results. + * Related guide: Accessing verification results. * * @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. diff --git a/lib/PaymentMethodDomain.php b/lib/PaymentMethodDomain.php index 2121adcc0..810ccb4de 100644 --- a/lib/PaymentMethodDomain.php +++ b/lib/PaymentMethodDomain.php @@ -8,7 +8,7 @@ * A payment method domain represents a web domain that you have registered with Stripe. * Stripe Elements use registered payment method domains to control where certain payment methods are shown. * - * Related guides: Payment method domains. + * Related guide: Payment method domains. * * @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. diff --git a/lib/Service/EventService.php b/lib/Service/EventService.php index 0901293af..7b02e408f 100644 --- a/lib/Service/EventService.php +++ b/lib/Service/EventService.php @@ -30,8 +30,8 @@ public function all($params = null, $opts = null) } /** - * Retrieves the details of an event. Supply the unique identifier of the event, - * which you might have received in a webhook. + * Retrieves the details of an event if it was created in the last 30 days. Supply + * the unique identifier of the event, which you might have received in a webhook. * * @param string $id * @param null|array $params diff --git a/lib/Terminal/Reader.php b/lib/Terminal/Reader.php index af2478f18..33953963c 100644 --- a/lib/Terminal/Reader.php +++ b/lib/Terminal/Reader.php @@ -13,7 +13,7 @@ * @property string $object String representing the object's type. Objects of the same type share the same value. * @property null|\Stripe\StripeObject $action The most recent action performed by the reader. * @property null|string $device_sw_version The current software version of the reader. - * @property string $device_type Type of reader, one of bbpos_wisepad3, stripe_m2, bbpos_chipper2x, bbpos_wisepos_e, verifone_P400, simulated_wisepos_e, or mobile_phone_reader. + * @property string $device_type Type of reader, one of bbpos_wisepad3, stripe_m2, stripe_s700, bbpos_chipper2x, bbpos_wisepos_e, verifone_P400, simulated_wisepos_e, or mobile_phone_reader. * @property null|string $ip_address The local IP address of the reader. * @property string $label Custom label given to the reader for easier identification. * @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. @@ -34,6 +34,7 @@ class Reader extends \Stripe\ApiResource const DEVICE_TYPE_MOBILE_PHONE_READER = 'mobile_phone_reader'; const DEVICE_TYPE_SIMULATED_WISEPOS_E = 'simulated_wisepos_e'; const DEVICE_TYPE_STRIPE_M2 = 'stripe_m2'; + const DEVICE_TYPE_STRIPE_S700 = 'stripe_s700'; const DEVICE_TYPE_VERIFONE_P400 = 'verifone_P400'; const STATUS_OFFLINE = 'offline'; From 0ac234d3651ee7bd4c74c0bc867032742506d6dc Mon Sep 17 00:00:00 2001 From: Prathmesh Ranaut Date: Thu, 18 Jul 2024 16:09:01 -0400 Subject: [PATCH 11/24] Bump version to 15.3.0 --- CHANGELOG.md | 6 ++++++ VERSION | 2 +- lib/Stripe.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ab91a7dd..2ccfe8e49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 15.3.0 - 2024-07-18 +* [#1724](https://github.com/stripe/stripe-php/pull/1724) Update generated code + * Add support for new value `issuing_dispute.funds_rescinded` on enum `Event.type` + * Add support for new value `stripe_s700` on enum `Terminal.Reader.device_type` +* [#1722](https://github.com/stripe/stripe-php/pull/1722) Update changelog + ## 15.2.0 - 2024-07-11 * [#1721](https://github.com/stripe/stripe-php/pull/1721) Update generated code * ⚠️ Remove support for values `billing_policy_remote_function_response_invalid`, `billing_policy_remote_function_timeout`, `billing_policy_remote_function_unexpected_status_code`, and `billing_policy_remote_function_unreachable` from enum `StripeError.code`. diff --git a/VERSION b/VERSION index 6c43fc8ae..5ff58dbcd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -15.2.0 +15.3.0 diff --git a/lib/Stripe.php b/lib/Stripe.php index 6a3b5a820..7566d7f79 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 = '15.2.0'; + const VERSION = '15.3.0'; /** * @return string the API key used for requests From 1d2c14db941c64ea9b68b140a8002b58d878faf6 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 19 Jul 2024 19:08:29 +0000 Subject: [PATCH 12/24] Update generated code for v1137 --- lib/Util/ApiVersion.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Util/ApiVersion.php b/lib/Util/ApiVersion.php index 481a81dcd..59fc3e38e 100644 --- a/lib/Util/ApiVersion.php +++ b/lib/Util/ApiVersion.php @@ -7,5 +7,5 @@ class ApiVersion { const CURRENT = '2024-06-20'; - const PREVIEW = '2024-05-23.preview-v2'; + const PREVIEW = '2024-07-16.preview-v2'; } From 4a635f29052d5fc176e733deed01a027ee6c9c53 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 20:33:23 +0000 Subject: [PATCH 13/24] Update generated code for v1142 --- OPENAPI_VERSION | 2 +- lib/Event.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b4113d3d5..30174a6ce 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1137 \ No newline at end of file +v1142 \ No newline at end of file diff --git a/lib/Event.php b/lib/Event.php index be9f3f40f..e33202e30 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -160,6 +160,7 @@ class Event extends ApiResource const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed'; const INVOICE_FINALIZED = 'invoice.finalized'; const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible'; + const INVOICE_OVERDUE = 'invoice.overdue'; const INVOICE_PAID = 'invoice.paid'; const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required'; const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed'; @@ -169,6 +170,7 @@ class Event extends ApiResource const INVOICE_UPCOMING = 'invoice.upcoming'; const INVOICE_UPDATED = 'invoice.updated'; const INVOICE_VOIDED = 'invoice.voided'; + const INVOICE_WILL_BE_DUE = 'invoice.will_be_due'; const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created'; const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request'; const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated'; @@ -420,6 +422,7 @@ class Event extends ApiResource const TYPE_INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed'; const TYPE_INVOICE_FINALIZED = 'invoice.finalized'; const TYPE_INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible'; + const TYPE_INVOICE_OVERDUE = 'invoice.overdue'; const TYPE_INVOICE_PAID = 'invoice.paid'; const TYPE_INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required'; const TYPE_INVOICE_PAYMENT_FAILED = 'invoice.payment_failed'; @@ -429,6 +432,7 @@ class Event extends ApiResource const TYPE_INVOICE_UPCOMING = 'invoice.upcoming'; const TYPE_INVOICE_UPDATED = 'invoice.updated'; const TYPE_INVOICE_VOIDED = 'invoice.voided'; + const TYPE_INVOICE_WILL_BE_DUE = 'invoice.will_be_due'; const TYPE_ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created'; const TYPE_ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request'; const TYPE_ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated'; From f6f6a40b5ad1fe7a9be6553cef73fd42f6861ea7 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 15:42:05 +0000 Subject: [PATCH 14/24] Update generated code for v1145 --- OPENAPI_VERSION | 2 +- lib/PaymentMethodConfiguration.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 30174a6ce..f48942252 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1142 \ No newline at end of file +v1145 \ No newline at end of file diff --git a/lib/PaymentMethodConfiguration.php b/lib/PaymentMethodConfiguration.php index a3aa25075..6a79b7570 100644 --- a/lib/PaymentMethodConfiguration.php +++ b/lib/PaymentMethodConfiguration.php @@ -65,6 +65,7 @@ * @property null|\Stripe\StripeObject $sepa_debit * @property null|\Stripe\StripeObject $sofort * @property null|\Stripe\StripeObject $swish + * @property null|\Stripe\StripeObject $twint * @property null|\Stripe\StripeObject $us_bank_account * @property null|\Stripe\StripeObject $wechat_pay * @property null|\Stripe\StripeObject $zip From 50de3faa2e401e4c4299bbe0de5185bf8f3784b4 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 19:16:00 +0000 Subject: [PATCH 15/24] Update generated code for v1146 --- OPENAPI_VERSION | 2 +- lib/PaymentIntent.php | 2 +- lib/QuotePreviewInvoice.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f48942252..75148fdcc 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1145 \ No newline at end of file +v1146 \ No newline at end of file diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php index 65ac871fc..ec2dffcc6 100644 --- a/lib/PaymentIntent.php +++ b/lib/PaymentIntent.php @@ -38,7 +38,7 @@ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|string|\Stripe\Invoice $invoice ID of the invoice that created this PaymentIntent, if it exists. * @property null|\Stripe\StripeObject $last_payment_error The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. - * @property null|string|\Stripe\Charge $latest_charge The latest charge created by this PaymentIntent. + * @property null|string|\Stripe\Charge $latest_charge ID of the latest Charge object created by this PaymentIntent. This property is null until PaymentIntent confirmation is attempted. * @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. Learn more about storing information in metadata. * @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. diff --git a/lib/QuotePreviewInvoice.php b/lib/QuotePreviewInvoice.php index 5c04178f4..bd1024f35 100644 --- a/lib/QuotePreviewInvoice.php +++ b/lib/QuotePreviewInvoice.php @@ -105,7 +105,7 @@ * @property null|string $statement_descriptor Extra information about an invoice for the customer's credit card statement. * @property null|string $status The status of the invoice, one of draft, open, paid, uncollectible, or void. Learn more * @property \Stripe\StripeObject $status_transitions - * @property null|string|\Stripe\Subscription $subscription The subscription that this invoice was prepared for, if any. + * @property null|string|\Stripe\Subscription $subscription * @property null|\Stripe\StripeObject $subscription_details Details about the subscription that created this invoice. * @property null|int $subscription_proration_date Only set for upcoming invoices that preview prorations. The time used to calculate prorations. * @property int $subtotal Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated From 12fe479a6f4373665938f2b4fa95d2fbbe1d8e80 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 20:32:00 +0000 Subject: [PATCH 16/24] Update generated code for v1148 --- OPENAPI_VERSION | 2 +- lib/Treasury/FinancialAccount.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 75148fdcc..e35e17cbb 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1146 \ No newline at end of file +v1148 \ No newline at end of file diff --git a/lib/Treasury/FinancialAccount.php b/lib/Treasury/FinancialAccount.php index f72f533ea..0cccf05d3 100644 --- a/lib/Treasury/FinancialAccount.php +++ b/lib/Treasury/FinancialAccount.php @@ -14,6 +14,7 @@ * @property \Stripe\StripeObject $balance Balance information for the FinancialAccount * @property string $country Two-letter country code (ISO 3166-1 alpha-2). * @property int $created Time at which the object was created. Measured in seconds since the Unix epoch. + * @property null|string $display_name The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the nickname field, display_name is not internal metadata and will be exposed to connected accounts. * @property null|\Stripe\Treasury\FinancialAccountFeatures $features Encodes whether a FinancialAccount has access to a particular Feature, with a status enum and associated status_details. Stripe or the platform can control Features via the requested field. * @property \Stripe\StripeObject[] $financial_addresses The set of credentials that resolve to a FinancialAccount. * @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 7ba35ffb2a6e41a19f5cf65f78c05ef73a04bd64 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 19:05:13 +0000 Subject: [PATCH 17/24] Update generated code for v1150 --- OPENAPI_VERSION | 2 +- lib/AccountNotice.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e35e17cbb..7bce358ae 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1148 \ No newline at end of file +v1150 \ No newline at end of file diff --git a/lib/AccountNotice.php b/lib/AccountNotice.php index 5727b59f3..94e1571a1 100644 --- a/lib/AccountNotice.php +++ b/lib/AccountNotice.php @@ -27,6 +27,9 @@ class AccountNotice extends ApiResource use ApiOperations\Update; const REASON_ISSUING_ACCOUNT_CLOSED_FOR_INACTIVITY = 'issuing.account_closed_for_inactivity'; + const REASON_ISSUING_ACCOUNT_CLOSED_FOR_NOT_PROVIDING_BUSINESS_MODEL_CLARIFICATION = 'issuing.account_closed_for_not_providing_business_model_clarification'; + const REASON_ISSUING_ACCOUNT_CLOSED_FOR_NOT_PROVIDING_URL_CLARIFICATION = 'issuing.account_closed_for_not_providing_url_clarification'; + const REASON_ISSUING_ACCOUNT_CLOSED_FOR_NOT_PROVIDING_USE_CASE_CLARIFICATION = 'issuing.account_closed_for_not_providing_use_case_clarification'; const REASON_ISSUING_ACCOUNT_CLOSED_FOR_TERMS_OF_SERVICE_VIOLATION = 'issuing.account_closed_for_terms_of_service_violation'; const REASON_ISSUING_APPLICATION_REJECTED_FOR_FAILURE_TO_VERIFY = 'issuing.application_rejected_for_failure_to_verify'; const REASON_ISSUING_CREDIT_APPLICATION_REJECTED = 'issuing.credit_application_rejected'; From f55dab987f6ac9e4f1e485f3d8a9709357e3eb2c Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 00:32:05 +0000 Subject: [PATCH 18/24] Update generated code for v1151 --- OPENAPI_VERSION | 2 +- lib/InvoicePayment.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 7bce358ae..a1e778629 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1150 \ No newline at end of file +v1151 \ No newline at end of file diff --git a/lib/InvoicePayment.php b/lib/InvoicePayment.php index bee30277b..f097437fe 100644 --- a/lib/InvoicePayment.php +++ b/lib/InvoicePayment.php @@ -12,13 +12,12 @@ * @property null|int $amount_overpaid Excess payment that was received for this invoice and credited to the customer’s invoice_credit_balance. This field is null until the payment is paid. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more. * @property null|int $amount_paid Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is paid. This amount can be less than the amount_requested if the PaymentIntent’s amount_received is not sufficient to pay all of the invoices that it is attached to. * @property int $amount_requested Amount intended to be paid toward this invoice, in cents (or local equivalent) - * @property null|string|\Stripe\Charge $charge ID of the successful charge for this payment. This field is null when the payment is open or canceled. * @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 string|\Stripe\Invoice $invoice The invoice that was paid. * @property null|bool $is_default Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s amount_remaining. The PaymentIntent associated with the default payment can’t be edited or canceled directly. * @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|string|\Stripe\PaymentIntent $payment_intent ID of the PaymentIntent associated with this payment. Note: This property is only populated for invoices finalized on or after March 15th, 2019. + * @property \Stripe\StripeObject $payment * @property string $status The status of the payment, one of open, paid, or canceled. * @property \Stripe\StripeObject $status_transitions */ From afe5dce29e1be9ff7be415382cbf221964bddc66 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 00:45:23 +0000 Subject: [PATCH 19/24] Update generated code for v1152 --- OPENAPI_VERSION | 2 +- init.php | 3 + lib/Billing/Alert.php | 135 ++++++++++++++++++ lib/Billing/AlertTriggered.php | 18 +++ lib/Event.php | 1 + lib/Service/Billing/AlertService.php | 107 ++++++++++++++ lib/Service/Billing/BillingServiceFactory.php | 2 + lib/Util/ObjectTypes.php | 2 + 8 files changed, 269 insertions(+), 1 deletion(-) create mode 100644 lib/Billing/Alert.php create mode 100644 lib/Billing/AlertTriggered.php create mode 100644 lib/Service/Billing/AlertService.php diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index a1e778629..3be20c394 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1151 \ No newline at end of file +v1152 \ No newline at end of file diff --git a/init.php b/init.php index c47fd0b37..8b12bca38 100644 --- a/init.php +++ b/init.php @@ -94,6 +94,8 @@ require __DIR__ . '/lib/Balance.php'; require __DIR__ . '/lib/BalanceTransaction.php'; require __DIR__ . '/lib/BankAccount.php'; +require __DIR__ . '/lib/Billing/Alert.php'; +require __DIR__ . '/lib/Billing/AlertTriggered.php'; require __DIR__ . '/lib/Billing/Meter.php'; require __DIR__ . '/lib/Billing/MeterEvent.php'; require __DIR__ . '/lib/Billing/MeterEventAdjustment.php'; @@ -197,6 +199,7 @@ require __DIR__ . '/lib/Service/Apps/SecretService.php'; require __DIR__ . '/lib/Service/BalanceService.php'; require __DIR__ . '/lib/Service/BalanceTransactionService.php'; +require __DIR__ . '/lib/Service/Billing/AlertService.php'; require __DIR__ . '/lib/Service/Billing/BillingServiceFactory.php'; require __DIR__ . '/lib/Service/Billing/MeterEventAdjustmentService.php'; require __DIR__ . '/lib/Service/Billing/MeterEventService.php'; diff --git a/lib/Billing/Alert.php b/lib/Billing/Alert.php new file mode 100644 index 000000000..5846efb1a --- /dev/null +++ b/lib/Billing/Alert.php @@ -0,0 +1,135 @@ +customer. + * @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|string $status Status of the alert. This can be active, inactive or archived. + * @property string $title Title of the alert. + * @property null|\Stripe\StripeObject $usage_threshold_config Encapsulates configuration of the alert to monitor usage on a specific Billing Meter. + */ +class Alert extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'billing.alert'; + + const STATUS_ACTIVE = 'active'; + const STATUS_ARCHIVED = 'archived'; + const STATUS_INACTIVE = 'inactive'; + + /** + * Creates a billing alert. + * + * @param null|array $params + * @param null|array|string $options + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Billing\Alert the created resource + */ + public static function create($params = null, $options = null) + { + self::_validateParams($params); + $url = static::classUrl(); + + list($response, $opts) = static::_staticRequest('post', $url, $params, $options); + $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + + /** + * Lists billing active and inactive alerts. + * + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection<\Stripe\Billing\Alert> of ApiResources + */ + public static function all($params = null, $opts = null) + { + $url = static::classUrl(); + + return static::_requestPage($url, \Stripe\Collection::class, $params, $opts); + } + + /** + * Retrieves a billing alert given an ID. + * + * @param array|string $id the ID of the API resource to retrieve, or an options array containing an `id` key + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Billing\Alert + */ + public static function retrieve($id, $opts = null) + { + $opts = \Stripe\Util\RequestOptions::parse($opts); + $instance = new static($id, $opts); + $instance->refresh(); + + return $instance; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Billing\Alert the activated alert + */ + public function activate($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/activate'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Billing\Alert the archived alert + */ + public function archive($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/archive'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } + + /** + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Billing\Alert the deactivated alert + */ + public function deactivate($params = null, $opts = null) + { + $url = $this->instanceUrl() . '/deactivate'; + list($response, $opts) = $this->_request('post', $url, $params, $opts); + $this->refreshFrom($response, $opts); + + return $this; + } +} diff --git a/lib/Billing/AlertTriggered.php b/lib/Billing/AlertTriggered.php new file mode 100644 index 000000000..04bae44d0 --- /dev/null +++ b/lib/Billing/AlertTriggered.php @@ -0,0 +1,18 @@ +true if the object exists in live mode or the value false if the object exists in test mode. + * @property int $value The value triggering the alert + */ +class AlertTriggered extends \Stripe\ApiResource +{ + const OBJECT_NAME = 'billing.alert_triggered'; +} diff --git a/lib/Event.php b/lib/Event.php index e33202e30..d4492eaaa 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -67,6 +67,7 @@ class Event extends ApiResource const APPLICATION_FEE_REFUNDED = 'application_fee.refunded'; const APPLICATION_FEE_REFUND_UPDATED = 'application_fee.refund.updated'; const BALANCE_AVAILABLE = 'balance.available'; + const BILLING_ALERT_TRIGGERED = 'billing.alert.triggered'; const BILLING_PORTAL_CONFIGURATION_CREATED = 'billing_portal.configuration.created'; const BILLING_PORTAL_CONFIGURATION_UPDATED = 'billing_portal.configuration.updated'; const BILLING_PORTAL_SESSION_CREATED = 'billing_portal.session.created'; diff --git a/lib/Service/Billing/AlertService.php b/lib/Service/Billing/AlertService.php new file mode 100644 index 000000000..8baafb1bf --- /dev/null +++ b/lib/Service/Billing/AlertService.php @@ -0,0 +1,107 @@ +request('post', $this->buildPath('/v1/billing/alerts/%s/activate', $id), $params, $opts); + } + + /** + * Lists billing active and inactive alerts. + * + * @param null|array $params + * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Collection<\Stripe\Billing\Alert> + */ + public function all($params = null, $opts = null) + { + return $this->requestCollection('get', '/v1/billing/alerts', $params, $opts); + } + + /** + * Archives this alert, removing it from the list view and APIs. This is + * non-reversible. + * + * @param string $id + * @param null|array $params + * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Billing\Alert + */ + public function archive($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/billing/alerts/%s/archive', $id), $params, $opts); + } + + /** + * Creates a billing alert. + * + * @param null|array $params + * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Billing\Alert + */ + public function create($params = null, $opts = null) + { + return $this->request('post', '/v1/billing/alerts', $params, $opts); + } + + /** + * Deactivates this alert, preventing it from triggering. + * + * @param string $id + * @param null|array $params + * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Billing\Alert + */ + public function deactivate($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/billing/alerts/%s/deactivate', $id), $params, $opts); + } + + /** + * Retrieves a billing alert given an ID. + * + * @param string $id + * @param null|array $params + * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Billing\Alert + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/billing/alerts/%s', $id), $params, $opts); + } +} diff --git a/lib/Service/Billing/BillingServiceFactory.php b/lib/Service/Billing/BillingServiceFactory.php index 234dd822c..809febe62 100644 --- a/lib/Service/Billing/BillingServiceFactory.php +++ b/lib/Service/Billing/BillingServiceFactory.php @@ -7,6 +7,7 @@ /** * Service factory class for API resources in the Billing namespace. * + * @property AlertService $alerts * @property MeterEventAdjustmentService $meterEventAdjustments * @property MeterEventService $meterEvents * @property MeterService $meters @@ -17,6 +18,7 @@ class BillingServiceFactory extends \Stripe\Service\AbstractServiceFactory * @var array */ private static $classMap = [ + 'alerts' => AlertService::class, 'meterEventAdjustments' => MeterEventAdjustmentService::class, 'meterEvents' => MeterEventService::class, 'meters' => MeterService::class, diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php index 1daad948c..d679a96db 100644 --- a/lib/Util/ObjectTypes.php +++ b/lib/Util/ObjectTypes.php @@ -26,6 +26,8 @@ class ObjectTypes \Stripe\Balance::OBJECT_NAME => \Stripe\Balance::class, \Stripe\BalanceTransaction::OBJECT_NAME => \Stripe\BalanceTransaction::class, \Stripe\BankAccount::OBJECT_NAME => \Stripe\BankAccount::class, + \Stripe\Billing\Alert::OBJECT_NAME => \Stripe\Billing\Alert::class, + \Stripe\Billing\AlertTriggered::OBJECT_NAME => \Stripe\Billing\AlertTriggered::class, \Stripe\Billing\Meter::OBJECT_NAME => \Stripe\Billing\Meter::class, \Stripe\Billing\MeterEvent::OBJECT_NAME => \Stripe\Billing\MeterEvent::class, \Stripe\Billing\MeterEventAdjustment::OBJECT_NAME => \Stripe\Billing\MeterEventAdjustment::class, From debbe8f08f4e89a13693e8ebf687514e7a360f7d Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 12:46:31 +0000 Subject: [PATCH 20/24] Update generated code for v1153 --- OPENAPI_VERSION | 2 +- lib/Tax/Calculation.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3be20c394..72ea0eb4a 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1152 \ No newline at end of file +v1153 \ No newline at end of file diff --git a/lib/Tax/Calculation.php b/lib/Tax/Calculation.php index d9155267d..26d9890ad 100644 --- a/lib/Tax/Calculation.php +++ b/lib/Tax/Calculation.php @@ -11,7 +11,7 @@ * * @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. - * @property int $amount_total Total after taxes. + * @property int $amount_total Total amount after taxes in the smallest currency unit. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|string $customer The ID of an existing Customer used for the resource. * @property \Stripe\StripeObject $customer_details From d2855468aff1abf4bbc951cc480423a7cb3f14bd Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 15:11:18 +0000 Subject: [PATCH 21/24] Update generated code for v1154 --- OPENAPI_VERSION | 2 +- lib/Checkout/Session.php | 25 +++++++++++++++++++++++++ lib/Service/Checkout/SessionService.php | 16 ++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 72ea0eb4a..793cc6975 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1153 \ No newline at end of file +v1154 \ No newline at end of file diff --git a/lib/Checkout/Session.php b/lib/Checkout/Session.php index b66c1ead8..d2a05afc1 100644 --- a/lib/Checkout/Session.php +++ b/lib/Checkout/Session.php @@ -80,6 +80,8 @@ class Session extends \Stripe\ApiResource { const OBJECT_NAME = 'checkout.session'; + use \Stripe\ApiOperations\Update; + const BILLING_ADDRESS_COLLECTION_AUTO = 'auto'; const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required'; @@ -171,6 +173,29 @@ public static function retrieve($id, $opts = null) return $instance; } + /** + * Updates a Session object. + * + * @param string $id the ID of the resource to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Checkout\Session the updated resource + */ + public static function update($id, $params = null, $opts = null) + { + self::_validateParams($params); + $url = static::resourceUrl($id); + + list($response, $opts) = static::_staticRequest('post', $url, $params, $opts); + $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + /** * @param null|array $params * @param null|array|string $opts diff --git a/lib/Service/Checkout/SessionService.php b/lib/Service/Checkout/SessionService.php index bed354656..c419a5050 100644 --- a/lib/Service/Checkout/SessionService.php +++ b/lib/Service/Checkout/SessionService.php @@ -93,4 +93,20 @@ public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/checkout/sessions/%s', $id), $params, $opts); } + + /** + * Updates a Session object. + * + * @param string $id + * @param null|array $params + * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Checkout\Session + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/checkout/sessions/%s', $id), $params, $opts); + } } From 7e6e4d5dc3b2d3d4e57f4d0c168482f1f7ea8bcc Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 13:34:14 -0700 Subject: [PATCH 22/24] Update generated code (#1726) * Update generated code for v1137 * Update generated code for v1142 * Update generated code for v1145 * Update generated code for v1146 * Update generated code for v1153 * Update generated code for v1154 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- lib/Checkout/Session.php | 25 +++++++++++++++++++++++++ lib/Event.php | 4 ++++ lib/PaymentIntent.php | 2 +- lib/PaymentMethodConfiguration.php | 1 + lib/Refund.php | 2 +- lib/Service/Checkout/SessionService.php | 16 ++++++++++++++++ lib/Service/RefundService.php | 2 +- lib/Tax/Calculation.php | 2 +- 9 files changed, 51 insertions(+), 5 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6e73fe685..793cc6975 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1135 \ No newline at end of file +v1154 \ No newline at end of file diff --git a/lib/Checkout/Session.php b/lib/Checkout/Session.php index b66c1ead8..d2a05afc1 100644 --- a/lib/Checkout/Session.php +++ b/lib/Checkout/Session.php @@ -80,6 +80,8 @@ class Session extends \Stripe\ApiResource { const OBJECT_NAME = 'checkout.session'; + use \Stripe\ApiOperations\Update; + const BILLING_ADDRESS_COLLECTION_AUTO = 'auto'; const BILLING_ADDRESS_COLLECTION_REQUIRED = 'required'; @@ -171,6 +173,29 @@ public static function retrieve($id, $opts = null) return $instance; } + /** + * Updates a Session object. + * + * @param string $id the ID of the resource to update + * @param null|array $params + * @param null|array|string $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Checkout\Session the updated resource + */ + public static function update($id, $params = null, $opts = null) + { + self::_validateParams($params); + $url = static::resourceUrl($id); + + list($response, $opts) = static::_staticRequest('post', $url, $params, $opts); + $obj = \Stripe\Util\Util::convertToStripeObject($response->json, $opts); + $obj->setLastResponse($response); + + return $obj; + } + /** * @param null|array $params * @param null|array|string $opts diff --git a/lib/Event.php b/lib/Event.php index e2b38e0e7..f9f8fd74c 100644 --- a/lib/Event.php +++ b/lib/Event.php @@ -143,6 +143,7 @@ class Event extends ApiResource const INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed'; const INVOICE_FINALIZED = 'invoice.finalized'; const INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible'; + const INVOICE_OVERDUE = 'invoice.overdue'; const INVOICE_PAID = 'invoice.paid'; const INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required'; const INVOICE_PAYMENT_FAILED = 'invoice.payment_failed'; @@ -151,6 +152,7 @@ class Event extends ApiResource const INVOICE_UPCOMING = 'invoice.upcoming'; const INVOICE_UPDATED = 'invoice.updated'; const INVOICE_VOIDED = 'invoice.voided'; + const INVOICE_WILL_BE_DUE = 'invoice.will_be_due'; const ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created'; const ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request'; const ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated'; @@ -378,6 +380,7 @@ class Event extends ApiResource const TYPE_INVOICE_FINALIZATION_FAILED = 'invoice.finalization_failed'; const TYPE_INVOICE_FINALIZED = 'invoice.finalized'; const TYPE_INVOICE_MARKED_UNCOLLECTIBLE = 'invoice.marked_uncollectible'; + const TYPE_INVOICE_OVERDUE = 'invoice.overdue'; const TYPE_INVOICE_PAID = 'invoice.paid'; const TYPE_INVOICE_PAYMENT_ACTION_REQUIRED = 'invoice.payment_action_required'; const TYPE_INVOICE_PAYMENT_FAILED = 'invoice.payment_failed'; @@ -386,6 +389,7 @@ class Event extends ApiResource const TYPE_INVOICE_UPCOMING = 'invoice.upcoming'; const TYPE_INVOICE_UPDATED = 'invoice.updated'; const TYPE_INVOICE_VOIDED = 'invoice.voided'; + const TYPE_INVOICE_WILL_BE_DUE = 'invoice.will_be_due'; const TYPE_ISSUING_AUTHORIZATION_CREATED = 'issuing_authorization.created'; const TYPE_ISSUING_AUTHORIZATION_REQUEST = 'issuing_authorization.request'; const TYPE_ISSUING_AUTHORIZATION_UPDATED = 'issuing_authorization.updated'; diff --git a/lib/PaymentIntent.php b/lib/PaymentIntent.php index b5fc22a58..975c5bcfd 100644 --- a/lib/PaymentIntent.php +++ b/lib/PaymentIntent.php @@ -37,7 +37,7 @@ * @property null|string $description An arbitrary string attached to the object. Often useful for displaying to users. * @property null|string|\Stripe\Invoice $invoice ID of the invoice that created this PaymentIntent, if it exists. * @property null|\Stripe\StripeObject $last_payment_error The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. - * @property null|string|\Stripe\Charge $latest_charge The latest charge created by this PaymentIntent. + * @property null|string|\Stripe\Charge $latest_charge ID of the latest Charge object created by this PaymentIntent. This property is null until PaymentIntent confirmation is attempted. * @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. Learn more about storing information in metadata. * @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. diff --git a/lib/PaymentMethodConfiguration.php b/lib/PaymentMethodConfiguration.php index ec8d60e8d..172efb52b 100644 --- a/lib/PaymentMethodConfiguration.php +++ b/lib/PaymentMethodConfiguration.php @@ -64,6 +64,7 @@ * @property null|\Stripe\StripeObject $sepa_debit * @property null|\Stripe\StripeObject $sofort * @property null|\Stripe\StripeObject $swish + * @property null|\Stripe\StripeObject $twint * @property null|\Stripe\StripeObject $us_bank_account * @property null|\Stripe\StripeObject $wechat_pay * @property null|\Stripe\StripeObject $zip diff --git a/lib/Refund.php b/lib/Refund.php index 039d3b602..9e59f8c68 100644 --- a/lib/Refund.php +++ b/lib/Refund.php @@ -89,7 +89,7 @@ public static function create($params = null, $options = null) /** * Returns a list of all refunds you created. We return the refunds in sorted - * order, with the most recent refunds appearing first The 10 most recent refunds + * order, with the most recent refunds appearing first. The 10 most recent refunds * are always available by default on the Charge object. * * @param null|array $params diff --git a/lib/Service/Checkout/SessionService.php b/lib/Service/Checkout/SessionService.php index bed354656..c419a5050 100644 --- a/lib/Service/Checkout/SessionService.php +++ b/lib/Service/Checkout/SessionService.php @@ -93,4 +93,20 @@ public function retrieve($id, $params = null, $opts = null) { return $this->request('get', $this->buildPath('/v1/checkout/sessions/%s', $id), $params, $opts); } + + /** + * Updates a Session object. + * + * @param string $id + * @param null|array $params + * @param null|RequestOptionsArray|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\Checkout\Session + */ + public function update($id, $params = null, $opts = null) + { + return $this->request('post', $this->buildPath('/v1/checkout/sessions/%s', $id), $params, $opts); + } } diff --git a/lib/Service/RefundService.php b/lib/Service/RefundService.php index d8dcef2be..f86b20905 100644 --- a/lib/Service/RefundService.php +++ b/lib/Service/RefundService.php @@ -12,7 +12,7 @@ class RefundService extends \Stripe\Service\AbstractService { /** * Returns a list of all refunds you created. We return the refunds in sorted - * order, with the most recent refunds appearing first The 10 most recent refunds + * order, with the most recent refunds appearing first. The 10 most recent refunds * are always available by default on the Charge object. * * @param null|array $params diff --git a/lib/Tax/Calculation.php b/lib/Tax/Calculation.php index d9155267d..26d9890ad 100644 --- a/lib/Tax/Calculation.php +++ b/lib/Tax/Calculation.php @@ -11,7 +11,7 @@ * * @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. - * @property int $amount_total Total after taxes. + * @property int $amount_total Total amount after taxes in the smallest currency unit. * @property string $currency Three-letter ISO currency code, in lowercase. Must be a supported currency. * @property null|string $customer The ID of an existing Customer used for the resource. * @property \Stripe\StripeObject $customer_details From 13581553ea8725b9d0cfff93d24462c4149abec9 Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Thu, 25 Jul 2024 14:00:20 -0700 Subject: [PATCH 23/24] Bump version to 15.4.0 --- CHANGELOG.md | 6 ++++++ VERSION | 2 +- lib/Stripe.php | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ccfe8e49..1426b3460 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 15.4.0 - 2024-07-25 +* [#1726](https://github.com/stripe/stripe-php/pull/1726) Update generated code + * Add support for `update` method on resource `Checkout.Session` + * Add support for new values `invoice.overdue` and `invoice.will_be_due` on enum `Event.type` + * Add support for `twint` on `PaymentMethodConfiguration` + ## 15.3.0 - 2024-07-18 * [#1724](https://github.com/stripe/stripe-php/pull/1724) Update generated code * Add support for new value `issuing_dispute.funds_rescinded` on enum `Event.type` diff --git a/VERSION b/VERSION index 5ff58dbcd..c915b5db7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -15.3.0 +15.4.0 diff --git a/lib/Stripe.php b/lib/Stripe.php index 7566d7f79..6c4bf4c38 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 = '15.3.0'; + const VERSION = '15.4.0'; /** * @return string the API key used for requests From 30e8e4bf461bbcd290c967cfe1e394f2f238f3bb Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 21:13:44 +0000 Subject: [PATCH 24/24] Update generated code for v1157 --- OPENAPI_VERSION | 2 +- lib/Charge.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1b60cdbc5..0560d3ff7 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1156 \ No newline at end of file +v1157 \ No newline at end of file diff --git a/lib/Charge.php b/lib/Charge.php index 7c4a47fdc..5198a9997 100644 --- a/lib/Charge.php +++ b/lib/Charge.php @@ -21,7 +21,7 @@ * @property null|string $authorization_code Authorization code on the charge. * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). * @property \Stripe\StripeObject $billing_details - * @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. + * @property null|string $calculated_statement_descriptor The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This only works for card payments. * @property bool $captured If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. * @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.