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.

38 lines
893 B

  1. //
  2. // InviteUserInteractor.swift
  3. // GME Remit
  4. //
  5. // Created by Armaan Shrestha on 21/08/2022.
  6. //Copyright © 2022 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. class InviteUserInteractor {
  10. // MARK: Properties
  11. weak var output: InviteUserInteractorOutput?
  12. private let service: InviteUserServiceType
  13. // MARK: Initialization
  14. init(service: InviteUserServiceType) {
  15. self.service = service
  16. }
  17. // MARK: Converting entities
  18. }
  19. // MARK: InviteUser interactor input interface
  20. extension InviteUserInteractor: InviteUserInteractorInput {
  21. func fetchData() {
  22. service.fetchReferralList { referral in
  23. self.output?.obtained(data: referral)
  24. } failure: { error in
  25. print(error.localizedDescription)
  26. self.output?.obtained(error: error.localizedDescription)
  27. }
  28. }
  29. }