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.
 
 
 
 

71 lines
1.6 KiB

//
// 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.view?.showOption()
self.wireframe?.gotToHome()
}
func goHome() {
self.wireframe?.gotToHome()
}
func showPennyTest() {
// TODO: keycresponse is comming from interactor
// self.wireframe?.showPennyTest(model: KYCResponse())
}
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)
}
}