// // KycModel.swift // GMERemittance // // Created by gme_2 on 14/09/2018. // Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. // import Foundation import ObjectMapper class KycModelContainer: Mappable { var errorCode: String? var message: String? var id: String? var data: KYCModel? required init?(map: Map) { } func mapping(map: Map) { errorCode <- map["ErrorCode"] message <- map["Msg"] id <- map["Id"] data <- map["Data"] } } class KYCModel: Mappable { var occupations: [KeyValueResponseModel]? var idType: [VerifyIdType]? var sourceOfFund: [KeyValueResponseModel]? required init?(map: Map) { } func mapping(map: Map) { occupations <- map["Occupation"] idType <- map["IdType"] sourceOfFund <- map["SourceOfFund"] } } class VerifyIdType: Mappable { var id: String? var text: String? var dependent: [String]? required init?(map: Map) { } func mapping(map: Map) { id <- map["id"] text <- map["text"] dependent <- map["dependent"] } } extension VerifyIdType: TablePresenterProtocol { var cellTitle: String? { return text } var cellImage: UIImage? { return nil } } class KeyValueResponseModel: Mappable { var id: String? var text: String? var code: String? required init?(map: Map) { } func mapping(map: Map) { id <- map["id"] text <- map["text"] code <- map["code"] } } extension KeyValueResponseModel: TablePresenterProtocol { var cellTitle: String? { return text } var cellImage: UIImage? { return nil } }