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.

41 lines
915 B

  1. //
  2. // InternationalTopupInteractor.swift
  3. // GME Remit
  4. //
  5. // Created by InKwon James Kim on 2019/10/30.
  6. //Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. class InternationalTopupInteractor {
  10. // MARK: Properties
  11. weak var output: InternationalTopupInteractorOutput?
  12. private let service: InternationalTopupServiceType
  13. // MARK: Initialization
  14. init(service: InternationalTopupServiceType) {
  15. self.service = service
  16. }
  17. }
  18. // MARK: InternationalTopup interactor input interface
  19. extension InternationalTopupInteractor: InternationalTopupInteractorInput {
  20. func fetchCardList(type: String, mobile: String) {
  21. service.fetchCardList(
  22. type: type,
  23. mobile: mobile,
  24. success: {[weak self] in
  25. self?.output?.setModel(with: $0)
  26. },
  27. failure: {[weak self] in
  28. self?.output?.setError(with: $0)
  29. }
  30. )
  31. }
  32. }