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

5 years ago
  1. //
  2. // RewardInteractor.swift
  3. // GME Remit
  4. //
  5. // Created by InKwon Devik Kim on 11/04/2019.
  6. //Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. class RewardInteractor {
  10. // MARK: Properties
  11. weak var output: RewardInteractorOutput?
  12. private let service: RewardServiceType
  13. // MARK: Initialization
  14. init(service: RewardServiceType) {
  15. self.service = service
  16. }
  17. // MARK: Converting entities
  18. }
  19. // MARK: Reward interactor input interface
  20. extension RewardInteractor: RewardInteractorInput {
  21. func viewIsReady() {
  22. service.fetchProductList(
  23. success: {
  24. self.output?.setRewardProducts(models: $0)
  25. }) {
  26. self.output?.failure(error: $0)
  27. }
  28. }
  29. }