40045-vm/venv/lib/python3.11/site-packages/stripe/_createable_api_resource.py
2026-05-20 10:50:30 +00:00

15 lines
382 B
Python

from stripe._api_resource import APIResource
from typing import TypeVar, cast
from stripe._stripe_object import StripeObject
T = TypeVar("T", bound=StripeObject)
class CreateableAPIResource(APIResource[T]):
@classmethod
def create(cls, **params) -> T:
return cast(
T,
cls._static_request("post", cls.class_url(), params=params),
)