# 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 .negotiated_charges_itemized_charges import NegotiatedChargesItemizedCharges


@JsonMap({"itemized_charges": "ItemizedCharges"})
class RatedPackageNegotiatedCharges(BaseModel):
    """Negotiated Rates container.  These charges would be returned only when -1) subversion is greater than or equal to 16072) if negotiated rates were requested for GFP shipments and account number is eligible to receive negotiated rates.

    :param itemized_charges: Negotiated Itemized Accessorial and Sur Charges.  These charges would be returned only when subversion is greater than or equal to 1607. **NOTE:** For versions >= v2403, this element will always be returned as an array. For requests using versions < v2403, this element will be returned as an array if there is more than one object and a single object if there is only 1. , defaults to None
    :type itemized_charges: List[NegotiatedChargesItemizedCharges], optional
    """

    def __init__(self, itemized_charges: List[NegotiatedChargesItemizedCharges] = None):
        if itemized_charges is not None:
            self.itemized_charges = self._define_list(
                itemized_charges, NegotiatedChargesItemizedCharges
            )
