diff --git a/CHANGELOG.md b/CHANGELOG.md index 05d788f26..9854c35db 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.6.0-beta.1 - 2023-11-30 * [#1610](https://github.com/stripe/stripe-php/pull/1610) Update generated code for beta diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 23c765cb2..d9f690a6c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v689 \ No newline at end of file +v705 \ 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..be27ae58a 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 @@ -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/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. 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); + } }