From 339372248cde6daf4ff04e4d1220ac3e4a0c20d0 Mon Sep 17 00:00:00 2001 From: ccr Date: Thu, 27 Dec 2018 13:12:07 +0545 Subject: [PATCH] kftcClientIdMapped --- GMERemittance/Model/User.swift | 3 +++ GMERemittance/RestApiManager.swift | 2 +- GMERemittance/Utility/AppConstants.swift | 8 +++++++- .../mac.xcuserdatad/xcschemes/xcschememanagement.plist | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/GMERemittance/Model/User.swift b/GMERemittance/Model/User.swift index 53d7f8d6..f7160465 100644 --- a/GMERemittance/Model/User.swift +++ b/GMERemittance/Model/User.swift @@ -45,6 +45,7 @@ struct UserKeys { static let ErrorCode = "ErrorCode" static let hasRequestedPennyTest = "hasRequestedPennyTest" static let isPennyTestPending = "isPennyTestPending" + static let kftcClientId = "kftcClientId" static let Msg = "Msg" static let Id = "Id" static let Data = "Data" @@ -103,6 +104,7 @@ class User: Mappable { var ErrorCode: String? var Msg: String? var Id: String? + var kftcClientId: String? var Data: String? var platforms: [Platform] = [] @@ -145,6 +147,7 @@ class User: Mappable { Msg <- map["Msg"] Id <- map["Id"] Data <- map["Data"] + kftcClientId <- map["kftcClientId"] pennyTestStatus <- map["pennyTestStatus"] } } diff --git a/GMERemittance/RestApiManager.swift b/GMERemittance/RestApiManager.swift index be4a324b..abbddfbe 100644 --- a/GMERemittance/RestApiManager.swift +++ b/GMERemittance/RestApiManager.swift @@ -66,7 +66,7 @@ class RestApiMananger { "Authorization": "Bearer " + accessCode, "GME-TOKEN" : "39587YT398@FBQOW8RY3#948R7GB@CNEQW987GF87$TD18$1981..919@@##joghndvberteiru", "Content-Type": "application/json", - "clientId": Utility.getMyId() + "clientId": Utility.getMyKftcClientId() ] } diff --git a/GMERemittance/Utility/AppConstants.swift b/GMERemittance/Utility/AppConstants.swift index f0ec6144..e1b7eeb7 100644 --- a/GMERemittance/Utility/AppConstants.swift +++ b/GMERemittance/Utility/AppConstants.swift @@ -138,6 +138,12 @@ class Utility { return myId } + static func getMyKftcClientId() -> String { + let defaults = UserDefaults.standard + let myId = defaults.string(forKey: UserKeys.kftcClientId) ?? "" + return myId + } + static func getMyIdNumber() -> String { let defaults = UserDefaults.standard let myId = defaults.string(forKey: UserKeys.idNumber) ?? "" @@ -211,7 +217,7 @@ class Utility { save(value: user?.rewardPoint ?? "", forKey: UserKeys.rewardPoint) save(value: user?.verified ?? false, forKey: UserKeys.verified) save(value: user?.kyc ?? "", forKey: UserKeys.kyc) - + save(value: user?.kftcClientId ?? "", forKey: UserKeys.kftcClientId) save(value: user?.email ?? "", forKey: UserKeys.email) save(value: user?.mobileNumber ?? "", forKey: UserKeys.mobileNumber) save(value: user?.sourceId ?? "", forKey: UserKeys.sourceId) diff --git a/Pods/Pods.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist b/Pods/Pods.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist index e9edbbb7..30ca7e8b 100644 --- a/Pods/Pods.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/Pods/Pods.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist @@ -17,7 +17,7 @@ AlamofireNetworkActivityLogger.xcscheme orderHint - 9 + 8 BRYXBanner.xcscheme