# This file was generated by liblab | https://liblab.com/

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .cod_cod_amount import CodCodAmount


@JsonMap({"cod_funds_code": "CODFundsCode", "cod_amount": "CODAmount"})
class PackageServiceOptionsCod(BaseModel):
    """COD Container. Indicates COD is requested.   Valid for the following country or territory combinations: US/PR to US/PRCA to CACA to USNot allowed for CA to US for packages that are designated as Letters or Envelopes.

    :param cod_funds_code: Indicates the type of funds that will be used for the C.O.D. payment.  For valid values, refer to Rating and Shipping COD Supported Countries or Territories in the Appendix.
    :type cod_funds_code: str
    :param cod_amount: CODAmount Container.
    :type cod_amount: CodCodAmount
    """

    def __init__(self, cod_funds_code: str, cod_amount: CodCodAmount):
        self.cod_funds_code = cod_funds_code
        self.cod_amount = self._define_object(cod_amount, CodCodAmount)
