Repository: stripe/stripe-node
Pull request #1190 (2021-07-12 22:17:00)

API Updates
Codegen for openapi 265b165.
r? @dcr-stripe
cc @stripe/api-libraries

## Changelog
* Add support for `list_computed_upfront_line_items` method on resource `Quote`




Patch:
diff --git a/README.md b/README.md
index 1c177956..db7c023c 100644
--- a/README.md
+++ b/README.md
@@ -511,7 +511,7 @@ $ yarn fix
 [connect]: https://stripe.com/connect
 [expanding_objects]: https://stripe.com/docs/api/expanding_objects
 [https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
-[stripe-js]: https://stripe.com/docs/stripe.js
+[stripe-js]: https://stripe.com/docs/js
 [youtube-playlist]: https://www.youtube.com/playlist?list=PLy1nL-pvL2M5xNIuNapwmABwEy2uifAlY
 
 <!--
diff --git a/lib/resources/Quotes.js b/lib/resources/Quotes.js
index 119c23cd..444a01b1 100644
--- a/lib/resources/Quotes.js
+++ b/lib/resources/Quotes.js
@@ -25,6 +25,11 @@ module.exports = StripeResource.extend({
     path: '/{quote}/finalize',
   }),
 
+  listComputedUpfrontLineItems: stripeMethod({
+    method: 'GET',
+    path: '/{quote}/computed_upfront_line_items',
+  }),
+
   listLineItems: stripeMethod({
     method: 'GET',
     path: '/{quote}/line_items',
diff --git a/types/2020-08-27/Accounts.d.ts b/types/2020-08-27/Accounts.d.ts
index 6afde4fc..191d12c4 100644
--- a/types/2020-08-27/Accounts.d.ts
+++ b/types/2020-08-27/Accounts.d.ts
@@ -3201,7 +3201,7 @@ declare module 'stripe' {
       ): Promise<Stripe.Response<Stripe.BankAccount | Stripe.Card>>;
 
       /**
-       * Updates the metadata, account holder name, and account holder type of a bank account belonging to a [Custom account](https://stripe.com/docs/connect/custom-accounts), and optionally sets it as the default for its currency. Other bank account details are not editable by design.
+       * Updates the metadata, account holder name, account holder type of a bank account belonging to a [Custom account](https://stripe.com/docs/connect/custom-accounts), and optionally sets it as the default for its currency. Other bank account details are not editable by design.
        *
        * You can re-enable a disabled bank account by performing an update call without providing any arguments or changes.
        */
diff --git a/types/2020-08-27/Checkout/Sessions.d.ts b/types/2020-08-27/Checkout/Sessions.d.ts
index b591774b..7c9bdcee 100644
--- a/types/2020-08-27/Checkout/Sessions.d.ts
+++ b/types/2020-08-27/Checkout/Sessions.d.ts
@@ -855,7 +855,7 @@ declare module 'stripe' {
         shipping_address_collection?: SessionCreateParams.ShippingAddressCollection;
 
         /**
-         * The shipping rate to apply to this Session. Currently, only up to one may be specified
+         * The shipping rate to apply to this Session. Currently, only up to one may be specified.
          */
         shipping_rates?: Array<string>;
 
diff --git a/types/2020-08-27/Quotes.d.ts b/types/2020-08-27/Quotes.d.ts
index f4a73ea7..9d47b06e 100644
--- a/types/2020-08-27/Quotes.d.ts
+++ b/types/2020-08-27/Quotes.d.ts
@@ -1003,13 +1003,6 @@ declare module 'stripe' {
       type Status = 'accepted' | 'canceled' | 'draft' | 'open';
     }
 
-    interface QuoteListParams extends PaginationParams {
-      /**
-       * Specifies which fields in the response should be expanded.
-       */
-      expand?: Array<string>;
-    }
-
     interface QuoteAcceptParams {
       /**
        * Specifies which fields in the response should be expanded.
@@ -1036,6 +1029,13 @@ declare module 'stripe' {
       expires_at?: number;
     }
 
+    interface QuoteListComputedUpfrontLineItemsParams extends PaginationParams {
+      /**
+       * Specifies which fields in the response should be expanded.
+       */
+      expand?: Array<string>;
+    }
+
     interface QuoteListLineItemsParams extends PaginationParams {
       /**
        * Specifies which fields in the response should be expanded.
@@ -1091,19 +1091,6 @@ declare module 'stripe' {
       ): ApiListPromise<Stripe.Quote>;
       list(options?: RequestOptions): ApiListPromise<Stripe.Quote>;
 
-      /**
-       * When retrieving a quote, there is an includable upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
-       */
-      list(
-        id: string,
-        params?: QuoteListParams,
-        options?: RequestOptions
-      ): ApiListPromise<Stripe.LineItem>;
-      list(
-        id: string,
-        options?: RequestOptions
-      ): ApiListPromise<Stripe.LineItem>;
-
       /**
        * Accepts the specified quote.
        */
@@ -1143,6 +1130,19 @@ declare module 'stripe' {
         options?: RequestOptions
       ): Promise<Stripe.Response<Stripe.Quote>>;
 
+      /**
+       * When retrieving a quote, there is an includable upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.
+       */
+      listComputedUpfrontLineItems(
+        id: string,
+        params?: QuoteListComputedUpfrontLineItemsParams,
+        options?: RequestOptions
+      ): ApiListPromise<Stripe.LineItem>;
+      listComputedUpfrontLineItems(
+        id: string,
+        options?: RequestOptions
+      ): ApiListPromise<Stripe.LineItem>;
+
       /**
        * When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.
        */


Test patch:
diff --git a/test/resources/Quotes.spec.js b/test/resources/Quotes.spec.js
index 1e734897..9f3bb684 100644
--- a/test/resources/Quotes.spec.js
+++ b/test/resources/Quotes.spec.js
@@ -117,6 +117,19 @@ describe('Quotes Resource', () => {
     });
   });
 
+  describe('listComputedUpfrontLineItems', () => {
+    it('Sends the correct request', () => {
+      stripe.quotes.listComputedUpfrontLineItems(QUOTE_TEST_ID);
+      expect(stripe.LAST_REQUEST).to.deep.equal({
+        method: 'GET',
+        url: `/v1/quotes/${QUOTE_TEST_ID}/computed_upfront_line_items`,
+        headers: {},
+        data: {},
+        settings: {},
+      });
+    });
+  });
+
   describe('pdf', () => {
     it('success', (callback) => {
       const handleRequest = (req, res) => {