From c4eff2b94ecaa77534e07a1b95f0aa91f8ac3993 Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 16 May 2024 17:59:54 -0400 Subject: [PATCH 1/3] Update generated code (#1694) * Update generated code for v1025 * Update generated code for v1028 * Update generated code for v1029 * Update generated code for v1033 * Update generated code for v1034 * Update generated code for v1035 * Update generated code for v1036 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- lib/ApplicationFee.php | 1 + lib/Invoice.php | 2 +- lib/Issuing/Dispute.php | 22 ++++++++++++++++++++++ lib/Payout.php | 2 ++ lib/Product.php | 2 +- lib/Terminal/Configuration.php | 1 + 7 files changed, 29 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 8ac6a0165..2d336225b 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v1015 \ No newline at end of file +v1036 \ No newline at end of file diff --git a/lib/ApplicationFee.php b/lib/ApplicationFee.php index 81e7f6ac2..468bcfd70 100644 --- a/lib/ApplicationFee.php +++ b/lib/ApplicationFee.php @@ -15,6 +15,7 @@ * @property string|\Stripe\Charge $charge ID of the charge that the application fee was taken from. * @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|\Stripe\StripeObject $fee_source Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. * @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\Charge $originating_transaction ID of the corresponding charge on the platform account, if this fee was the result of a charge using the destination parameter. * @property bool $refunded Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. diff --git a/lib/Invoice.php b/lib/Invoice.php index ee88e83c6..4024fe0b1 100644 --- a/lib/Invoice.php +++ b/lib/Invoice.php @@ -49,7 +49,7 @@ * @property int $amount_shipping This is the sum of all the shipping amounts. * @property null|string|\Stripe\Application $application ID of the Connect Application that created the invoice. * @property null|int $application_fee_amount The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. - * @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. + * @property int $attempt_count Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. * @property bool $attempted Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the invoice.created webhook, for example, so you might not want to display that invoice as unpaid to your users. * @property null|bool $auto_advance Controls whether Stripe performs automatic collection of the invoice. If false, the invoice's state doesn't automatically advance without an explicit action. * @property \Stripe\StripeObject $automatic_tax diff --git a/lib/Issuing/Dispute.php b/lib/Issuing/Dispute.php index aa4c454d5..bc37efe27 100644 --- a/lib/Issuing/Dispute.php +++ b/lib/Issuing/Dispute.php @@ -17,6 +17,7 @@ * @property string $currency The currency the transaction was made in. * @property \Stripe\StripeObject $evidence * @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 $loss_reason The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. * @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 string $status Current status of the dispute. * @property string|\Stripe\Issuing\Transaction $transaction The transaction being disputed. @@ -31,6 +32,27 @@ class Dispute extends \Stripe\ApiResource use \Stripe\ApiOperations\Retrieve; use \Stripe\ApiOperations\Update; + const LOSS_REASON_CARDHOLDER_AUTHENTICATION_ISSUER_LIABILITY = 'cardholder_authentication_issuer_liability'; + const LOSS_REASON_ECI5_TOKEN_TRANSACTION_WITH_TAVV = 'eci5_token_transaction_with_tavv'; + const LOSS_REASON_EXCESS_DISPUTES_IN_TIMEFRAME = 'excess_disputes_in_timeframe'; + const LOSS_REASON_HAS_NOT_MET_THE_MINIMUM_DISPUTE_AMOUNT_REQUIREMENTS = 'has_not_met_the_minimum_dispute_amount_requirements'; + const LOSS_REASON_INVALID_DUPLICATE_DISPUTE = 'invalid_duplicate_dispute'; + const LOSS_REASON_INVALID_INCORRECT_AMOUNT_DISPUTE = 'invalid_incorrect_amount_dispute'; + const LOSS_REASON_INVALID_NO_AUTHORIZATION = 'invalid_no_authorization'; + const LOSS_REASON_INVALID_USE_OF_DISPUTES = 'invalid_use_of_disputes'; + const LOSS_REASON_MERCHANDISE_DELIVERED_OR_SHIPPED = 'merchandise_delivered_or_shipped'; + const LOSS_REASON_MERCHANDISE_OR_SERVICE_AS_DESCRIBED = 'merchandise_or_service_as_described'; + const LOSS_REASON_NOT_CANCELLED = 'not_cancelled'; + const LOSS_REASON_OTHER = 'other'; + const LOSS_REASON_REFUND_ISSUED = 'refund_issued'; + const LOSS_REASON_SUBMITTED_BEYOND_ALLOWABLE_TIME_LIMIT = 'submitted_beyond_allowable_time_limit'; + const LOSS_REASON_TRANSACTION_3DS_REQUIRED = 'transaction_3ds_required'; + const LOSS_REASON_TRANSACTION_APPROVED_AFTER_PRIOR_FRAUD_DISPUTE = 'transaction_approved_after_prior_fraud_dispute'; + const LOSS_REASON_TRANSACTION_AUTHORIZED = 'transaction_authorized'; + const LOSS_REASON_TRANSACTION_ELECTRONICALLY_READ = 'transaction_electronically_read'; + const LOSS_REASON_TRANSACTION_QUALIFIES_FOR_VISA_EASY_PAYMENT_SERVICE = 'transaction_qualifies_for_visa_easy_payment_service'; + const LOSS_REASON_TRANSACTION_UNATTENDED = 'transaction_unattended'; + const STATUS_EXPIRED = 'expired'; const STATUS_LOST = 'lost'; const STATUS_SUBMITTED = 'submitted'; diff --git a/lib/Payout.php b/lib/Payout.php index d04369b2c..2404e1a33 100644 --- a/lib/Payout.php +++ b/lib/Payout.php @@ -17,6 +17,8 @@ * @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 The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. + * @property null|string|\Stripe\ApplicationFee $application_fee The application fee (if any) for the payout. See the Connect documentation for details. + * @property null|int $application_fee_amount The amount of the application fee (if any) requested for the payout. See the Connect documentation for details. * @property int $arrival_date Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. * @property bool $automatic Returns true if the payout is created by an automated payout schedule and false if it's requested manually. * @property null|string|\Stripe\BalanceTransaction $balance_transaction ID of the balance transaction that describes the impact of this payout on your account balance. diff --git a/lib/Product.php b/lib/Product.php index 20931e9c3..df29fbb7a 100644 --- a/lib/Product.php +++ b/lib/Product.php @@ -27,7 +27,7 @@ * @property string $name The product's name, meant to be displayable to the customer. * @property null|\Stripe\StripeObject $package_dimensions The dimensions of this product for shipping purposes. * @property null|bool $shippable Whether this product is shipped (i.e., physical goods). - * @property null|string $statement_descriptor Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. + * @property null|string $statement_descriptor Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. * @property null|string|\Stripe\TaxCode $tax_code A tax code ID. * @property string $type The type of the product. The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans. * @property null|string $unit_label A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. diff --git a/lib/Terminal/Configuration.php b/lib/Terminal/Configuration.php index 318f9b7da..d30ac6712 100644 --- a/lib/Terminal/Configuration.php +++ b/lib/Terminal/Configuration.php @@ -14,6 +14,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|string $name String indicating the name of the Configuration object, set by the user * @property null|\Stripe\StripeObject $offline + * @property null|\Stripe\StripeObject $stripe_s700 * @property null|\Stripe\StripeObject $tipping * @property null|\Stripe\StripeObject $verifone_p400 */ From 697d2222cb4479dabb1989d124c38d400046f2cf Mon Sep 17 00:00:00 2001 From: Prathmesh Ranaut Date: Thu, 16 May 2024 18:20:18 -0400 Subject: [PATCH 2/3] Bump version to 14.7.0 --- CHANGELOG.md | 7 +++++++ VERSION | 2 +- lib/Stripe.php | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59fe84038..6dbbc35e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## 14.7.0 - 2024-05-16 +* [#1694](https://github.com/stripe/stripe-php/pull/1694) Update generated code + * Add support for `fee_source` on `ApplicationFee` + * Add support for `loss_reason` on `Issuing.Dispute` + * Add support for `application_fee_amount` and `application_fee` on `Payout` + * Add support for `stripe_s700` on `Terminal.Configuration` + ## 14.6.0 - 2024-05-09 * [#1692](https://github.com/stripe/stripe-php/pull/1692) Update generated code * Add support for `update` test helper method on resources `Treasury.OutboundPayment` and `Treasury.OutboundTransfer` diff --git a/VERSION b/VERSION index df249f48e..654afc8e1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -14.6.0 +14.7.0 diff --git a/lib/Stripe.php b/lib/Stripe.php index b6c7f73a0..bb893d8bb 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 = '14.6.0'; + const VERSION = '14.7.0'; /** * @return string the API key used for requests From ca075667aec802ed13a51aba6920500974356e2f Mon Sep 17 00:00:00 2001 From: helenye-stripe <111009531+helenye-stripe@users.noreply.github.com> Date: Tue, 21 May 2024 13:01:11 -0700 Subject: [PATCH 3/3] Rename section for object type generation (#1697) --- lib/Util/ObjectTypes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Util/ObjectTypes.php b/lib/Util/ObjectTypes.php index 5246de5eb..4bcda072c 100644 --- a/lib/Util/ObjectTypes.php +++ b/lib/Util/ObjectTypes.php @@ -13,7 +13,7 @@ class ObjectTypes \Stripe\Issuing\CardDetails::OBJECT_NAME => \Stripe\Issuing\CardDetails::class, \Stripe\SearchResult::OBJECT_NAME => \Stripe\SearchResult::class, \Stripe\File::OBJECT_NAME_ALT => \Stripe\File::class, - // The beginning of the section generated from our OpenAPI spec + // object classes: The beginning of the section generated from our OpenAPI spec \Stripe\Account::OBJECT_NAME => \Stripe\Account::class, \Stripe\AccountLink::OBJECT_NAME => \Stripe\AccountLink::class, \Stripe\AccountSession::OBJECT_NAME => \Stripe\AccountSession::class, @@ -147,6 +147,6 @@ class ObjectTypes \Stripe\UsageRecord::OBJECT_NAME => \Stripe\UsageRecord::class, \Stripe\UsageRecordSummary::OBJECT_NAME => \Stripe\UsageRecordSummary::class, \Stripe\WebhookEndpoint::OBJECT_NAME => \Stripe\WebhookEndpoint::class, - // The end of the section generated from our OpenAPI spec + // object classes: The end of the section generated from our OpenAPI spec ]; }