|
|
// // ResendExchangePresenter.swift // GME Remit // // Created by gme_2 on 18/03/2019. //Copyright © 2019 Gobal Money Express Co. Ltd. All rights reserved. //
import Foundation
class ResendExchangePresenter { // MARK: Properties weak var view: ResendExchangeViewInterface? var interactor: ResendExchangeInteractorInput? var wireframe: ResendExchangeWireframeInput?
// MARK: Converting entities }
// MARK: ResendExchange module interface
extension ResendExchangePresenter: ResendExchangeModuleInterface { func viewIsReady() { interactor?.viewIsReady() }
func calculate(senderAmt: String, senderCurrency: String, recieverAmt: String, recieverCurrency: String, recieverCountryName: String, recieverCountryId: String, paymentMethod: String, paymentMethodId: String, calcBy: String, senderCountryId: String, payoutPartner: String, userId: String, bankId: String) { self.view?.showLoading() interactor?.calculate(senderAmt: senderAmt, senderCurrency: senderCurrency, recieverAmt: recieverAmt, recieverCurrency: recieverCurrency, recieverCountryName: recieverCountryName, recieverCountryId: recieverCountryId, paymentMethod: paymentMethod, paymentMethodId: paymentMethodId, calcBy: calcBy, senderCountryId: senderCountryId, payoutPartner: payoutPartner, userId: userId, bankId: bankId) } }
// MARK: ResendExchange interactor output interface
extension ResendExchangePresenter: ResendExchangeInteractorOutput { func show(model: ResendDetail) { self.view?.hideLoading() self.view?.show(model: model) } func show(model: SendMoneyExchangeRateModel) { self.view?.hideLoading() self.view?.show(model: model) } func showExchangeRate(error: Error) { self.view?.showExchangeRate(error: error.localizedDescription) } func show(error: Error) { self.view?.hideLoading() self.view?.show(error: error.localizedDescription) } }
|