Skip to content

Commit

Permalink
Codegen for openapi v158
Browse files Browse the repository at this point in the history
  • Loading branch information
yejia-stripe committed Jun 21, 2022
1 parent 2307df7 commit 72a1382
Show file tree
Hide file tree
Showing 14 changed files with 292 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v157
v158
31 changes: 31 additions & 0 deletions types/2020-08-27/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,11 @@ declare module 'stripe' {
*/
paynow_payments?: Capabilities.PaynowPayments;

/**
* The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges.
*/
promptpay_payments?: Capabilities.PromptpayPayments;

/**
* The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges.
*/
Expand Down Expand Up @@ -361,6 +366,8 @@ declare module 'stripe' {

type PaynowPayments = 'active' | 'inactive' | 'pending';

type PromptpayPayments = 'active' | 'inactive' | 'pending';

type SepaDebitPayments = 'active' | 'inactive' | 'pending';

type SofortPayments = 'active' | 'inactive' | 'pending';
Expand Down Expand Up @@ -1377,6 +1384,11 @@ declare module 'stripe' {
*/
paynow_payments?: Capabilities.PaynowPayments;

/**
* The promptpay_payments capability.
*/
promptpay_payments?: Capabilities.PromptpayPayments;

/**
* The sepa_debit_payments capability.
*/
Expand Down Expand Up @@ -1582,6 +1594,13 @@ declare module 'stripe' {
requested?: boolean;
}

interface PromptpayPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface SepaDebitPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down Expand Up @@ -2586,6 +2605,11 @@ declare module 'stripe' {
*/
paynow_payments?: Capabilities.PaynowPayments;

/**
* The promptpay_payments capability.
*/
promptpay_payments?: Capabilities.PromptpayPayments;

/**
* The sepa_debit_payments capability.
*/
Expand Down Expand Up @@ -2791,6 +2815,13 @@ declare module 'stripe' {
requested?: boolean;
}

interface PromptpayPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
*/
requested?: boolean;
}

interface SepaDebitPayments {
/**
* Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays.
Expand Down
9 changes: 9 additions & 0 deletions types/2020-08-27/Charges.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ declare module 'stripe' {

paynow?: PaymentMethodDetails.Paynow;

promptpay?: PaymentMethodDetails.Promptpay;

sepa_credit_transfer?: PaymentMethodDetails.SepaCreditTransfer;

sepa_debit?: PaymentMethodDetails.SepaDebit;
Expand Down Expand Up @@ -1556,6 +1558,13 @@ declare module 'stripe' {
reference: string | null;
}

interface Promptpay {
/**
* Bill reference generated by PromptPay
*/
reference: string | null;
}

interface SepaCreditTransfer {
/**
* Name of the bank associated with the bank account.
Expand Down
1 change: 1 addition & 0 deletions types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2403,6 +2403,7 @@ declare module 'stripe' {
| 'oxxo'
| 'p24'
| 'paynow'
| 'promptpay'
| 'sepa_debit'
| 'sofort'
| 'us_bank_account'
Expand Down
10 changes: 10 additions & 0 deletions types/2020-08-27/CreditNoteLineItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ declare module 'stripe' {
*/
amount: number;

/**
* The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts.
*/
amount_excluding_tax: number | null;

/**
* Description of the item being credited.
*/
Expand Down Expand Up @@ -75,6 +80,11 @@ declare module 'stripe' {
* Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
*/
unit_amount_decimal: string | null;

/**
* The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts.
*/
unit_amount_excluding_tax: string | null;
}

namespace CreditNoteLineItem {
Expand Down
5 changes: 5 additions & 0 deletions types/2020-08-27/CreditNotes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ declare module 'stripe' {
*/
subtotal: number;

/**
* The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.
*/
subtotal_excluding_tax: number | null;

/**
* The aggregate amounts calculated per tax rate for all line items.
*/
Expand Down
1 change: 1 addition & 0 deletions types/2020-08-27/Customers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,7 @@ declare module 'stripe' {
| 'oxxo'
| 'p24'
| 'paynow'
| 'promptpay'
| 'sepa_debit'
| 'sofort'
| 'us_bank_account'
Expand Down
10 changes: 10 additions & 0 deletions types/2020-08-27/InvoiceLineItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ declare module 'stripe' {
*/
amount: number;

/**
* The integer amount in %s representing the amount for this line item, excluding all tax and discounts.
*/
amount_excluding_tax: number | null;

/**
* Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
*/
Expand Down Expand Up @@ -112,6 +117,11 @@ declare module 'stripe' {
* A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`.
*/
type: InvoiceLineItem.Type;

/**
* The amount in %s representing the unit amount for this line item, excluding all tax and discounts.
*/
unit_amount_excluding_tax: string | null;
}

namespace InvoiceLineItem {
Expand Down
53 changes: 53 additions & 0 deletions types/2020-08-27/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ declare module 'stripe' {
*/
subtotal: number;

/**
* The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated
*/
subtotal_excluding_tax: number | null;

/**
* The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice.
*/
Expand All @@ -349,6 +354,11 @@ declare module 'stripe' {
*/
total_discount_amounts: Array<Invoice.TotalDiscountAmount> | null;

/**
* The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax.
*/
total_excluding_tax: number | null;

/**
* The aggregate amounts calculated per tax rate for all line items.
*/
Expand Down Expand Up @@ -767,6 +777,7 @@ declare module 'stripe' {
| 'konbini'
| 'link'
| 'paynow'
| 'promptpay'
| 'sepa_credit_transfer'
| 'sepa_debit'
| 'sofort'
Expand Down Expand Up @@ -1000,6 +1011,13 @@ declare module 'stripe' {
*/
pending_invoice_items_behavior?: InvoiceCreateParams.PendingInvoiceItemsBehavior;

/**
* Options for invoice PDF rendering.
*/
rendering_options?: Stripe.Emptyable<
InvoiceCreateParams.RenderingOptions
>;

/**
* Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
*/
Expand Down Expand Up @@ -1237,6 +1255,7 @@ declare module 'stripe' {
| 'konbini'
| 'link'
| 'paynow'
| 'promptpay'
| 'sepa_credit_transfer'
| 'sepa_debit'
| 'sofort'
Expand All @@ -1249,6 +1268,19 @@ declare module 'stripe' {
| 'include'
| 'include_and_require';

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.
*/
amount_tax_display?: Stripe.Emptyable<
RenderingOptions.AmountTaxDisplay
>;
}

namespace RenderingOptions {
type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax';
}

interface TransferData {
/**
* The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
Expand Down Expand Up @@ -1360,6 +1392,13 @@ declare module 'stripe' {
*/
payment_settings?: InvoiceUpdateParams.PaymentSettings;

/**
* Options for invoice PDF rendering.
*/
rendering_options?: Stripe.Emptyable<
InvoiceUpdateParams.RenderingOptions
>;

/**
* Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`.
*/
Expand Down Expand Up @@ -1592,13 +1631,27 @@ declare module 'stripe' {
| 'konbini'
| 'link'
| 'paynow'
| 'promptpay'
| 'sepa_credit_transfer'
| 'sepa_debit'
| 'sofort'
| 'us_bank_account'
| 'wechat_pay';
}

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.
*/
amount_tax_display?: Stripe.Emptyable<
RenderingOptions.AmountTaxDisplay
>;
}

namespace RenderingOptions {
type AmountTaxDisplay = 'exclude_tax' | 'include_inclusive_tax';
}

interface TransferData {
/**
* The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred.
Expand Down
18 changes: 15 additions & 3 deletions types/2020-08-27/Orders.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,18 @@ declare module 'stripe' {
*/
application_fee_amount: number | null;

/**
* Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types.
*/
automatic_payment_methods: Settings.AutomaticPaymentMethods | null;

/**
* PaymentMethod-specific configuration to provide to the order's PaymentIntent.
*/
payment_method_options: Settings.PaymentMethodOptions | null;

/**
* The list of payment method types (e.g., card) to provide to the order's PaymentIntent.
* The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
*/
payment_method_types: Array<Settings.PaymentMethodType> | null;

Expand All @@ -209,6 +214,13 @@ declare module 'stripe' {
}

namespace Settings {
interface AutomaticPaymentMethods {
/**
* Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
*/
enabled: boolean;
}

interface PaymentMethodOptions {
acss_debit?: PaymentMethodOptions.AcssDebit;

Expand Down Expand Up @@ -1108,7 +1120,7 @@ declare module 'stripe' {
payment_method_options?: Settings.PaymentMethodOptions;

/**
* The list of payment method types (e.g., card) to provide to the order's PaymentIntent.
* The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
*/
payment_method_types?: Array<Settings.PaymentMethodType>;

Expand Down Expand Up @@ -2152,7 +2164,7 @@ declare module 'stripe' {
payment_method_options?: Settings.PaymentMethodOptions;

/**
* The list of payment method types (e.g., card) to provide to the order's PaymentIntent.
* The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
*/
payment_method_types?: Array<Settings.PaymentMethodType>;

Expand Down
Loading

0 comments on commit 72a1382

Please sign in to comment.