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.

98 lines
1.6 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. //
  2. // KycModel.swift
  3. // GMERemittance
  4. //
  5. // Created by gme_2 on 14/09/2018.
  6. // Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. import ObjectMapper
  10. class KycModelContainer: Mappable {
  11. var errorCode: String?
  12. var message: String?
  13. var id: String?
  14. var data: KYCModel?
  15. required init?(map: Map) {
  16. }
  17. func mapping(map: Map) {
  18. errorCode <- map["ErrorCode"]
  19. message <- map["Msg"]
  20. id <- map["Id"]
  21. data <- map["Data"]
  22. }
  23. }
  24. class KYCModel: Mappable {
  25. var occupations: [KeyValueResponseModel]?
  26. var idType: [VerifyIdType]?
  27. var sourceOfFund: [KeyValueResponseModel]?
  28. required init?(map: Map) {
  29. }
  30. func mapping(map: Map) {
  31. occupations <- map["Occupation"]
  32. idType <- map["IdType"]
  33. sourceOfFund <- map["SourceOfFund"]
  34. }
  35. }
  36. class VerifyIdType: Mappable {
  37. var id: String?
  38. var text: String?
  39. var dependent: [String]?
  40. required init?(map: Map) {
  41. }
  42. func mapping(map: Map) {
  43. id <- map["id"]
  44. text <- map["text"]
  45. dependent <- map["dependent"]
  46. }
  47. }
  48. extension VerifyIdType: TablePresenterProtocol {
  49. var cellTitle: String? {
  50. return text
  51. }
  52. var cellImage: UIImage? {
  53. return nil
  54. }
  55. }
  56. class KeyValueResponseModel: Mappable {
  57. var id: String?
  58. var text: String?
  59. var code: String?
  60. required init?(map: Map) {
  61. }
  62. func mapping(map: Map) {
  63. id <- map["id"]
  64. text <- map["text"]
  65. code <- map["code"]
  66. }
  67. }
  68. extension KeyValueResponseModel: TablePresenterProtocol {
  69. var cellTitle: String? {
  70. return text
  71. }
  72. var cellImage: UIImage? {
  73. return nil
  74. }
  75. }