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

6 statements  

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

1from typing import Literal, TypedDict 

2 

3from ..base.properties import BenefitGrantProperties, BenefitProperties 

4 

5 

6class BenefitLicenseKeyExpirationProperties(TypedDict): 

7 ttl: int 

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

9 

10 

11class BenefitLicenseKeyActivationProperties(TypedDict): 

12 limit: int 

13 enable_customer_admin: bool 

14 

15 

16class BenefitLicenseKeysProperties(BenefitProperties): 

17 prefix: str | None 

18 expires: BenefitLicenseKeyExpirationProperties | None 

19 activations: BenefitLicenseKeyActivationProperties | None 

20 limit_usage: int | None 

21 

22 

23class BenefitGrantLicenseKeysProperties(BenefitGrantProperties, total=False): 

24 license_key_id: str 

25 display_key: str