From 1e30ee8e3fac4d37948c1a241e27f254d9c7a36d Mon Sep 17 00:00:00 2001 From: Kamil Pajdzik <99290280+kamil-stripe@users.noreply.github.com> Date: Wed, 2 Nov 2022 13:21:02 -0700 Subject: [PATCH] API Updates (#1596) Codegen for openapi v204 --- OPENAPI_VERSION | 2 +- types/2022-08-01/Checkout/Sessions.d.ts | 5 ++++ types/2022-08-01/InvoiceItems.d.ts | 24 ++++++++++++++++ types/2022-08-01/Invoices.d.ts | 24 ++++++++++++++++ types/2022-08-01/Issuing/Authorizations.d.ts | 2 ++ types/2022-08-01/Refunds.d.ts | 4 +++ types/2022-08-01/SubscriptionSchedules.d.ts | 30 ++++++++++++++++++++ types/2022-08-01/Subscriptions.d.ts | 15 ++++++++++ types/2022-08-01/Transfers.d.ts | 6 ++-- 9 files changed, 108 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index e394bcf081..fe802d3a45 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v203 \ No newline at end of file +v204 \ No newline at end of file diff --git a/types/2022-08-01/Checkout/Sessions.d.ts b/types/2022-08-01/Checkout/Sessions.d.ts index 9574bf8a43..74b43703cc 100644 --- a/types/2022-08-01/Checkout/Sessions.d.ts +++ b/types/2022-08-01/Checkout/Sessions.d.ts @@ -3142,6 +3142,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * The account on behalf of which to charge, for each of the subscription's invoices. + */ + on_behalf_of?: string; + /** * If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. */ diff --git a/types/2022-08-01/InvoiceItems.d.ts b/types/2022-08-01/InvoiceItems.d.ts index e74de5a3f6..7fbdef7f3f 100644 --- a/types/2022-08-01/InvoiceItems.d.ts +++ b/types/2022-08-01/InvoiceItems.d.ts @@ -232,6 +232,16 @@ declare module 'stripe' { */ subscription?: string; + /** + * Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ + tax_behavior?: InvoiceItemCreateParams.TaxBehavior; + + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + */ + tax_code?: Stripe.Emptyable; + /** * The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ @@ -303,6 +313,8 @@ declare module 'stripe' { namespace PriceData { type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } + + type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } interface InvoiceItemRetrieveParams { @@ -363,6 +375,16 @@ declare module 'stripe' { */ quantity?: number; + /** + * Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ + tax_behavior?: InvoiceItemUpdateParams.TaxBehavior; + + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + */ + tax_code?: Stripe.Emptyable; + /** * The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ @@ -434,6 +456,8 @@ declare module 'stripe' { namespace PriceData { type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } + + type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } interface InvoiceItemListParams extends PaginationParams { diff --git a/types/2022-08-01/Invoices.d.ts b/types/2022-08-01/Invoices.d.ts index 7f316e2c6a..07bc5b551d 100644 --- a/types/2022-08-01/Invoices.d.ts +++ b/types/2022-08-01/Invoices.d.ts @@ -2210,6 +2210,16 @@ declare module 'stripe' { */ quantity?: number; + /** + * Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ + tax_behavior?: InvoiceItem.TaxBehavior; + + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + */ + tax_code?: Stripe.Emptyable; + /** * The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. */ @@ -2281,6 +2291,8 @@ declare module 'stripe' { namespace PriceData { type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } + + type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } type SubscriptionBillingCycleAnchor = 'now' | 'unchanged'; @@ -2760,6 +2772,16 @@ declare module 'stripe' { */ quantity?: number; + /** + * Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + */ + tax_behavior?: InvoiceItem.TaxBehavior; + + /** + * A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + */ + tax_code?: Stripe.Emptyable; + /** * The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. */ @@ -2831,6 +2853,8 @@ declare module 'stripe' { namespace PriceData { type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } + + type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified'; } type SubscriptionBillingCycleAnchor = 'now' | 'unchanged'; diff --git a/types/2022-08-01/Issuing/Authorizations.d.ts b/types/2022-08-01/Issuing/Authorizations.d.ts index 936d99a094..3d7ef05adc 100644 --- a/types/2022-08-01/Issuing/Authorizations.d.ts +++ b/types/2022-08-01/Issuing/Authorizations.d.ts @@ -464,6 +464,7 @@ declare module 'stripe' { /** * Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. + * You can also respond directly to the webhook request to approve an authorization (preferred). More details can be found [here](https://site-admin.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). */ approve( id: string, @@ -477,6 +478,7 @@ declare module 'stripe' { /** * Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. + * You can also respond directly to the webhook request to decline an authorization (preferred). More details can be found [here](https://site-admin.stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). */ decline( id: string, diff --git a/types/2022-08-01/Refunds.d.ts b/types/2022-08-01/Refunds.d.ts index f620ad25da..97e274cd4b 100644 --- a/types/2022-08-01/Refunds.d.ts +++ b/types/2022-08-01/Refunds.d.ts @@ -7,6 +7,10 @@ declare module 'stripe' { * but not yet refunded. Funds will be refunded to the credit or debit card that * was originally charged. * + * Stripe Tax users with recurring payments and invoices can create [Credit Notes](https://stripe.com/docs/api/credit_notes), + * which reduce overall tax liability because tax is correctly recalculated and + * apportioned to the related invoice. + * * Related guide: [Refunds](https://stripe.com/docs/refunds). */ interface Refund { diff --git a/types/2022-08-01/SubscriptionSchedules.d.ts b/types/2022-08-01/SubscriptionSchedules.d.ts index 36e028e606..267c3f6d1f 100644 --- a/types/2022-08-01/SubscriptionSchedules.d.ts +++ b/types/2022-08-01/SubscriptionSchedules.d.ts @@ -151,6 +151,11 @@ declare module 'stripe' { */ invoice_settings: DefaultSettings.InvoiceSettings | null; + /** + * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + */ + on_behalf_of: string | Stripe.Account | null; + /** * The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ @@ -276,6 +281,11 @@ declare module 'stripe' { */ metadata: Stripe.Metadata | null; + /** + * The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + */ + on_behalf_of: string | Stripe.Account | null; + /** * If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. */ @@ -493,6 +503,11 @@ declare module 'stripe' { */ invoice_settings?: DefaultSettings.InvoiceSettings; + /** + * The account on behalf of which to charge, for each of the associated subscription's invoices. + */ + on_behalf_of?: Stripe.Emptyable; + /** * The data with which to automatically create a Transfer for each of the associated subscription's invoices. */ @@ -626,6 +641,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * The account on behalf of which to charge, for each of the associated subscription's invoices. + */ + on_behalf_of?: string; + /** * Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. */ @@ -928,6 +948,11 @@ declare module 'stripe' { */ invoice_settings?: DefaultSettings.InvoiceSettings; + /** + * The account on behalf of which to charge, for each of the associated subscription's invoices. + */ + on_behalf_of?: Stripe.Emptyable; + /** * The data with which to automatically create a Transfer for each of the associated subscription's invoices. */ @@ -1061,6 +1086,11 @@ declare module 'stripe' { */ metadata?: Stripe.MetadataParam; + /** + * The account on behalf of which to charge, for each of the associated subscription's invoices. + */ + on_behalf_of?: string; + /** * Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. */ diff --git a/types/2022-08-01/Subscriptions.d.ts b/types/2022-08-01/Subscriptions.d.ts index 49025a3342..92d46aea27 100644 --- a/types/2022-08-01/Subscriptions.d.ts +++ b/types/2022-08-01/Subscriptions.d.ts @@ -149,6 +149,11 @@ declare module 'stripe' { */ next_pending_invoice_item_invoice: number | null; + /** + * The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. + */ + on_behalf_of: string | Stripe.Account | null; + /** * If specified, payment collection for this subscription will be paused. */ @@ -653,6 +658,11 @@ declare module 'stripe' { */ off_session?: boolean; + /** + * The account on behalf of which to charge, for each of the subscription's invoices. + */ + on_behalf_of?: Stripe.Emptyable; + /** * Only applies to subscriptions with `collection_method=charge_automatically`. * @@ -1268,6 +1278,11 @@ declare module 'stripe' { */ off_session?: boolean; + /** + * The account on behalf of which to charge, for each of the subscription's invoices. + */ + on_behalf_of?: Stripe.Emptyable; + /** * If specified, payment collection for this subscription will be paused. */ diff --git a/types/2022-08-01/Transfers.d.ts b/types/2022-08-01/Transfers.d.ts index e20cb902c0..0bef68541d 100644 --- a/types/2022-08-01/Transfers.d.ts +++ b/types/2022-08-01/Transfers.d.ts @@ -258,13 +258,13 @@ declare module 'stripe' { * By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. */ retrieveReversal( - idId: string, + transferId: string, id: string, params?: TransferReversalRetrieveParams, options?: RequestOptions ): Promise>; retrieveReversal( - idId: string, + transferId: string, id: string, options?: RequestOptions ): Promise>; @@ -275,7 +275,7 @@ declare module 'stripe' { * This request only accepts metadata and description as arguments. */ updateReversal( - idId: string, + transferId: string, id: string, params?: TransferReversalUpdateParams, options?: RequestOptions