Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code #972

Merged
merged 6 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v353
v385
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
9 changes: 4 additions & 5 deletions stripe/api_resources/charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ class Charge(
UpdateableAPIResource,
):
"""
To charge a credit or a debit card, you create a `Charge` object. You can
retrieve and refund individual charges as well as list all charges. Charges
are identified by a unique, random ID.

Related guide: [Accept a payment with the Charges API](https://stripe.com/docs/payments/accept-a-payment-charges)
The `Charge` object represents a single attempt to move money into your Stripe account.
PaymentIntent confirmation is the most common way to create Charges, but transferring
money to a different Stripe account through Connect also creates Charges.
Some legacy payment flows create Charges directly, which is not recommended for new integrations.
"""

OBJECT_NAME = "charge"
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: 0 additions & 2 deletions stripe/api_resources/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ class Token(CreateableAPIResource):
objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that
[Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection,
performs best with integrations that use client-side tokenization.

Related guide: [Accept a payment with Charges and Tokens](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token)
"""

OBJECT_NAME = "token"
Loading