diff --git a/CHANGELOG.md b/CHANGELOG.md index 695d2b1fed..a2942b1d3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## 14.21.0 - 2024-03-14 +* [#2035](https://github.com/stripe/stripe-node/pull/2035) Update generated code + * Add support for new resources `Issuing.PersonalizationDesign` and `Issuing.PhysicalBundle` + * Add support for `create`, `list`, `retrieve`, and `update` methods on resource `PersonalizationDesign` + * Add support for `list` and `retrieve` methods on resource `PhysicalBundle` + * Add support for `personalization_design` on `Issuing.CardCreateParams`, `Issuing.CardListParams`, `Issuing.CardUpdateParams`, and `Issuing.Card` + * Change type of `SubscriptionCreateParams.application_fee_percent` and `SubscriptionUpdateParams.application_fee_percent` from `number` to `emptyStringable(number)` + * Add support for `sepa_debit` on `Subscription.payment_settings.payment_method_options`, `SubscriptionCreateParams.payment_settings.payment_method_options`, and `SubscriptionUpdateParams.payment_settings.payment_method_options` + +## 14.20.0 - 2024-03-07 +* [#2033](https://github.com/stripe/stripe-node/pull/2033) Update generated code + * Add support for `documents` on `AccountSession.components` and `AccountSessionCreateParams.components` + * Add support for `request_three_d_secure` on `Checkout.Session.payment_method_options.card` and `Checkout.SessionCreateParams.payment_method_options.card` + * Add support for `created` on `CreditNoteListParams` + * Add support for `sepa_debit` on `Invoice.payment_settings.payment_method_options`, `InvoiceCreateParams.payment_settings.payment_method_options`, and `InvoiceUpdateParams.payment_settings.payment_method_options` + ## 14.19.0 - 2024-02-29 * [#2029](https://github.com/stripe/stripe-node/pull/2029) Update generated code * Change `Identity.VerificationReport.type`, `SubscriptionSchedule.default_settings.invoice_settings.account_tax_ids`, `SubscriptionSchedule.phases[].invoice_settings.account_tax_ids`, and `TaxId.owner` to be required diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 148e3ec37f..0963e32fcd 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v857 \ No newline at end of file +v878 \ No newline at end of file diff --git a/VERSION b/VERSION index 28c34d2cd8..0edfba1c6f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -14.19.0 +14.21.0 diff --git a/package.json b/package.json index 9512e1e885..f9de73788b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stripe", - "version": "14.19.0", + "version": "14.21.0", "description": "Stripe API wrapper", "keywords": [ "stripe", diff --git a/src/resources.ts b/src/resources.ts index 4e3e18664b..62948b68e1 100644 --- a/src/resources.ts +++ b/src/resources.ts @@ -25,6 +25,9 @@ import {OutboundPayments as TestHelpersTreasuryOutboundPayments} from './resourc import {OutboundPayments as TreasuryOutboundPayments} from './resources/Treasury/OutboundPayments.js'; import {OutboundTransfers as TestHelpersTreasuryOutboundTransfers} from './resources/TestHelpers/Treasury/OutboundTransfers.js'; import {OutboundTransfers as TreasuryOutboundTransfers} from './resources/Treasury/OutboundTransfers.js'; +import {PersonalizationDesigns as TestHelpersIssuingPersonalizationDesigns} from './resources/TestHelpers/Issuing/PersonalizationDesigns.js'; +import {PersonalizationDesigns as IssuingPersonalizationDesigns} from './resources/Issuing/PersonalizationDesigns.js'; +import {PhysicalBundles as IssuingPhysicalBundles} from './resources/Issuing/PhysicalBundles.js'; import {Products as ClimateProducts} from './resources/Climate/Products.js'; import {Readers as TestHelpersTerminalReaders} from './resources/TestHelpers/Terminal/Readers.js'; import {Readers as TerminalReaders} from './resources/Terminal/Readers.js'; @@ -133,6 +136,8 @@ export const Issuing = resourceNamespace('issuing', { Cardholders: IssuingCardholders, Cards: IssuingCards, Disputes: IssuingDisputes, + PersonalizationDesigns: IssuingPersonalizationDesigns, + PhysicalBundles: IssuingPhysicalBundles, Tokens: IssuingTokens, Transactions: IssuingTransactions, }); @@ -167,6 +172,7 @@ export const TestHelpers = resourceNamespace('testHelpers', { Issuing: resourceNamespace('issuing', { Authorizations: TestHelpersIssuingAuthorizations, Cards: TestHelpersIssuingCards, + PersonalizationDesigns: TestHelpersIssuingPersonalizationDesigns, Transactions: TestHelpersIssuingTransactions, }), Terminal: resourceNamespace('terminal', { diff --git a/src/resources/Issuing/PersonalizationDesigns.ts b/src/resources/Issuing/PersonalizationDesigns.ts new file mode 100644 index 0000000000..9974919a82 --- /dev/null +++ b/src/resources/Issuing/PersonalizationDesigns.ts @@ -0,0 +1,23 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const PersonalizationDesigns = StripeResource.extend({ + create: stripeMethod({ + method: 'POST', + fullPath: '/v1/issuing/personalization_designs', + }), + retrieve: stripeMethod({ + method: 'GET', + fullPath: '/v1/issuing/personalization_designs/{personalization_design}', + }), + update: stripeMethod({ + method: 'POST', + fullPath: '/v1/issuing/personalization_designs/{personalization_design}', + }), + list: stripeMethod({ + method: 'GET', + fullPath: '/v1/issuing/personalization_designs', + methodType: 'list', + }), +}); diff --git a/src/resources/Issuing/PhysicalBundles.ts b/src/resources/Issuing/PhysicalBundles.ts new file mode 100644 index 0000000000..bed1ee26ad --- /dev/null +++ b/src/resources/Issuing/PhysicalBundles.ts @@ -0,0 +1,15 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const PhysicalBundles = StripeResource.extend({ + retrieve: stripeMethod({ + method: 'GET', + fullPath: '/v1/issuing/physical_bundles/{physical_bundle}', + }), + list: stripeMethod({ + method: 'GET', + fullPath: '/v1/issuing/physical_bundles', + methodType: 'list', + }), +}); diff --git a/src/resources/TestHelpers/Issuing/PersonalizationDesigns.ts b/src/resources/TestHelpers/Issuing/PersonalizationDesigns.ts new file mode 100644 index 0000000000..1540987b2b --- /dev/null +++ b/src/resources/TestHelpers/Issuing/PersonalizationDesigns.ts @@ -0,0 +1,21 @@ +// File generated from our OpenAPI spec + +import {StripeResource} from '../../../StripeResource.js'; +const stripeMethod = StripeResource.method; +export const PersonalizationDesigns = StripeResource.extend({ + activate: stripeMethod({ + method: 'POST', + fullPath: + '/v1/test_helpers/issuing/personalization_designs/{personalization_design}/activate', + }), + deactivate: stripeMethod({ + method: 'POST', + fullPath: + '/v1/test_helpers/issuing/personalization_designs/{personalization_design}/deactivate', + }), + reject: stripeMethod({ + method: 'POST', + fullPath: + '/v1/test_helpers/issuing/personalization_designs/{personalization_design}/reject', + }), +}); diff --git a/src/stripe.core.ts b/src/stripe.core.ts index 2f3e57e707..cf82b561b0 100644 --- a/src/stripe.core.ts +++ b/src/stripe.core.ts @@ -49,7 +49,7 @@ export function createStripe( platformFunctions: PlatformFunctions, requestSender: RequestSenderFactory = defaultRequestSenderFactory ): typeof Stripe { - Stripe.PACKAGE_VERSION = '14.19.0'; + Stripe.PACKAGE_VERSION = '14.21.0'; Stripe.USER_AGENT = { bindings_version: Stripe.PACKAGE_VERSION, lang: 'node', diff --git a/test/resources/generated_examples_test.spec.js b/test/resources/generated_examples_test.spec.js index 94242fc4ec..ba5d878761 100644 --- a/test/resources/generated_examples_test.spec.js +++ b/test/resources/generated_examples_test.spec.js @@ -742,6 +742,16 @@ describe('Generated tests', function() { expect(cashBalance).not.to.be.null; }); + it('test_customers_cash_balance_transactions_get', async function() { + const customerCashBalanceTransactions = await stripe.customers.listCashBalanceTransactions( + 'cus_123', + { + limit: 3, + } + ); + expect(customerCashBalanceTransactions).not.to.be.null; + }); + it('test_customers_delete', async function() { const deleted = await stripe.customers.del('cus_xxxxxxxxxxxxx'); expect(deleted).not.to.be.null; @@ -1516,6 +1526,46 @@ describe('Generated tests', function() { expect(dispute).not.to.be.null; }); + it('test_issuing_personalization_designs_get', async function() { + const personalizationDesigns = await stripe.issuing.personalizationDesigns.list(); + expect(personalizationDesigns).not.to.be.null; + }); + + it('test_issuing_personalization_designs_get_2', async function() { + const personalizationDesign = await stripe.issuing.personalizationDesigns.retrieve( + 'pd_xyz' + ); + expect(personalizationDesign).not.to.be.null; + }); + + it('test_issuing_personalization_designs_post', async function() { + const personalizationDesign = await stripe.issuing.personalizationDesigns.create( + { + physical_bundle: 'pb_xyz', + } + ); + expect(personalizationDesign).not.to.be.null; + }); + + it('test_issuing_personalization_designs_post_2', async function() { + const personalizationDesign = await stripe.issuing.personalizationDesigns.update( + 'pd_xyz' + ); + expect(personalizationDesign).not.to.be.null; + }); + + it('test_issuing_physical_bundles_get', async function() { + const physicalBundles = await stripe.issuing.physicalBundles.list(); + expect(physicalBundles).not.to.be.null; + }); + + it('test_issuing_physical_bundles_get_2', async function() { + const physicalBundle = await stripe.issuing.physicalBundles.retrieve( + 'pb_xyz' + ); + expect(physicalBundle).not.to.be.null; + }); + it('test_issuing_transactions_get', async function() { const transactions = await stripe.issuing.transactions.list({ limit: 3, @@ -2657,6 +2707,29 @@ describe('Generated tests', function() { expect(taxCode).not.to.be.null; }); + it('test_tax_ids_delete', async function() { + const deleted = await stripe.taxIds.del('taxid_123'); + expect(deleted).not.to.be.null; + }); + + it('test_tax_ids_get', async function() { + const taxIds = await stripe.taxIds.list(); + expect(taxIds).not.to.be.null; + }); + + it('test_tax_ids_get_2', async function() { + const taxId = await stripe.taxIds.retrieve('taxid_123'); + expect(taxId).not.to.be.null; + }); + + it('test_tax_ids_post', async function() { + const taxId = await stripe.taxIds.create({ + type: 'eu_vat', + value: '123', + }); + expect(taxId).not.to.be.null; + }); + it('test_tax_rates_get', async function() { const taxRates = await stripe.taxRates.list({ limit: 3, @@ -3070,6 +3143,32 @@ describe('Generated tests', function() { expect(card).not.to.be.null; }); + it('test_test_helpers_issuing_personalization_designs_activate_post', async function() { + const personalizationDesign = await stripe.testHelpers.issuing.personalizationDesigns.activate( + 'pd_xyz' + ); + expect(personalizationDesign).not.to.be.null; + }); + + it('test_test_helpers_issuing_personalization_designs_deactivate_post', async function() { + const personalizationDesign = await stripe.testHelpers.issuing.personalizationDesigns.deactivate( + 'pd_xyz' + ); + expect(personalizationDesign).not.to.be.null; + }); + + it('test_test_helpers_issuing_personalization_designs_reject_post', async function() { + const personalizationDesign = await stripe.testHelpers.issuing.personalizationDesigns.reject( + 'pd_xyz', + { + rejection_reasons: { + card_logo: ['geographic_location'], + }, + } + ); + expect(personalizationDesign).not.to.be.null; + }); + it('test_test_helpers_issuing_transactions_create_force_capture_post', async function() { const transaction = await stripe.testHelpers.issuing.transactions.createForceCapture( { diff --git a/types/AccountSessions.d.ts b/types/AccountSessions.d.ts index 5b9d458a8c..d4e4d65b4f 100644 --- a/types/AccountSessions.d.ts +++ b/types/AccountSessions.d.ts @@ -48,6 +48,8 @@ declare module 'stripe' { interface Components { account_onboarding: Components.AccountOnboarding; + documents: Components.Documents; + payment_details: Components.PaymentDetails; payments: Components.Payments; @@ -69,6 +71,19 @@ declare module 'stripe' { interface Features {} } + interface Documents { + /** + * Whether the embedded component is enabled. + */ + enabled: boolean; + + features: Documents.Features; + } + + namespace Documents { + interface Features {} + } + interface PaymentDetails { /** * Whether the embedded component is enabled. diff --git a/types/AccountSessionsResource.d.ts b/types/AccountSessionsResource.d.ts index 005e43d56f..1ef28cc5b8 100644 --- a/types/AccountSessionsResource.d.ts +++ b/types/AccountSessionsResource.d.ts @@ -26,6 +26,11 @@ declare module 'stripe' { */ account_onboarding?: Components.AccountOnboarding; + /** + * Configuration for the documents embedded component. + */ + documents?: Components.Documents; + /** * Configuration for the payment details embedded component. */ @@ -59,6 +64,22 @@ declare module 'stripe' { interface Features {} } + interface Documents { + /** + * Whether the embedded component is enabled. + */ + enabled: boolean; + + /** + * The list of features enabled in the embedded component. + */ + features?: Documents.Features; + } + + namespace Documents { + interface Features {} + } + interface PaymentDetails { /** * Whether the embedded component is enabled. diff --git a/types/Checkout/Sessions.d.ts b/types/Checkout/Sessions.d.ts index 7b543113df..a738b4e607 100644 --- a/types/Checkout/Sessions.d.ts +++ b/types/Checkout/Sessions.d.ts @@ -1087,6 +1087,11 @@ declare module 'stripe' { interface Card { installments?: Card.Installments; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ + request_three_d_secure: Card.RequestThreeDSecure; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -1115,6 +1120,8 @@ declare module 'stripe' { enabled?: boolean; } + type RequestThreeDSecure = 'any' | 'automatic' | 'challenge'; + type SetupFutureUsage = 'none' | 'off_session' | 'on_session'; } diff --git a/types/Checkout/SessionsResource.d.ts b/types/Checkout/SessionsResource.d.ts index 1b231fbf93..9d6eabd820 100644 --- a/types/Checkout/SessionsResource.d.ts +++ b/types/Checkout/SessionsResource.d.ts @@ -1267,6 +1267,11 @@ declare module 'stripe' { */ installments?: Card.Installments; + /** + * We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + */ + request_three_d_secure?: Card.RequestThreeDSecure; + /** * Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -1296,6 +1301,8 @@ declare module 'stripe' { enabled?: boolean; } + type RequestThreeDSecure = 'any' | 'automatic' | 'challenge'; + type SetupFutureUsage = 'off_session' | 'on_session'; } diff --git a/types/CreditNotesResource.d.ts b/types/CreditNotesResource.d.ts index ced01ca5e1..d606de28e6 100644 --- a/types/CreditNotesResource.d.ts +++ b/types/CreditNotesResource.d.ts @@ -177,6 +177,11 @@ declare module 'stripe' { } interface CreditNoteListParams extends PaginationParams { + /** + * Only return credit notes that were created during the given date interval. + */ + created?: Stripe.RangeQueryParam | number; + /** * Only return credit notes for the customer specified by this customer ID. */ diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index 4ac0381b3e..cc88fb2b43 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -995,6 +995,11 @@ declare module 'stripe' { */ konbini: PaymentMethodOptions.Konbini | null; + /** + * If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + */ + sepa_debit: PaymentMethodOptions.SepaDebit | null; + /** * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. */ @@ -1092,6 +1097,8 @@ declare module 'stripe' { interface Konbini {} + interface SepaDebit {} + interface UsBankAccount { financial_connections?: UsBankAccount.FinancialConnections; @@ -1307,7 +1314,8 @@ declare module 'stripe' { interface SubscriptionDetails { /** - * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. *Note: This attribute is populated only for invoices created on or after June 29, 2023.* + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + * *Note: This attribute is populated only for invoices created on or after June 29, 2023.* */ metadata: Stripe.Metadata | null; } diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index b12b446dd9..46aeb507d3 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -299,6 +299,11 @@ declare module 'stripe' { */ konbini?: Stripe.Emptyable; + /** + * If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + */ + sepa_debit?: Stripe.Emptyable; + /** * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. */ @@ -434,6 +439,8 @@ declare module 'stripe' { interface Konbini {} + interface SepaDebit {} + interface UsBankAccount { /** * Additional fields for Financial Connections Session creation @@ -984,6 +991,11 @@ declare module 'stripe' { */ konbini?: Stripe.Emptyable; + /** + * If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + */ + sepa_debit?: Stripe.Emptyable; + /** * If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. */ @@ -1119,6 +1131,8 @@ declare module 'stripe' { interface Konbini {} + interface SepaDebit {} + interface UsBankAccount { /** * Additional fields for Financial Connections Session creation diff --git a/types/Issuing/Cards.d.ts b/types/Issuing/Cards.d.ts index 6724e7bf11..a17536de30 100644 --- a/types/Issuing/Cards.d.ts +++ b/types/Issuing/Cards.d.ts @@ -84,6 +84,14 @@ declare module 'stripe' { */ number?: string; + /** + * The personalization design object belonging to this card. + */ + personalization_design?: + | string + | Stripe.Issuing.PersonalizationDesign + | null; + /** * The latest card that replaces this card, if any. */ diff --git a/types/Issuing/CardsResource.d.ts b/types/Issuing/CardsResource.d.ts index ba800e42f8..00a9c7662b 100644 --- a/types/Issuing/CardsResource.d.ts +++ b/types/Issuing/CardsResource.d.ts @@ -31,6 +31,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * The personalization design object belonging to this card. + */ + personalization_design?: string; + /** * The desired PIN for this card. */ @@ -1119,6 +1124,8 @@ declare module 'stripe' { */ metadata?: Stripe.Emptyable; + personalization_design?: string; + /** * The desired new PIN for this card. */ @@ -2116,6 +2123,8 @@ declare module 'stripe' { */ last4?: string; + personalization_design?: string; + /** * Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. */ diff --git a/types/Issuing/PersonalizationDesigns.d.ts b/types/Issuing/PersonalizationDesigns.d.ts new file mode 100644 index 0000000000..5f3a551bf5 --- /dev/null +++ b/types/Issuing/PersonalizationDesigns.d.ts @@ -0,0 +1,142 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Issuing { + /** + * A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. + */ + interface PersonalizationDesign { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'issuing.personalization_design'; + + /** + * The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + */ + card_logo: string | Stripe.File | null; + + /** + * Hash containing carrier text, for use with physical bundles that support carrier text. + */ + carrier_text: PersonalizationDesign.CarrierText | null; + + /** + * Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + */ + lookup_key: string | null; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + */ + metadata: Stripe.Metadata; + + /** + * Friendly display name. + */ + name: string | null; + + /** + * The physical bundle object belonging to this personalization design. + */ + physical_bundle: string | Stripe.Issuing.PhysicalBundle; + + preferences: PersonalizationDesign.Preferences; + + rejection_reasons: PersonalizationDesign.RejectionReasons; + + /** + * Whether this personalization design can be used to create cards. + */ + status: PersonalizationDesign.Status; + } + + namespace PersonalizationDesign { + interface CarrierText { + /** + * The footer body text of the carrier letter. + */ + footer_body: string | null; + + /** + * The footer title text of the carrier letter. + */ + footer_title: string | null; + + /** + * The header body text of the carrier letter. + */ + header_body: string | null; + + /** + * The header title text of the carrier letter. + */ + header_title: string | null; + } + + interface Preferences { + /** + * Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + */ + is_default: boolean; + + /** + * Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. + */ + is_platform_default: boolean | null; + } + + interface RejectionReasons { + /** + * The reason(s) the card logo was rejected. + */ + card_logo: Array | null; + + /** + * The reason(s) the carrier text was rejected. + */ + carrier_text: Array | null; + } + + namespace RejectionReasons { + type CardLogo = + | 'geographic_location' + | 'inappropriate' + | 'network_name' + | 'non_binary_image' + | 'non_fiat_currency' + | 'other' + | 'other_entity' + | 'promotional_material'; + + type CarrierText = + | 'geographic_location' + | 'inappropriate' + | 'network_name' + | 'non_fiat_currency' + | 'other' + | 'other_entity' + | 'promotional_material'; + } + + type Status = 'active' | 'inactive' | 'rejected' | 'review'; + } + } + } +} diff --git a/types/Issuing/PersonalizationDesignsResource.d.ts b/types/Issuing/PersonalizationDesignsResource.d.ts new file mode 100644 index 0000000000..f7dba27ebc --- /dev/null +++ b/types/Issuing/PersonalizationDesignsResource.d.ts @@ -0,0 +1,253 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Issuing { + interface PersonalizationDesignCreateParams { + /** + * The physical bundle object belonging to this personalization design. + */ + physical_bundle: string; + + /** + * The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + */ + card_logo?: string; + + /** + * Hash containing carrier text, for use with physical bundles that support carrier text. + */ + carrier_text?: PersonalizationDesignCreateParams.CarrierText; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + */ + lookup_key?: string; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.MetadataParam; + + /** + * Friendly display name. + */ + name?: string; + + /** + * Information on whether this personalization design is used to create cards when one is not specified. + */ + preferences?: PersonalizationDesignCreateParams.Preferences; + + /** + * If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + */ + transfer_lookup_key?: boolean; + } + + namespace PersonalizationDesignCreateParams { + interface CarrierText { + /** + * The footer body text of the carrier letter. + */ + footer_body?: Stripe.Emptyable; + + /** + * The footer title text of the carrier letter. + */ + footer_title?: Stripe.Emptyable; + + /** + * The header body text of the carrier letter. + */ + header_body?: Stripe.Emptyable; + + /** + * The header title text of the carrier letter. + */ + header_title?: Stripe.Emptyable; + } + + interface Preferences { + /** + * Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + */ + is_default: boolean; + } + } + + interface PersonalizationDesignRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface PersonalizationDesignUpdateParams { + /** + * The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + */ + card_logo?: Stripe.Emptyable; + + /** + * Hash containing carrier text, for use with physical bundles that support carrier text. + */ + carrier_text?: Stripe.Emptyable< + PersonalizationDesignUpdateParams.CarrierText + >; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + */ + lookup_key?: Stripe.Emptyable; + + /** + * Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + */ + metadata?: Stripe.MetadataParam; + + /** + * Friendly display name. Providing an empty string will set the field to null. + */ + name?: Stripe.Emptyable; + + /** + * The physical bundle object belonging to this personalization design. + */ + physical_bundle?: string; + + /** + * Information on whether this personalization design is used to create cards when one is not specified. + */ + preferences?: PersonalizationDesignUpdateParams.Preferences; + + /** + * If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + */ + transfer_lookup_key?: boolean; + } + + namespace PersonalizationDesignUpdateParams { + interface CarrierText { + /** + * The footer body text of the carrier letter. + */ + footer_body?: Stripe.Emptyable; + + /** + * The footer title text of the carrier letter. + */ + footer_title?: Stripe.Emptyable; + + /** + * The header body text of the carrier letter. + */ + header_body?: Stripe.Emptyable; + + /** + * The header title text of the carrier letter. + */ + header_title?: Stripe.Emptyable; + } + + interface Preferences { + /** + * Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + */ + is_default: boolean; + } + } + + interface PersonalizationDesignListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Only return personalization designs with the given lookup keys. + */ + lookup_keys?: Array; + + /** + * Only return personalization designs with the given preferences. + */ + preferences?: PersonalizationDesignListParams.Preferences; + + /** + * Only return personalization designs with the given status. + */ + status?: PersonalizationDesignListParams.Status; + } + + namespace PersonalizationDesignListParams { + interface Preferences { + /** + * Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default. + */ + is_default?: boolean; + + /** + * Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts. + */ + is_platform_default?: boolean; + } + + type Status = 'active' | 'inactive' | 'rejected' | 'review'; + } + + class PersonalizationDesignsResource { + /** + * Creates a personalization design object. + */ + create( + params: PersonalizationDesignCreateParams, + options?: RequestOptions + ): Promise>; + + /** + * Retrieves a personalization design object. + */ + retrieve( + id: string, + params?: PersonalizationDesignRetrieveParams, + options?: RequestOptions + ): Promise>; + retrieve( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Updates a card personalization object. + */ + update( + id: string, + params?: PersonalizationDesignUpdateParams, + options?: RequestOptions + ): Promise>; + + /** + * Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ + list( + params?: PersonalizationDesignListParams, + options?: RequestOptions + ): ApiListPromise; + list( + options?: RequestOptions + ): ApiListPromise; + } + } + } +} diff --git a/types/Issuing/PhysicalBundles.d.ts b/types/Issuing/PhysicalBundles.d.ts new file mode 100644 index 0000000000..8fef28c8ea --- /dev/null +++ b/types/Issuing/PhysicalBundles.d.ts @@ -0,0 +1,75 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Issuing { + /** + * A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card. + */ + interface PhysicalBundle { + /** + * Unique identifier for the object. + */ + id: string; + + /** + * String representing the object's type. Objects of the same type share the same value. + */ + object: 'issuing.physical_bundle'; + + features?: PhysicalBundle.Features; + + /** + * Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + */ + livemode: boolean; + + /** + * Friendly display name. + */ + name: string; + + /** + * Whether this physical bundle can be used to create cards. + */ + status: PhysicalBundle.Status; + + /** + * Whether this physical bundle is a standard Stripe offering or custom-made for you. + */ + type: PhysicalBundle.Type; + } + + namespace PhysicalBundle { + interface Features { + /** + * The policy for how to use card logo images in a card design with this physical bundle. + */ + card_logo: Features.CardLogo; + + /** + * The policy for how to use carrier letter text in a card design with this physical bundle. + */ + carrier_text: Features.CarrierText; + + /** + * The policy for how to use a second line on a card with this physical bundle. + */ + second_line: Features.SecondLine; + } + + namespace Features { + type CardLogo = 'optional' | 'required' | 'unsupported'; + + type CarrierText = 'optional' | 'required' | 'unsupported'; + + type SecondLine = 'optional' | 'required' | 'unsupported'; + } + + type Status = 'active' | 'inactive' | 'review'; + + type Type = 'custom' | 'standard'; + } + } + } +} diff --git a/types/Issuing/PhysicalBundlesResource.d.ts b/types/Issuing/PhysicalBundlesResource.d.ts new file mode 100644 index 0000000000..a60f025eff --- /dev/null +++ b/types/Issuing/PhysicalBundlesResource.d.ts @@ -0,0 +1,63 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace Issuing { + interface PhysicalBundleRetrieveParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + interface PhysicalBundleListParams extends PaginationParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + + /** + * Only return physical bundles with the given status. + */ + status?: PhysicalBundleListParams.Status; + + /** + * Only return physical bundles with the given type. + */ + type?: PhysicalBundleListParams.Type; + } + + namespace PhysicalBundleListParams { + type Status = 'active' | 'inactive' | 'review'; + + type Type = 'custom' | 'standard'; + } + + class PhysicalBundlesResource { + /** + * Retrieves a physical bundle object. + */ + retrieve( + id: string, + params?: PhysicalBundleRetrieveParams, + options?: RequestOptions + ): Promise>; + retrieve( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + */ + list( + params?: PhysicalBundleListParams, + options?: RequestOptions + ): ApiListPromise; + list( + options?: RequestOptions + ): ApiListPromise; + } + } + } +} diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index 16a9d879b2..3ea7f95f46 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -29,7 +29,7 @@ declare module 'stripe' { capture_method?: PaymentIntentCreateParams.CaptureMethod; /** - * Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). + * Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). */ confirm?: boolean; diff --git a/types/PayoutsResource.d.ts b/types/PayoutsResource.d.ts index 442924c2f9..cc7eef9513 100644 --- a/types/PayoutsResource.d.ts +++ b/types/PayoutsResource.d.ts @@ -75,6 +75,9 @@ declare module 'stripe' { } interface PayoutListParams extends PaginationParams { + /** + * Only return payouts that are expected to arrive during the given date interval. + */ arrival_date?: Stripe.RangeQueryParam | number; /** diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index 5796dedee7..76b4fdbd13 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -404,6 +404,11 @@ declare module 'stripe' { */ konbini: PaymentMethodOptions.Konbini | null; + /** + * This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. + */ + sepa_debit: PaymentMethodOptions.SepaDebit | null; + /** * This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. */ @@ -533,6 +538,8 @@ declare module 'stripe' { interface Konbini {} + interface SepaDebit {} + interface UsBankAccount { financial_connections?: UsBankAccount.FinancialConnections; diff --git a/types/SubscriptionsResource.d.ts b/types/SubscriptionsResource.d.ts index d1a6211fc8..5a5a55b81c 100644 --- a/types/SubscriptionsResource.d.ts +++ b/types/SubscriptionsResource.d.ts @@ -16,7 +16,7 @@ declare module 'stripe' { /** * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number; + application_fee_percent?: Stripe.Emptyable; /** * Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. @@ -497,6 +497,11 @@ declare module 'stripe' { */ konbini?: Stripe.Emptyable; + /** + * This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + */ + sepa_debit?: Stripe.Emptyable; + /** * This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. */ @@ -636,6 +641,8 @@ declare module 'stripe' { interface Konbini {} + interface SepaDebit {} + interface UsBankAccount { /** * Additional fields for Financial Connections Session creation @@ -773,7 +780,7 @@ declare module 'stripe' { /** * A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number; + application_fee_percent?: Stripe.Emptyable; /** * Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. @@ -1277,6 +1284,11 @@ declare module 'stripe' { */ konbini?: Stripe.Emptyable; + /** + * This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice's PaymentIntent. + */ + sepa_debit?: Stripe.Emptyable; + /** * This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice's PaymentIntent. */ @@ -1416,6 +1428,8 @@ declare module 'stripe' { interface Konbini {} + interface SepaDebit {} + interface UsBankAccount { /** * Additional fields for Financial Connections Session creation diff --git a/types/TestHelpers/Issuing/PersonalizationDesignsResource.d.ts b/types/TestHelpers/Issuing/PersonalizationDesignsResource.d.ts new file mode 100644 index 0000000000..a872b9ce5d --- /dev/null +++ b/types/TestHelpers/Issuing/PersonalizationDesignsResource.d.ts @@ -0,0 +1,113 @@ +// File generated from our OpenAPI spec + +declare module 'stripe' { + namespace Stripe { + namespace TestHelpers { + namespace Issuing { + interface PersonalizationDesignActivateParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + } + + namespace Issuing { + interface PersonalizationDesignDeactivateParams { + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + } + + namespace Issuing { + interface PersonalizationDesignRejectParams { + /** + * The reason(s) the personalization design was rejected. + */ + rejection_reasons: PersonalizationDesignRejectParams.RejectionReasons; + + /** + * Specifies which fields in the response should be expanded. + */ + expand?: Array; + } + + namespace PersonalizationDesignRejectParams { + interface RejectionReasons { + /** + * The reason(s) the card logo was rejected. + */ + card_logo?: Array; + + /** + * The reason(s) the carrier text was rejected. + */ + carrier_text?: Array; + } + + namespace RejectionReasons { + type CardLogo = + | 'geographic_location' + | 'inappropriate' + | 'network_name' + | 'non_binary_image' + | 'non_fiat_currency' + | 'other' + | 'other_entity' + | 'promotional_material'; + + type CarrierText = + | 'geographic_location' + | 'inappropriate' + | 'network_name' + | 'non_fiat_currency' + | 'other' + | 'other_entity' + | 'promotional_material'; + } + } + } + + namespace Issuing { + class PersonalizationDesignsResource { + /** + * Updates the status of the specified testmode personalization design object to active. + */ + activate( + id: string, + params?: PersonalizationDesignActivateParams, + options?: RequestOptions + ): Promise>; + activate( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Updates the status of the specified testmode personalization design object to inactive. + */ + deactivate( + id: string, + params?: PersonalizationDesignDeactivateParams, + options?: RequestOptions + ): Promise>; + deactivate( + id: string, + options?: RequestOptions + ): Promise>; + + /** + * Updates the status of the specified testmode personalization design object to rejected. + */ + reject( + id: string, + params: PersonalizationDesignRejectParams, + options?: RequestOptions + ): Promise>; + } + } + } + } +} diff --git a/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts b/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts index 1c8f5a39da..59ff635961 100644 --- a/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts +++ b/types/TestHelpers/Treasury/ReceivedCreditsResource.d.ts @@ -21,7 +21,7 @@ declare module 'stripe' { financial_account: string; /** - * The rails used for the object. + * Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. */ network: ReceivedCreditCreateParams.Network; diff --git a/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts b/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts index cd9c3b6b94..77191d6cc0 100644 --- a/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts +++ b/types/TestHelpers/Treasury/ReceivedDebitsResource.d.ts @@ -21,7 +21,7 @@ declare module 'stripe' { financial_account: string; /** - * The rails used for the object. + * Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. */ network: 'ach'; diff --git a/types/Treasury/InboundTransfers.d.ts b/types/Treasury/InboundTransfers.d.ts index 5ea5da85ae..3464f697ad 100644 --- a/types/Treasury/InboundTransfers.d.ts +++ b/types/Treasury/InboundTransfers.d.ts @@ -187,7 +187,7 @@ declare module 'stripe' { last4: string | null; /** - * The US bank account network used to debit funds. + * 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. */ network: 'ach'; diff --git a/types/Treasury/OutboundPayments.d.ts b/types/Treasury/OutboundPayments.d.ts index 4001968489..106ed79120 100644 --- a/types/Treasury/OutboundPayments.d.ts +++ b/types/Treasury/OutboundPayments.d.ts @@ -182,7 +182,7 @@ declare module 'stripe' { last4: string | null; /** - * The US bank account network used to send funds. + * 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. */ network: UsBankAccount.Network; diff --git a/types/Treasury/OutboundPaymentsResource.d.ts b/types/Treasury/OutboundPaymentsResource.d.ts index eca5858a43..af832a0bf8 100644 --- a/types/Treasury/OutboundPaymentsResource.d.ts +++ b/types/Treasury/OutboundPaymentsResource.d.ts @@ -164,7 +164,7 @@ declare module 'stripe' { namespace DestinationPaymentMethodOptions { interface UsBankAccount { /** - * The US bank account network that must be used for this OutboundPayment. If not set, we will default to the PaymentMethod's preferred network. + * Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. */ network?: UsBankAccount.Network; } diff --git a/types/Treasury/OutboundTransfers.d.ts b/types/Treasury/OutboundTransfers.d.ts index 2c5765b85c..023dc5842a 100644 --- a/types/Treasury/OutboundTransfers.d.ts +++ b/types/Treasury/OutboundTransfers.d.ts @@ -153,7 +153,7 @@ declare module 'stripe' { last4: string | null; /** - * The US bank account network used to send funds. + * 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. */ network: UsBankAccount.Network; diff --git a/types/Treasury/OutboundTransfersResource.d.ts b/types/Treasury/OutboundTransfersResource.d.ts index 65e21eb748..90e9e44f9d 100644 --- a/types/Treasury/OutboundTransfersResource.d.ts +++ b/types/Treasury/OutboundTransfersResource.d.ts @@ -63,7 +63,7 @@ declare module 'stripe' { namespace DestinationPaymentMethodOptions { interface UsBankAccount { /** - * Designate the OutboundTransfer as using a US bank account network configuration. + * Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. */ network?: UsBankAccount.Network; } diff --git a/types/index.d.ts b/types/index.d.ts index 7158e389ea..1e0a6bcfc1 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -46,6 +46,8 @@ /// /// /// +/// +/// /// /// /// @@ -89,6 +91,7 @@ /// /// /// +/// /// /// /// @@ -167,6 +170,8 @@ /// /// /// +/// +/// /// /// /// @@ -334,6 +339,8 @@ declare module 'stripe' { cards: Stripe.Issuing.CardsResource; cardholders: Stripe.Issuing.CardholdersResource; disputes: Stripe.Issuing.DisputesResource; + personalizationDesigns: Stripe.Issuing.PersonalizationDesignsResource; + physicalBundles: Stripe.Issuing.PhysicalBundlesResource; tokens: Stripe.Issuing.TokensResource; transactions: Stripe.Issuing.TransactionsResource; }; @@ -368,6 +375,7 @@ declare module 'stripe' { issuing: { authorizations: Stripe.TestHelpers.Issuing.AuthorizationsResource; cards: Stripe.TestHelpers.Issuing.CardsResource; + personalizationDesigns: Stripe.TestHelpers.Issuing.PersonalizationDesignsResource; transactions: Stripe.TestHelpers.Issuing.TransactionsResource; }; terminal: {