def METHOD_NAME(
    data: dict,
    settings: provider_utils.Settings,
) -> models.RateDetails:
    rate = lib.to_object(rating.RateResponseType, data)
    service = provider_units.ShippingService.nationex_delivery
    charges = [
        ("Base Charge", rate.BasePrice),
        ("Fuel Surcharge", rate.FuelCharge),
        ("NCVCharge", rate.NCVCharge),
        *[
            (_.NameFr if settings.language == "fr" else _.NameEn, _.Charge)
            for _ in rate.AccessoryCharges
            if _.Charge > 0
        ],
        *[
            (_.NameFr if settings.language == "fr" else _.NameEn, _.Charge)
            for _ in rate.SurchargeCharges
            if _.Charge > 0
        ],
        *[
            (_.NameFr if settings.language == "fr" else _.NameEn, _.Charge)
            for _ in rate.TaxCharges
            if _.Charge > 0
        ],
    ]
    return models.RateDetails(
        carrier_id=settings.carrier_id,
        carrier_name=settings.carrier_name,
        service=service.name,
        total_charge=lib.to_money(rate.Total),
        currency="CAD",
        transit_days=rate.DelayTransitDays,
        estimated_delivery=lib.fdate(rate.EstimatedDeliveryDate, "%Y-%m-%d"),
        extra_charges=[
            models.ChargeDetails(
                name=name,
                currency="CAD",
                amount=lib.to_money(amount),
            )
            for name, amount in charges
            if amount > 0
        ],
    )