8000 Codegen · stripe/stripe-python@b5a5f96 · GitHub
[go: up one dir, main page]

Skip to content

Commit b5a5f96

Browse files
Codegen
1 parent 8d0e40e commit b5a5f96

File tree

118 files changed

+20972
-126
lines changed
  • tests
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    118 files changed

    +20972
    -126
    lines changed

    stripe/_account.py

    Lines changed: 524 additions & 2 deletions
    Large diffs are not rendered by default.

    stripe/_account_link.py

    Lines changed: 16 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -95,3 +95,19 @@ def create(
    9595
    params=params,
    9696
    ),
    9797
    )
    98+
    99+
    @classmethod
    100+
    async def create_async(
    101+
    cls, **params: Unpack["AccountLink.CreateParams"]
    102+
    ) -> "AccountLink":
    103+
    """
    104+
    Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow.
    105+
    """
    106+
    return cast(
    107+
    "AccountLink",
    108+
    await cls._static_request_async(
    109+
    "post",
    110+
    cls.class_url(),
    111+
    params=params,
    112+
    ),
    113+
    )

    stripe/_account_notice.py

    Lines changed: 49 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -183,6 +183,27 @@ def list(
    183183

    184184
    return result
    185185

    186+
    @classmethod
    187+
    async def list_async(
    188+
    cls, **params: Unpack["AccountNotice.ListParams"]
    189+
    ) -> ListObject["AccountNotice"]:
    190+
    """
    191+
    Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first.
    192+
    """
    193+
    result = await cls._static_request_async(
    194+
    "get",
    195+
    cls.class_url(),
    196+
    params=params,
    197+
    )
    198+
    if not isinstance(result, ListObject):
    199+
    200+
    raise TypeError(
    201+
    "Expected list object from API, got %s"
    202+
    % (type(result).__name__)
    203+
    )
    204+
    205+
    return result
    206+
    186207
    @classmethod
    187208
    def modify(
    188209
    cls, id: str, **params: Unpack["AccountNotice.ModifyParams"]
    @@ -200,6 +221,23 @@ def modify(
    200221
    ),
    201222
    )
    202223

    224+
    @classmethod
    225+
    async def modify_async(
    226+
    cls, id: str, **params: Unpack["AccountNotice.ModifyParams"]
    227+
    ) -> "AccountNotice":
    228+
    """
    229+
    Updates an AccountNotice object.
    230+
    """
    231+
    url = "%s/%s" % (cls.class_url(), sanitize_id(id))
    232+
    return cast(
    233+
    "AccountNotice",
    234+
    await cls._static_request_async(
    235+
    "post",
    236+
    url,
    237+
    params=params,
    238+
    ),
    239+
    )
    240+
    203241
    @classmethod
    204242
    def retrieve(
    205243
    cls, id: str, **params: Unpack["AccountNotice.RetrieveParams"]
    @@ -211,4 +249,15 @@ def retrieve(
    211249
    instance.refresh()
    212250
    return instance
    213251

    252+
    @classmethod
    253+
    async def retrieve_async(
    254+
    cls, id: str, **params: Unpack["AccountNotice.RetrieveParams"]
    255+
    ) -> "AccountNotice":
    256+
    """
    257+
    Retrieves an AccountNotice object.
    258+
    """
    259+
    instance = cls(id, **params)
    260+
    await instance.refresh_async()
    261+
    return instance
    262+
    214263
    _inner_class_types = {"email": Email, "linked_objects": LinkedObjects}

    stripe/_account_session.py

    Lines changed: 16 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -311,4 +311,20 @@ def create(
    311311
    ),
    312312
    )
    313313

    314+
    @classmethod
    315+
    async def create_async(
    316+
    cls, **params: Unpack["AccountSession.CreateParams"]
    317+
    ) -> "AccountSession":
    318+
    """
    319+
    Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access.
    320+
    """
    321+
    return cast(
    322+
    "AccountSession",
    323+
    await cls._static_request_async(
    324+
    "post",
    325+
    cls.class_url(),
    326+
    params=params,
    327+
    ),
    328+
    )
    329+
    314330
    _inner_class_types = {"components": Components}

    stripe/_apple_pay_domain.py

    Lines changed: 97 additions & 0 deletions
    Original file line numberDiff line numberDiff line change
    @@ -90,6 +90,22 @@ def create(
    9090
    ),
    9191
    )
    9292

    93+
    @classmethod
    94+
    async def create_async(
    95+
    cls, **params: Unpack["ApplePayDomain.CreateParams"]
    96+
    ) -> "ApplePayDomain":
    97+
    """
    98+
    Create an apple pay domain.
    99+
    """
    100+
    return cast(
    101+
    "ApplePayDomain",
    102+
    await cls._static_request_async(
    103+
    "post",
    104+
    cls.class_url(),
    105+
    params=params,
    106+
    ),
    107+
    )
    108+
    93109
    @classmethod
    94110
    def _cls_delete(
    95111
    cls, sid: str, **params: Unpack["ApplePayDomain.DeleteParams"]
    @@ -139,6 +155,55 @@ def delete( # pyright: ignore[reportGeneralTypeIssues]
    139155
    params=params,
    140156
    )
    141157

    158+
    @classmethod
    159+
    async def _cls_delete_async(
    160+
    cls, sid: str, **params: Unpack["ApplePayDomain.DeleteParams"]
    161+
    ) -> "ApplePayDomain":
    162+
    """
    163+
    Delet 10000 e an apple pay domain.
    164+
    """
    165+
    url = "%s/%s" % (cls.class_url(), sanitize_id(sid))
    166+
    return cast(
    167+
    "ApplePayDomain",
    168+
    await cls._static_request_async(
    169+
    "delete",
    170+
    url,
    171+
    params=params,
    172+
    ),
    173+
    )
    174+
    175+
    @overload
    176+
    @staticmethod
    177+
    async def delete_async(
    178+
    sid: str, **params: Unpack["ApplePayDomain.DeleteParams"]
    179+
    ) -> "ApplePayDomain":
    180+
    """
    181+
    Delete an apple pay domain.
    182+
    """
    183+
    ...
    184+
    185+
    @overload
    186+
    async def delete_async(
    187+
    self, **params: Unpack["ApplePayDomain.DeleteParams"]
    188+
    ) -> "ApplePayDomain":
    189+
    """
    190+
    Delete an apple pay domain.
    191+
    """
    192+
    ...
    193+
    194+
    @class_method_variant("_cls_delete_async")
    195+
    async def delete_async( # pyright: ignore[reportGeneralTypeIssues]
    196+
    self, **params: Unpack["ApplePayDomain.DeleteParams"]
    197+
    ) -> "ApplePayDomain":
    198+
    """
    199+
    Delete an apple pay domain.
    200+
    """
    201+
    return await self._request_and_refresh_async(
    202+
    "delete",
    203+
    self.instance_url(),
    204+
    params=params,
    205+
    )
    206+
    142207
    @classmethod
    143208
    10000 def list(
    144209
    cls, **params: Unpack["ApplePayDomain.ListParams"]
    @@ -160,6 +225,27 @@ def list(
    160225

    161226
    return result
    162227

    228+
    @classmethod
    229+
    async def list_async(
    230+
    cls, **params: Unpack["ApplePayDomain.ListParams"]
    231+
    ) -> ListObject["ApplePayDomain"]:
    232+
    """
    233+
    List apple pay domains.
    234+
    """
    235+
    result = await cls._static_request_async(
    236+
    "get",
    237+
    cls.class_url(),
    238+
    params=params,
    239+
    )
    240+
    if not isinstance(result, ListObject):
    241+
    242+
    raise TypeError(
    243+
    "Expected list object from API, got %s"
    244+
    % (type(result).__name__)
    245+
    )
    246+
    247+
    return result
    248+
    163249
    @classmethod
    164250
    def retrieve(
    165251
    cls, id: str, **params: Unpack["ApplePayDomain.RetrieveParams"]
    @@ -171,6 +257,17 @@ def retrieve(
    171257
    instance.refresh()
    172258
    return instance
    173259

    260+
    @classmethod
    261+
    async def retrieve_async(
    262+
    cls, id: str, **params: Unpack["ApplePayDomain.RetrieveParams"]
    263+
    ) -> "ApplePayDomain":
    264+
    """
    265+
    Retrieve an apple pay domain.
    266+
    """
    267+
    instance = cls(id, **params)
    268+
    await instance.refresh_async()
    269+
    return instance
    270+
    174271
    @classmethod
    175272
    def class_url(cls):
    176273
    return "/v1/apple_pay/domains"

    0 commit comments

    Comments
     (0)
    0