Coverage for polar/customer_portal/sorting/customer_meter.py: 100%

13 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 CustomerCustomerMeterSortProperty(StrEnum): 1a

10 created_at = "created_at" 1a

11 modified_at = "modified_at" 1a

12 meter_id = "meter_id" 1a

13 meter_name = "meter_name" 1a

14 consumed_units = "consumed_units" 1a

15 credited_units = "credited_units" 1a

16 balance = "balance" 1a

17 

18 

19ListSorting = Annotated[ 1a

20 list[Sorting[CustomerCustomerMeterSortProperty]], 

21 Depends(SortingGetter(CustomerCustomerMeterSortProperty, ["-modified_at"])), 

22]