KWMExchangeRateResult.m 994 Bytes
Newer Older
houweibin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
//
//  KWMExchangeRateResult.m
//  iCemarose
//
//  Created by HouWeiBin on 2016/12/5.
//  Copyright © 2016年 kollway. All rights reserved.
//

#import "KWMExchangeRateResult.h"

@implementation KWMExchangeRateResult

- (instancetype)initWithDictionary:(NSDictionary *)dict
                        modelClass:(Class)modelClass
                             error:(NSError **)err {
lee committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
//    if (dict) {
//        NSArray *dataArray = (NSArray *)dict;
//        if(dataArray && dataArray.count>0){
//            NSDictionary *exchangedata = [dataArray objectAtIndex:0];
//            if(exchangedata[@"CNY"]){
//                self.exchangeRate = [exchangedata objectForKey:@"CNY"];
//            }
//        }
//    }
    self.status = dict[@"status"];
    self.code = dict[@"code"];
    self.message = dict[@"message"];
    self.currency = self.message[@"currency"];
    self.name = self.message[@"name"];
    self.exchange_rate = self.message[@"exchange_rate"];
houweibin committed
31 32 33 34 35 36 37
    
    return self;
}



@end