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

from __future__ import annotations
from typing import List
from .utils.json_map import JsonMap
from .base import BaseModel
from .payment_details_shipment_charge import PaymentDetailsShipmentCharge


@JsonMap(
    {
        "shipment_charge": "ShipmentCharge",
        "split_duty_vat_indicator": "SplitDutyVATIndicator",
    }
)
class ShipmentPaymentDetails(BaseModel):
    """Payment details container for detailed shipment charges. The two shipment charges that are available for specification are Transportation charges and Duties and Taxes.  This container is used for Who Pays What functionality.

    :param shipment_charge: shipment_charge
    :type shipment_charge: List[PaymentDetailsShipmentCharge]
    :param split_duty_vat_indicator: Split Duty VAT Indicator. The presence indicates the payer specified for Transportation Charges will pay transportation charges and any duties that apply to the shipment. The payer specified for Duties and Taxes will pay the VAT (Value-Added Tax) only.  Empty Tag. The payment method for Transportation charges must be UPS account. The UPS account must be a daily pickup account or an occasional account., defaults to None
    :type split_duty_vat_indicator: str, optional
    """

    def __init__(
        self,
        shipment_charge: List[PaymentDetailsShipmentCharge],
        split_duty_vat_indicator: str = None,
    ):
        self.shipment_charge = self._define_list(
            shipment_charge, PaymentDetailsShipmentCharge
        )
        if split_duty_vat_indicator is not None:
            self.split_duty_vat_indicator = split_duty_vat_indicator
