Debian Codegraph @

stripe/identity/_verification_report_service.py

raw
1 # -*- coding: utf-8 -*-
2 # File generated from our OpenAPI spec
3 from stripe._stripe_service import StripeService
4 from stripe._util import sanitize_id
5 from typing import Optional, cast
6 from typing_extensions import TYPE_CHECKING
7
8 if TYPE_CHECKING:
9 from stripe._list_object import ListObject
10 from stripe._request_options import RequestOptions
11 from stripe.identity._verification_report import VerificationReport
12 from stripe.params.identity._verification_report_list_params import (
13 VerificationReportListParams,
14 )
15 from stripe.params.identity._verification_report_retrieve_params import (
16 VerificationReportRetrieveParams,
17 )
18
19
20 class VerificationReportService(StripeService):
21 def list(
22 self,
23 params: Optional["VerificationReportListParams"] = None,
24 options: Optional["RequestOptions"] = None,
25 ) -> "ListObject[VerificationReport]":
26 """
27 List all verification reports.
28 """
29 return cast(
30 "ListObject[VerificationReport]",
31 self._request(
32 "get",
33 "/v1/identity/verification_reports",
34 base_address="api",
35 params=params,
36 options=options,
37 ),
38 )
39
40 async def list_async(
41 self,
42 params: Optional["VerificationReportListParams"] = None,
43 options: Optional["RequestOptions"] = None,
44 ) -> "ListObject[VerificationReport]":
45 """
46 List all verification reports.
47 """
48 return cast(
49 "ListObject[VerificationReport]",
50 await self._request_async(
51 "get",
52 "/v1/identity/verification_reports",
53 base_address="api",
54 params=params,
55 options=options,
56 ),
57 )
58
59 def retrieve(
60 self,
61 report: str,
62 params: Optional["VerificationReportRetrieveParams"] = None,
63 options: Optional["RequestOptions"] = None,
64 ) -> "VerificationReport":
65 """
66 Retrieves an existing VerificationReport
67 """
68 return cast(
69 "VerificationReport",
70 self._request(
71 "get",
72 "/v1/identity/verification_reports/{report}".format(
73 report=sanitize_id(report),
74 ),
75 base_address="api",
76 params=params,
77 options=options,
78 ),
79 )
80
81 async def retrieve_async(
82 self,
83 report: str,
84 params: Optional["VerificationReportRetrieveParams"] = None,
85 options: Optional["RequestOptions"] = None,
86 ) -> "VerificationReport":
87 """
88 Retrieves an existing VerificationReport
89 """
90 return cast(
91 "VerificationReport",
92 await self._request_async(
93 "get",
94 "/v1/identity/verification_reports/{report}".format(
95 report=sanitize_id(report),
96 ),
97 base_address="api",
98 params=params,
99 options=options,
100 ),
101 )