/***************************************************************
 * Copyright © 2017 HERE Global B.V. All rights reserved. *
 **************************************************************/

#import "HereSDKDemandVehicle+Dictionary.h"
#import "NSString+Utilities.h"

@implementation HereSDKDemandVehicle (Dictionary)

+ (NSString*)vehicleTypeToString:(HereSDKDemandVehicleType)type {

    switch (type) {
        case HereSDKDemandVehicleTypeNotSupplied:
            return @"NOT_SUPPLIED";
            break;
        case HereSDKDemandVehicleTypeStandard:
            return @"STANDARD";
            break;
        case HereSDKDemandVehicleTypeLimo:
            return @"LIMO";
            break;
        case HereSDKDemandVehicleTypeVan:
            return @"VAN";
            break;
        case HereSDKDemandVehicleTypeOther:
            return @"OTHER";
    }
}

- (NSDictionary *)dictionary
{
    return @{
             @"licensePlateNumber": self.licensePlateNumber,
             @"vehicleType": [HereSDKDemandVehicle vehicleTypeToString:self.vehicleType],
             @"manufacturer": self.manufacturer,
             @"color": self.color,
             @"model": self.model,
             };
}

@end
