Skip to content

Commit

Permalink
Merge pull request #976 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] committed Jun 13, 2023
2 parents 97dac32 + 4eacb31 commit caad475
Show file tree
Hide file tree
Showing 11 changed files with 438 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ venv: $(VENV_NAME)/bin/activate
$(VENV_NAME)/bin/activate: setup.py
$(PIP) install --upgrade pip virtualenv
@test -d $(VENV_NAME) || $(PYTHON) -m virtualenv --clear $(VENV_NAME)
${VENV_NAME}/bin/python -m pip install -U pip tox twine "cryptography<40"
${VENV_NAME}/bin/python -m pip install -U pip tox twine -c constraints.txt
${VENV_NAME}/bin/python -m pip install -e .
@touch $(VENV_NAME)/bin/activate

Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v361
v385
2 changes: 2 additions & 0 deletions constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# cryptography 40.0.0 deprecates support for Python 3.6 and PyPy3 < 7.3.10
cryptography<40
8 changes: 4 additions & 4 deletions stripe/api_resources/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
from stripe.six.moves.urllib.parse import quote_plus


@nested_resource_class_methods(
"external_account",
operations=["create", "retrieve", "update", "delete", "list"],
)
@nested_resource_class_methods(
"capability",
operations=["retrieve", "update", "list"],
resource_plural="capabilities",
)
@nested_resource_class_methods(
"external_account",
operations=["create", "retrieve", "update", "delete", "list"],
)
@nested_resource_class_methods(
"login_link",
operations=["create"],
Expand Down
18 changes: 18 additions & 0 deletions stripe/api_resources/credit_note.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
from stripe.api_resources.abstract import CreateableAPIResource
from stripe.api_resources.abstract import ListableAPIResource
from stripe.api_resources.abstract import UpdateableAPIResource
from stripe.api_resources.abstract import nested_resource_class_methods


@nested_resource_class_methods(
"line",
operations=["list"],
)
class CreditNote(
CreateableAPIResource,
ListableAPIResource,
Expand All @@ -34,6 +39,19 @@ def preview(
params=params,
)

@classmethod
def preview_lines(
cls, api_key=None, stripe_version=None, stripe_account=None, **params
):
return cls._static_request(
"get",
"/v1/credit_notes/preview/lines",
api_key=api_key,
stripe_version=stripe_version,
stripe_account=stripe_account,
params=params,
)

@classmethod
def _cls_void_credit_note(
cls,
Expand Down
4 changes: 2 additions & 2 deletions stripe/api_resources/credit_note_line_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# File generated from our OpenAPI spec
from __future__ import absolute_import, division, print_function

from stripe.stripe_object import StripeObject
from stripe.api_resources.abstract import ListableAPIResource


class CreditNoteLineItem(StripeObject):
class CreditNoteLineItem(ListableAPIResource):
OBJECT_NAME = "credit_note_line_item"
8 changes: 4 additions & 4 deletions stripe/api_resources/customer.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@


@test_helpers
@nested_resource_class_methods(
"source",
operations=["create", "retrieve", "update", "delete", "list"],
)
@nested_resource_class_methods(
"balance_transaction",
operations=["create", "retrieve", "update", "list"],
Expand All @@ -26,6 +22,10 @@
"cash_balance_transaction",
operations=["retrieve", "list"],
)
@nested_resource_class_methods(
"source",
operations=["create", "retrieve", "update", "delete", "list"],
)
@nested_resource_class_methods(
"tax_id",
operations=["create", "retrieve", "delete", "list"],
Expand Down
2 changes: 1 addition & 1 deletion stripe/api_resources/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Invoice(
If your invoice is configured to be billed through automatic charges,
Stripe automatically finalizes your invoice and attempts payment. Note
that finalizing the invoice,
[when automatic](https://stripe.com/docs/billing/invoices/workflow/#auto_advance), does
[when automatic](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection), does
not happen immediately as the invoice is created. Stripe waits
until one hour after the last webhook was successfully sent (or the last
webhook timed out after failing). If you (and the platforms you may have
Expand Down
4 changes: 4 additions & 0 deletions stripe/api_resources/login_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@


class LoginLink(StripeObject):
"""
Login Links are single-use login link for an Express account to access their Stripe dashboard.
"""

OBJECT_NAME = "login_link"
2 changes: 1 addition & 1 deletion stripe/api_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

class _ApiVersion:
CURRENT = "2022-11-15"
PREVIEW = "2023-05-26.preview-v2"
PREVIEW = "2023-06-08.preview-v2"
Loading

0 comments on commit caad475

Please sign in to comment.