77from ...core .client_wrapper import AsyncClientWrapper , SyncClientWrapper
88from ...core .http_response import AsyncHttpResponse , HttpResponse
99from ...core .jsonable_encoder import jsonable_encoder
10- from ...core .pagination import AsyncPager , BaseHttpResponse , SyncPager
10+ from ...core .pagination import AsyncPager , SyncPager
1111from ...core .request_options import RequestOptions
1212from ...core .serialization import convert_and_respect_annotation_metadata
1313from ...core .unchecked_base_model import construct_type
@@ -35,7 +35,7 @@ def list(
3535 limit : typing .Optional [int ] = None ,
3636 cursor : typing .Optional [str ] = None ,
3737 request_options : typing .Optional [RequestOptions ] = None ,
38- ) -> SyncPager [CustomAttributeDefinition ]:
38+ ) -> SyncPager [CustomAttributeDefinition , ListBookingCustomAttributeDefinitionsResponse ]:
3939 """
4040 Get all bookings custom attribute definitions.
4141
@@ -59,7 +59,7 @@ def list(
5959
6060 Returns
6161 -------
62- SyncPager[CustomAttributeDefinition]
62+ SyncPager[CustomAttributeDefinition, ListBookingCustomAttributeDefinitionsResponse ]
6363 Success
6464 """
6565 _response = self ._client_wrapper .httpx_client .request (
@@ -88,9 +88,7 @@ def list(
8888 cursor = _parsed_next ,
8989 request_options = request_options ,
9090 )
91- return SyncPager (
92- has_next = _has_next , items = _items , get_next = _get_next , response = BaseHttpResponse (response = _response )
93- )
91+ return SyncPager (has_next = _has_next , items = _items , get_next = _get_next , response = _parsed_response )
9492 _response_json = _response .json ()
9593 except JSONDecodeError :
9694 raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response .text )
@@ -359,7 +357,7 @@ async def list(
359357 limit : typing .Optional [int ] = None ,
360358 cursor : typing .Optional [str ] = None ,
361359 request_options : typing .Optional [RequestOptions ] = None ,
362- ) -> AsyncPager [CustomAttributeDefinition ]:
360+ ) -> AsyncPager [CustomAttributeDefinition , ListBookingCustomAttributeDefinitionsResponse ]:
363361 """
364362 Get all bookings custom attribute definitions.
365363
@@ -383,7 +381,7 @@ async def list(
383381
384382 Returns
385383 -------
386- AsyncPager[CustomAttributeDefinition]
384+ AsyncPager[CustomAttributeDefinition, ListBookingCustomAttributeDefinitionsResponse ]
387385 Success
388386 """
389387 _response = await self ._client_wrapper .httpx_client .request (
@@ -415,9 +413,7 @@ async def _get_next():
415413 request_options = request_options ,
416414 )
417415
418- return AsyncPager (
419- has_next = _has_next , items = _items , get_next = _get_next , response = BaseHttpResponse (response = _response )
420- )
416+ return AsyncPager (has_next = _has_next , items = _items , get_next = _get_next , response = _parsed_response )
421417 _response_json = _response .json ()
422418 except JSONDecodeError :
423419 raise ApiError (status_code = _response .status_code , headers = dict (_response .headers ), body = _response .text )
0 commit comments