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
881 B

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