Coverage for polar/benefit/strategies/license_keys/properties.py: 100%

16 statements  

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

1from typing import Literal, TypedDict 1a

2 

3from ..base.properties import BenefitGrantProperties, BenefitProperties 1a

4 

5 

6class BenefitLicenseKeyExpirationProperties(TypedDict): 1a

7 ttl: int 1a

8 timeframe: Literal["year", "month", "day"] 1a

9 

10 

11class BenefitLicenseKeyActivationProperties(TypedDict): 1a

12 limit: int 1a

13 enable_customer_admin: bool 1a

14 

15 

16class BenefitLicenseKeysProperties(BenefitProperties): 1a

17 prefix: str | None 1a

18 expires: BenefitLicenseKeyExpirationProperties | None 1a

19 activations: BenefitLicenseKeyActivationProperties | None 1a

20 limit_usage: int | None 1a

21 

22 

23class BenefitGrantLicenseKeysProperties(BenefitGrantProperties, total=False): 1a

24 license_key_id: str 1a

25 display_key: str 1a