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.

104 lines
1.8 KiB

6 years ago
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 nativeCountry: [KeyValueModel]?
  26. var city: [KeyValueModel]?
  27. var occupations: [KeyValueModel]?
  28. var bank: [KeyValueModel]?
  29. var idType: [VerificationIdType]?
  30. var sourceOfFund: [KeyValueModel]?
  31. required init?(map: Map) {
  32. }
  33. func mapping(map: Map) {
  34. nativeCountry <- map["NativeCountry"]
  35. city <- map["City"]
  36. occupations <- map["Occupation"]
  37. bank <- map["Bank"]
  38. idType <- map["IdType"]
  39. sourceOfFund <- map["SourceOfFund"]
  40. }
  41. }
  42. class VerificationIdType: Mappable {
  43. var id: String?
  44. var text: String?
  45. var dependent: [String]?
  46. required init?(map: Map) {
  47. }
  48. func mapping(map: Map) {
  49. id <- map["id"]
  50. text <- map["text"]
  51. dependent <- map["dependent"]
  52. }
  53. }
  54. extension VerificationIdType: TablePresenterProtocol {
  55. var cellTitle: String? {
  56. return text
  57. }
  58. var cellImage: UIImage? {
  59. return nil
  60. }
  61. }
  62. class KeyValueModel: Mappable {
  63. var id: String?
  64. var text: String?
  65. var code: String?
  66. required init?(map: Map) {
  67. }
  68. func mapping(map: Map) {
  69. id <- map["id"]
  70. text <- map["text"]
  71. code <- map["code"]
  72. }
  73. }
  74. extension KeyValueModel: TablePresenterProtocol {
  75. var cellTitle: String? {
  76. return text
  77. }
  78. var cellImage: UIImage? {
  79. return nil
  80. }
  81. }