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

//
// CouponBoxInteractor.swift
// GME Remit
//
// Created by Jeongbae Kong on 03/12/2019.
//Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved.
//
import Foundation
class CouponBoxInteractor {
// MARK: Properties
weak var output: CouponBoxInteractorOutput?
private let service: CouponBoxServiceType
// MARK: Initialization
init(service: CouponBoxServiceType) {
self.service = service
}
}
// MARK: CouponBox interactor input interface
extension CouponBoxInteractor: CouponBoxInteractorInput {
func fetchCouponBox() {
service.fetchCouponBox(
success: {
self.output?.setModel(with: $0)
},
failure: {[weak self] in
guard let `self` = self else {
return
}
self.output?.setError(with: $0)
}
)
}
}