From 70c2dc8e03bd9e383491d2a62ef65860f774a5d1 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 20:12:42 +0000 Subject: [PATCH 1/4] Update generated code for v704 --- OPENAPI_VERSION | 2 +- lib/BalanceTransaction.php | 4 +++- lib/Climate/Product.php | 2 +- lib/ErrorObject.php | 2 ++ lib/FinancialConnections/Transaction.php | 2 +- lib/PaymentLink.php | 2 ++ 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 23c765cb2..55d0a33c4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v689 \ No newline at end of file +v704 \ No newline at end of file diff --git a/lib/BalanceTransaction.php b/lib/BalanceTransaction.php index d2e1d9250..c78c0f5ca 100644 --- a/lib/BalanceTransaction.php +++ b/lib/BalanceTransaction.php @@ -24,7 +24,7 @@ * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective. * @property null|string|\Stripe\ApplicationFee|\Stripe\ApplicationFeeRefund|\Stripe\Charge|\Stripe\CustomerCashBalanceTransaction|\Stripe\Dispute|\Stripe\Issuing\Authorization|\Stripe\Issuing\Dispute|\Stripe\Issuing\Transaction|\Stripe\Payout|\Stripe\Refund|\Stripe\StripeObject|\Stripe\Topup|\Stripe\Transfer|\Stripe\TransferReversal $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, climate_order_purchase, climate_order_refund, 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, payment_unreconciled, 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. + * @property string $type Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, climate_order_purchase, climate_order_refund, 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_network_reserve_hold, payment_network_reserve_release, payment_refund, payment_reversal, payment_unreconciled, 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 { @@ -56,6 +56,8 @@ class BalanceTransaction extends ApiResource const TYPE_OBLIGATION_REVERSAL_OUTBOUND = 'obligation_reversal_outbound'; const TYPE_PAYMENT = 'payment'; const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund'; + const TYPE_PAYMENT_NETWORK_RESERVE_HOLD = 'payment_network_reserve_hold'; + const TYPE_PAYMENT_NETWORK_RESERVE_RELEASE = 'payment_network_reserve_release'; const TYPE_PAYMENT_REFUND = 'payment_refund'; const TYPE_PAYMENT_REVERSAL = 'payment_reversal'; const TYPE_PAYMENT_UNRECONCILED = 'payment_unreconciled'; diff --git a/lib/Climate/Product.php b/lib/Climate/Product.php index df2280798..2c33a294c 100644 --- a/lib/Climate/Product.php +++ b/lib/Climate/Product.php @@ -14,7 +14,7 @@ * @property \Stripe\StripeObject $current_prices_per_metric_ton Current prices for a metric ton of carbon removal in a currency's smallest unit. * @property null|int $delivery_year The year in which the carbon removal is expected to be delivered. * @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 $metric_tons_available The quantity of metric tons available for reservation. + * @property string $metric_tons_available The quantity of metric tons available for reservation. * @property string $name The Climate product's name. * @property \Stripe\Climate\Supplier[] $suppliers The carbon removal suppliers that fulfill orders for this Climate product. */ diff --git a/lib/ErrorObject.php b/lib/ErrorObject.php index 28f2ea921..6e94a2041 100644 --- a/lib/ErrorObject.php +++ b/lib/ErrorObject.php @@ -85,10 +85,12 @@ class ErrorObject extends StripeObject const CODE_COUPON_EXPIRED = 'coupon_expired'; const CODE_CUSTOMER_MAX_PAYMENT_METHODS = 'customer_max_payment_methods'; const CODE_CUSTOMER_MAX_SUBSCRIPTIONS = 'customer_max_subscriptions'; + const CODE_CUSTOMER_TAX_LOCATION_INVALID = 'customer_tax_location_invalid'; const CODE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; const CODE_EMAIL_INVALID = 'email_invalid'; const CODE_EXPIRED_CARD = 'expired_card'; const CODE_FINANCIAL_CONNECTIONS_ACCOUNT_INACTIVE = 'financial_connections_account_inactive'; + const CODE_FINANCIAL_CONNECTIONS_NO_SUCCESSFUL_TRANSACTION_REFRESH = 'financial_connections_no_successful_transaction_refresh'; const CODE_GIFT_CARD_BALANCE_INSUFFICIENT = 'gift_card_balance_insufficient'; const CODE_GIFT_CARD_CODE_EXISTS = 'gift_card_code_exists'; const CODE_GIFT_CARD_INACTIVE = 'gift_card_inactive'; diff --git a/lib/FinancialConnections/Transaction.php b/lib/FinancialConnections/Transaction.php index eeea2ebef..42edf5cd6 100644 --- a/lib/FinancialConnections/Transaction.php +++ b/lib/FinancialConnections/Transaction.php @@ -17,7 +17,7 @@ * @property string $status The status of the transaction. * @property \Stripe\StripeObject $status_transitions * @property int $transacted_at Time at which the transaction was transacted. Measured in seconds since the Unix epoch. - * @property string $transaction_refresh The transaction_refresh object that last updated or created this transaction. + * @property string $transaction_refresh The token of the transaction refresh that last updated or created this transaction. * @property int $updated Time at which the object was last updated. Measured in seconds since the Unix epoch. */ class Transaction extends \Stripe\ApiResource diff --git a/lib/PaymentLink.php b/lib/PaymentLink.php index 9064dfccc..c715f59f6 100644 --- a/lib/PaymentLink.php +++ b/lib/PaymentLink.php @@ -26,6 +26,7 @@ * @property \Stripe\StripeObject[] $custom_fields Collect additional information from your customer using custom fields. Up to 2 fields are supported. * @property \Stripe\StripeObject $custom_text * @property string $customer_creation Configuration for Customer creation during checkout. + * @property null|string $inactive_message The custom message to be displayed to a customer when a payment link is no longer active. * @property null|\Stripe\StripeObject $invoice_creation Configuration for creating invoice for payment mode payment links. * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items The line items representing what is being sold. * @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. @@ -35,6 +36,7 @@ * @property string $payment_method_collection Configuration for collecting a payment method during checkout. * @property null|string[] $payment_method_types The list of payment method types that customers can use. When null, Stripe will dynamically show relevant payment methods you've enabled in your payment method settings. * @property \Stripe\StripeObject $phone_number_collection + * @property null|\Stripe\StripeObject $restrictions Settings that restrict the usage of a payment link. * @property null|\Stripe\StripeObject $shipping_address_collection Configuration for collecting the customer's shipping address. * @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to the session. * @property string $submit_type Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. From 4ccb6601ef790417881e7cb54259816166f4892e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:04:37 +0000 Subject: [PATCH 2/4] Update generated code for v705 --- OPENAPI_VERSION | 2 +- lib/FinancialConnections/Transaction.php | 1 + .../FinancialConnections/TransactionService.php | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 55d0a33c4..d9f690a6c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v704 \ No newline at end of file +v705 \ No newline at end of file diff --git a/lib/FinancialConnections/Transaction.php b/lib/FinancialConnections/Transaction.php index 42edf5cd6..be27ae58a 100644 --- a/lib/FinancialConnections/Transaction.php +++ b/lib/FinancialConnections/Transaction.php @@ -25,6 +25,7 @@ class Transaction extends \Stripe\ApiResource const OBJECT_NAME = 'financial_connections.transaction'; use \Stripe\ApiOperations\All; + use \Stripe\ApiOperations\Retrieve; const STATUS_PENDING = 'pending'; const STATUS_POSTED = 'posted'; diff --git a/lib/Service/FinancialConnections/TransactionService.php b/lib/Service/FinancialConnections/TransactionService.php index ee010ef07..846662ee6 100644 --- a/lib/Service/FinancialConnections/TransactionService.php +++ b/lib/Service/FinancialConnections/TransactionService.php @@ -20,4 +20,20 @@ public function all($params = null, $opts = null) { return $this->requestCollection('get', '/v1/financial_connections/transactions', $params, $opts); } + + /** + * Retrieves the details of a Financial Connections Transaction. + * + * @param string $id + * @param null|array $params + * @param null|array|\Stripe\Util\RequestOptions $opts + * + * @throws \Stripe\Exception\ApiErrorException if the request fails + * + * @return \Stripe\FinancialConnections\Transaction + */ + public function retrieve($id, $params = null, $opts = null) + { + return $this->request('get', $this->buildPath('/v1/financial_connections/transactions/%s', $id), $params, $opts); + } } From 2d17d0083307089956a8fbb51f189dfdc74f73dd Mon Sep 17 00:00:00 2001 From: "stripe-openapi[bot]" <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 7 Dec 2023 21:06:36 +0000 Subject: [PATCH 3/4] Update generated code (#1613) * Update generated code for v692 * Update generated code for v693 * Update generated code for v694 * Update generated code for v697 * Update generated code for v704 --------- Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Co-authored-by: pakrym-stripe <99349468+pakrym-stripe@users.noreply.github.com> --- OPENAPI_VERSION | 2 +- lib/BalanceTransaction.php | 4 +++- lib/Climate/Product.php | 2 +- lib/ErrorObject.php | 2 ++ lib/PaymentLink.php | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 23c765cb2..55d0a33c4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v689 \ No newline at end of file +v704 \ No newline at end of file diff --git a/lib/BalanceTransaction.php b/lib/BalanceTransaction.php index d2e1d9250..c78c0f5ca 100644 --- a/lib/BalanceTransaction.php +++ b/lib/BalanceTransaction.php @@ -24,7 +24,7 @@ * @property string $reporting_category Learn more about how reporting categories can help you understand balance transactions from an accounting perspective. * @property null|string|\Stripe\ApplicationFee|\Stripe\ApplicationFeeRefund|\Stripe\Charge|\Stripe\CustomerCashBalanceTransaction|\Stripe\Dispute|\Stripe\Issuing\Authorization|\Stripe\Issuing\Dispute|\Stripe\Issuing\Transaction|\Stripe\Payout|\Stripe\Refund|\Stripe\StripeObject|\Stripe\Topup|\Stripe\Transfer|\Stripe\TransferReversal $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, climate_order_purchase, climate_order_refund, 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, payment_unreconciled, 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. + * @property string $type Transaction type: adjustment, advance, advance_funding, anticipation_repayment, application_fee, application_fee_refund, charge, climate_order_purchase, climate_order_refund, 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_network_reserve_hold, payment_network_reserve_release, payment_refund, payment_reversal, payment_unreconciled, 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 { @@ -56,6 +56,8 @@ class BalanceTransaction extends ApiResource const TYPE_OBLIGATION_REVERSAL_OUTBOUND = 'obligation_reversal_outbound'; const TYPE_PAYMENT = 'payment'; const TYPE_PAYMENT_FAILURE_REFUND = 'payment_failure_refund'; + const TYPE_PAYMENT_NETWORK_RESERVE_HOLD = 'payment_network_reserve_hold'; + const TYPE_PAYMENT_NETWORK_RESERVE_RELEASE = 'payment_network_reserve_release'; const TYPE_PAYMENT_REFUND = 'payment_refund'; const TYPE_PAYMENT_REVERSAL = 'payment_reversal'; const TYPE_PAYMENT_UNRECONCILED = 'payment_unreconciled'; diff --git a/lib/Climate/Product.php b/lib/Climate/Product.php index df2280798..2c33a294c 100644 --- a/lib/Climate/Product.php +++ b/lib/Climate/Product.php @@ -14,7 +14,7 @@ * @property \Stripe\StripeObject $current_prices_per_metric_ton Current prices for a metric ton of carbon removal in a currency's smallest unit. * @property null|int $delivery_year The year in which the carbon removal is expected to be delivered. * @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 $metric_tons_available The quantity of metric tons available for reservation. + * @property string $metric_tons_available The quantity of metric tons available for reservation. * @property string $name The Climate product's name. * @property \Stripe\Climate\Supplier[] $suppliers The carbon removal suppliers that fulfill orders for this Climate product. */ diff --git a/lib/ErrorObject.php b/lib/ErrorObject.php index 821a6959d..a4014bdea 100644 --- a/lib/ErrorObject.php +++ b/lib/ErrorObject.php @@ -85,10 +85,12 @@ class ErrorObject extends StripeObject const CODE_COUPON_EXPIRED = 'coupon_expired'; const CODE_CUSTOMER_MAX_PAYMENT_METHODS = 'customer_max_payment_methods'; const CODE_CUSTOMER_MAX_SUBSCRIPTIONS = 'customer_max_subscriptions'; + const CODE_CUSTOMER_TAX_LOCATION_INVALID = 'customer_tax_location_invalid'; const CODE_DEBIT_NOT_AUTHORIZED = 'debit_not_authorized'; const CODE_EMAIL_INVALID = 'email_invalid'; const CODE_EXPIRED_CARD = 'expired_card'; const CODE_FINANCIAL_CONNECTIONS_ACCOUNT_INACTIVE = 'financial_connections_account_inactive'; + const CODE_FINANCIAL_CONNECTIONS_NO_SUCCESSFUL_TRANSACTION_REFRESH = 'financial_connections_no_successful_transaction_refresh'; const CODE_IDEMPOTENCY_KEY_IN_USE = 'idempotency_key_in_use'; const CODE_INCORRECT_ADDRESS = 'incorrect_address'; const CODE_INCORRECT_CVC = 'incorrect_cvc'; diff --git a/lib/PaymentLink.php b/lib/PaymentLink.php index 9064dfccc..c715f59f6 100644 --- a/lib/PaymentLink.php +++ b/lib/PaymentLink.php @@ -26,6 +26,7 @@ * @property \Stripe\StripeObject[] $custom_fields Collect additional information from your customer using custom fields. Up to 2 fields are supported. * @property \Stripe\StripeObject $custom_text * @property string $customer_creation Configuration for Customer creation during checkout. + * @property null|string $inactive_message The custom message to be displayed to a customer when a payment link is no longer active. * @property null|\Stripe\StripeObject $invoice_creation Configuration for creating invoice for payment mode payment links. * @property null|\Stripe\Collection<\Stripe\LineItem> $line_items The line items representing what is being sold. * @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. @@ -35,6 +36,7 @@ * @property string $payment_method_collection Configuration for collecting a payment method during checkout. * @property null|string[] $payment_method_types The list of payment method types that customers can use. When null, Stripe will dynamically show relevant payment methods you've enabled in your payment method settings. * @property \Stripe\StripeObject $phone_number_collection + * @property null|\Stripe\StripeObject $restrictions Settings that restrict the usage of a payment link. * @property null|\Stripe\StripeObject $shipping_address_collection Configuration for collecting the customer's shipping address. * @property \Stripe\StripeObject[] $shipping_options The shipping rate options applied to the session. * @property string $submit_type Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. From 6863bd70637fa1e2c022eceec44b89b7687634a1 Mon Sep 17 00:00:00 2001 From: Pavel Krymets Date: Thu, 7 Dec 2023 13:13:50 -0800 Subject: [PATCH 4/4] Bump version to 13.6.0 --- CHANGELOG.md | 9 +++++++++ VERSION | 2 +- lib/Stripe.php | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d154a1c4f..ce56b5195 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 13.6.0 - 2023-12-07 +* [#1613](https://github.com/stripe/stripe-php/pull/1613) Update generated code + * Add support for new values `customer_tax_location_invalid` and `financial_connections_no_successful_transaction_refresh` on enum `StripeError.code` + * Add support for new values `payment_network_reserve_hold` and `payment_network_reserve_release` on enum `BalanceTransaction.type` + * Remove support for value `various` from enum `Climate.Supplier.removal_pathway` + * Add support for `inactive_message` and `restrictions` on `PaymentLink` +* [#1612](https://github.com/stripe/stripe-php/pull/1612) Report usage of .save and StripeClient + * Reports uses of the deprecated `.save` and of `StripeClient` in `X-Stripe-Client-Telemetry`. (You can disable telemetry via `\Stripe\Stripe::setEnableTelemetry(false);`, see the [README](https://github.com/stripe/stripe-php/blob/master/README.md#telemetry).) + ## 13.5.0 - 2023-11-30 * [#1611](https://github.com/stripe/stripe-php/pull/1611) Update generated code * Add support for new resources `Climate.Order`, `Climate.Product`, and `Climate.Supplier` diff --git a/VERSION b/VERSION index d224e6909..fc9c00c1b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -13.5.0 +13.6.0 diff --git a/lib/Stripe.php b/lib/Stripe.php index cb1d6827e..038fee1c0 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 = '13.5.0'; + const VERSION = '13.6.0'; /** * @return string the API key used for requests