Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/semver-6.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
richardm-stripe authored Aug 10, 2023
2 parents 4e51198 + f4ad01f commit 6182f32
Show file tree
Hide file tree
Showing 13 changed files with 113 additions and 15 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v446
v458
2 changes: 1 addition & 1 deletion test/resources/generated_examples_test.spec.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion types/Accounts.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ declare module 'stripe' {
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'incorporated_partnership'
| 'limited_liability_partnership'
| 'llc'
| 'multi_member_llc'
Expand All @@ -635,7 +636,8 @@ declare module 'stripe' {
| 'sole_proprietorship'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';
| 'unincorporated_non_profit'
| 'unincorporated_partnership';

interface Verification {
document: Verification.Document;
Expand Down
12 changes: 8 additions & 4 deletions types/AccountsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ declare module 'stripe' {
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'incorporated_partnership'
| 'limited_liability_partnership'
| 'llc'
| 'multi_member_llc'
Expand All @@ -725,7 +726,8 @@ declare module 'stripe' {
| 'sole_proprietorship'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';
| 'unincorporated_non_profit'
| 'unincorporated_partnership';

interface Verification {
/**
Expand Down Expand Up @@ -1991,6 +1993,7 @@ declare module 'stripe' {
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'incorporated_partnership'
| 'limited_liability_partnership'
| 'llc'
| 'multi_member_llc'
Expand All @@ -2005,7 +2008,8 @@ declare module 'stripe' {
| 'sole_proprietorship'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';
| 'unincorporated_non_profit'
| 'unincorporated_partnership';

interface Verification {
/**
Expand Down Expand Up @@ -3359,7 +3363,7 @@ declare module 'stripe' {
* for a Standard or Express account, some parameters can no longer be changed. These are marked as Custom Only or Custom and Express
* below.
*
* To update your own account, use the [Dashboard](https://dashboard.stripe.com/account). Refer to our
* To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our
* [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts.
*/
update(
Expand All @@ -3382,7 +3386,7 @@ declare module 'stripe' {
*
* Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.
*
* If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/account) instead.
* If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead.
*/
del(
id: string,
Expand Down
3 changes: 2 additions & 1 deletion types/BalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ declare module 'stripe' {
status: string;

/**
* Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.
* Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead.
*/
type: BalanceTransaction.Type;
}
Expand Down Expand Up @@ -148,6 +148,7 @@ declare module 'stripe' {
| 'payment'
| 'payment_failure_refund'
| 'payment_refund'
| 'payment_reversal'
| 'payout'
| 'payout_cancel'
| 'payout_failure'
Expand Down
2 changes: 1 addition & 1 deletion types/BalanceTransactionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ declare module 'stripe' {
source?: string;

/**
* Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
* Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`.
*/
type?: string;
}
Expand Down
2 changes: 1 addition & 1 deletion types/BillingPortal/SessionsResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ declare module 'stripe' {
flow_data?: SessionCreateParams.FlowData;

/**
* The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used.
* The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used.
*/
locale?: SessionCreateParams.Locale;

Expand Down
2 changes: 1 addition & 1 deletion types/CreditNoteLineItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
declare module 'stripe' {
namespace Stripe {
/**
* The CreditNoteLineItem object.
* The credit note line item object
*/
interface CreditNoteLineItem {
/**
Expand Down
10 changes: 10 additions & 0 deletions types/CustomerCashBalanceTransactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ declare module 'stripe' {
*/
object: 'customer_cash_balance_transaction';

adjusted_for_overdraft?: CustomerCashBalanceTransaction.AdjustedForOverdraft;

applied_to_payment?: CustomerCashBalanceTransaction.AppliedToPayment;

/**
Expand Down Expand Up @@ -64,6 +66,13 @@ declare module 'stripe' {
}

namespace CustomerCashBalanceTransaction {
interface AdjustedForOverdraft {
/**
* The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds.
*/
linked_transaction: string | Stripe.CustomerCashBalanceTransaction;
}

interface AppliedToPayment {
/**
* The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to.
Expand Down Expand Up @@ -181,6 +190,7 @@ declare module 'stripe' {
}

type Type =
| 'adjusted_for_overdraft'
| 'applied_to_payment'
| 'funded'
| 'funding_reversed'
Expand Down
29 changes: 27 additions & 2 deletions types/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ declare module 'stripe' {
*/
receipt_number: string | null;

/**
* 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;

/**
* Options for invoice PDF rendering.
*/
Expand Down Expand Up @@ -381,7 +386,7 @@ declare module 'stripe' {
/**
* Details about the subscription that created this invoice.
*/
subscription_details?: Invoice.SubscriptionDetails | null;
subscription_details: Invoice.SubscriptionDetails | null;

/**
* Only set for upcoming invoices that preview prorations. The time used to calculate prorations.
Expand Down Expand Up @@ -1062,6 +1067,26 @@ declare module 'stripe' {
| 'wechat_pay';
}

interface Rendering {
/**
* 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.
Expand Down Expand Up @@ -1196,7 +1221,7 @@ declare module 'stripe' {
/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will reflect the metadata of the subscription at the time of invoice creation. *Note: This attribute is populated only for invoices created on or after June 29, 2023.*
*/
metadata?: Stripe.Metadata | null;
metadata: Stripe.Metadata | null;
}

interface ThresholdReason {
Expand Down
52 changes: 52 additions & 0 deletions types/InvoicesResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ declare module 'stripe' {
*/
pending_invoice_items_behavior?: InvoiceCreateParams.PendingInvoiceItemsBehavior;

/**
* 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;

/**
* Options for invoice PDF rendering.
*/
Expand Down Expand Up @@ -444,6 +449,27 @@ declare module 'stripe' {
| 'include'
| 'include_and_require';

interface Rendering {
/**
* Invoice pdf rendering options
*/
pdf?: Rendering.Pdf;
}

namespace Rendering {
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.
Expand Down Expand Up @@ -728,6 +754,11 @@ declare module 'stripe' {
*/
payment_settings?: InvoiceUpdateParams.PaymentSettings;

/**
* 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;

/**
* Options for invoice PDF rendering.
*/
Expand Down Expand Up @@ -1032,6 +1063,27 @@ declare module 'stripe' {
| 'wechat_pay';
}

interface Rendering {
/**
* Invoice pdf rendering options
*/
pdf?: Rendering.Pdf;
}

namespace Rendering {
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.
Expand Down
4 changes: 3 additions & 1 deletion types/TaxRates.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ declare module 'stripe' {
display_name: string;

/**
* Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage does not include the statutory tax rate of non-taxable jurisdictions.
* Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true,
* this percentage reflects the rate actually used to calculate tax based on the product's taxability
* and whether the user is registered to collect taxes in the corresponding jurisdiction.
*/
effective_percentage: number | null;

Expand Down
4 changes: 3 additions & 1 deletion types/TokensResource.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ declare module 'stripe' {
| 'government_instrumentality'
| 'governmental_unit'
| 'incorporated_non_profit'
| 'incorporated_partnership'
| 'limited_liability_partnership'
| 'llc'
| 'multi_member_llc'
Expand All @@ -211,7 +212,8 @@ declare module 'stripe' {
| 'sole_proprietorship'
| 'tax_exempt_government_instrumentality'
| 'unincorporated_association'
| 'unincorporated_non_profit';
| 'unincorporated_non_profit'
| 'unincorporated_partnership';

interface Verification {
/**
Expand Down

0 comments on commit 6182f32

Please sign in to comment.