|
18 | 18 | account_holder_simulate_enrollment_document_review_params, |
19 | 19 | ) |
20 | 20 | from ..._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given |
21 | | -from ..._utils import is_given, required_args, maybe_transform, async_maybe_transform |
| 21 | +from ..._utils import is_given, path_template, required_args, maybe_transform, async_maybe_transform |
22 | 22 | from .entities import ( |
23 | 23 | Entities, |
24 | 24 | AsyncEntities, |
@@ -461,7 +461,7 @@ def retrieve( |
461 | 461 | f"Expected a non-empty value for `account_holder_token` but received {account_holder_token!r}" |
462 | 462 | ) |
463 | 463 | return self._get( |
464 | | - f"/v1/account_holders/{account_holder_token}", |
| 464 | + path_template("/v1/account_holders/{account_holder_token}", account_holder_token=account_holder_token), |
465 | 465 | options=make_request_options( |
466 | 466 | extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
467 | 467 | ), |
@@ -679,7 +679,7 @@ def update( |
679 | 679 | return cast( |
680 | 680 | AccountHolderUpdateResponse, |
681 | 681 | self._patch( |
682 | | - f"/v1/account_holders/{account_holder_token}", |
| 682 | + path_template("/v1/account_holders/{account_holder_token}", account_holder_token=account_holder_token), |
683 | 683 | body=maybe_transform( |
684 | 684 | { |
685 | 685 | "beneficial_owner_individuals": beneficial_owner_individuals, |
@@ -843,7 +843,9 @@ def list_documents( |
843 | 843 | f"Expected a non-empty value for `account_holder_token` but received {account_holder_token!r}" |
844 | 844 | ) |
845 | 845 | return self._get( |
846 | | - f"/v1/account_holders/{account_holder_token}/documents", |
| 846 | + path_template( |
| 847 | + "/v1/account_holders/{account_holder_token}/documents", account_holder_token=account_holder_token |
| 848 | + ), |
847 | 849 | options=make_request_options( |
848 | 850 | extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
849 | 851 | ), |
@@ -894,7 +896,11 @@ def retrieve_document( |
894 | 896 | if not document_token: |
895 | 897 | raise ValueError(f"Expected a non-empty value for `document_token` but received {document_token!r}") |
896 | 898 | return self._get( |
897 | | - f"/v1/account_holders/{account_holder_token}/documents/{document_token}", |
| 899 | + path_template( |
| 900 | + "/v1/account_holders/{account_holder_token}/documents/{document_token}", |
| 901 | + account_holder_token=account_holder_token, |
| 902 | + document_token=document_token, |
| 903 | + ), |
898 | 904 | options=make_request_options( |
899 | 905 | extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
900 | 906 | ), |
@@ -1108,7 +1114,9 @@ def upload_document( |
1108 | 1114 | f"Expected a non-empty value for `account_holder_token` but received {account_holder_token!r}" |
1109 | 1115 | ) |
1110 | 1116 | return self._post( |
1111 | | - f"/v1/account_holders/{account_holder_token}/documents", |
| 1117 | + path_template( |
| 1118 | + "/v1/account_holders/{account_holder_token}/documents", account_holder_token=account_holder_token |
| 1119 | + ), |
1112 | 1120 | body=maybe_transform( |
1113 | 1121 | { |
1114 | 1122 | "document_type": document_type, |
@@ -1539,7 +1547,7 @@ async def retrieve( |
1539 | 1547 | f"Expected a non-empty value for `account_holder_token` but received {account_holder_token!r}" |
1540 | 1548 | ) |
1541 | 1549 | return await self._get( |
1542 | | - f"/v1/account_holders/{account_holder_token}", |
| 1550 | + path_template("/v1/account_holders/{account_holder_token}", account_holder_token=account_holder_token), |
1543 | 1551 | options=make_request_options( |
1544 | 1552 | extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
1545 | 1553 | ), |
@@ -1757,7 +1765,7 @@ async def update( |
1757 | 1765 | return cast( |
1758 | 1766 | AccountHolderUpdateResponse, |
1759 | 1767 | await self._patch( |
1760 | | - f"/v1/account_holders/{account_holder_token}", |
| 1768 | + path_template("/v1/account_holders/{account_holder_token}", account_holder_token=account_holder_token), |
1761 | 1769 | body=await async_maybe_transform( |
1762 | 1770 | { |
1763 | 1771 | "beneficial_owner_individuals": beneficial_owner_individuals, |
@@ -1921,7 +1929,9 @@ async def list_documents( |
1921 | 1929 | f"Expected a non-empty value for `account_holder_token` but received {account_holder_token!r}" |
1922 | 1930 | ) |
1923 | 1931 | return await self._get( |
1924 | | - f"/v1/account_holders/{account_holder_token}/documents", |
| 1932 | + path_template( |
| 1933 | + "/v1/account_holders/{account_holder_token}/documents", account_holder_token=account_holder_token |
| 1934 | + ), |
1925 | 1935 | options=make_request_options( |
1926 | 1936 | extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
1927 | 1937 | ), |
@@ -1972,7 +1982,11 @@ async def retrieve_document( |
1972 | 1982 | if not document_token: |
1973 | 1983 | raise ValueError(f"Expected a non-empty value for `document_token` but received {document_token!r}") |
1974 | 1984 | return await self._get( |
1975 | | - f"/v1/account_holders/{account_holder_token}/documents/{document_token}", |
| 1985 | + path_template( |
| 1986 | + "/v1/account_holders/{account_holder_token}/documents/{document_token}", |
| 1987 | + account_holder_token=account_holder_token, |
| 1988 | + document_token=document_token, |
| 1989 | + ), |
1976 | 1990 | options=make_request_options( |
1977 | 1991 | extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout |
1978 | 1992 | ), |
@@ -2186,7 +2200,9 @@ async def upload_document( |
2186 | 2200 | f"Expected a non-empty value for `account_holder_token` but received {account_holder_token!r}" |
2187 | 2201 | ) |
2188 | 2202 | return await self._post( |
2189 | | - f"/v1/account_holders/{account_holder_token}/documents", |
| 2203 | + path_template( |
| 2204 | + "/v1/account_holders/{account_holder_token}/documents", account_holder_token=account_holder_token |
| 2205 | + ), |
2190 | 2206 | body=await async_maybe_transform( |
2191 | 2207 | { |
2192 | 2208 | "document_type": document_type, |
|
0 commit comments