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.

82 lines
1.4 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
6 years ago
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. // ExchangeModel.swift
  3. // GMERemittance
  4. //
  5. // Created by gme_2 on 21/08/2018.
  6. // Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. import ObjectMapper
  10. class ExchangeRateModel: Mappable {
  11. var country: String?
  12. var countryCode: String?
  13. var currency: String?
  14. var countryId: String?
  15. var availableServices: [PaymentServiceType]?
  16. init() {}
  17. required init?(map: Map) {
  18. }
  19. func mapping(map: Map) {
  20. country <- map["country"]
  21. countryCode <- map["countryCode"]
  22. currency <- map["currency"]
  23. countryId <- map["countryId"]
  24. availableServices <- map["serviceAvailable"]
  25. }
  26. }
  27. class PaymentServiceType: Mappable {
  28. var id: String?
  29. var type: String?
  30. var subtitle: String?
  31. init() {}
  32. required init?(map: Map) {
  33. }
  34. func mapping(map: Map) {
  35. id <- map["id"]
  36. type <- map["text"]
  37. subtitle <- map["description"]
  38. }
  39. }
  40. class ExchangeRateContainer: Mappable {
  41. var errorCode: String?
  42. var message: String?
  43. var id: String?
  44. var data: [ExchangeRateModel]?
  45. required init?(map: Map) {
  46. }
  47. func mapping(map: Map) {
  48. errorCode <- map["ErrorCode"]
  49. id <- map["Id"]
  50. message <- map["Msg"]
  51. data <- map["Data"]
  52. }
  53. }
  54. //"ErrorCode": "0",
  55. //"Msg": "Success",
  56. //"Id": null,
  57. //"data" : {
  58. //
  59. //}