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 #1112

Merged
merged 1 commit into from
Jan 22, 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
6 changes: 3 additions & 3 deletions types/2020-08-27/Checkout/Sessions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -796,9 +796,9 @@ declare module 'stripe' {
price_data?: LineItem.PriceData;

/**
* The quantity of the line item being purchased.
* The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`.
*/
quantity: number;
quantity?: number;

/**
* The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item.
Expand Down Expand Up @@ -1393,7 +1393,7 @@ declare module 'stripe' {
plan: string;

/**
* Quantity for this item.
* The quantity of the subscription item being purchased. Quantity should not be defined when `recurring.usage_type=metered`.
*/
quantity?: number;

Expand Down
2 changes: 1 addition & 1 deletion types/2020-08-27/Invoices.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ declare module 'stripe' {
/**
* The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized.
*/
last_finalization_error?: Invoice.LastFinalizationError | null;
last_finalization_error: Invoice.LastFinalizationError | null;

/**
* The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any.
Expand Down
12 changes: 6 additions & 6 deletions types/2020-08-27/Issuing/Disputes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ declare module 'stripe' {
/**
* Disputed amount. Usually the amount of the `disputed_transaction`, but can differ (usually because of currency fluctuation).
*/
amount?: number;
amount: number;

/**
* List of balance transactions associated with the dispute.
Expand All @@ -30,14 +30,14 @@ declare module 'stripe' {
/**
* Time at which the object was created. Measured in seconds since the Unix epoch.
*/
created?: number;
created: number;

/**
* The currency the `disputed_transaction` was made in.
*/
currency?: string;
currency: string;

evidence?: Dispute.Evidence;
evidence: Dispute.Evidence;

/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
Expand All @@ -47,12 +47,12 @@ declare module 'stripe' {
/**
* Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
*/
metadata?: Stripe.Metadata;
metadata: Stripe.Metadata;

/**
* Current status of the dispute.
*/
status?: Dispute.Status;
status: Dispute.Status;

/**
* The transaction being disputed.
Expand Down
4 changes: 2 additions & 2 deletions types/2020-08-27/Issuing/Transactions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ declare module 'stripe' {
/**
* If you've disputed the transaction, the ID of the dispute.
*/
dispute?: string | Stripe.Issuing.Dispute | null;
dispute: string | Stripe.Issuing.Dispute | null;

/**
* Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
Expand Down Expand Up @@ -286,7 +286,7 @@ declare module 'stripe' {
}
}

type Type = 'capture' | 'dispute' | 'refund';
type Type = 'capture' | 'refund';
}

interface TransactionRetrieveParams {
Expand Down
11 changes: 3 additions & 8 deletions types/2020-08-27/LineItems.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ declare module 'stripe' {
object: 'item';

/**
* Total before any discounts or taxes is applied.
* Total before any discounts or taxes are applied.
*/
amount_subtotal: number | null;

Expand All @@ -42,14 +42,9 @@ declare module 'stripe' {
discounts?: Array<LineItem.Discount>;

/**
* Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products.
* [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme.
*
* For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once.
*
* Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/billing/prices-guide).
* The price used to generate the line item.
*/
price: Stripe.Price;
price: Stripe.Price | null;

/**
* The quantity of products being purchased.
Expand Down