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

12 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-12-05 17:15 +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 PayoutSortProperty(StrEnum): 1a

10 created_at = "created_at" 1a

11 amount = "amount" 1a

12 fees_amount = "fees_amount" 1a

13 status = "status" 1a

14 paid_at = "paid_at" 1a

15 account_id = "account_id" 1a

16 

17 

18ListSorting = Annotated[ 1a

19 list[Sorting[PayoutSortProperty]], 

20 Depends(SortingGetter(PayoutSortProperty, ["-created_at"])), 

21]