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.
 
 
 
 

89 lines
3.2 KiB

//
// CountryInfo.swift
// GMERemittance
//
// Created by gme_2 on 22/08/2018.
// Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
//
import Foundation
class CountryInfo {
private var flag: [String: UIImage] =
[
"sg" : #imageLiteral(resourceName: "flag_singapore"), // singapore
"id" : #imageLiteral(resourceName: "flag_indonesia"), // india
"kh" : #imageLiteral(resourceName: "flag_cambodia"), // cambodia
"in" : #imageLiteral(resourceName: "flag_india"), // india
"my" : #imageLiteral(resourceName: "flag_malaysia"), // malaysia
"krw" : #imageLiteral(resourceName: "flag_korean"), // korea
"cn" : #imageLiteral(resourceName: "flag_china"), // china
"vn" : #imageLiteral(resourceName: "flag_vietnam"), // vietnam
"th" : #imageLiteral(resourceName: "flag_thailand"), // thailand
"au" : #imageLiteral(resourceName: "flag_australia"), // australia
"lk" : #imageLiteral(resourceName: "flag_srilanka"), // sri lanka
"bd" : #imageLiteral(resourceName: "flag_bangladesh"), // bangladesh
"ph" : #imageLiteral(resourceName: "flag_philippines"), // philipines
"pk" : #imageLiteral(resourceName: "flag_pakistan"), // pakistan
"mm" : #imageLiteral(resourceName: "flag_myanmar"), // myanmar
"np" : #imageLiteral(resourceName: "flag_nepal") // nepal
]
var defaultCountries = ["Nepal", "Cambodia", "Philipinnes", "Sri Lanka", "Vietnam", "India", "Pakistan"]
var defaultCountryCodes = ["np", "kh", "ph", "lk", "vn", "in", "pk"]
private var defaultSendingAmount: [String: String] =
[
"np" : "100000", // nepal
"kh" : "500", // cambodia
"ph" : "50000", // philipines
"lk" : "100,000", // sri lanka
"vn" : "20000000", // vietnam
"in" : "50000", // india
"pk" : "100000", // pakistan
"default": "1000000"
]
private var defaultSendingCurrency: [String: String] =
[
"np" : "NPR", // nepal
"kh" : "USD", // cambodia
"ph" : "PHP", // philipines
"lk" : "LKR", // sri lanka
"vn" : "VND", // vietnam
"in" : "INR", // india
"pk" : "PKR", // pakistan
"default": "KRW"
]
private var countryCode: [String: String] =
[
"nepal" : "np", // nepal
"kh" : "USD", // cambodia
"ph" : "PHP", // philipines
"lk" : "LKR", // sri lanka
"vn" : "VND", // vietnam
"in" : "INR", // india
"pk" : "PKR", // pakistan
"default": "KRW"
]
func getFlag(for countryCode: String) -> UIImage? {
return flag[countryCode.lowercased()]
}
func getDefaultSendingAmount(for countryCode: String) -> String? {
return defaultSendingAmount[countryCode.lowercased()]
}
func getDefaultSendingCurrency(for countryCode: String) -> String? {
return defaultSendingCurrency[countryCode.lowercased()]
}
func getDefaultSendingMoneyInKoreanWon() -> String? {
return defaultSendingAmount["default"]
}
}