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

from __future__ import annotations
import dataclasses
from dataclasses_json import Undefined, dataclass_json
from orb import utils
from typing import Optional



@dataclasses.dataclass
class NewCouponDiscount:
    pass


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class NewCoupon:
    discount: NewCouponDiscount = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('discount') }})
    redemption_code: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('redemption_code') }})
    r"""This string can be used to redeem this coupon for a given subscription."""
    duration_in_months: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('duration_in_months') }})
    r"""This allows for a coupon's discount to apply for a limited time (determined in months); a `null` value here means \\"unlimited time\\"."""
    max_redemptions: Optional[int] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('max_redemptions') }})
    r"""The maximum number of redemptions allowed for this coupon before it is exhausted;`null` here means \\"unlimited\\"."""
    

