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

from __future__ import annotations
import dataclasses
from ..shared import changeoption1 as shared_changeoption1
from dataclasses_json import Undefined, dataclass_json
from datetime import date
from orb import utils
from typing import Optional


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class FixedFeeQuantityChange:
    price_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('price_id') }})
    r"""Price for which the quantity should be updated. Must be a fixed fee."""
    quantity: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity') }})
    change_option: Optional[shared_changeoption1.ChangeOption1] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('change_option'), 'exclude': lambda f: f is None }})
    r"""Determines when the change takes effect. Note that if `effective_date` is specified, this defautls to `effective_date`. Otherwise, this defaults to `immediate` unless it's explicitly set to `upcoming_invoice."""
    effective_date: Optional[date] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('effective_date'), 'encoder': utils.dateisoformat(True), 'decoder': utils.datefromisoformat, 'exclude': lambda f: f is None }})
    r"""The date that the quantity change should take effect, localized to the customer's timezone. If this parameter is not passed in, the quantity change is effective immediately."""
    

