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

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

@implementation HereSDKAddressData (HereSDKDemand_Utilities)

- (NSDictionary *)dictionary
{
    return @{@"countryName": [NSString hereSDK_utilities_emptyOrString:self.country],
             @"countryCode": [NSString hereSDK_utilities_emptyOrString:self.countryCode],
             @"stateName": [NSString hereSDK_utilities_emptyOrString:self.state],
             @"county": [NSString hereSDK_utilities_emptyOrString:self.county],
             @"cityName": [NSString hereSDK_utilities_emptyOrString:self.city],
             @"districtName": [NSString hereSDK_utilities_emptyOrString:self.district],
             @"subDistrict": [NSString hereSDK_utilities_emptyOrString:self.subDistrict],
             @"streetName": [NSString hereSDK_utilities_emptyOrString:self.street],
             @"houseNumber": [NSString hereSDK_utilities_emptyOrString:self.houseNumber],
             @"postalCode": [NSString hereSDK_utilities_emptyOrString:self.postalCode],
             @"building": [NSString hereSDK_utilities_emptyOrString:self.building],
             @"addressLines": (self.lineArray) ? self.lineArray : [NSNull null],
             };
}

@end
