Skip to content

Commit

Permalink
Codegen for openapi v170
Browse files Browse the repository at this point in the history
  • Loading branch information
dcr-stripe committed Jul 21, 2022
1 parent c8a637c commit 328c2bf
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v166
v170
1 change: 1 addition & 0 deletions stripe/api_resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions stripe/api_resources/quote_phase.py
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions stripe/object_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 328c2bf

Please sign in to comment.