Coverage for polar/refund/sorting.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-12-05 15:52 +0000

1from enum import StrEnum 1a

2from typing import Annotated 1a

3 

4from fastapi import Depends 1a

5 

6from polar.kit.sorting import Sorting, SortingGetter 1a

7 

8 

9class RefundSortProperty(StrEnum): 1a

10 created_at = "created_at" 1a

11 amount = "amount" 1a

12 

13 

14RefundListSorting = Annotated[ 1a

15 list[Sorting[RefundSortProperty]], 

16 Depends(SortingGetter(RefundSortProperty, ["-created_at"])), 

17]