You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

82 lines
1.4 KiB

//
// ExchangeModel.swift
// GMERemittance
//
// Created by gme_2 on 21/08/2018.
// Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
//
import Foundation
import ObjectMapper
class ExchangeRateModel: Mappable {
var country: String?
var countryCode: String?
var currency: String?
var countryId: String?
var availableServices: [PaymentServiceType]?
init() {}
required init?(map: Map) {
}
func mapping(map: Map) {
country <- map["country"]
countryCode <- map["countryCode"]
currency <- map["currency"]
countryId <- map["countryId"]
availableServices <- map["serviceAvailable"]
}
}
class PaymentServiceType: Mappable {
var id: String?
var type: String?
var subtitle: String?
init() {}
required init?(map: Map) {
}
func mapping(map: Map) {
id <- map["id"]
type <- map["text"]
subtitle <- map["description"]
}
}
class ExchangeRateContainer: Mappable {
var errorCode: String?
var message: String?
var id: String?
var data: [ExchangeRateModel]?
required init?(map: Map) {
}
func mapping(map: Map) {
errorCode <- map["ErrorCode"]
id <- map["Id"]
message <- map["Msg"]
data <- map["Data"]
}
}
//"ErrorCode": "0",
//"Msg": "Success",
//"Id": null,
//"data" : {
//
//}