// // KycPresenter.swift // GMERemittance // // Created by gme_2 on 12/09/2018. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. // import Foundation class KycPresenter { // MARK: Properties weak var view: KycViewInterface? var interactor: KycInteractorInput? var wireframe: KycWireframeInput? // MARK: Converting entities } // MARK: Kyc module interface extension KycPresenter: KycModuleInterface { func validate(model: KYCRequestModel) { self.view?.showLoading() self.interactor?.validate(model: model) } } // MARK: Kyc interactor output interface extension KycPresenter: KycInteractorOutput { func submitSuccess() { self.wireframe?.gotToHome() } func show(result1: (isValid: Bool, errorsDick: [String : String])) { self.view?.hideLoading() self.view?.show(resultl: result1) } func show(result2: (isValid: Bool, errorsDick: [String : String])) { self.view?.hideLoading() self.view?.show(result2: result2) } func show(result3: (isValid: Bool, errorsDick: [String : String])) { self.view?.hideLoading() self.view?.show(result3: result3) } func show(error: Error) { self.view?.hideLoading() self.view?.show(error: error.localizedDescription) } }