def METHOD_NAME(
    payload: models.RateRequest,
    settings: provider_utils.Settings,
) -> lib.Serializable:
    packages = lib.to_packages(
        payload.parcels,
        max_weight=units.Weight(99, "LB"),
    )
    service = lib.to_services(
        payload.services,
        initializer=provider_units.shipping_services_initializer,
    ).first
    options = lib.to_shipping_options(
        payload.options,
        package_options=packages.options,
        initializer=provider_units.shipping_options_initializer,
    )
    unit = provider_units.MeasurementUnit.map(packages.weight_unit).value
    request = nationex.RateRequestType(
        CustomerId=lib.to_int(settings.customer_id),
        ExpeditionDate=lib.fdate(options.shipment_date.state, "%Y-%m-%d"),
        ShipmentType=service.value,
        SourcePostalCode=payload.shipper.postal_code,
        DestinationPostalCode=payload.recipient.postal_code,
        TotalWeight=packages.weight.value,
        TotalParcels=len(packages),
        UnitsOfMeasurement=unit,
        Accessory=nationex.AccessoryType(
            InsuranceAmount=options.nationex_insurance_amount.state,
            FrozenProtection=options.nationex_frozen_protection.state,
            DangerousGoods=options.nationex_dangerous_goods.state,
            SNR=(
                options.nationex_snr.state
                if options.nationex_snr.state is not None
                else True
            ),
        ),
        Parcels=[
            nationex.ParcelType(
                NCV=(
                    True
                    if (
                        package.length.IN > 36
                        or package.width.IN > 36
                        or package.height.IN > 36
                        or package.weight.LB > 70
                    )
                    else False
                ),
                Weight=package.weight.map(provider_units.MeasurementOptions).value,
                Dimensions=(
                    nationex.DimensionsType(
                        Length=package.length.value,
                        Width=package.width.value,
                        Height=package.height.value,
                        Cubing=lib.to_decimal(
                            (package.length.IN * package.width.IN * package.height.IN)
                            / 1728
                        ),
                    )
                    if any(
                        [
                            package.length.value,
                            package.width.value,
                            package.height.value,
                        ]
                    )
                    else None
                ),
            )
            for package in packages
        ],
    )
    return lib.Serializable(request, lib.to_dict)