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

from __future__ import annotations
from .utils.json_map import JsonMap
from .base import BaseModel
from .shipment_service_options_cod_cod_amount import ShipmentServiceOptionsCodCodAmount


@JsonMap({"cod_funds_code": "CODFundsCode", "cod_amount": "CODAmount"})
class ShipmentServiceOptionsCod(BaseModel):
    """If present, indicates C.O.D. is requested for the shipment.  Shipment level C.O.D. is only available for EU origin countries or territories.C.O.D. shipments are only available for Shippers with Daily Pickup and Drop Shipping accounts.

    :param cod_funds_code: 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.  UPS does not support all international currency codes. Refer to the appendix for a list of valid codes.
    :type cod_amount: ShipmentServiceOptionsCodCodAmount
    """

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