Coverage for polar/customer_portal/schemas/organization.py: 100%
14 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 17:15 +0000
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 17:15 +0000
1from pydantic import Field 1a
3from polar.benefit.schemas import BenefitPublic 1a
4from polar.file.schemas import ProductMediaFileRead 1a
5from polar.kit.schemas import Schema 1a
6from polar.organization.schemas import ( 1a
7 OrganizationPublicBase,
8)
9from polar.product.schemas import ProductBase, ProductPrice 1a
12class CustomerProduct(ProductBase): 1a
13 """Schema of a product for customer portal."""
15 prices: list[ProductPrice] = Field( 1a
16 description="List of available prices for this product."
17 )
18 benefits: list[BenefitPublic] = Field( 1a
19 title="BenefitPublic", description="The benefits granted by the product."
20 )
21 medias: list[ProductMediaFileRead] = Field( 1a
22 description="The medias associated to the product."
23 )
26class CustomerOrganization(OrganizationPublicBase): ... 1a
29class CustomerOrganizationData(Schema): 1a
30 """Schema of an organization and related data for customer portal."""
32 organization: CustomerOrganization 1a
33 products: list[CustomerProduct] 1a