Skip to content

Commit

Permalink
[stripe] Add type for PaymentLink (#10461)
Browse files Browse the repository at this point in the history
  • Loading branch information
anniel-stripe authored Jul 15, 2023
1 parent 7ea173c commit a83e559
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions stubs/stripe/@tests/stubtest_allowlist.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# The following methods have custom classmethod decorators
stripe\..*\.delete
stripe\..*PaymentIntent\.confirm
stripe\..*PaymentLink\.list_line_items
stripe\.api_resources\.test_helpers\.test_clock\.TestClock\.advance
stripe\.api_resources\.test_helpers\.TestClock\.advance
stripe\.api_resources\..*\.SearchableAPIResource\.search # Not defined on the actual class in v3, but expected to exist.
Expand Down
1 change: 1 addition & 0 deletions stubs/stripe/stripe/api_resources/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ from stripe.api_resources.login_link import LoginLink as LoginLink
from stripe.api_resources.mandate import Mandate as Mandate
from stripe.api_resources.order import Order as Order
from stripe.api_resources.payment_intent import PaymentIntent as PaymentIntent
from stripe.api_resources.payment_link import PaymentLink as PaymentLink
from stripe.api_resources.payment_method import PaymentMethod as PaymentMethod
from stripe.api_resources.payout import Payout as Payout
from stripe.api_resources.person import Person as Person
Expand Down
24 changes: 24 additions & 0 deletions stubs/stripe/stripe/api_resources/payment_link.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from typing import overload

from stripe.api_resources.abstract import (
CreateableAPIResource as CreateableAPIResource,
ListableAPIResource as ListableAPIResource,
UpdateableAPIResource as UpdateableAPIResource,
)

class PaymentLink(CreateableAPIResource, ListableAPIResource, UpdateableAPIResource):
OBJECT_NAME: str

@overload
@classmethod
def list_line_items(
cls,
payment_link: str,
api_key: str | None = None,
stripe_version: str | None = None,
stripe_account: str | None = None,
**params,
): ...
@overload
@classmethod
def list_line_items(cls, idempotency_key: str | None = None, **params): ...

0 comments on commit a83e559

Please sign in to comment.