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.

46 lines
1.1 KiB

6 years ago
  1. //
  2. // ResendInteractor.swift
  3. // GME Remit
  4. //
  5. // Created by gme_2 on 18/03/2019.
  6. //Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. class ResendInteractor {
  10. // MARK: Properties
  11. weak var output: ResendInteractorOutput?
  12. private let service: ResendServiceType
  13. // MARK: Initialization
  14. init(service: ResendServiceType) {
  15. self.service = service
  16. }
  17. // MARK: Converting entities
  18. }
  19. // MARK: Resend interactor input interface
  20. extension ResendInteractor: ResendInteractorInput {
  21. func fetchList(fromDate: String?, toDate: String?) {
  22. let userName = Utility.getMyUserName()
  23. var param: [String: String] = [:]
  24. if let fromDate = fromDate {
  25. param["FromDate"] = fromDate
  26. }
  27. if let toDate = toDate {
  28. param["ToDate"] = toDate
  29. }
  30. self.service.fetchResendService(user: userName, param: param, success: { (model) in
  31. guard let model = model else {return}
  32. self.output?.show(model: model)
  33. }) { (error) in
  34. self.output?.show(error: error)
  35. }
  36. }
  37. }