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