Skip to content

Commit

Permalink
API Updates (#1596)
Browse files Browse the repository at this point in the history
Codegen for openapi v204
  • Loading branch information
kamil-stripe committed Nov 2, 2022
1 parent a8a1f48 commit 1e30ee8
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v203
v204
5 changes: 5 additions & 0 deletions types/2022-08-01/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
24 changes: 24 additions & 0 deletions types/2022-08-01/InvoiceItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>;

/**
* 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.
*/
Expand Down Expand Up @@ -303,6 +313,8 @@ declare module 'stripe' {
namespace PriceData {
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
}

type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
}

interface InvoiceItemRetrieveParams {
Expand Down Expand Up @@ -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<string>;

/**
* 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.
*/
Expand Down Expand Up @@ -434,6 +456,8 @@ declare module 'stripe' {
namespace PriceData {
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
}

type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
}

interface InvoiceItemListParams extends PaginationParams {
Expand Down
24 changes: 24 additions & 0 deletions types/2022-08-01/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>;

/**
* The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
*/
Expand Down Expand Up @@ -2281,6 +2291,8 @@ declare module 'stripe' {
namespace PriceData {
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
}

type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
}

type SubscriptionBillingCycleAnchor = 'now' | 'unchanged';
Expand Down Expand Up @@ -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<string>;

/**
* The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item.
*/
Expand Down Expand Up @@ -2831,6 +2853,8 @@ declare module 'stripe' {
namespace PriceData {
type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
}

type TaxBehavior = 'exclusive' | 'inclusive' | 'unspecified';
}

type SubscriptionBillingCycleAnchor = 'now' | 'unchanged';
Expand Down
2 changes: 2 additions & 0 deletions types/2022-08-01/Issuing/Authorizations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions types/2022-08-01/Refunds.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
30 changes: 30 additions & 0 deletions types/2022-08-01/SubscriptionSchedules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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`.
*/
Expand Down Expand Up @@ -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<string>;

/**
* The data with which to automatically create a Transfer for each of the associated subscription's invoices.
*/
Expand Down Expand Up @@ -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`.
*/
Expand Down Expand Up @@ -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<string>;

/**
* The data with which to automatically create a Transfer for each of the associated subscription's invoices.
*/
Expand Down Expand Up @@ -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`.
*/
Expand Down
15 changes: 15 additions & 0 deletions types/2022-08-01/Subscriptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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<string>;

/**
* Only applies to subscriptions with `collection_method=charge_automatically`.
*
Expand Down Expand Up @@ -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<string>;

/**
* If specified, payment collection for this subscription will be paused.
*/
Expand Down
6 changes: 3 additions & 3 deletions types/2022-08-01/Transfers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Stripe.Response<Stripe.TransferReversal>>;
retrieveReversal(
idId: string,
transferId: string,
id: string,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.TransferReversal>>;
Expand All @@ -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
Expand Down

0 comments on commit 1e30ee8

Please sign in to comment.