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.

39 lines
891 B

  1. //
  2. // SelectCouponPresenter.swift
  3. // GME Remit
  4. //
  5. // Created by InKwon Devik Kim on 30/05/2019.
  6. //Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import Foundation
  9. class SelectCouponPresenter {
  10. // MARK: Properties
  11. weak var view: SelectCouponViewInterface?
  12. var interactor: SelectCouponInteractorInput?
  13. var wireframe: SelectCouponWireframeInput?
  14. }
  15. // MARK: SelectCoupon module interface
  16. extension SelectCouponPresenter: SelectCouponModuleInterface {
  17. func fetchCoupons() {
  18. interactor?.fetchCoupons()
  19. }
  20. }
  21. // MARK: SelectCoupon interactor output interface
  22. extension SelectCouponPresenter: SelectCouponInteractorOutput {
  23. func setCoupons(didSelect coupon: CouponBoxModel?, with coupons: [CouponBoxModel]?) {
  24. view?.setCoupons(didSelect: coupon, with: coupons)
  25. }
  26. func error(with error: Error) {
  27. view?.error(with: error)
  28. }
  29. }