From 328c2bf07937aaf2a75c349137b9444b4b0779ba Mon Sep 17 00:00:00 2001 From: Dominic Charley-Roy Date: Thu, 21 Jul 2022 15:02:01 -0400 Subject: [PATCH] Codegen for openapi v170 --- OPENAPI_VERSION | 2 +- stripe/api_resources/__init__.py | 1 + stripe/api_resources/quote_phase.py | 21 +++++++++++++++++++++ stripe/object_classes.py | 1 + 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 stripe/api_resources/quote_phase.py diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 6cd1357ca..48af0461c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v166 \ No newline at end of file +v170 \ No newline at end of file diff --git a/stripe/api_resources/__init__.py b/stripe/api_resources/__init__.py index 4fe8250a6..c70e46d7b 100644 --- a/stripe/api_resources/__init__.py +++ b/stripe/api_resources/__init__.py @@ -69,6 +69,7 @@ from stripe.api_resources.product import Product from stripe.api_resources.promotion_code import PromotionCode from stripe.api_resources.quote import Quote +from stripe.api_resources.quote_phase import QuotePhase from stripe.api_resources.recipient import Recipient from stripe.api_resources.recipient_transfer import RecipientTransfer from stripe.api_resources.refund import Refund diff --git a/stripe/api_resources/quote_phase.py b/stripe/api_resources/quote_phase.py new file mode 100644 index 000000000..c393a09b5 --- /dev/null +++ b/stripe/api_resources/quote_phase.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec +from __future__ import absolute_import, division, print_function + +from stripe import util +from stripe.api_resources.abstract import ListableAPIResource +from stripe.api_resources.abstract import custom_method + + +@custom_method("list_line_items", http_verb="get", http_path="line_items") +class QuotePhase(ListableAPIResource): + OBJECT_NAME = "quote_phase" + + def list_line_items(self, idempotency_key=None, **params): + url = "/v1/quote_phases/{quote_phase}/line_items".format( + quote_phase=util.sanitize_id(self.get("id")) + ) + headers = util.populate_headers(idempotency_key) + resp = self.request("get", url, params, headers) + stripe_object = util.convert_to_stripe_object(resp) + stripe_object._retrieve_params = params + return stripe_object diff --git a/stripe/object_classes.py b/stripe/object_classes.py index e41194c7a..b4b58935d 100644 --- a/stripe/object_classes.py +++ b/stripe/object_classes.py @@ -72,6 +72,7 @@ api_resources.Product.OBJECT_NAME: api_resources.Product, api_resources.PromotionCode.OBJECT_NAME: api_resources.PromotionCode, api_resources.Quote.OBJECT_NAME: api_resources.Quote, + api_resources.QuotePhase.OBJECT_NAME: api_resources.QuotePhase, api_resources.radar.EarlyFraudWarning.OBJECT_NAME: api_resources.radar.EarlyFraudWarning, api_resources.radar.ValueList.OBJECT_NAME: api_resources.radar.ValueList, api_resources.radar.ValueListItem.OBJECT_NAME: api_resources.radar.ValueListItem,