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

#import "HereSDKDemandRideOffer+Dictionary.h"
#import "HereSDKDemandRoute+Dictionary.h"
#import "HereSDKDemandPriceEstimate+Dictionary.h"
#import "NSString+Utilities.h"
#import "NSDate+NSNumber.h"

@implementation HereSDKDemandRideOffer (Dictionary)

- (NSDictionary *)dictionary
{
    return @{
             @"route": self.route.dictionary,
             @"estimatedPickupTime": (self.estimatedPickupTime) ? self.estimatedPickupTime.hereSdk_toNumber : [NSNull null],
             @"estimatedDropOffTime": (self.estimatedDropoffTime) ? self.estimatedDropoffTime.hereSdk_toNumber : [NSNull null],
             @"estimatedPrice": (self.estimatedPrice) ? self.estimatedPrice.dictionary : [NSNull null],
             @"estimatedDurationMs": (self.duration) ? self.duration.description : [NSNull null],
             };
}

@end
