Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Updates #1137

Merged
merged 1 commit into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,10 +693,10 @@ declare module 'stripe' {

/**
* A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices).
* One-time Prices in `subscription` mode will be on the initial invoice only.
*
* There is a maximum of 100 line items, however it is recommended to
* consolidate line items if there are more than a few dozen.
* For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen.
*
* For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only.
*/
line_items?: Array<SessionCreateParams.LineItem>;

Expand Down Expand Up @@ -993,7 +993,7 @@ declare module 'stripe' {
receipt_email?: string;

/**
* Indicates that you intend to make future payments with the payment
* Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment
* method collected by this Checkout Session.
*
* When setting this to `on_session`, Checkout will show a notice to the
Expand Down Expand Up @@ -1402,6 +1402,11 @@ declare module 'stripe' {
*/
metadata?: Stripe.MetadataParam;

/**
* 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.
*/
transfer_data?: SubscriptionData.TransferData;

/**
* Unix timestamp representing the end of the trial period the customer
* will get before being charged for the first time. Has to be at least
Expand Down Expand Up @@ -1439,6 +1444,18 @@ declare module 'stripe' {
*/
tax_rates?: Array<string>;
}

interface TransferData {
/**
* A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
*/
amount_percent?: number;

/**
* ID of an existing, connected Stripe account.
*/
destination: string;
}
}
}

Expand Down
8 changes: 4 additions & 4 deletions types/2020-08-27/Reporting/ReportRuns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ declare module 'stripe' {
error: string | null;

/**
* Always `true`: reports can only be run on live-mode data.
* `true` if the report is run on live mode data and `false` if it is run on test mode data.
*/
livemode: boolean;

Expand Down Expand Up @@ -817,15 +817,15 @@ declare module 'stripe' {

class ReportRunsResource {
/**
* Creates a new object and begin running the report. (Requires a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
* Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
*/
create(
params: ReportRunCreateParams,
options?: RequestOptions
): Promise<Stripe.Response<Stripe.Reporting.ReportRun>>;

/**
* Retrieves the details of an existing Report Run. (Requires a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
* Retrieves the details of an existing Report Run.
*/
retrieve(
id: string,
Expand All @@ -838,7 +838,7 @@ declare module 'stripe' {
): Promise<Stripe.Response<Stripe.Reporting.ReportRun>>;

/**
* Returns a list of Report Runs, with the most recent appearing first. (Requires a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
* Returns a list of Report Runs, with the most recent appearing first.
*/
list(
params?: ReportRunListParams,
Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/Reporting/ReportTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ declare module 'stripe' {

class ReportTypesResource {
/**
* Retrieves the details of a Report Type. (Requires a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
* Retrieves the details of a Report Type. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
*/
retrieve(
id: string,
Expand All @@ -77,7 +77,7 @@ declare module 'stripe' {
): Promise<Stripe.Response<Stripe.Reporting.ReportType>>;

/**
* Returns a full list of Report Types. (Requires a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).)
* Returns a full list of Report Types.
*/
list(
params?: ReportTypeListParams,
Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/SubscriptionSchedules.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ declare module 'stripe' {

interface Phase {
/**
* A list of prices and quantities that will generate invoice items appended to the next invoice. You may pass up to 10 items.
* A list of prices and quantities that will generate invoice items appended to the next invoice. You may pass up to 20 items.
*/
add_invoice_items?: Array<Phase.AddInvoiceItem>;

Expand Down Expand Up @@ -851,7 +851,7 @@ declare module 'stripe' {

interface Phase {
/**
* A list of prices and quantities that will generate invoice items appended to the next invoice. You may pass up to 10 items.
* A list of prices and quantities that will generate invoice items appended to the next invoice. You may pass up to 20 items.
*/
add_invoice_items?: Array<Phase.AddInvoiceItem>;

Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/Subscriptions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ declare module 'stripe' {
customer: string;

/**
* A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 10 items.
* A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items.
*/
add_invoice_items?: Array<SubscriptionCreateParams.AddInvoiceItem>;

Expand Down Expand Up @@ -620,7 +620,7 @@ declare module 'stripe' {

interface SubscriptionUpdateParams {
/**
* A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 10 items.
* A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items.
*/
add_invoice_items?: Array<SubscriptionUpdateParams.AddInvoiceItem>;

Expand Down