Debian Codegraph @

stripe/tax/_association_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.tax._association_find_params import (
10 AssociationFindParams,
11 )
12 from stripe.tax._association import Association
13
14
15 class AssociationService(StripeService):
16 def find(
17 self,
18 params: "AssociationFindParams",
19 options: Optional["RequestOptions"] = None,
20 ) -> "Association":
21 """
22 Finds a tax association object by PaymentIntent id.
23 """
24 return cast(
25 "Association",
26 self._request(
27 "get",
28 "/v1/tax/associations/find",
29 base_address="api",
30 params=params,
31 options=options,
32 ),
33 )
34
35 async def find_async(
36 self,
37 params: "AssociationFindParams",
38 options: Optional["RequestOptions"] = None,
39 ) -> "Association":
40 """
41 Finds a tax association object by PaymentIntent id.
42 """
43 return cast(
44 "Association",
45 await self._request_async(
46 "get",
47 "/v1/tax/associations/find",
48 base_address="api",
49 params=params,
50 options=options,
51 ),
52 )