diff --git a/CHANGELOG.md b/CHANGELOG.md index 36853bcb27..9006dcae2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 13.8.0 - 2023-09-28 +* [#1911](https://github.com/stripe/stripe-node/pull/1911) Update generated code + * Add support for `rendering` on `InvoiceCreateParams`, `InvoiceUpdateParams`, and `Invoice` + * Change `PaymentMethod.us_bank_account.financial_connections_account` and `PaymentMethod.us_bank_account.status_details` to be required + ## 13.8.0-beta.1 - 2023-09-21 * [#1906](https://github.com/stripe/stripe-node/pull/1906) Update generated code for beta * Remove support for `customer` on `ConfirmationToken` @@ -9,6 +14,10 @@ * Change type of `Issuing.CardDesignUpdateParams.carrier_text` from `carrier_text_param` to `emptyStringable(carrier_text_param)` * Add support for `invoice_settings` on `SubscriptionCreateParams` and `SubscriptionUpdateParams` +## 13.7.0 - 2023-09-21 +* [#1907](https://github.com/stripe/stripe-node/pull/1907) Update generated code + * Add support for `terms_of_service_acceptance` on `Checkout.Session.custom_text`, `Checkout.SessionCreateParams.custom_text`, `PaymentLink.custom_text`, `PaymentLinkCreateParams.custom_text`, and `PaymentLinkUpdateParams.custom_text` + ## 13.7.0-beta.1 - 2023-09-14 * [#1900](https://github.com/stripe/stripe-node/pull/1900) Update generated code for beta * Add support for new resource `ConfirmationToken` diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 688708d739..1373ea073f 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v545 \ No newline at end of file +v569 \ No newline at end of file diff --git a/src/resources.ts b/src/resources.ts index e5fb260d76..150d4f1685 100644 --- a/src/resources.ts +++ b/src/resources.ts @@ -5,9 +5,6 @@ import {Accounts as FinancialConnectionsAccounts} from './resources/FinancialCon import {Authorizations as TestHelpersIssuingAuthorizations} from './resources/TestHelpers/Issuing/Authorizations.js'; import {Authorizations as IssuingAuthorizations} from './resources/Issuing/Authorizations.js'; import {Calculations as TaxCalculations} from './resources/Tax/Calculations.js'; -import {CardBundles as IssuingCardBundles} from './resources/Issuing/CardBundles.js'; -import {CardDesigns as TestHelpersIssuingCardDesigns} from './resources/TestHelpers/Issuing/CardDesigns.js'; -import {CardDesigns as IssuingCardDesigns} from './resources/Issuing/CardDesigns.js'; import {Cardholders as IssuingCardholders} from './resources/Issuing/Cardholders.js'; import {Cards as TestHelpersIssuingCards} from './resources/TestHelpers/Issuing/Cards.js'; import {Cards as GiftCardsCards} from './resources/GiftCards/Cards.js'; @@ -32,6 +29,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 {Readers as TestHelpersTerminalReaders} from './resources/TestHelpers/Terminal/Readers.js'; import {Readers as TerminalReaders} from './resources/Terminal/Readers.js'; import {ReceivedCredits as TestHelpersTreasuryReceivedCredits} from './resources/TestHelpers/Treasury/ReceivedCredits.js'; @@ -141,11 +141,11 @@ export const Identity = resourceNamespace('identity', { }); export const Issuing = resourceNamespace('issuing', { Authorizations: IssuingAuthorizations, - CardBundles: IssuingCardBundles, - CardDesigns: IssuingCardDesigns, Cardholders: IssuingCardholders, Cards: IssuingCards, Disputes: IssuingDisputes, + PersonalizationDesigns: IssuingPersonalizationDesigns, + PhysicalBundles: IssuingPhysicalBundles, Transactions: IssuingTransactions, }); export const Radar = resourceNamespace('radar', { @@ -179,8 +179,8 @@ export const TestHelpers = resourceNamespace('testHelpers', { TestClocks: TestHelpersTestClocks, Issuing: resourceNamespace('issuing', { Authorizations: TestHelpersIssuingAuthorizations, - CardDesigns: TestHelpersIssuingCardDesigns, Cards: TestHelpersIssuingCards, + PersonalizationDesigns: TestHelpersIssuingPersonalizationDesigns, Transactions: TestHelpersIssuingTransactions, }), Terminal: resourceNamespace('terminal', { diff --git a/src/resources/Issuing/CardDesigns.ts b/src/resources/Issuing/CardDesigns.ts deleted file mode 100644 index 58641bd5e8..0000000000 --- a/src/resources/Issuing/CardDesigns.ts +++ /dev/null @@ -1,20 +0,0 @@ -// File generated from our OpenAPI spec - -import {StripeResource} from '../../StripeResource.js'; -const stripeMethod = StripeResource.method; -export const CardDesigns = StripeResource.extend({ - create: stripeMethod({method: 'POST', fullPath: '/v1/issuing/card_designs'}), - retrieve: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/card_designs/{card_design}', - }), - update: stripeMethod({ - method: 'POST', - fullPath: '/v1/issuing/card_designs/{card_design}', - }), - list: stripeMethod({ - method: 'GET', - fullPath: '/v1/issuing/card_designs', - methodType: 'list', - }), -}); 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/CardBundles.ts b/src/resources/Issuing/PhysicalBundles.ts similarity index 61% rename from src/resources/Issuing/CardBundles.ts rename to src/resources/Issuing/PhysicalBundles.ts index 4358e594de..bed1ee26ad 100644 --- a/src/resources/Issuing/CardBundles.ts +++ b/src/resources/Issuing/PhysicalBundles.ts @@ -2,14 +2,14 @@ import {StripeResource} from '../../StripeResource.js'; const stripeMethod = StripeResource.method; -export const CardBundles = StripeResource.extend({ +export const PhysicalBundles = StripeResource.extend({ retrieve: stripeMethod({ method: 'GET', - fullPath: '/v1/issuing/card_bundles/{card_bundle}', + fullPath: '/v1/issuing/physical_bundles/{physical_bundle}', }), list: stripeMethod({ method: 'GET', - fullPath: '/v1/issuing/card_bundles', + fullPath: '/v1/issuing/physical_bundles', methodType: 'list', }), }); diff --git a/src/resources/TestHelpers/Issuing/CardDesigns.ts b/src/resources/TestHelpers/Issuing/CardDesigns.ts deleted file mode 100644 index 186a909bb6..0000000000 --- a/src/resources/TestHelpers/Issuing/CardDesigns.ts +++ /dev/null @@ -1,21 +0,0 @@ -// File generated from our OpenAPI spec - -import {StripeResource} from '../../../StripeResource.js'; -const stripeMethod = StripeResource.method; -export const CardDesigns = StripeResource.extend({ - activateTestmode: stripeMethod({ - method: 'POST', - fullPath: - '/v1/test_helpers/issuing/card_designs/{card_design}/status/activate', - }), - deactivateTestmode: stripeMethod({ - method: 'POST', - fullPath: - '/v1/test_helpers/issuing/card_designs/{card_design}/status/deactivate', - }), - rejectTestmode: stripeMethod({ - method: 'POST', - fullPath: - '/v1/test_helpers/issuing/card_designs/{card_design}/status/reject', - }), -}); 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/test/resources/generated_examples_test.spec.js b/test/resources/generated_examples_test.spec.js index 9dacfa31c2..06546ba1d4 100644 --- a/test/resources/generated_examples_test.spec.js +++ b/test/resources/generated_examples_test.spec.js @@ -2952,6 +2952,11 @@ describe('Subscriptions', function() { }); expect(subscriptions).not.to.be.null; }); + + it('deleteDiscount method', async function() { + const deleted = await stripe.subscriptions.deleteDiscount('sub_xyz'); + expect(deleted).not.to.be.null; + }); }); describe('TaxCodes', function() { diff --git a/types/AccountLinksResource.d.ts b/types/AccountLinksResource.d.ts index abaa8e0cb0..0c7464171d 100644 --- a/types/AccountLinksResource.d.ts +++ b/types/AccountLinksResource.d.ts @@ -37,7 +37,11 @@ declare module 'stripe' { namespace AccountLinkCreateParams { type Collect = 'currently_due' | 'eventually_due'; - type Type = 'account_onboarding' | 'account_update'; + type Type = + | 'account_onboarding' + | 'account_update' + | 'capital_financing_offer' + | 'capital_financing_reporting'; } class AccountLinksResource { diff --git a/types/AccountSessions.d.ts b/types/AccountSessions.d.ts index 23016b5516..ce1911320d 100644 --- a/types/AccountSessions.d.ts +++ b/types/AccountSessions.d.ts @@ -68,6 +68,27 @@ declare module 'stripe' { * Whether the embedded component is enabled. */ enabled: boolean; + + features?: PaymentDetails.Features; + } + + namespace PaymentDetails { + interface Features { + /** + * Whether to allow capturing and cancelling payment intents. This is `true` by default. + */ + capture_payments: boolean; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + */ + dispute_management: boolean; + + /** + * Whether to allow sending refunds. This is `true` by default. + */ + refund_management: boolean; + } } interface Payments { @@ -75,6 +96,27 @@ declare module 'stripe' { * Whether the embedded component is enabled. */ enabled: boolean; + + features?: Payments.Features; + } + + namespace Payments { + interface Features { + /** + * Whether to allow capturing and cancelling payment intents. This is `true` by default. + */ + capture_payments: boolean; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + */ + dispute_management: boolean; + + /** + * Whether to allow sending refunds. This is `true` by default. + */ + refund_management: boolean; + } } interface Payouts { @@ -82,6 +124,12 @@ declare module 'stripe' { * Whether the embedded component is enabled. */ enabled: boolean; + + features?: Payouts.Features; + } + + namespace Payouts { + interface Features {} } } } diff --git a/types/AccountSessionsResource.d.ts b/types/AccountSessionsResource.d.ts index ded0e8c107..e2f6565c7b 100644 --- a/types/AccountSessionsResource.d.ts +++ b/types/AccountSessionsResource.d.ts @@ -48,6 +48,15 @@ declare module 'stripe' { * Whether the embedded component is enabled. */ enabled: boolean; + + /** + * The list of features enabled in the embedded component. + */ + features?: AccountOnboarding.Features; + } + + namespace AccountOnboarding { + interface Features {} } interface PaymentDetails { @@ -55,6 +64,30 @@ declare module 'stripe' { * Whether the embedded component is enabled. */ enabled: boolean; + + /** + * The list of features enabled in the embedded component. + */ + features?: PaymentDetails.Features; + } + + namespace PaymentDetails { + interface Features { + /** + * Whether to allow capturing and cancelling payment intents. This is `true` by default. + */ + capture_payments?: boolean; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + */ + dispute_management?: boolean; + + /** + * Whether to allow sending refunds. This is `true` by default. + */ + refund_management?: boolean; + } } interface Payments { @@ -62,6 +95,30 @@ declare module 'stripe' { * Whether the embedded component is enabled. */ enabled: boolean; + + /** + * The list of features enabled in the embedded component. + */ + features?: Payments.Features; + } + + namespace Payments { + interface Features { + /** + * Whether to allow capturing and cancelling payment intents. This is `true` by default. + */ + capture_payments?: boolean; + + /** + * Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + */ + dispute_management?: boolean; + + /** + * Whether to allow sending refunds. This is `true` by default. + */ + refund_management?: boolean; + } } interface Payouts { @@ -69,6 +126,15 @@ declare module 'stripe' { * Whether the embedded component is enabled. */ enabled: boolean; + + /** + * The list of features enabled in the embedded component. + */ + features?: Payouts.Features; + } + + namespace Payouts { + interface Features {} } } } diff --git a/types/BillingPortal/Sessions.d.ts b/types/BillingPortal/Sessions.d.ts index 04b2983d74..9c2773ad83 100644 --- a/types/BillingPortal/Sessions.d.ts +++ b/types/BillingPortal/Sessions.d.ts @@ -216,7 +216,7 @@ declare module 'stripe' { id: string | null; /** - * The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + * The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). */ price: string | null; diff --git a/types/ConfirmationTokens.d.ts b/types/ConfirmationTokens.d.ts index bf99815f8b..f76b744d32 100644 --- a/types/ConfirmationTokens.d.ts +++ b/types/ConfirmationTokens.d.ts @@ -1042,7 +1042,7 @@ declare module 'stripe' { /** * The ID of the Financial Connections Account used to create the payment method. */ - financial_connections_account?: string | null; + financial_connections_account: string | null; /** * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. @@ -1067,7 +1067,7 @@ declare module 'stripe' { /** * Contains information about the future reusability of this PaymentMethod. */ - status_details?: UsBankAccount.StatusDetails | null; + status_details: UsBankAccount.StatusDetails | null; } namespace UsBankAccount { diff --git a/types/CustomerCashBalanceTransactions.d.ts b/types/CustomerCashBalanceTransactions.d.ts index fb7e24be79..26ca73f2af 100644 --- a/types/CustomerCashBalanceTransactions.d.ts +++ b/types/CustomerCashBalanceTransactions.d.ts @@ -68,7 +68,7 @@ declare module 'stripe' { namespace CustomerCashBalanceTransaction { interface AdjustedForOverdraft { /** - * The [Balance Transaction](docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. + * The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. */ balance_transaction: string | Stripe.BalanceTransaction; diff --git a/types/Events.d.ts b/types/Events.d.ts index 9d38eca32e..b98f9c6507 100644 --- a/types/Events.d.ts +++ b/types/Events.d.ts @@ -72,6 +72,11 @@ declare module 'stripe' { */ pending_webhooks: number; + /** + * Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://stripe.com/docs/billing/revenue-recovery/automations) action. + */ + reason?: Event.Reason | null; + /** * Information on the API request that triggers the event. */ @@ -102,6 +107,59 @@ declare module 'stripe' { interface PreviousAttributes {} } + interface Reason { + automation_action?: Reason.AutomationAction; + + request?: Reason.Request; + + /** + * The type of the reason for the event. + */ + type: Reason.Type; + } + + namespace Reason { + interface AutomationAction { + stripe_send_webhook_custom_event?: AutomationAction.StripeSendWebhookCustomEvent; + + /** + * The trigger name of the automation that triggered this action. + * Please visit [Revenue and retention automations](https://stripe.com/docs/billing/revenue-recovery/automations#choose-a-trigger) for all possible trigger names. + */ + trigger: string; + + /** + * The type of the `automation_action`. + */ + type: 'stripe_send_webhook_custom_event'; + } + + namespace AutomationAction { + interface StripeSendWebhookCustomEvent { + /** + * Set of key-value pairs attached to the action when creating an Automation. + */ + custom_data: { + [key: string]: string; + } | null; + } + } + + interface Request { + /** + * ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. + */ + id: string | null; + + /** + * The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. + */ + idempotency_key: string | null; + } + + type Type = 'automation_action' | 'request'; + } + interface Request { /** * ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. @@ -174,6 +232,7 @@ declare module 'stripe' { | 'customer.subscription.collection_paused' | 'customer.subscription.collection_resumed' | 'customer.subscription.created' + | 'customer.subscription.custom_event' | 'customer.subscription.deleted' | 'customer.subscription.paused' | 'customer.subscription.pending_update_applied' @@ -222,10 +281,6 @@ declare module 'stripe' { | 'issuing_authorization.updated' | 'issuing_card.created' | 'issuing_card.updated' - | 'issuing_card_design.activated' - | 'issuing_card_design.deactivated' - | 'issuing_card_design.rejected' - | 'issuing_card_design.updated' | 'issuing_cardholder.created' | 'issuing_cardholder.updated' | 'issuing_dispute.closed' @@ -233,10 +288,13 @@ declare module 'stripe' { | 'issuing_dispute.funds_reinstated' | 'issuing_dispute.submitted' | 'issuing_dispute.updated' + | 'issuing_personalization_design.activated' + | 'issuing_personalization_design.deactivated' + | 'issuing_personalization_design.rejected' + | 'issuing_personalization_design.updated' | 'issuing_transaction.created' | 'issuing_transaction.updated' | 'mandate.updated' - | 'order.created' | 'payment_intent.amount_capturable_updated' | 'payment_intent.canceled' | 'payment_intent.created' @@ -282,9 +340,6 @@ declare module 'stripe' { | 'quote.stale' | 'radar.early_fraud_warning.created' | 'radar.early_fraud_warning.updated' - | 'recipient.created' - | 'recipient.deleted' - | 'recipient.updated' | 'refund.created' | 'refund.updated' | 'reporting.report_run.failed' @@ -298,9 +353,6 @@ declare module 'stripe' { | 'setup_intent.setup_failed' | 'setup_intent.succeeded' | 'sigma.scheduled_query_run.created' - | 'sku.created' - | 'sku.deleted' - | 'sku.updated' | 'source.canceled' | 'source.chargeable' | 'source.failed' @@ -363,7 +415,14 @@ declare module 'stripe' { | 'treasury.received_credit.failed' | 'treasury.received_credit.succeeded' | 'treasury.received_debit.created' - | 'invoiceitem.updated'; + | 'invoiceitem.updated' + | 'order.created' + | 'recipient.created' + | 'recipient.deleted' + | 'recipient.updated' + | 'sku.created' + | 'sku.deleted' + | 'sku.updated'; } } } diff --git a/types/Invoices.d.ts b/types/Invoices.d.ts index e0e0b5c0d1..6c35fe58a9 100644 --- a/types/Invoices.d.ts +++ b/types/Invoices.d.ts @@ -358,7 +358,12 @@ declare module 'stripe' { receipt_number: string | null; /** - * Options for invoice PDF rendering. + * The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + */ + rendering: Invoice.Rendering | null; + + /** + * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. */ rendering_options: Invoice.RenderingOptions | null; @@ -465,7 +470,7 @@ declare module 'stripe' { enabled: boolean; /** - * The connected account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. */ liability?: AutomaticTax.Liability | null; @@ -1135,6 +1140,31 @@ declare module 'stripe' { | 'wechat_pay'; } + interface Rendering { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ + amount_tax_display: string | null; + + /** + * Invoice pdf rendering options + */ + pdf: Rendering.Pdf | null; + } + + namespace Rendering { + interface Pdf { + /** + * Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. + */ + page_size: Pdf.PageSize | null; + } + + namespace Pdf { + type PageSize = 'a4' | 'auto' | 'letter'; + } + } + interface RenderingOptions { /** * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. diff --git a/types/InvoicesResource.d.ts b/types/InvoicesResource.d.ts index 698cf6d068..74dd4afc96 100644 --- a/types/InvoicesResource.d.ts +++ b/types/InvoicesResource.d.ts @@ -124,7 +124,12 @@ declare module 'stripe' { pending_invoice_items_behavior?: InvoiceCreateParams.PendingInvoiceItemsBehavior; /** - * Options for invoice PDF rendering. + * The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + */ + rendering?: InvoiceCreateParams.Rendering; + + /** + * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. */ rendering_options?: Stripe.Emptyable< InvoiceCreateParams.RenderingOptions @@ -543,6 +548,34 @@ declare module 'stripe' { | 'include' | 'include_and_require'; + interface Rendering { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + amount_tax_display?: Stripe.Emptyable; + + /** + * Invoice pdf rendering options + */ + pdf?: Rendering.Pdf; + } + + namespace Rendering { + type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax'; + + interface Pdf { + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. + * If set to auto, page size will be switched to a4 or letter based on customer locale. + */ + page_size?: Pdf.PageSize; + } + + namespace Pdf { + type PageSize = 'a4' | 'auto' | 'letter'; + } + } + interface RenderingOptions { /** * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. @@ -833,7 +866,12 @@ declare module 'stripe' { payment_settings?: InvoiceUpdateParams.PaymentSettings; /** - * Options for invoice PDF rendering. + * The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + */ + rendering?: InvoiceUpdateParams.Rendering; + + /** + * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. */ rendering_options?: Stripe.Emptyable< InvoiceUpdateParams.RenderingOptions @@ -1230,6 +1268,34 @@ declare module 'stripe' { | 'wechat_pay'; } + interface Rendering { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + */ + amount_tax_display?: Stripe.Emptyable; + + /** + * Invoice pdf rendering options + */ + pdf?: Rendering.Pdf; + } + + namespace Rendering { + type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax'; + + interface Pdf { + /** + * Page size for invoice PDF. Can be set to a4, letter, or auto. + * If set to auto, page size will be switched to a4 or letter based on customer locale. + */ + page_size?: Pdf.PageSize; + } + + namespace Pdf { + type PageSize = 'a4' | 'auto' | 'letter'; + } + } + interface RenderingOptions { /** * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. diff --git a/types/Issuing/CardBundlesResource.d.ts b/types/Issuing/CardBundlesResource.d.ts deleted file mode 100644 index 36cae5eb99..0000000000 --- a/types/Issuing/CardBundlesResource.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -// File generated from our OpenAPI spec - -declare module 'stripe' { - namespace Stripe { - namespace Issuing { - interface CardBundleRetrieveParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - - interface CardBundleListParams extends PaginationParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - - /** - * Only return card bundles with the given status. - */ - status?: CardBundleListParams.Status; - - /** - * Only return card bundles with the given type. - */ - type?: CardBundleListParams.Type; - } - - namespace CardBundleListParams { - type Status = 'active' | 'inactive' | 'review'; - - type Type = 'custom' | 'standard'; - } - - class CardBundlesResource { - /** - * Retrieves a card bundle object. - */ - retrieve( - id: string, - params?: CardBundleRetrieveParams, - options?: RequestOptions - ): Promise>; - retrieve( - id: string, - options?: RequestOptions - ): Promise>; - - /** - * Returns a list of card bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - */ - list( - params?: CardBundleListParams, - options?: RequestOptions - ): ApiListPromise; - list( - options?: RequestOptions - ): ApiListPromise; - } - } - } -} diff --git a/types/Issuing/CardDesignsResource.d.ts b/types/Issuing/CardDesignsResource.d.ts deleted file mode 100644 index b210f3c955..0000000000 --- a/types/Issuing/CardDesignsResource.d.ts +++ /dev/null @@ -1,251 +0,0 @@ -// File generated from our OpenAPI spec - -declare module 'stripe' { - namespace Stripe { - namespace Issuing { - interface CardDesignCreateParams { - /** - * The card bundle object belonging to this card design. - */ - card_bundle: string; - - /** - * The file for the card logo, for use with card bundles that support card logos. - */ - card_logo?: string; - - /** - * Hash containing carrier text, for use with card bundles that support carrier text. - */ - carrier_text?: CardDesignCreateParams.CarrierText; - - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - - /** - * A lookup key used to retrieve card 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 card design is used to create cards when one is not specified. - */ - preferences?: CardDesignCreateParams.Preferences; - - /** - * If set to true, will atomically remove the lookup key from the existing card design, and assign it to this card design. - */ - transfer_lookup_key?: boolean; - } - - namespace CardDesignCreateParams { - interface CarrierText { - /** - * The footer body text of the carrier letter. - */ - footer_body?: string; - - /** - * The footer title text of the carrier letter. - */ - footer_title?: string; - - /** - * The header body text of the carrier letter. - */ - header_body?: string; - - /** - * The header title text of the carrier letter. - */ - header_title?: string; - } - - interface Preferences { - /** - * Whether this card design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no card design is set as the account default. - */ - account_default: boolean; - } - } - - interface CardDesignRetrieveParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - } - - interface CardDesignUpdateParams { - /** - * The card bundle object belonging to this card design. - */ - card_bundle?: string; - - /** - * The file for the card logo, for use with card bundles that support card logos. - */ - card_logo?: Stripe.Emptyable; - - /** - * Hash containing carrier text, for use with card bundles that support carrier text. - */ - carrier_text?: Stripe.Emptyable; - - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - - /** - * A lookup key used to retrieve card 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; - - /** - * Information on whether this card design is used to create cards when one is not specified. - */ - preferences?: CardDesignUpdateParams.Preferences; - - /** - * If set to true, will atomically remove the lookup key from the existing card design, and assign it to this card design. - */ - transfer_lookup_key?: boolean; - } - - namespace CardDesignUpdateParams { - interface CarrierText { - /** - * The footer body text of the carrier letter. - */ - footer_body?: string; - - /** - * The footer title text of the carrier letter. - */ - footer_title?: string; - - /** - * The header body text of the carrier letter. - */ - header_body?: string; - - /** - * The header title text of the carrier letter. - */ - header_title?: string; - } - - interface Preferences { - /** - * Whether this card design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no card design is set as the account default. - */ - account_default: boolean; - } - } - - interface CardDesignListParams extends PaginationParams { - /** - * Specifies which fields in the response should be expanded. - */ - expand?: Array; - - /** - * Only return card designs with the given lookup keys. - */ - lookup_keys?: Array; - - /** - * Only return card designs with the given preferences. - */ - preferences?: CardDesignListParams.Preferences; - - /** - * Only return card designs with the given status. - */ - status?: CardDesignListParams.Status; - } - - namespace CardDesignListParams { - interface Preferences { - /** - * Only return the card design that is set as the account default. A connected account will use the Connect platform's default if no card design is set as the account default. - */ - account_default?: boolean; - - /** - * Only return the card design that is set as the Connect platform's default. This parameter is only applicable to connected accounts. - */ - platform_default?: boolean; - } - - type Status = 'active' | 'inactive' | 'rejected' | 'review'; - } - - class CardDesignsResource { - /** - * Creates a card design object. - */ - create( - params: CardDesignCreateParams, - options?: RequestOptions - ): Promise>; - - /** - * Retrieves a card design object. - */ - retrieve( - id: string, - params?: CardDesignRetrieveParams, - options?: RequestOptions - ): Promise>; - retrieve( - id: string, - options?: RequestOptions - ): Promise>; - - /** - * Updates a card design object. - */ - update( - id: string, - params?: CardDesignUpdateParams, - options?: RequestOptions - ): Promise>; - - /** - * Returns a list of card design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - */ - list( - params?: CardDesignListParams, - options?: RequestOptions - ): ApiListPromise; - list( - options?: RequestOptions - ): ApiListPromise; - } - } - } -} diff --git a/types/Issuing/Cards.d.ts b/types/Issuing/Cards.d.ts index 3f61eccec0..fab2fa8afc 100644 --- a/types/Issuing/Cards.d.ts +++ b/types/Issuing/Cards.d.ts @@ -27,11 +27,6 @@ declare module 'stripe' { */ cancellation_reason: Card.CancellationReason | null; - /** - * The card design object belonging to this card. - */ - card_design?: string | Stripe.Issuing.CardDesign | null; - /** * An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. * @@ -89,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 32fac4b346..7568a868ec 100644 --- a/types/Issuing/CardsResource.d.ts +++ b/types/Issuing/CardsResource.d.ts @@ -14,11 +14,6 @@ declare module 'stripe' { */ type: CardCreateParams.Type; - /** - * The card design object belonging to this card. - */ - card_design?: string; - /** * The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. */ @@ -36,6 +31,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * The personalization design object belonging to this card. + */ + personalization_design?: string; + /** * The card this is meant to be a replacement for (if any). */ @@ -1121,8 +1121,6 @@ declare module 'stripe' { */ cancellation_reason?: CardUpdateParams.CancellationReason; - card_design?: string; - /** * Specifies which fields in the response should be expanded. */ @@ -1133,6 +1131,8 @@ declare module 'stripe' { */ metadata?: Stripe.Emptyable; + personalization_design?: string; + /** * The desired new PIN for this card. */ diff --git a/types/Issuing/CardDesigns.d.ts b/types/Issuing/PersonalizationDesigns.d.ts similarity index 64% rename from types/Issuing/CardDesigns.d.ts rename to types/Issuing/PersonalizationDesigns.d.ts index 84b3b4ddd4..a31023823a 100644 --- a/types/Issuing/CardDesigns.d.ts +++ b/types/Issuing/PersonalizationDesigns.d.ts @@ -4,9 +4,9 @@ declare module 'stripe' { namespace Stripe { namespace Issuing { /** - * A Card Design is a logical grouping of a Card Bundle, card logo, and carrier text that represents a product line. + * A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. */ - interface CardDesign { + interface PersonalizationDesign { /** * Unique identifier for the object. */ @@ -15,25 +15,20 @@ declare module 'stripe' { /** * String representing the object's type. Objects of the same type share the same value. */ - object: 'issuing.card_design'; + object: 'issuing.personalization_design'; /** - * The card bundle object belonging to this card design. - */ - card_bundle: string | Stripe.Issuing.CardBundle; - - /** - * The file for the card logo, for use with card bundles that support card logos. + * The file for the card logo, for use with physical bundles that support card logos. */ card_logo: string | Stripe.File | null; /** - * Hash containing carrier text, for use with card bundles that support carrier text. + * Hash containing carrier text, for use with physical bundles that support carrier text. */ - carrier_text: CardDesign.CarrierText | null; + carrier_text: PersonalizationDesign.CarrierText | null; /** - * A lookup key used to retrieve card designs dynamically from a static string. This may be up to 200 characters. + * A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. */ lookup_key: string | null; @@ -47,17 +42,22 @@ declare module 'stripe' { */ name: string | null; - preferences: CardDesign.Preferences; + /** + * The physical bundle object belonging to this personalization design. + */ + physical_bundle: string | Stripe.Issuing.PhysicalBundle; + + preferences: PersonalizationDesign.Preferences; - rejection_reasons: CardDesign.RejectionReasons; + rejection_reasons: PersonalizationDesign.RejectionReasons; /** - * Whether this card design can be used to create cards. + * Whether this personalization design can be used to create cards. */ - status: CardDesign.Status; + status: PersonalizationDesign.Status; } - namespace CardDesign { + namespace PersonalizationDesign { interface CarrierText { /** * The footer body text of the carrier letter. @@ -82,12 +82,12 @@ declare module 'stripe' { interface Preferences { /** - * Whether this card design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no card design is set as the account default. + * Whether this personalization design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no personalization design is set as the account default. */ account_default: boolean; /** - * Whether this card design is used to create cards when one is not specified and an account default for this connected account does not exist. + * Whether this personalization design is used to create cards when one is not specified and an account default for this connected account does not exist. */ platform_default: boolean | null; } diff --git a/types/Issuing/PersonalizationDesignsResource.d.ts b/types/Issuing/PersonalizationDesignsResource.d.ts new file mode 100644 index 0000000000..11e3c516ba --- /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 `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 this personalization design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no personalization design is set as the account default. + */ + account_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 `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 this personalization design is used to create cards when one is not specified. A connected account will use the Connect platform's default if no personalization design is set as the account default. + */ + account_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 is set as the account default. A connected account will use the Connect platform's default if no personalization design is set as the account default. + */ + account_default?: boolean; + + /** + * Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts. + */ + 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/CardBundles.d.ts b/types/Issuing/PhysicalBundles.d.ts similarity index 66% rename from types/Issuing/CardBundles.d.ts rename to types/Issuing/PhysicalBundles.d.ts index ae23dc8bc8..2612ef0547 100644 --- a/types/Issuing/CardBundles.d.ts +++ b/types/Issuing/PhysicalBundles.d.ts @@ -4,9 +4,9 @@ declare module 'stripe' { namespace Stripe { namespace Issuing { /** - * A Card 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. + * 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 CardBundle { + interface PhysicalBundle { /** * Unique identifier for the object. */ @@ -15,9 +15,9 @@ declare module 'stripe' { /** * String representing the object's type. Objects of the same type share the same value. */ - object: 'issuing.card_bundle'; + object: 'issuing.physical_bundle'; - features?: CardBundle.Features; + 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. @@ -30,25 +30,25 @@ declare module 'stripe' { name: string; /** - * Whether this card bundle can be used to create cards. + * Whether this physical bundle can be used to create cards. */ - status: CardBundle.Status; + status: PhysicalBundle.Status; /** - * Whether this card bundle is a standard Stripe offering or custom-made for you. + * Whether this physical bundle is a standard Stripe offering or custom-made for you. */ - type: CardBundle.Type; + type: PhysicalBundle.Type; } - namespace CardBundle { + namespace PhysicalBundle { interface Features { /** - * The policy for how to use card logo images in a card design with this card bundle. + * 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 card bundle. + * The policy for how to use carrier letter text in a card design with this physical bundle. */ carrier_text: Features.CarrierText; } 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/Mandates.d.ts b/types/Mandates.d.ts index 093bd8dc29..bcc354783a 100644 --- a/types/Mandates.d.ts +++ b/types/Mandates.d.ts @@ -3,7 +3,7 @@ declare module 'stripe' { namespace Stripe { /** - * A Mandate is a record of the permission a customer has given you to debit their payment method. + * A Mandate is a record of the permission that your customer gives you to debit their payment method. */ interface Mandate { /** @@ -26,7 +26,7 @@ declare module 'stripe' { multi_use?: Mandate.MultiUse; /** - * The account (if any) for which the mandate is intended. + * The account (if any) that the mandate is intended for. */ on_behalf_of?: string; @@ -40,7 +40,7 @@ declare module 'stripe' { single_use?: Mandate.SingleUse; /** - * The status of the mandate, which indicates whether it can be used to initiate a payment. + * The mandate status indicates whether or not you can use it to initiate a payment. */ status: Mandate.Status; @@ -53,7 +53,7 @@ declare module 'stripe' { namespace Mandate { interface CustomerAcceptance { /** - * The time at which the customer accepted the Mandate. + * The time that the customer accepts the mandate. */ accepted_at: number | null; @@ -62,7 +62,7 @@ declare module 'stripe' { online?: CustomerAcceptance.Online; /** - * The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + * The mandate includes the type of customer acceptance information, such as: `online` or `offline`. */ type: CustomerAcceptance.Type; } @@ -72,12 +72,12 @@ declare module 'stripe' { interface Online { /** - * The IP address from which the Mandate was accepted by the customer. + * The customer accepts the mandate from this IP address. */ ip_address: string | null; /** - * The user agent of the browser from which the Mandate was accepted by the customer. + * The customer accepts the mandate using the user agent of the browser. */ user_agent: string | null; } @@ -105,7 +105,7 @@ declare module 'stripe' { sepa_debit?: PaymentMethodDetails.SepaDebit; /** - * The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. + * This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. */ type: string; @@ -217,12 +217,12 @@ declare module 'stripe' { interface SingleUse { /** - * On a single use mandate, the amount of the payment. + * The amount of the payment on a single use mandate. */ amount: number; /** - * On a single use mandate, the currency of the payment. + * The currency of the payment on a single use mandate. */ currency: string; } diff --git a/types/PaymentIntents.d.ts b/types/PaymentIntents.d.ts index b9ac3c3078..20f0b30f60 100644 --- a/types/PaymentIntents.d.ts +++ b/types/PaymentIntents.d.ts @@ -39,7 +39,7 @@ declare module 'stripe' { amount_details?: PaymentIntent.AmountDetails; /** - * Amount that was collected by this PaymentIntent. + * Amount that this PaymentIntent collects. */ amount_received: number; @@ -119,7 +119,7 @@ declare module 'stripe' { last_payment_error: PaymentIntent.LastPaymentError | null; /** - * The latest charge created by this payment intent. + * The latest charge created by this PaymentIntent. */ latest_charge?: string | Stripe.Charge | null; @@ -129,7 +129,7 @@ declare module 'stripe' { livemode: boolean; /** - * 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. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + * 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. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). */ metadata: Stripe.Metadata; @@ -225,12 +225,12 @@ declare module 'stripe' { status: PaymentIntent.Status; /** - * The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + * The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ transfer_data: PaymentIntent.TransferData | null; /** - * A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + * A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). */ transfer_group: string | null; } @@ -1398,8 +1398,8 @@ declare module 'stripe' { capture_method?: 'manual'; /** - * Order identifier shown to the customer in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about - * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + * This field differs from the statement descriptor and item name. */ reference: string | null; @@ -2295,8 +2295,8 @@ declare module 'stripe' { amount?: number; /** - * The account (if any) the payment will be attributed to for tax - * reporting, and where funds from the payment will be transferred to upon + * The account (if any) that the payment is attributed to for tax + * reporting, and where funds from the payment are transferred to after * payment success. */ destination: string | Stripe.Account; diff --git a/types/PaymentIntentsResource.d.ts b/types/PaymentIntentsResource.d.ts index b764c7ba3c..089bb4d867 100644 --- a/types/PaymentIntentsResource.d.ts +++ b/types/PaymentIntentsResource.d.ts @@ -19,7 +19,7 @@ declare module 'stripe' { application_fee_amount?: number; /** - * When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + * When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. */ automatic_payment_methods?: PaymentIntentCreateParams.AutomaticPaymentMethods; @@ -29,7 +29,7 @@ declare module 'stripe' { capture_method?: PaymentIntentCreateParams.CaptureMethod; /** - * Set to `true` to attempt to [confirm](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, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. + * 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). */ confirm?: boolean; @@ -57,7 +57,7 @@ declare module 'stripe' { description?: string; /** - * Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + * Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ error_on_requires_action?: boolean; @@ -67,7 +67,7 @@ declare module 'stripe' { expand?: Array; /** - * ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + * ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ mandate?: string; @@ -82,12 +82,12 @@ declare module 'stripe' { metadata?: Stripe.MetadataParam; /** - * Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + * Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ off_session?: boolean | PaymentIntentCreateParams.OffSession; /** - * The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ on_behalf_of?: string; @@ -99,7 +99,7 @@ declare module 'stripe' { /** * ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. * - * If neither the `payment_method` parameter nor the `source` parameter are provided with `confirm=true`, `source` will be automatically populated with `customer.default_source` to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. + * If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. */ payment_method?: string; @@ -116,22 +116,22 @@ declare module 'stripe' { payment_method_data?: PaymentIntentCreateParams.PaymentMethodData; /** - * Payment-method-specific configuration for this PaymentIntent. + * Payment method-specific configuration for this PaymentIntent. */ payment_method_options?: PaymentIntentCreateParams.PaymentMethodOptions; /** - * The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + * The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, it defaults to ["card"]. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ payment_method_types?: Array; /** - * Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + * Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). */ radar_options?: PaymentIntentCreateParams.RadarOptions; /** - * Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + * Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ receipt_email?: string; @@ -160,23 +160,23 @@ declare module 'stripe' { shipping?: PaymentIntentCreateParams.Shipping; /** - * For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + * For non-card charges, you can use this value as the complete description that appears on your customers' statements. It must contain at least one letter and be 1–22 characters long. */ statement_descriptor?: string; /** - * Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. The concatenated descriptor must contain 1-22 characters. */ statement_descriptor_suffix?: string; /** - * The parameters used to automatically create a Transfer when the payment succeeds. - * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * The parameters that you can use to automatically create a Transfer after the payment succeeds. + * Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ transfer_data?: PaymentIntentCreateParams.TransferData; /** - * A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + * A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). */ transfer_group?: string; @@ -1358,8 +1358,8 @@ declare module 'stripe' { capture_method?: Stripe.Emptyable<'manual'>; /** - * Order identifier shown to the customer in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about - * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + * This field differs from the statement descriptor and item name. */ reference?: string; @@ -2395,7 +2395,7 @@ declare module 'stripe' { interface PaymentIntentRetrieveParams { /** - * The client secret of the PaymentIntent. It's required if you use a publishable key to retrieve the source. + * The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. */ client_secret?: string; @@ -3669,8 +3669,8 @@ declare module 'stripe' { capture_method?: Stripe.Emptyable<'manual'>; /** - * Order identifier shown to the customer in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about - * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + * This field differs from the statement descriptor and item name. */ reference?: string; @@ -4683,12 +4683,12 @@ declare module 'stripe' { interface PaymentIntentListParams extends PaginationParams { /** - * A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + * A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. */ created?: Stripe.RangeQueryParam | number; /** - * Only return PaymentIntents for the customer specified by this customer ID. + * Only return PaymentIntents for the customer that this customer ID specifies. */ customer?: string; @@ -4700,13 +4700,13 @@ declare module 'stripe' { interface PaymentIntentApplyCustomerBalanceParams { /** - * Amount intended to be applied to this PaymentIntent from the customer's cash balance. + * Amount that you intend to apply to this PaymentIntent from the customer's cash balance. * - * A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). + * A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). * * The maximum amount is the amount of the PaymentIntent. * - * When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + * When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. */ amount?: number; @@ -4723,7 +4723,7 @@ declare module 'stripe' { interface PaymentIntentCancelParams { /** - * Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + * Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` */ cancellation_reason?: PaymentIntentCancelParams.CancellationReason; @@ -4743,7 +4743,7 @@ declare module 'stripe' { interface PaymentIntentCaptureParams { /** - * The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. + * The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount is automatically refunded. Defaults to the full `amount_capturable` if it's not provided. */ amount_to_capture?: number; @@ -4775,13 +4775,13 @@ declare module 'stripe' { statement_descriptor?: string; /** - * Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + * Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that's set on the account to form the complete statement descriptor. The concatenated descriptor must be 1-22 characters long. */ statement_descriptor_suffix?: string; /** - * The parameters used to automatically create a Transfer when the payment - * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * The parameters that you can use to automatically create a transfer after the payment + * is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ transfer_data?: PaymentIntentCaptureParams.TransferData; } @@ -5109,20 +5109,17 @@ declare module 'stripe' { expand?: Array; /** - * ID of the mandate to be used for this payment. + * ID of the mandate that's used for this payment. */ mandate?: string; - /** - * This hash contains details about the Mandate to create - */ mandate_data?: Stripe.Emptyable< | PaymentIntentConfirmParams.MandateData1 | PaymentIntentConfirmParams.MandateData2 >; /** - * Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + * Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ off_session?: boolean | PaymentIntentConfirmParams.OffSession; @@ -5146,12 +5143,12 @@ declare module 'stripe' { payment_method_data?: PaymentIntentConfirmParams.PaymentMethodData; /** - * Payment-method-specific configuration for this PaymentIntent. + * Payment method-specific configuration for this PaymentIntent. */ payment_method_options?: PaymentIntentConfirmParams.PaymentMethodOptions; /** - * Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + * Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). */ radar_options?: PaymentIntentConfirmParams.RadarOptions; @@ -6378,8 +6375,8 @@ declare module 'stripe' { capture_method?: Stripe.Emptyable<'manual'>; /** - * Order identifier shown to the customer in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about - * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + * An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + * This field differs from the statement descriptor and item name. */ reference?: string; @@ -7392,7 +7389,7 @@ declare module 'stripe' { interface PaymentIntentIncrementAuthorizationParams { /** - * The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. + * The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. */ amount: number; @@ -7422,8 +7419,8 @@ declare module 'stripe' { statement_descriptor?: string; /** - * The parameters used to automatically create a Transfer when the payment is captured. - * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * The parameters used to automatically create a transfer after the payment is captured. + * Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ transfer_data?: PaymentIntentIncrementAuthorizationParams.TransferData; } @@ -7481,13 +7478,13 @@ declare module 'stripe' { * Creates a PaymentIntent object. * * After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm) - * to continue the payment. You can read more about the different payment flows - * available via the Payment Intents API [here](https://stripe.com/docs/payments/payment-intents). + * to continue the payment. Learn more about the available payment flows + * with the Payment Intents API. * - * When confirm=true is used during creation, it is equivalent to creating - * and confirming the PaymentIntent in the same call. You may use any parameters - * available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when confirm=true - * is supplied. + * When you use confirm=true during creation, it's equivalent to creating + * and confirming the PaymentIntent in the same call. You can use any parameters + * available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply + * confirm=true. */ create( params: PaymentIntentCreateParams, @@ -7549,11 +7546,11 @@ declare module 'stripe' { ): Promise>; /** - * A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing. + * You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing. * - * Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable will automatically be refunded. + * After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded. * - * You cannot cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + * You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. */ cancel( id: string, @@ -7568,7 +7565,7 @@ declare module 'stripe' { /** * Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. * - * Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default). + * Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation. * * Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later). */ @@ -7625,21 +7622,21 @@ declare module 'stripe' { * must be true. * * Incremental authorizations attempt to increase the authorized amount on - * your customer's card to the new, higher amount provided. As with the - * initial authorization, incremental authorizations may be declined. A + * your customer's card to the new, higher amount provided. Similar to the + * initial authorization, incremental authorizations can be declined. A * single PaymentIntent can call this endpoint multiple times to further * increase the authorized amount. * - * If the incremental authorization succeeds, the PaymentIntent object is - * returned with the updated + * If the incremental authorization succeeds, the PaymentIntent object + * returns with the updated * [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount). * If the incremental authorization fails, a - * [card_declined](https://stripe.com/docs/error-codes#card-declined) error is returned, and no - * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other + * fields on the PaymentIntent or Charge update. The PaymentIntent * object remains capturable for the previously authorized amount. * * Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. - * Once captured, a PaymentIntent can no longer be incremented. + * After it's captured, a PaymentIntent can no longer be incremented. * * Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations). */ diff --git a/types/PaymentMethods.d.ts b/types/PaymentMethods.d.ts index f92a000e1a..1d285a0fc2 100644 --- a/types/PaymentMethods.d.ts +++ b/types/PaymentMethods.d.ts @@ -981,7 +981,7 @@ declare module 'stripe' { /** * The ID of the Financial Connections Account used to create the payment method. */ - financial_connections_account?: string | null; + financial_connections_account: string | null; /** * Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. @@ -1006,7 +1006,7 @@ declare module 'stripe' { /** * Contains information about the future reusability of this PaymentMethod. */ - status_details?: UsBankAccount.StatusDetails | null; + status_details: UsBankAccount.StatusDetails | null; } namespace UsBankAccount { diff --git a/types/Payouts.d.ts b/types/Payouts.d.ts index 05ee9b0d0d..51ad8e84bc 100644 --- a/types/Payouts.d.ts +++ b/types/Payouts.d.ts @@ -6,7 +6,7 @@ declare module 'stripe' { * A `Payout` object is created when you receive funds from Stripe, or when you * initiate a payout to either a bank account or debit card of a [connected * Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, - * as well as list all payouts. Payouts are made on [varying + * and list all payouts. Payouts are made on [varying * schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and * industry. * @@ -24,17 +24,17 @@ declare module 'stripe' { object: 'payout'; /** - * Amount (in cents (or local equivalent)) to be transferred to your bank account or debit card. + * The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. */ amount: number; /** - * Date the payout is expected to arrive in the bank. This factors in delays like weekends or bank holidays. + * Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. */ arrival_date: number; /** - * Returns `true` if the payout was created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts). + * Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). */ automatic: boolean; @@ -59,7 +59,7 @@ declare module 'stripe' { description: string | null; /** - * ID of the bank account or card the payout was sent to. + * ID of the bank account or card the payout is sent to. */ destination: | string @@ -70,17 +70,17 @@ declare module 'stripe' { | null; /** - * If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. + * If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. */ failure_balance_transaction: string | Stripe.BalanceTransaction | null; /** - * Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes. + * Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). */ failure_code: string | null; /** - * Message to user further explaining reason for payout failure if available. + * Message that provides the reason for a payout failure, if available. */ failure_message: string | null; @@ -95,7 +95,7 @@ declare module 'stripe' { metadata: Stripe.Metadata | null; /** - * The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. (See [Bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks) for more information.) + * The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). */ method: string; @@ -105,27 +105,27 @@ declare module 'stripe' { original_payout: string | Stripe.Payout | null; /** - * If `completed`, the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) may be used to list all Balance Transactions that were paid out in this payout. + * If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. */ reconciliation_status: Payout.ReconciliationStatus; /** - * If the payout was reversed, this is the ID of the payout that reverses this payout. + * If the payout reverses, this is the ID of the payout that reverses this payout. */ reversed_by: string | Stripe.Payout | null; /** - * The source balance this payout came from. One of `card`, `fpx`, or `bank_account`. + * The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. */ source_type: string; /** - * Extra information about a payout to be displayed on the user's bank statement. + * Extra information about a payout that displays on the user's bank statement. */ statement_descriptor: string | null; /** - * Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it is submitted to the bank, when it becomes `in_transit`. The status then changes to `paid` if the transaction goes through, or to `failed` or `canceled` (within 5 business days). Some failed payouts may initially show as `paid` but then change to `failed`. + * Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. */ status: string; diff --git a/types/PayoutsResource.d.ts b/types/PayoutsResource.d.ts index 29dbbd825c..5ad9d7dc38 100644 --- a/types/PayoutsResource.d.ts +++ b/types/PayoutsResource.d.ts @@ -19,7 +19,7 @@ declare module 'stripe' { description?: string; /** - * The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. + * The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. */ destination?: string; @@ -34,17 +34,17 @@ declare module 'stripe' { metadata?: Stripe.MetadataParam; /** - * The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. (See [Bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks) for more information.) + * The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). */ method?: PayoutCreateParams.Method; /** - * The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. */ source_type?: PayoutCreateParams.SourceType; /** - * A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. + * A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. */ statement_descriptor?: string; } @@ -116,11 +116,11 @@ declare module 'stripe' { class PayoutsResource { /** - * To send funds to your own bank account, you create a new payout object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the payout amount, or you'll receive an “Insufficient Funds” error. + * To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://stripe.com/docs/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error. * - * If your API key is in test mode, money won't actually be sent, though everything else will occur as if in live mode. + * If your API key is in test mode, money won't actually be sent, though every other action occurs as if you're in live mode. * - * If you are creating a manual payout on a Stripe account that uses multiple payment source types, you'll need to specify the source type balance that the payout should draw from. The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type. + * If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type. */ create( params: PayoutCreateParams, @@ -128,7 +128,7 @@ declare module 'stripe' { ): Promise>; /** - * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information. + * Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information. */ retrieve( id: string, @@ -141,7 +141,7 @@ declare module 'stripe' { ): Promise>; /** - * Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments. + * Updates the specified payout by setting the values of the parameters you pass. We don't change parameters that you don't provide. This request only accepts the metadata as arguments. */ update( id: string, @@ -150,7 +150,7 @@ declare module 'stripe' { ): Promise>; /** - * Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first. + * Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. */ list( params?: PayoutListParams, @@ -159,7 +159,7 @@ declare module 'stripe' { list(options?: RequestOptions): ApiListPromise; /** - * A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts. + * You can cancel a previously created payout if it hasn't been paid out yet. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. */ cancel( id: string, @@ -172,9 +172,9 @@ declare module 'stripe' { ): Promise>; /** - * Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead. + * Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is in the pending status, use /v1/payouts/:id/cancel instead. * - * By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required. + * By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required. */ reverse( id: string, diff --git a/types/QuotePreviewInvoices.d.ts b/types/QuotePreviewInvoices.d.ts index e6d26d0208..b7b7019821 100644 --- a/types/QuotePreviewInvoices.d.ts +++ b/types/QuotePreviewInvoices.d.ts @@ -330,7 +330,12 @@ declare module 'stripe' { receipt_number: string | null; /** - * Options for invoice PDF rendering. + * The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + */ + rendering: QuotePreviewInvoice.Rendering | null; + + /** + * This is a legacy field that will be removed soon. For details about `rendering_options`, refer to `rendering` instead. Options for invoice PDF rendering. */ rendering_options: QuotePreviewInvoice.RenderingOptions | null; @@ -460,7 +465,7 @@ declare module 'stripe' { enabled: boolean; /** - * The connected account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. */ liability?: AutomaticTax.Liability | null; @@ -1130,6 +1135,31 @@ declare module 'stripe' { | 'wechat_pay'; } + interface Rendering { + /** + * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + */ + amount_tax_display: string | null; + + /** + * Invoice pdf rendering options + */ + pdf: Rendering.Pdf | null; + } + + namespace Rendering { + interface Pdf { + /** + * Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. + */ + page_size: Pdf.PageSize | null; + } + + namespace Pdf { + type PageSize = 'a4' | 'auto' | 'letter'; + } + } + interface RenderingOptions { /** * How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. diff --git a/types/QuotePreviewSchedules.d.ts b/types/QuotePreviewSchedules.d.ts index 73803ff5ba..7722fb5403 100644 --- a/types/QuotePreviewSchedules.d.ts +++ b/types/QuotePreviewSchedules.d.ts @@ -203,7 +203,7 @@ declare module 'stripe' { enabled: boolean; /** - * The connected account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. */ liability?: AutomaticTax.Liability | null; } @@ -469,7 +469,7 @@ declare module 'stripe' { enabled: boolean; /** - * The connected account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. */ liability?: AutomaticTax.Liability | null; } diff --git a/types/Refunds.d.ts b/types/Refunds.d.ts index de9dea55c7..3f50589de6 100644 --- a/types/Refunds.d.ts +++ b/types/Refunds.d.ts @@ -3,9 +3,9 @@ declare module 'stripe' { namespace Stripe { /** - * `Refund` objects allow you to refund a charge that has previously been created - * but not yet refunded. Funds will be refunded to the credit or debit card that - * was originally charged. + * Refund objects allow you to refund a previously created charge that isn't + * refunded yet. Funds are refunded to the credit or debit card that's + * initially charged. * * Related guide: [Refunds](https://stripe.com/docs/refunds) */ @@ -31,7 +31,7 @@ declare module 'stripe' { balance_transaction: string | Stripe.BalanceTransaction | null; /** - * ID of the charge that was refunded. + * ID of the charge that's refunded. */ charge: string | Stripe.Charge | null; @@ -46,22 +46,22 @@ declare module 'stripe' { currency: string; /** - * An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) + * An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). */ description?: string; /** - * If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + * After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. */ failure_balance_transaction?: string | Stripe.BalanceTransaction; /** - * If the refund failed, the reason for refund failure if known. Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request` or `unknown`. + * Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. */ failure_reason?: string; /** - * For payment methods without native refund support (e.g., Konbini, PromptPay), email for the customer to receive refund instructions. + * For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. */ instructions_email?: string; @@ -73,12 +73,12 @@ declare module 'stripe' { next_action?: Refund.NextAction; /** - * ID of the PaymentIntent that was refunded. + * ID of the PaymentIntent that's refunded. */ payment_intent: string | Stripe.PaymentIntent | null; /** - * Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + * Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). */ reason: Refund.Reason | null; @@ -88,17 +88,17 @@ declare module 'stripe' { receipt_number: string | null; /** - * The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. + * The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. */ source_transfer_reversal: string | Stripe.TransferReversal | null; /** - * Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. + * Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). */ status: string | null; /** - * If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. + * This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. */ transfer_reversal: string | Stripe.TransferReversal | null; } diff --git a/types/RefundsResource.d.ts b/types/RefundsResource.d.ts index d6206f43e4..cb097367fa 100644 --- a/types/RefundsResource.d.ts +++ b/types/RefundsResource.d.ts @@ -3,11 +3,11 @@ declare module 'stripe' { namespace Stripe { interface RefundCreateParams { - /** - * A positive integer representing how much to refund. - */ amount?: number; + /** + * The identifier of the charge to refund. + */ charge?: string; /** @@ -40,12 +40,26 @@ declare module 'stripe' { */ origin?: 'customer_balance'; + /** + * The identifier of the PaymentIntent to refund. + */ payment_intent?: string; + /** + * String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. + */ reason?: RefundCreateParams.Reason; + /** + * Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + */ refund_application_fee?: boolean; + /** + * Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). + * + * A transfer can be reversed only by the application that created the charge. + */ reverse_transfer?: boolean; } @@ -100,7 +114,17 @@ declare module 'stripe' { class RefundsResource { /** - * Create a refund. + * When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. + * + * Creating a new refund will refund a charge that has previously been created but not yet refunded. + * Funds will be refunded to the credit or debit card that was originally charged. + * + * You can optionally refund only part of a charge. + * You can do so multiple times, until the entire charge has been refunded. + * + * Once entirely refunded, a charge can't be refunded again. + * This method will raise an error when called on an already-refunded charge, + * or when trying to refund more money than is left on a charge. */ create( params?: RefundCreateParams, @@ -122,7 +146,7 @@ declare module 'stripe' { ): Promise>; /** - * Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + * Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged. * * This request only accepts metadata as an argument. */ @@ -133,7 +157,7 @@ declare module 'stripe' { ): Promise>; /** - * Returns a list of all refunds you've previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object. + * Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first The 10 most recent refunds are always available by default on the Charge object. */ list( params?: RefundListParams, @@ -144,7 +168,7 @@ declare module 'stripe' { /** * Cancels a refund with a status of requires_action. * - * Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state. + * You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state. */ cancel( id: string, diff --git a/types/SetupAttempts.d.ts b/types/SetupAttempts.d.ts index 6300987390..fa934e3029 100644 --- a/types/SetupAttempts.d.ts +++ b/types/SetupAttempts.d.ts @@ -4,7 +4,7 @@ declare module 'stripe' { namespace Stripe { /** * A SetupAttempt describes one attempted confirmation of a SetupIntent, - * whether that confirmation was successful or unsuccessful. You can use + * whether that confirmation is successful or unsuccessful. You can use * SetupAttempts to inspect details of a specific attempt at setting up a * payment method using a SetupIntent. */ diff --git a/types/SetupAttemptsResource.d.ts b/types/SetupAttemptsResource.d.ts index 806feb7066..755a9d2417 100644 --- a/types/SetupAttemptsResource.d.ts +++ b/types/SetupAttemptsResource.d.ts @@ -11,7 +11,7 @@ declare module 'stripe' { /** * A filter on the list, based on the object `created` field. The value - * can be a string with an integer Unix timestamp, or it can be a + * can be a string with an integer Unix timestamp or a * dictionary with a number of different query options. */ created?: Stripe.RangeQueryParam | number; @@ -24,7 +24,7 @@ declare module 'stripe' { class SetupAttemptsResource { /** - * Returns a list of SetupAttempts associated with a provided SetupIntent. + * Returns a list of SetupAttempts that associate with a provided SetupIntent. */ list( params: SetupAttemptListParams, diff --git a/types/SubscriptionSchedules.d.ts b/types/SubscriptionSchedules.d.ts index cf6e6cfde0..2105ba6cb2 100644 --- a/types/SubscriptionSchedules.d.ts +++ b/types/SubscriptionSchedules.d.ts @@ -182,7 +182,7 @@ declare module 'stripe' { enabled: boolean; /** - * The connected account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. */ liability?: AutomaticTax.Liability | null; } @@ -448,7 +448,7 @@ declare module 'stripe' { enabled: boolean; /** - * The connected account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. */ liability?: AutomaticTax.Liability | null; } diff --git a/types/Subscriptions.d.ts b/types/Subscriptions.d.ts index bf91700a8b..97c1eb1990 100644 --- a/types/Subscriptions.d.ts +++ b/types/Subscriptions.d.ts @@ -251,7 +251,7 @@ declare module 'stripe' { enabled: boolean; /** - * The connected account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + * The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. */ liability?: AutomaticTax.Liability | null; } diff --git a/types/TestHelpers/Issuing/CardDesignsResource.d.ts b/types/TestHelpers/Issuing/PersonalizationDesignsResource.d.ts similarity index 60% rename from types/TestHelpers/Issuing/CardDesignsResource.d.ts rename to types/TestHelpers/Issuing/PersonalizationDesignsResource.d.ts index 17e19f801e..a872b9ce5d 100644 --- a/types/TestHelpers/Issuing/CardDesignsResource.d.ts +++ b/types/TestHelpers/Issuing/PersonalizationDesignsResource.d.ts @@ -4,7 +4,7 @@ declare module 'stripe' { namespace Stripe { namespace TestHelpers { namespace Issuing { - interface CardDesignActivateTestmodeParams { + interface PersonalizationDesignActivateParams { /** * Specifies which fields in the response should be expanded. */ @@ -13,7 +13,7 @@ declare module 'stripe' { } namespace Issuing { - interface CardDesignDeactivateTestmodeParams { + interface PersonalizationDesignDeactivateParams { /** * Specifies which fields in the response should be expanded. */ @@ -22,11 +22,11 @@ declare module 'stripe' { } namespace Issuing { - interface CardDesignRejectTestmodeParams { + interface PersonalizationDesignRejectParams { /** - * The reason(s) the card design was rejected. + * The reason(s) the personalization design was rejected. */ - rejection_reasons: CardDesignRejectTestmodeParams.RejectionReasons; + rejection_reasons: PersonalizationDesignRejectParams.RejectionReasons; /** * Specifies which fields in the response should be expanded. @@ -34,7 +34,7 @@ declare module 'stripe' { expand?: Array; } - namespace CardDesignRejectTestmodeParams { + namespace PersonalizationDesignRejectParams { interface RejectionReasons { /** * The reason(s) the card logo was rejected. @@ -71,41 +71,41 @@ declare module 'stripe' { } namespace Issuing { - class CardDesignsResource { + class PersonalizationDesignsResource { /** - * Updates the status of the specified testmode card design object to active. + * Updates the status of the specified testmode personalization design object to active. */ - activateTestmode( + activate( id: string, - params?: CardDesignActivateTestmodeParams, + params?: PersonalizationDesignActivateParams, options?: RequestOptions - ): Promise>; - activateTestmode( + ): Promise>; + activate( id: string, options?: RequestOptions - ): Promise>; + ): Promise>; /** - * Updates the status of the specified testmode card design object to inactive. + * Updates the status of the specified testmode personalization design object to inactive. */ - deactivateTestmode( + deactivate( id: string, - params?: CardDesignDeactivateTestmodeParams, + params?: PersonalizationDesignDeactivateParams, options?: RequestOptions - ): Promise>; - deactivateTestmode( + ): Promise>; + deactivate( id: string, options?: RequestOptions - ): Promise>; + ): Promise>; /** - * Updates the status of the specified testmode card design object to rejected. + * Updates the status of the specified testmode personalization design object to rejected. */ - rejectTestmode( + reject( id: string, - params: CardDesignRejectTestmodeParams, + params: PersonalizationDesignRejectParams, options?: RequestOptions - ): Promise>; + ): Promise>; } } } diff --git a/types/Treasury/ReceivedCredits.d.ts b/types/Treasury/ReceivedCredits.d.ts index 412aa4ad18..1772744268 100644 --- a/types/Treasury/ReceivedCredits.d.ts +++ b/types/Treasury/ReceivedCredits.d.ts @@ -215,7 +215,7 @@ declare module 'stripe' { * A `Payout` object is created when you receive funds from Stripe, or when you * initiate a payout to either a bank account or debit card of a [connected * Stripe account](https://stripe.com/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, - * as well as list all payouts. Payouts are made on [varying + * and list all payouts. Payouts are made on [varying * schedules](https://stripe.com/docs/connect/manage-payout-schedule), depending on your country and * industry. * diff --git a/types/WebhookEndpointsResource.d.ts b/types/WebhookEndpointsResource.d.ts index d37ca7e15f..99bda73b78 100644 --- a/types/WebhookEndpointsResource.d.ts +++ b/types/WebhookEndpointsResource.d.ts @@ -202,6 +202,7 @@ declare module 'stripe' { | 'customer.subscription.collection_paused' | 'customer.subscription.collection_resumed' | 'customer.subscription.created' + | 'customer.subscription.custom_event' | 'customer.subscription.deleted' | 'customer.subscription.paused' | 'customer.subscription.pending_update_applied' @@ -250,10 +251,6 @@ declare module 'stripe' { | 'issuing_authorization.updated' | 'issuing_card.created' | 'issuing_card.updated' - | 'issuing_card_design.activated' - | 'issuing_card_design.deactivated' - | 'issuing_card_design.rejected' - | 'issuing_card_design.updated' | 'issuing_cardholder.created' | 'issuing_cardholder.updated' | 'issuing_dispute.closed' @@ -261,10 +258,13 @@ declare module 'stripe' { | 'issuing_dispute.funds_reinstated' | 'issuing_dispute.submitted' | 'issuing_dispute.updated' + | 'issuing_personalization_design.activated' + | 'issuing_personalization_design.deactivated' + | 'issuing_personalization_design.rejected' + | 'issuing_personalization_design.updated' | 'issuing_transaction.created' | 'issuing_transaction.updated' | 'mandate.updated' - | 'order.created' | 'payment_intent.amount_capturable_updated' | 'payment_intent.canceled' | 'payment_intent.created' @@ -310,9 +310,6 @@ declare module 'stripe' { | 'quote.stale' | 'radar.early_fraud_warning.created' | 'radar.early_fraud_warning.updated' - | 'recipient.created' - | 'recipient.deleted' - | 'recipient.updated' | 'refund.created' | 'refund.updated' | 'reporting.report_run.failed' @@ -326,9 +323,6 @@ declare module 'stripe' { | 'setup_intent.setup_failed' | 'setup_intent.succeeded' | 'sigma.scheduled_query_run.created' - | 'sku.created' - | 'sku.deleted' - | 'sku.updated' | 'source.canceled' | 'source.chargeable' | 'source.failed' @@ -391,7 +385,14 @@ declare module 'stripe' { | 'treasury.received_credit.failed' | 'treasury.received_credit.succeeded' | 'treasury.received_debit.created' - | 'invoiceitem.updated'; + | 'invoiceitem.updated' + | 'order.created' + | 'recipient.created' + | 'recipient.deleted' + | 'recipient.updated' + | 'sku.created' + | 'sku.deleted' + | 'sku.updated'; } interface WebhookEndpointRetrieveParams { @@ -495,6 +496,7 @@ declare module 'stripe' { | 'customer.subscription.collection_paused' | 'customer.subscription.collection_resumed' | 'customer.subscription.created' + | 'customer.subscription.custom_event' | 'customer.subscription.deleted' | 'customer.subscription.paused' | 'customer.subscription.pending_update_applied' @@ -543,10 +545,6 @@ declare module 'stripe' { | 'issuing_authorization.updated' | 'issuing_card.created' | 'issuing_card.updated' - | 'issuing_card_design.activated' - | 'issuing_card_design.deactivated' - | 'issuing_card_design.rejected' - | 'issuing_card_design.updated' | 'issuing_cardholder.created' | 'issuing_cardholder.updated' | 'issuing_dispute.closed' @@ -554,10 +552,13 @@ declare module 'stripe' { | 'issuing_dispute.funds_reinstated' | 'issuing_dispute.submitted' | 'issuing_dispute.updated' + | 'issuing_personalization_design.activated' + | 'issuing_personalization_design.deactivated' + | 'issuing_personalization_design.rejected' + | 'issuing_personalization_design.updated' | 'issuing_transaction.created' | 'issuing_transaction.updated' | 'mandate.updated' - | 'order.created' | 'payment_intent.amount_capturable_updated' | 'payment_intent.canceled' | 'payment_intent.created' @@ -603,9 +604,6 @@ declare module 'stripe' { | 'quote.stale' | 'radar.early_fraud_warning.created' | 'radar.early_fraud_warning.updated' - | 'recipient.created' - | 'recipient.deleted' - | 'recipient.updated' | 'refund.created' | 'refund.updated' | 'reporting.report_run.failed' @@ -619,9 +617,6 @@ declare module 'stripe' { | 'setup_intent.setup_failed' | 'setup_intent.succeeded' | 'sigma.scheduled_query_run.created' - | 'sku.created' - | 'sku.deleted' - | 'sku.updated' | 'source.canceled' | 'source.chargeable' | 'source.failed' @@ -684,7 +679,14 @@ declare module 'stripe' { | 'treasury.received_credit.failed' | 'treasury.received_credit.succeeded' | 'treasury.received_debit.created' - | 'invoiceitem.updated'; + | 'invoiceitem.updated' + | 'order.created' + | 'recipient.created' + | 'recipient.deleted' + | 'recipient.updated' + | 'sku.created' + | 'sku.deleted' + | 'sku.updated'; } interface WebhookEndpointListParams extends PaginationParams { diff --git a/types/index.d.ts b/types/index.d.ts index 6f3af1a971..0a0225299a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -44,11 +44,11 @@ /// /// /// -/// -/// /// /// /// +/// +/// /// /// /// @@ -92,8 +92,8 @@ /// /// /// -/// /// +/// /// /// /// @@ -170,11 +170,11 @@ /// /// /// -/// -/// /// /// /// +/// +/// /// /// /// @@ -345,10 +345,10 @@ declare module 'stripe' { issuing: { authorizations: Stripe.Issuing.AuthorizationsResource; cards: Stripe.Issuing.CardsResource; - cardBundles: Stripe.Issuing.CardBundlesResource; - cardDesigns: Stripe.Issuing.CardDesignsResource; cardholders: Stripe.Issuing.CardholdersResource; disputes: Stripe.Issuing.DisputesResource; + personalizationDesigns: Stripe.Issuing.PersonalizationDesignsResource; + physicalBundles: Stripe.Issuing.PhysicalBundlesResource; transactions: Stripe.Issuing.TransactionsResource; }; radar: { @@ -383,7 +383,7 @@ declare module 'stripe' { issuing: { authorizations: Stripe.TestHelpers.Issuing.AuthorizationsResource; cards: Stripe.TestHelpers.Issuing.CardsResource; - cardDesigns: Stripe.TestHelpers.Issuing.CardDesignsResource; + personalizationDesigns: Stripe.TestHelpers.Issuing.PersonalizationDesignsResource; transactions: Stripe.TestHelpers.Issuing.TransactionsResource; }; terminal: {