diff --git a/CHANGELOG.md b/CHANGELOG.md index 3affa1d423..614ea5e63a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,23 @@ * Add support for new value `entitlements.active_entitlement_summary.updated` on enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]` * Remove support for value `customer.entitlement_summary.updated` from enums `WebhookEndpointCreateParams.enabled_events[]` and `WebhookEndpointUpdateParams.enabled_events[]` +## 14.22.0 - 2024-03-21 +* [#2040](https://github.com/stripe/stripe-node/pull/2040) Update generated code + * Add support for new resources `ConfirmationToken` and `Forwarding.Request` + * Add support for `retrieve` method on resource `ConfirmationToken` + * Add support for `create`, `list`, and `retrieve` methods on resource `Request` + * Add support for `mobilepay_payments` on `Account.capabilities`, `AccountCreateParams.capabilities`, and `AccountUpdateParams.capabilities` + * Add support for new values `forwarding_api_inactive`, `forwarding_api_invalid_parameter`, `forwarding_api_upstream_connection_error`, and `forwarding_api_upstream_connection_timeout` on enums `Invoice.last_finalization_error.code`, `PaymentIntent.last_payment_error.code`, `SetupAttempt.setup_error.code`, `SetupIntent.last_setup_error.code`, and `StripeError.code` + * Add support for `mobilepay` on `Charge.payment_method_details`, `PaymentIntent.payment_method_options`, `PaymentIntentConfirmParams.payment_method_data`, `PaymentIntentConfirmParams.payment_method_options`, `PaymentIntentCreateParams.payment_method_data`, `PaymentIntentCreateParams.payment_method_options`, `PaymentIntentUpdateParams.payment_method_data`, `PaymentIntentUpdateParams.payment_method_options`, `PaymentMethodCreateParams`, `PaymentMethod`, `SetupIntentConfirmParams.payment_method_data`, `SetupIntentCreateParams.payment_method_data`, and `SetupIntentUpdateParams.payment_method_data` + * Add support for `payment_reference` on `Charge.payment_method_details.us_bank_account` + * Add support for new value `mobilepay` on enums `CustomerListPaymentMethodsParams.type`, `PaymentMethodCreateParams.type`, and `PaymentMethodListParams.type` + * Add support for `confirmation_token` on `PaymentIntentConfirmParams`, `PaymentIntentCreateParams`, `SetupIntentConfirmParams`, and `SetupIntentCreateParams` + * Add support for new value `mobilepay` on enums `PaymentIntentConfirmParams.payment_method_data.type`, `PaymentIntentCreateParams.payment_method_data.type`, `PaymentIntentUpdateParams.payment_method_data.type`, `SetupIntentConfirmParams.payment_method_data.type`, `SetupIntentCreateParams.payment_method_data.type`, and `SetupIntentUpdateParams.payment_method_data.type` + * Add support for new value `mobilepay` on enum `PaymentMethod.type` + * Add support for `name` on `Terminal.ConfigurationCreateParams`, `Terminal.ConfigurationUpdateParams`, and `Terminal.Configuration` + * Add support for `payout` on `Treasury.ReceivedDebit.linked_flows` +* [#2043](https://github.com/stripe/stripe-node/pull/2043) Don't mutate error.type during minification + ## 14.22.0-beta.1 - 2024-03-14 * [#2036](https://github.com/stripe/stripe-node/pull/2036) Update generated code for beta * Add support for new resources `Billing.MeterEventAdjustment`, `Billing.MeterEvent`, and `Billing.Meter` @@ -27,7 +44,7 @@ * Add support for `multibanco` payment method throughout the API. * Add support for `second_line` on `Issuing.PhysicalBundle.features` * Add support for `multibanco_display_details` on `PaymentIntent.next_action` - * Add support for `meter` on `PlanCreateParams`, `Plan`, `Price.recurring`, `PriceCreateParams.recurring`, and `PriceListParams.recurring` + * Add support for `meter` on `PlanCreateParams`, `Plan`, `Price.recurring`, `PriceCreateParams.recurring`, and `PriceListParams.recurring` ## 14.21.0 - 2024-03-14 * [#2035](https://github.com/stripe/stripe-node/pull/2035) Update generated code diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 62a99e0ea9..163a5d3008 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v896 \ No newline at end of file +v897 \ No newline at end of file diff --git a/testProjects/esbuild/index.js b/testProjects/esbuild/index.js index 3ed3c57da2..4840664d5e 100644 --- a/testProjects/esbuild/index.js +++ b/testProjects/esbuild/index.js @@ -2,7 +2,7 @@ import {Stripe} from 'stripe'; import assert from 'assert'; // API key is null to trigger an authentication error -const stripe = new Stripe(null, { +const stripe = new Stripe("i'm not a real key", { host: process.env.STRIPE_MOCK_HOST || 'localhost', port: process.env.STRIPE_MOCK_PORT || 12111, protocol: 'http', @@ -21,6 +21,7 @@ try { async function exampleFunction(args) { try { await stripe.paymentIntents.create(args); + throw new Error('Expected an error'); } catch (e) { assert (e instanceof stripe.errors.StripeAuthenticationError); assert (e.type === 'StripeAuthenticationError'); diff --git a/types/Charges.d.ts b/types/Charges.d.ts index f3ff8744ff..b65d4596b8 100644 --- a/types/Charges.d.ts +++ b/types/Charges.d.ts @@ -2031,6 +2031,11 @@ declare module 'stripe' { */ last4: string | null; + /** + * ID of the mandate used to make this payment. + */ + mandate?: string | Stripe.Mandate; + /** * Reference number to locate ACH payments with customer's bank. */ diff --git a/types/Treasury/InboundTransfers.d.ts b/types/Treasury/InboundTransfers.d.ts index 3464f697ad..f8a84b3646 100644 --- a/types/Treasury/InboundTransfers.d.ts +++ b/types/Treasury/InboundTransfers.d.ts @@ -186,6 +186,11 @@ declare module 'stripe' { */ last4: string | null; + /** + * ID of the mandate used to make this payment. + */ + mandate?: string | Stripe.Mandate; + /** * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. */ diff --git a/types/Treasury/OutboundPayments.d.ts b/types/Treasury/OutboundPayments.d.ts index 106ed79120..d7e7443678 100644 --- a/types/Treasury/OutboundPayments.d.ts +++ b/types/Treasury/OutboundPayments.d.ts @@ -181,6 +181,11 @@ declare module 'stripe' { */ last4: string | null; + /** + * ID of the mandate used to make this payment. + */ + mandate?: string | Stripe.Mandate; + /** * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. */ diff --git a/types/Treasury/OutboundTransfers.d.ts b/types/Treasury/OutboundTransfers.d.ts index 7d8c51d9d0..91ab10df64 100644 --- a/types/Treasury/OutboundTransfers.d.ts +++ b/types/Treasury/OutboundTransfers.d.ts @@ -157,6 +157,11 @@ declare module 'stripe' { */ last4: string | null; + /** + * ID of the mandate used to make this payment. + */ + mandate?: string | Stripe.Mandate; + /** * The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. */