Manos Chorianopoulos

update ProfileModel

......@@ -1561,6 +1561,7 @@ public class swiftApi {
private var badge: String?
private var msisdnList: Array<String>?
private var answered: Bool?
private var nonTelco: Bool?
public init() {
......@@ -1603,6 +1604,7 @@ public class swiftApi {
self.badge = ""
self.msisdnList = []
self.answered = false
self.nonTelco = false
}
public init(dictionary: [String: Any]) {
......@@ -1654,11 +1656,13 @@ public class swiftApi {
self.badge = profile_metadata_parsed["badge"] as? String? ?? ""
self.msisdnList = profile_metadata_parsed["msisdnList"] as? Array<String>? ?? []
self.answered = profile_metadata_parsed["answered"] as? Bool? ?? false
self.nonTelco = profile_metadata_parsed["nonTelco"] as? Bool? ?? false
} else {
self.profile_metadata = [String: Any]()
self.badge = ""
self.msisdnList = []
self.answered = false
self.nonTelco = false
print("bad json")
}
} catch let error as NSError {
......@@ -1666,6 +1670,7 @@ public class swiftApi {
self.badge = ""
self.msisdnList = []
self.answered = false
self.nonTelco = false
print(error)
}
......@@ -1986,6 +1991,15 @@ public class swiftApi {
}
}
public var _nonTelco: Bool {
get { // getter
return self.nonTelco ?? false
}
set(newValue) { //setter
self.nonTelco = newValue
}
}
}
public class ProfileDataModel {
......