Repository: stripe/stripe-node
Pull request #1011 (2020-09-21 15:06:12)

Typedef for Stripe.StripeResource
Fixes https://github.com/stripe/stripe-node/issues/994
r? @jlomas-stripe 
cc @stripe/api-libraries 

We considered adding this for https://github.com/stripe/stripe-node/pull/920 but then opted not to, but per #994 this is not convenient for users. We could just expose `any` but why not try and get the types right?

The types in this PR are an approximation that reflect mostly the "public interface" of Stripe.StripeResource, and still use `any` a great deal, but it's a starting place.


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6f0e5f45..9078db0b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,16 @@
 # CHANGELOG
 
+## 8.98.0 - 2020-09-23
+* [#1014](https://github.com/stripe/stripe-node/pull/1014) Multiple API changes
+  * Add support for `issuing_dispute.closed` and `issuing_dispute.submitted` events
+  * Add support for `instant_available` on `Balance`
+
+## 8.97.0 - 2020-09-21
+* [#1012](https://github.com/stripe/stripe-node/pull/1012) Multiple API changes
+  * `metadata` is now always nullable on all resources
+  * Add support for `amount_captured` on `Charge`
+  * Add `checkout_session` on `Discount`
+
 ## 8.96.0 - 2020-09-13
 * [#1003](https://github.com/stripe/stripe-node/pull/1003) Add support for `promotion_code.created` and `promotion_code.updated` on `Event`
 
diff --git a/VERSION b/VERSION
index a915ceae..7a2b1c67 100644
--- a/VERSION
+++ b/VERSION
@@ -1,1 +1,1 @@
-8.96.0
+8.98.0
diff --git a/package.json b/package.json
index ac6483ac..e085f5c9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "stripe",
-  "version": "8.96.0",
+  "version": "8.98.0",
   "description": "Stripe API wrapper",
   "keywords": [
     "stripe",
diff --git a/types/2020-08-27/Balance.d.ts b/types/2020-08-27/Balance.d.ts
index 9cbab2be..556887b7 100644
--- a/types/2020-08-27/Balance.d.ts
+++ b/types/2020-08-27/Balance.d.ts
@@ -20,6 +20,11 @@ declare module 'stripe' {
        */
       connect_reserved?: Array<Balance.ConnectReserved>;
 
+      /**
+       * Funds that can be paid out using Instant Payouts.
+       */
+      instant_available?: Array<Balance.InstantAvailable>;
+
       issuing?: Balance.Issuing;
 
       /**
@@ -100,6 +105,39 @@ declare module 'stripe' {
         }
       }
 
+      interface InstantAvailable {
+        /**
+         * Balance amount.
+         */
+        amount: number;
+
+        /**
+         * 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).
+         */
+        currency: string;
+
+        source_types?: InstantAvailable.SourceTypes;
+      }
+
+      namespace InstantAvailable {
+        interface SourceTypes {
+          /**
+           * Amount for bank account.
+           */
+          bank_account?: number;
+
+          /**
+           * Amount for card.
+           */
+          card?: number;
+
+          /**
+           * Amount for FPX.
+           */
+          fpx?: number;
+        }
+      }
+
       interface Issuing {
         /**
          * Funds that are available for use.
diff --git a/types/2020-08-27/BitcoinReceivers.d.ts b/types/2020-08-27/BitcoinReceivers.d.ts
index 5434135b..cca1c3d5 100644
--- a/types/2020-08-27/BitcoinReceivers.d.ts
+++ b/types/2020-08-27/BitcoinReceivers.d.ts
@@ -90,7 +90,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       /**
        * The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key.
diff --git a/types/2020-08-27/Cards.d.ts b/types/2020-08-27/Cards.d.ts
index 858273a8..23c6ec93 100644
--- a/types/2020-08-27/Cards.d.ts
+++ b/types/2020-08-27/Cards.d.ts
@@ -75,6 +75,9 @@ declare module 'stripe' {
        */
       country: string | null;
 
+      /**
+       * Three-letter [ISO code for currency](https://stripe.com/docs/payouts). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency.
+       */
       currency?: string | null;
 
       /**
@@ -142,7 +145,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       /**
        * Cardholder name.
diff --git a/types/2020-08-27/Charges.d.ts b/types/2020-08-27/Charges.d.ts
index e83d3316..89f9f1fe 100644
--- a/types/2020-08-27/Charges.d.ts
+++ b/types/2020-08-27/Charges.d.ts
@@ -22,6 +22,11 @@ declare module 'stripe' {
        */
       amount: number;
 
+      /**
+       * Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).
+       */
+      amount_captured: number;
+
       /**
        * Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).
        */
diff --git a/types/2020-08-27/Checkout/Sessions.d.ts b/types/2020-08-27/Checkout/Sessions.d.ts
index 3c8e3b2d..f8c073ff 100644
--- a/types/2020-08-27/Checkout/Sessions.d.ts
+++ b/types/2020-08-27/Checkout/Sessions.d.ts
@@ -557,8 +557,7 @@ declare module 'stripe' {
          * The URL to which Stripe should send customers when payment or setup
          * is complete.
          * If you'd like access to the Checkout Session for the successful
-         * payment, read more about it in our guide on [fulfilling your payments
-         * with webhooks](https://stripe.com/docs/payments/checkout/accept-a-payment#payment-success).
+         * payment, read more about it in the guide on [fulfilling orders](https://stripe.com/docs/payments/checkout/fulfill-orders).
          */
         success_url: string;
 
@@ -732,12 +731,12 @@ declare module 'stripe' {
             recurring?: PriceData.Recurring;
 
             /**
-             * A positive integer in %s representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
+             * A non-negative integer in %s representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required.
              */
             unit_amount?: number;
 
             /**
-             * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+             * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
              */
             unit_amount_decimal?: string;
           }
diff --git a/types/2020-08-27/Coupons.d.ts b/types/2020-08-27/Coupons.d.ts
index a44dba09..299a4a15 100644
--- a/types/2020-08-27/Coupons.d.ts
+++ b/types/2020-08-27/Coupons.d.ts
@@ -57,7 +57,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       /**
        * Name of the coupon displayed to customers on for instance invoices or receipts.
diff --git a/types/2020-08-27/CreditNoteLineItems.d.ts b/types/2020-08-27/CreditNoteLineItems.d.ts
index 50ff984e..61c0f4c2 100644
--- a/types/2020-08-27/CreditNoteLineItems.d.ts
+++ b/types/2020-08-27/CreditNoteLineItems.d.ts
@@ -16,7 +16,7 @@ declare module 'stripe' {
       object: 'credit_note_line_item';
 
       /**
-       * The integer amount in **%s** representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
+       * The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
        */
       amount: number;
 
@@ -26,7 +26,7 @@ declare module 'stripe' {
       description: string | null;
 
       /**
-       * The integer amount in **%s** representing the discount being credited for this line item.
+       * The integer amount in %s representing the discount being credited for this line item.
        */
       discount_amount: number;
 
@@ -123,12 +123,12 @@ declare module 'stripe' {
       invoice: string;
 
       /**
-       * The integer amount in **%s** representing the total amount of the credit note.
+       * The integer amount in %s representing the total amount of the credit note.
        */
       amount?: number;
 
       /**
-       * The integer amount in **%s** representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+       * The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
        */
       credit_amount?: number;
 
@@ -153,7 +153,7 @@ declare module 'stripe' {
       metadata?: MetadataParam;
 
       /**
-       * The integer amount in **%s** representing the amount that is credited outside of Stripe.
+       * The integer amount in %s representing the amount that is credited outside of Stripe.
        */
       out_of_band_amount?: number;
 
@@ -168,7 +168,7 @@ declare module 'stripe' {
       refund?: string;
 
       /**
-       * The integer amount in **%s** representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+       * The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
        */
       refund_amount?: number;
     }
@@ -206,12 +206,12 @@ declare module 'stripe' {
         type: Line.Type;
 
         /**
-         * The integer unit amount in **%s** of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+         * The integer unit amount in %s of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
          */
         unit_amount?: number;
 
         /**
-         * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+         * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
          */
         unit_amount_decimal?: string;
       }
diff --git a/types/2020-08-27/CreditNotes.d.ts b/types/2020-08-27/CreditNotes.d.ts
index a06b83e8..cbecf2ce 100644
--- a/types/2020-08-27/CreditNotes.d.ts
+++ b/types/2020-08-27/CreditNotes.d.ts
@@ -16,7 +16,7 @@ declare module 'stripe' {
       object: 'credit_note';
 
       /**
-       * The integer amount in **%s** representing the total amount of the credit note, including tax.
+       * The integer amount in %s representing the total amount of the credit note, including tax.
        */
       amount: number;
 
@@ -44,7 +44,7 @@ declare module 'stripe' {
         | null;
 
       /**
-       * The integer amount in **%s** representing the total amount of discount that was credited.
+       * The integer amount in %s representing the total amount of discount that was credited.
        */
       discount_amount: number;
 
@@ -76,7 +76,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       /**
        * A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice.
@@ -109,7 +109,7 @@ declare module 'stripe' {
       status: CreditNote.Status;
 
       /**
-       * The integer amount in **%s** representing the amount of the credit note, excluding tax and invoice level discounts.
+       * The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts.
        */
       subtotal: number;
 
@@ -119,7 +119,7 @@ declare module 'stripe' {
       tax_amounts: Array<CreditNote.TaxAmount>;
 
       /**
-       * The integer amount in **%s** representing the total amount of the credit note, including tax and all discount.
+       * The integer amount in %s representing the total amount of the credit note, including tax and all discount.
        */
       total: number;
 
@@ -182,12 +182,12 @@ declare module 'stripe' {
       invoice: string;
 
       /**
-       * The integer amount in **%s** representing the total amount of the credit note.
+       * The integer amount in %s representing the total amount of the credit note.
        */
       amount?: number;
 
       /**
-       * The integer amount in **%s** representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+       * The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
        */
       credit_amount?: number;
 
@@ -212,7 +212,7 @@ declare module 'stripe' {
       metadata?: MetadataParam;
 
       /**
-       * The integer amount in **%s** representing the amount that is credited outside of Stripe.
+       * The integer amount in %s representing the amount that is credited outside of Stripe.
        */
       out_of_band_amount?: number;
 
@@ -227,7 +227,7 @@ declare module 'stripe' {
       refund?: string;
 
       /**
-       * The integer amount in **%s** representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+       * The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
        */
       refund_amount?: number;
     }
@@ -265,12 +265,12 @@ declare module 'stripe' {
         type: Line.Type;
 
         /**
-         * The integer unit amount in **%s** of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+         * The integer unit amount in %s of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
          */
         unit_amount?: number;
 
         /**
-         * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+         * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
          */
         unit_amount_decimal?: string;
       }
@@ -334,12 +334,12 @@ declare module 'stripe' {
       invoice: string;
 
       /**
-       * The integer amount in **%s** representing the total amount of the credit note.
+       * The integer amount in %s representing the total amount of the credit note.
        */
       amount?: number;
 
       /**
-       * The integer amount in **%s** representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
+       * The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice.
        */
       credit_amount?: number;
 
@@ -364,7 +364,7 @@ declare module 'stripe' {
       metadata?: MetadataParam;
 
       /**
-       * The integer amount in **%s** representing the amount that is credited outside of Stripe.
+       * The integer amount in %s representing the amount that is credited outside of Stripe.
        */
       out_of_band_amount?: number;
 
@@ -379,7 +379,7 @@ declare module 'stripe' {
       refund?: string;
 
       /**
-       * The integer amount in **%s** representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
+       * The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice.
        */
       refund_amount?: number;
     }
@@ -417,12 +417,12 @@ declare module 'stripe' {
         type: Line.Type;
 
         /**
-         * The integer unit amount in **%s** of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
+         * The integer unit amount in %s of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`.
          */
         unit_amount?: number;
 
         /**
-         * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+         * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
          */
         unit_amount_decimal?: string;
       }
diff --git a/types/2020-08-27/Discounts.d.ts b/types/2020-08-27/Discounts.d.ts
index 4db37e6e..9c98cca4 100644
--- a/types/2020-08-27/Discounts.d.ts
+++ b/types/2020-08-27/Discounts.d.ts
@@ -15,6 +15,11 @@ declare module 'stripe' {
        */
       object: 'discount';
 
+      /**
+       * The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
+       */
+      checkout_session: string | null;
+
       /**
        * A coupon contains information about a percent-off or amount-off discount you
        * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or
@@ -74,6 +79,11 @@ declare module 'stripe' {
        */
       object: 'discount';
 
+      /**
+       * The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode.
+       */
+      checkout_session: string | null;
+
       /**
        * A coupon contains information about a percent-off or amount-off discount you
        * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or
diff --git a/types/2020-08-27/FeeRefunds.d.ts b/types/2020-08-27/FeeRefunds.d.ts
index 906b9338..35303673 100644
--- a/types/2020-08-27/FeeRefunds.d.ts
+++ b/types/2020-08-27/FeeRefunds.d.ts
@@ -43,7 +43,7 @@ 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: Metadata;
+      metadata: Metadata | null;
     }
 
     interface FeeRefundCreateParams {
diff --git a/types/2020-08-27/InvoiceItems.d.ts b/types/2020-08-27/InvoiceItems.d.ts
index b03de827..e241d13b 100644
--- a/types/2020-08-27/InvoiceItems.d.ts
+++ b/types/2020-08-27/InvoiceItems.d.ts
@@ -65,7 +65,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       period: InvoiceItem.Period;
 
@@ -105,7 +105,7 @@ declare module 'stripe' {
       tax_rates: Array<Stripe.TaxRate> | null;
 
       /**
-       * Unit Amount (in the `currency` specified) of the invoice item.
+       * Unit amount (in the `currency` specified) of the invoice item.
        */
       unit_amount: number | null;
 
@@ -156,7 +156,7 @@ declare module 'stripe' {
       customer: string;
 
       /**
-       * The integer amount in **%s** of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice.
+       * The integer amount in %s of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice.
        */
       amount?: number;
 
@@ -226,12 +226,12 @@ declare module 'stripe' {
       tax_rates?: Array<string>;
 
       /**
-       * The integer unit amount in **%s** of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice.
+       * The integer unit amount in %s of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice.
        */
       unit_amount?: number;
 
       /**
-       * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+       * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
        */
       unit_amount_decimal?: string;
     }
@@ -278,7 +278,7 @@ declare module 'stripe' {
         unit_amount?: number;
 
         /**
-         * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+         * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
          */
         unit_amount_decimal?: string;
       }
@@ -293,7 +293,7 @@ declare module 'stripe' {
 
     interface InvoiceItemUpdateParams {
       /**
-       * The integer amount in **%s** of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
+       * The integer amount in %s of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
        */
       amount?: number;
 
@@ -348,12 +348,12 @@ declare module 'stripe' {
       tax_rates?: Array<string> | null;
 
       /**
-       * The integer unit amount in **%s** of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
+       * The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
        */
       unit_amount?: number;
 
       /**
-       * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+       * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
        */
       unit_amount_decimal?: string;
     }
@@ -400,7 +400,7 @@ declare module 'stripe' {
         unit_amount?: number;
 
         /**
-         * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+         * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
          */
         unit_amount_decimal?: string;
       }
diff --git a/types/2020-08-27/InvoiceLineItems.d.ts b/types/2020-08-27/InvoiceLineItems.d.ts
index 6a5ca45a..083ecf03 100644
--- a/types/2020-08-27/InvoiceLineItems.d.ts
+++ b/types/2020-08-27/InvoiceLineItems.d.ts
@@ -272,7 +272,7 @@ declare module 'stripe' {
 
       interface InvoiceItem {
         /**
-         * The integer amount in **%s** of previewed invoice item.
+         * The integer amount in %s of previewed invoice item.
          */
         amount?: number;
 
@@ -329,12 +329,12 @@ declare module 'stripe' {
         tax_rates?: Array<string> | null;
 
         /**
-         * The integer unit amount in **%s** of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
+         * The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
          */
         unit_amount?: number;
 
         /**
-         * Same as `unit_amount`, but accepts a decimal string with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+         * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
          */
         unit_amount_decimal?: string;
       }
@@ -381,7 +381,7 @@ declare module 'stripe' {
           unit_amount?: number;
 
           /**
-           * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+           * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
            */
           unit_amount_decimal?: string;
         }
@@ -471,7 +471,7 @@ declare module 'stripe' {
           unit_amount?: number;
 
           /**
-           * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+           * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
            */
           unit_amount_decimal?: string;
         }
diff --git a/types/2020-08-27/Invoices.d.ts b/types/2020-08-27/Invoices.d.ts
index 764483d3..9b6a2373 100644
--- a/types/2020-08-27/Invoices.d.ts
+++ b/types/2020-08-27/Invoices.d.ts
@@ -995,7 +995,7 @@ declare module 'stripe' {
 
       interface InvoiceItem {
         /**
-         * The integer amount in **%s** of previewed invoice item.
+         * The integer amount in %s of previewed invoice item.
          */
         amount?: number;
 
@@ -1052,12 +1052,12 @@ declare module 'stripe' {
         tax_rates?: Array<string> | null;
 
         /**
-         * The integer unit amount in **%s** of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
+         * The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount.
          */
         unit_amount?: number;
 
         /**
-         * Same as `unit_amount`, but accepts a decimal string with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+         * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
          */
         unit_amount_decimal?: string;
       }
@@ -1104,7 +1104,7 @@ declare module 'stripe' {
           unit_amount?: number;
 
           /**
-           * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+           * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
            */
           unit_amount_decimal?: string;
         }
@@ -1194,7 +1194,7 @@ declare module 'stripe' {
           unit_amount?: number;
 
           /**
-           * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+           * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
            */
           unit_amount_decimal?: string;
         }
diff --git a/types/2020-08-27/Orders.d.ts b/types/2020-08-27/Orders.d.ts
index 2c2b0cff..5a2210a4 100644
--- a/types/2020-08-27/Orders.d.ts
+++ b/types/2020-08-27/Orders.d.ts
@@ -78,7 +78,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       /**
        * A list of returns that have taken place for this order.
diff --git a/types/2020-08-27/PaymentMethods.d.ts b/types/2020-08-27/PaymentMethods.d.ts
index 089ddce9..63f754f7 100644
--- a/types/2020-08-27/PaymentMethods.d.ts
+++ b/types/2020-08-27/PaymentMethods.d.ts
@@ -57,7 +57,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       p24?: PaymentMethod.P24;
 
diff --git a/types/2020-08-27/Payouts.d.ts b/types/2020-08-27/Payouts.d.ts
index c21439ae..64f3b655 100644
--- a/types/2020-08-27/Payouts.d.ts
+++ b/types/2020-08-27/Payouts.d.ts
@@ -84,7 +84,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       /**
        * The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) for more information.)
diff --git a/types/2020-08-27/Plans.d.ts b/types/2020-08-27/Plans.d.ts
index a4469cf6..ac372250 100644
--- a/types/2020-08-27/Plans.d.ts
+++ b/types/2020-08-27/Plans.d.ts
@@ -70,7 +70,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       /**
        * A brief description of the plan, hidden from customers.
@@ -330,7 +330,7 @@ declare module 'stripe' {
         unit_amount?: number;
 
         /**
-         * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+         * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
          */
         unit_amount_decimal?: string;
 
diff --git a/types/2020-08-27/Prices.d.ts b/types/2020-08-27/Prices.d.ts
index c2239b6d..01091eb9 100644
--- a/types/2020-08-27/Prices.d.ts
+++ b/types/2020-08-27/Prices.d.ts
@@ -285,7 +285,7 @@ declare module 'stripe' {
       unit_amount?: number;
 
       /**
-       * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+       * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
        */
       unit_amount_decimal?: string;
     }
@@ -383,7 +383,7 @@ declare module 'stripe' {
         unit_amount?: number;
 
         /**
-         * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
+         * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
          */
         unit_amount_decimal?: string;
 
diff --git a/types/2020-08-27/PromotionCodes.d.ts b/types/2020-08-27/PromotionCodes.d.ts
index c3011ba0..75acfedf 100644
--- a/types/2020-08-27/PromotionCodes.d.ts
+++ b/types/2020-08-27/PromotionCodes.d.ts
@@ -60,7 +60,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       restrictions: PromotionCode.Restrictions;
 
diff --git a/types/2020-08-27/Refunds.d.ts b/types/2020-08-27/Refunds.d.ts
index 1075f2c4..af26ce1f 100644
--- a/types/2020-08-27/Refunds.d.ts
+++ b/types/2020-08-27/Refunds.d.ts
@@ -58,7 +58,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       /**
        * ID of the PaymentIntent that was refunded.
diff --git a/types/2020-08-27/SetupIntents.d.ts b/types/2020-08-27/SetupIntents.d.ts
index fd272e8e..0ef87b1e 100644
--- a/types/2020-08-27/SetupIntents.d.ts
+++ b/types/2020-08-27/SetupIntents.d.ts
@@ -67,7 +67,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       /**
        * If present, this property tells you what actions you need to take in order for your customer to continue payment setup.
diff --git a/types/2020-08-27/SubscriptionItems.d.ts b/types/2020-08-27/SubscriptionItems.d.ts
index bc7f2b3c..08012d4b 100644
--- a/types/2020-08-27/SubscriptionItems.d.ts
+++ b/types/2020-08-27/SubscriptionItems.d.ts
@@ -204,7 +204,7 @@ declare module 'stripe' {
         unit_amount?: number;
 
         /**
-         * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+         * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
          */
         unit_amount_decimal?: string;
       }
@@ -342,7 +342,7 @@ declare module 'stripe' {
         unit_amount?: number;
 
         /**
-         * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+         * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
          */
         unit_amount_decimal?: string;
       }
diff --git a/types/2020-08-27/SubscriptionSchedules.d.ts b/types/2020-08-27/SubscriptionSchedules.d.ts
index a3c9a4b1..85f6b254 100644
--- a/types/2020-08-27/SubscriptionSchedules.d.ts
+++ b/types/2020-08-27/SubscriptionSchedules.d.ts
@@ -574,7 +574,7 @@ declare module 'stripe' {
             unit_amount?: number;
 
             /**
-             * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+             * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
              */
             unit_amount_decimal?: string;
           }
@@ -665,7 +665,7 @@ declare module 'stripe' {
             unit_amount?: number;
 
             /**
-             * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+             * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
              */
             unit_amount_decimal?: string;
           }
@@ -942,7 +942,7 @@ declare module 'stripe' {
             unit_amount?: number;
 
             /**
-             * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+             * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
              */
             unit_amount_decimal?: string;
           }
@@ -1033,7 +1033,7 @@ declare module 'stripe' {
             unit_amount?: number;
 
             /**
-             * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+             * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
              */
             unit_amount_decimal?: string;
           }
@@ -1146,7 +1146,7 @@ declare module 'stripe' {
 
     class SubscriptionSchedulesResource {
       /**
-       * Creates a new subscription schedule object. Each customer can have up to 25 active or scheduled subscriptions.
+       * Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.
        */
       create(
         params?: SubscriptionScheduleCreateParams,
diff --git a/types/2020-08-27/Subscriptions.d.ts b/types/2020-08-27/Subscriptions.d.ts
index bf23db82..a7322005 100644
--- a/types/2020-08-27/Subscriptions.d.ts
+++ b/types/2020-08-27/Subscriptions.d.ts
@@ -76,12 +76,12 @@ declare module 'stripe' {
       days_until_due: number | null;
 
       /**
-       * ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings.
+       * ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
        */
       default_payment_method: string | Stripe.PaymentMethod | null;
 
       /**
-       * ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source.
+       * ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
        */
       default_source: string | CustomerSource | null;
 
@@ -337,12 +337,12 @@ declare module 'stripe' {
       days_until_due?: number;
 
       /**
-       * ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings.
+       * ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
        */
       default_payment_method?: string;
 
       /**
-       * ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source.
+       * ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
        */
       default_source?: string;
 
@@ -454,7 +454,7 @@ declare module 'stripe' {
           unit_amount?: number;
 
           /**
-           * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+           * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
            */
           unit_amount_decimal?: string;
         }
@@ -541,7 +541,7 @@ declare module 'stripe' {
           unit_amount?: number;
 
           /**
-           * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+           * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
            */
           unit_amount_decimal?: string;
         }
@@ -655,12 +655,12 @@ declare module 'stripe' {
       days_until_due?: number;
 
       /**
-       * ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. If not set, invoices will use the default payment method in the customer's invoice settings.
+       * ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
        */
       default_payment_method?: string;
 
       /**
-       * ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If not set, defaults to the customer's default source.
+       * ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source).
        */
       default_source?: string;
 
@@ -779,7 +779,7 @@ declare module 'stripe' {
           unit_amount?: number;
 
           /**
-           * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+           * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
            */
           unit_amount_decimal?: string;
         }
@@ -883,7 +883,7 @@ declare module 'stripe' {
           unit_amount?: number;
 
           /**
-           * Same as `unit_amount`, but accepts a decimal value with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set, but at least one is required.
+           * Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set.
            */
           unit_amount_decimal?: string;
         }
@@ -1033,7 +1033,7 @@ declare module 'stripe' {
 
     class SubscriptionsResource {
       /**
-       * Creates a new subscription on an existing customer. Each customer can have up to 25 active or scheduled subscriptions.
+       * Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.
        */
       create(
         params: SubscriptionCreateParams,
diff --git a/types/2020-08-27/TaxRates.d.ts b/types/2020-08-27/TaxRates.d.ts
index 1c7d9b7a..7e5c823e 100644
--- a/types/2020-08-27/TaxRates.d.ts
+++ b/types/2020-08-27/TaxRates.d.ts
@@ -53,7 +53,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       /**
        * This represents the tax rate percent out of 100.
diff --git a/types/2020-08-27/Tokens.d.ts b/types/2020-08-27/Tokens.d.ts
index 6c8f9f7b..46dc260a 100644
--- a/types/2020-08-27/Tokens.d.ts
+++ b/types/2020-08-27/Tokens.d.ts
@@ -485,7 +485,7 @@ declare module 'stripe' {
         country: string;
 
         /**
-         * The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts)
+         * The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts)
          */
         currency?: string;
 
diff --git a/types/2020-08-27/TransferReversals.d.ts b/types/2020-08-27/TransferReversals.d.ts
index d2604d7e..bdb83ca9 100644
--- a/types/2020-08-27/TransferReversals.d.ts
+++ b/types/2020-08-27/TransferReversals.d.ts
@@ -43,7 +43,7 @@ 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: Metadata;
+      metadata: Metadata | null;
 
       /**
        * ID of the refund responsible for the transfer reversal.
diff --git a/types/2020-08-27/WebhookEndpoints.d.ts b/types/2020-08-27/WebhookEndpoints.d.ts
index 1e774bfb..f39b1d02 100644
--- a/types/2020-08-27/WebhookEndpoints.d.ts
+++ b/types/2020-08-27/WebhookEndpoints.d.ts
@@ -301,8 +301,10 @@ declare module 'stripe' {
         | 'issuing_card.updated'
         | 'issuing_cardholder.created'
         | 'issuing_cardholder.updated'
+        | 'issuing_dispute.closed'
         | 'issuing_dispute.created'
         | 'issuing_dispute.funds_reinstated'
+        | 'issuing_dispute.submitted'
         | 'issuing_dispute.updated'
         | 'issuing_transaction.created'
         | 'issuing_transaction.updated'
@@ -505,8 +507,10 @@ declare module 'stripe' {
         | 'issuing_card.updated'
         | 'issuing_cardholder.created'
         | 'issuing_cardholder.updated'
+        | 'issuing_dispute.closed'
         | 'issuing_dispute.created'
         | 'issuing_dispute.funds_reinstated'
+        | 'issuing_dispute.submitted'
         | 'issuing_dispute.updated'
         | 'issuing_transaction.created'
         | 'issuing_transaction.updated'
diff --git a/types/2020-08-27/index.d.ts b/types/2020-08-27/index.d.ts
index 36185d55..a4cc146e 100644
--- a/types/2020-08-27/index.d.ts
+++ b/types/2020-08-27/index.d.ts
@@ -105,6 +105,8 @@ declare module 'stripe' {
 
     setAppInfo(info: Stripe.AppInfo): void;
 
+    StripeResource: Stripe.StripeResource;
+
     /**
      * Top Level Resources
      */
diff --git a/types/lib.d.ts b/types/lib.d.ts
index 78c00f29..4dd672a7 100644
--- a/types/lib.d.ts
+++ b/types/lib.d.ts
@@ -5,6 +5,43 @@ import {Agent} from 'http';
 
 declare module 'stripe' {
   namespace Stripe {
+    export class StripeResource {
+      static extend<
+        // eslint-disable-next-line @typescript-eslint/no-explicit-any
+        T extends {[prop: string]: any} & {
+          includeBasic?: Array<
+            'create' | 'retrieve' | 'update' | 'list' | 'del'
+          >;
+        }
+      >(spec: T): StripeResource & T;
+      static method(spec: {
+        method: string;
+        path: string;
+        methodType?: 'list';
+      }): (...args: any[]) => object; //eslint-disable-line @typescript-eslint/no-explicit-any
+      static BASIC_METHODS: {
+        create<T>(
+          params: CouponCreateParams,
+          options?: RequestOptions
+        ): Promise<T>;
+        retrieve<T>(
+          id: string,
+          params?: CouponRetrieveParams,
+          options?: RequestOptions
+        ): Promise<T>;
+        update<T>(
+          id: string,
+          params?: CouponUpdateParams,
+          options?: RequestOptions
+        ): Promise<T>;
+        list<T>(
+          params?: CouponListParams,
+          options?: RequestOptions
+        ): ApiListPromise<T>;
+        del<T>(id: string, options?: RequestOptions): Promise<T>;
+      };
+      static MAX_BUFFERED_REQUEST_METRICS: number;
+    }
     export type LatestApiVersion = '2020-08-27';
     export type HttpAgent = Agent;
 


Test patch:
diff --git a/types/test/typescriptTest.ts b/types/test/typescriptTest.ts
index b9503ee3..8d4d2949 100644
--- a/types/test/typescriptTest.ts
+++ b/types/test/typescriptTest.ts
@@ -168,3 +168,14 @@ const stripeCardError: Stripe.StripeCardError = Stripe.errors.generate({
   code: 'card_declined',
   charge: 'ch_123',
 });
+
+Stripe.StripeResource.extend({
+  includeBasic: ['retrieve'],
+  foo: Stripe.StripeResource.method({
+    method: 'create',
+    path: 'foo',
+  }),
+});
+
+const maxBufferedRequestMetrics: number =
+  Stripe.StripeResource.MAX_BUFFERED_REQUEST_METRICS;