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.
60 lines
1.3 KiB
60 lines
1.3 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.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)
|
|
}
|
|
|
|
}
|