"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
from ..shared import price as shared_price
from ..shared import pricegroup as shared_pricegroup
from dataclasses_json import Undefined, dataclass_json
from orb import utils
from typing import Optional


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class PerPriceCost:
    r"""Price's contributions for the timeframe, excluding any transforms (minimums and discounts)."""
    price: shared_price.Price = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('price') }})
    r"""See the [plan reference](plan.tag.mdx) for a detailed discussion of different pricing models"""
    subtotal: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('subtotal') }})
    r"""Price's contributions for the timeframe, excluding any minimums and discounts."""
    total: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('total') }})
    r"""Price's contributions for the timeframe, including minimums and discounts."""
    price_groups: Optional[list[shared_pricegroup.PriceGroup]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('price_groups'), 'exclude': lambda f: f is None }})
    r"""If a `group_by` attribute is passed in, array of costs per `grouping_key`, `grouping_value` or `secondary_grouping_key`, `secondary_grouping_value`."""
    

