11from typing import Any , Dict , Optional , Type , TypeVar
22
3+ from .profile_route_constants import build_profile_route
34from .response_utils import parse_response_model
45
56T = TypeVar ("T" )
@@ -27,13 +28,12 @@ def create_profile_resource(
2728def get_profile_resource (
2829 * ,
2930 client : Any ,
30- route_prefix : str ,
3131 profile_id : str ,
3232 model : Type [T ],
3333 operation_name : str ,
3434) -> T :
3535 response = client .transport .get (
36- client ._build_url (f" { route_prefix } / { profile_id } " ),
36+ client ._build_url (build_profile_route ( profile_id ) ),
3737 )
3838 return parse_response_model (
3939 response .data ,
@@ -45,13 +45,12 @@ def get_profile_resource(
4545def delete_profile_resource (
4646 * ,
4747 client : Any ,
48- route_prefix : str ,
4948 profile_id : str ,
5049 model : Type [T ],
5150 operation_name : str ,
5251) -> T :
5352 response = client .transport .delete (
54- client ._build_url (f" { route_prefix } / { profile_id } " ),
53+ client ._build_url (build_profile_route ( profile_id ) ),
5554 )
5655 return parse_response_model (
5756 response .data ,
@@ -101,13 +100,12 @@ async def create_profile_resource_async(
101100async def get_profile_resource_async (
102101 * ,
103102 client : Any ,
104- route_prefix : str ,
105103 profile_id : str ,
106104 model : Type [T ],
107105 operation_name : str ,
108106) -> T :
109107 response = await client .transport .get (
110- client ._build_url (f" { route_prefix } / { profile_id } " ),
108+ client ._build_url (build_profile_route ( profile_id ) ),
111109 )
112110 return parse_response_model (
113111 response .data ,
@@ -119,13 +117,12 @@ async def get_profile_resource_async(
119117async def delete_profile_resource_async (
120118 * ,
121119 client : Any ,
122- route_prefix : str ,
123120 profile_id : str ,
124121 model : Type [T ],
125122 operation_name : str ,
126123) -> T :
127124 response = await client .transport .delete (
128- client ._build_url (f" { route_prefix } / { profile_id } " ),
125+ client ._build_url (build_profile_route ( profile_id ) ),
129126 )
130127 return parse_response_model (
131128 response .data ,
0 commit comments