// // MobileOperator.swift // GMERemittance // // Created by Fm-user on 3/8/18. // Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. // import Foundation class AvailableAmounts: Decodable{ var converted: String var original: String init(converted: String, original: String) { self.converted = converted self.original = original } } class AvailableRechargeAmounts: Decodable{ var serviceType:String? var availableAmounts: [AvailableAmounts]? init(serviceType: String, availableAmounts: [AvailableAmounts]) { self.serviceType = serviceType self.availableAmounts = availableAmounts } } class MobileOperator : Decodable{ var telecomId: String? var country: String? var operatorName: String? var abbreviation: String? var iconUrl: String? var ServiceTypes:[String]? var availableAmounts: [AvailableAmounts]? init(telecomId:String,country:String,operatorName:String,abbreviation:String,iconUrl:String) { self.telecomId = telecomId self.country = country self.operatorName = operatorName self.abbreviation = abbreviation self.iconUrl = iconUrl } func getTelecomId() -> String{ if let tId = telecomId{ return tId }else{ return "null" } } func getCountry() -> String { if let country = country{ return country }else{ return "null" } } func getOperatorName() -> String{ if let oName = operatorName{ return oName }else{ return "null" } } func getAbbreviation() -> String { if let abbreviation = abbreviation{ return abbreviation }else{ return "null" } } func getIconUrl() -> String{ if let icon = iconUrl{ return icon }else{ return "null" } } } //"telecomId": "1", //"country": "NEPAL", //"operatorName": "Nepal Telecom Corporation", //"abbreviation": "NTC", //"iconUrl": "http://116.66.197.118:1235/handler/docs.ashx?img=aHR0cDovL2ltYWdlcy9uc3QucG5n&module=dGVsSWNvbg==", //"denos": [ //{ //"serviceType": "Postpaid", //"availableTopupAmounts": [ //"100.0000", //"150.0000", //"200.0000", //"300.0000", //"500.0000", //"1000.0000", //"2000.0000", //"3000.0000", //"4000.0000", //"5000.0000" //] //}, //{ //"serviceType": "Prepaid", //"availableTopupAmounts": [ //"5000.0000", //"300.0000", //"500.0000", //"1000.0000", //"2000.0000", //"3000.0000", //"4000.0000", //"30.0000", //"40.0000", //"50.0000", //"100.0000", //"150.0000", //"200.0000", //"10.0000", //"20.0000" //] //} //] //},