Debian Codegraph @

stripe/v2/core/_account_link_service.py

raw
1 # -*- coding: utf-8 -*-
2 # File generated from our OpenAPI spec
3 from stripe._stripe_service import StripeService
4 from typing import Optional, cast
5 from typing_extensions import TYPE_CHECKING
6
7 if TYPE_CHECKING:
8 from stripe._request_options import RequestOptions
9 from stripe.params.v2.core._account_link_create_params import (
10 AccountLinkCreateParams,
11 )
12 from stripe.v2.core._account_link import AccountLink
13
14
15 class AccountLinkService(StripeService):
16 def create(
17 self,
18 params: "AccountLinkCreateParams",
19 options: Optional["RequestOptions"] = None,
20 ) -> "AccountLink":
21 """
22 Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information.
23 """
24 return cast(
25 "AccountLink",
26 self._request(
27 "post",
28 "/v2/core/account_links",
29 base_address="api",
30 params=params,
31 options=options,
32 ),
33 )
34
35 async def create_async(
36 self,
37 params: "AccountLinkCreateParams",
38 options: Optional["RequestOptions"] = None,
39 ) -> "AccountLink":
40 """
41 Creates an AccountLink object that includes a single-use URL that an account can use to access a Stripe-hosted flow for collecting or updating required information.
42 """
43 return cast(
44 "AccountLink",
45 await self._request_async(
46 "post",
47 "/v2/core/account_links",
48 base_address="api",
49 params=params,
50 options=options,
51 ),
52 )