File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,15 @@ def __init__(
167167 poll_max_retries = poll_max_retries ,
168168 timeout = timeout ,
169169 )
170+ self ._client_hetzner = ClientBase (
171+ token = token ,
172+ endpoint = api_endpoint_hetzner ,
173+ application_name = application_name ,
174+ application_version = application_version ,
175+ poll_interval = poll_interval ,
176+ poll_max_retries = poll_max_retries ,
177+ timeout = timeout ,
178+ )
170179
171180 self .datacenters = DatacentersClient (self )
172181 """DatacentersClient Instance
Original file line number Diff line number Diff line change @@ -27,7 +27,9 @@ class StorageBoxTypesClient(ResourceClientBase):
2727 See https://docs.hetzner.cloud/reference/hetzner#storage-box-types.
2828 """
2929
30- _client : Client
30+ def __init__ (self , client : Client ):
31+ super ().__init__ (client )
32+ self ._client = client ._client_hetzner
3133
3234 def get_by_id (self , id : int ) -> BoundStorageBoxType :
3335 """
@@ -37,7 +39,7 @@ def get_by_id(self, id: int) -> BoundStorageBoxType:
3739
3840 :param id: ID of the Storage Box Type.
3941 """
40- response = self ._client ._request_hetzner ( # pylint: disable=protected-access
42+ response = self ._client .request (
4143 method = "GET" ,
4244 url = f"/storage_box_types/{ id } " ,
4345 )
@@ -76,7 +78,7 @@ def get_list(
7678 if per_page is not None :
7779 params ["per_page" ] = per_page
7880
79- response = self ._client ._request_hetzner ( # pylint: disable=protected-access
81+ response = self ._client .request (
8082 method = "GET" ,
8183 url = "/storage_box_types" ,
8284 params = params ,
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ def client(request_mock) -> Client:
2929 poll_max_retries = 3 ,
3030 )
3131 c ._client .request = request_mock
32+ c ._client_hetzner .request = request_mock
3233 return c
3334
3435
You can’t perform that action at this time.
0 commit comments