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

from __future__ import annotations
import dataclasses
from .cod import Cod
from .parcelinsurance import ParcelInsurance
from dataclasses_json import Undefined, dataclass_json
from shippo import utils
from typing import Optional


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class ParcelExtra:
    r"""An object holding optional extra services to be requested for each parcel in a multi-piece shipment.
    See the <a href=\"#section/Parcel-Extras\">Parcel Extra table below</a> for all available services.
    """
    cod: Optional[Cod] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('COD'), 'exclude': lambda f: f is None }})
    r"""Specify collection on delivery details (UPS only)."""
    insurance: Optional[ParcelInsurance] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('insurance'), 'exclude': lambda f: f is None }})
    r"""To add insurace to your parcel, specify `amount`, `content` and `currency`. <br><br>If you do not want to add insurance to you parcel, do not set these parameters."""
    reference_1: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reference_1'), 'exclude': lambda f: f is None }})
    r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters."""
    reference_2: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reference_2'), 'exclude': lambda f: f is None }})
    r"""Optional text to be printed on the shipping label if supported by carrier. Up to 50 characters."""
    

