"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

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


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class CoreRate:
    amount: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount'), 'exclude': lambda f: f is None }})
    r"""Final Rate price, expressed in the currency used in the sender's country."""
    amount_local: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount_local'), 'exclude': lambda f: f is None }})
    r"""Final Rate price, expressed in the currency used in the recipient's country."""
    currency: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency'), 'exclude': lambda f: f is None }})
    r"""Currency used in the sender's country, refers to `amount`.
    The <a href=\"http://www.xe.com/iso4217.php\">official ISO 4217</a> currency codes are used, e.g. `USD` or `EUR`.
    """
    currency_local: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('currency_local'), 'exclude': lambda f: f is None }})
    r"""Currency used in the recipient's country, refers to `amount_local`.
    The <a href=\"http://www.xe.com/iso4217.php\">official ISO 4217</a> currency codes are used, e.g. `USD` or \"EUR\".
    """
    object_id: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('object_id'), 'exclude': lambda f: f is None }})
    r"""Unique identifier of the Rate object."""
    provider: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('provider'), 'exclude': lambda f: f is None }})
    r"""Carrier offering the rate, e.g., `FedEx` or `Deutsche Post DHL`."""
    carrier_account: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('carrier_account'), 'exclude': lambda f: f is None }})
    r"""Object ID of the carrier account that has been used to retrieve the rate."""
    servicelevel_name: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('servicelevel_name'), 'exclude': lambda f: f is None }})
    r"""Service level name, e.g. `Priority Mail` or `FedEx Ground®`.
    A service level commonly defines the transit time of a Shipment (e.g., Express vs. Standard), 
    along with other properties.  These names vary depending on the provider.<br>
    See <a href=\"#tag/Service-Levels\">Service Levels</a>.
    """
    servicelevel_token: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('servicelevel_token'), 'exclude': lambda f: f is None }})
    r"""Token of the Rate's servicelevel, e.g. `usps_priority` or `fedex_ground`.
    See <a href=\"#tag/Service-Levels\">servicelevels</a>.
    """
    

