@@ -21,6 +21,8 @@ async def get_virtual_cards(
2121 status : Optional [str ] = None ,
2222 recipient : Optional [str ] = None ,
2323 search_term : Optional [str ] = None ,
24+ sort_field : Optional [str ] = None ,
25+ sort_direction : Optional [str ] = None ,
2426 ) -> Dict :
2527 """Get a list of virtual cards with optional filtering and pagination.
2628
@@ -30,6 +32,8 @@ async def get_virtual_cards(
3032 status (Optional[str]): Filter cards by status (e.g., "ACTIVE", "CANCELLED")
3133 recipient (Optional[str]): Filter cards by recipient id (e.g., "u_1234")
3234 search_term (Optional[str]): Filter cards by search term (e.g., "Marketing")
35+ sort_field (Optional[str]): Field to sort by "createdAt", "updatedAt", "balanceCents", "displayName", "type", or "status"
36+ sort_direction (Optional[str]): Direction to sort (ASC or DESC)
3337
3438 Returns:
3539 Dict: A dictionary containing:
@@ -49,8 +53,9 @@ async def get_virtual_cards(
4953 "statuses" : status ,
5054 "recipient" : recipient ,
5155 "search" : search_term ,
56+ "sortField" : sort_field ,
57+ "sortDirection" : sort_direction ,
5258 }
53- params = {k : v for k , v in params .items () if v is not None }
5459
5560 return await self ._request (method = "get" , params = params )
5661
0 commit comments