Coverage for polar/customer_portal/schemas/downloadables.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-07 12:42 +0000

1from datetime import datetime 

2 

3from pydantic import UUID4 

4 

5from polar.benefit.schemas import BenefitID 

6from polar.file.schemas import FileDownload 

7from polar.kit.schemas import Schema 

8from polar.models.downloadable import DownloadableStatus 

9 

10 

11class DownloadableURL(Schema): 

12 url: str 

13 expires_at: datetime 

14 

15 

16class DownloadableRead(Schema): 

17 id: UUID4 

18 benefit_id: UUID4 

19 

20 file: FileDownload 

21 

22 

23class DownloadableCreate(Schema): 

24 file_id: UUID4 

25 customer_id: UUID4 

26 benefit_id: BenefitID 

27 status: DownloadableStatus 

28 

29 

30class DownloadableUpdate(Schema): 

31 file_id: UUID4 

32 customer_id: UUID4 

33 benefit_id: BenefitID 

34 status: DownloadableStatus