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.
132 lines
3.8 KiB
132 lines
3.8 KiB
//
|
|
// RecipientModel.swift
|
|
// GME Remit
|
|
//
|
|
// Created by InKwon James Kim on 16/08/2019.
|
|
// Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
|
|
//
|
|
|
|
import ObjectMapper
|
|
|
|
struct Recipient: Mappable {
|
|
var firstName: String?
|
|
var middleName: String?
|
|
var lastName1: String?
|
|
var lastName2: String?
|
|
var localFirstName: String?
|
|
var localMiddleName: String?
|
|
var localLastName1: String?
|
|
var localLastName2: String?
|
|
var id: String?
|
|
var name: String?
|
|
var localizedName: String?
|
|
var paymentMethod: PaymentMethodModel?
|
|
var agent: AgentModel?
|
|
var receiverID: String?
|
|
var membershipID: String?
|
|
var country: String?
|
|
var countryCode: String?
|
|
var countryID: String?
|
|
var address: String?
|
|
var state: String?
|
|
var stateID: String?
|
|
var zipCode: String?
|
|
var city: String?
|
|
var email: String?
|
|
var homePhone: String?
|
|
var workPhone: String?
|
|
var mobile: String?
|
|
var relationship: String?
|
|
var relationshipID: String?
|
|
var district: String?
|
|
var districtID: String?
|
|
var purposeOfRemit: String?
|
|
var purposeOfRemitID: String?
|
|
var fullName: String?
|
|
var idType: String?
|
|
var idNumber: String?
|
|
|
|
init?(map: Map) {}
|
|
|
|
init() {}
|
|
|
|
mutating func mapping(map: Map) {
|
|
firstName <- map["firstName"]
|
|
middleName <- map["middleName"]
|
|
lastName1 <- map["lastName1"]
|
|
lastName2 <- map["lastName2"]
|
|
localFirstName <- map["localFirstName"]
|
|
localMiddleName <- map["localMiddleName"]
|
|
localLastName1 <- map["localLastName1"]
|
|
localLastName2 <- map["localLastName2"]
|
|
id <- map["id"]
|
|
name <- map["name"]
|
|
localizedName <- map["localizedName"]
|
|
paymentMethod <- map["paymentMethod"]
|
|
agent <- map["agent"]
|
|
receiverID <- map["receiverId"]
|
|
membershipID <- map["membershipId"]
|
|
country <- map["country"]
|
|
address <- map["address"]
|
|
state <- map["state"]
|
|
zipCode <- map["zipCode"]
|
|
city <- map["city"]
|
|
email <- map["email"]
|
|
homePhone <- map["homePhone"]
|
|
workPhone <- map["workPhone"]
|
|
mobile <- map["mobile"]
|
|
relationship <- map["relationship"]
|
|
district <- map["district"]
|
|
purposeOfRemit <- map["purposeOfRemit"]
|
|
fullName <- map["fullName"]
|
|
idType <- map["idType"]
|
|
idNumber <- map["idNumber"]
|
|
stateID <- map["stateId"]
|
|
countryCode <- map["countryCode"]
|
|
countryID <- map["countryId"]
|
|
relationshipID <- map["relationshipId"]
|
|
districtID <- map["districtId"]
|
|
purposeOfRemitID <- map["purposeOfRemitId"]
|
|
}
|
|
|
|
func serialize() -> [String : String] {
|
|
return [
|
|
"firstName": firstName ?? "",
|
|
"middleName": middleName ?? "",
|
|
"lastName1": lastName1 ?? "",
|
|
"lastName2": lastName2 ?? "",
|
|
"localFirstName": localFirstName ?? "",
|
|
"localMiddleName": localMiddleName ?? "",
|
|
"localLastName1": localLastName1 ?? "",
|
|
"localLastName2": localLastName2 ?? "",
|
|
"id": id ?? "",
|
|
"name": name ?? "",
|
|
"localizedName": localizedName ?? "",
|
|
// "paymentMethod": paymentMethod ?? "",
|
|
// "agent": agent ?? "",
|
|
"receiverId": receiverID ?? "",
|
|
"membershipId": membershipID ?? "",
|
|
"country": country ?? "",
|
|
"address": address ?? "",
|
|
"state": state ?? "",
|
|
"zipCode": zipCode ?? "",
|
|
"city": city ?? "",
|
|
"email": email ?? "",
|
|
"homePhone": homePhone ?? "",
|
|
"workPhone": workPhone ?? "",
|
|
"mobile": mobile ?? "",
|
|
"relationship": relationship ?? "",
|
|
"district": district ?? "",
|
|
"purposeOfRemit": purposeOfRemit ?? "",
|
|
"fullName": fullName ?? "",
|
|
"idType": idType ?? "",
|
|
"idNumber": idNumber ?? "",
|
|
"stateId": stateID ?? "",
|
|
"countryCode": countryCode ?? "",
|
|
"countryId": countryID ?? "",
|
|
"relationshipId": relationshipID ?? "",
|
|
"districtId": districtID ?? "",
|
|
"purposeOfRemitId": purposeOfRemitID ?? "",
|
|
]
|
|
}
|
|
}
|