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

#import "HereSDKDemandRideOffer+Dictionary.h"
#import "HereSDKDemandTaxiRideOffer+Dictionary.h"
#import "HereSDKDemandSupplier+Dictionary.h"
#import "HereSDKDemandCancellationInfo+Dictionary.h"
#import "NSString+Utilities.h"
#import "NSDate+NSNumber.h"

@implementation HereSDKDemandTaxiRideOffer (Dictionary)

- (NSDictionary *)dictionary
{
  NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithDictionary:super.dictionary];
  [dict addEntriesFromDictionary:@{
                                   @"offerId": self.offerId,
                                   @"supplier": self.supplier.dictionary,
                                   @"expirationTime": self.offerExpirationTime.hereSdk_toNumber,
                                   @"cancellationPolicy": [HereSDKDemandCancellationInfo cancellationPolicyToString:self.cancellationPolicy],
                                   @"type": @"TAXI",
                                   }];
  return dict;
}

@end
