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.
52 lines
1.8 KiB
52 lines
1.8 KiB
//
|
|
// 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 show(error: Error) {
|
|
self.view?.hideLoading()
|
|
self.view?.show(error: error.localizedDescription)
|
|
}
|
|
}
|