// // SendMoneyPaymentModeInteractor.swift // GMERemittance // // Created by gme_2 on 28/08/2018. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. // import Foundation class SendMoneyPaymentModeInteractor { // MARK: Properties weak var output: SendMoneyPaymentModeInteractorOutput? private let service: SendMoneyPaymentModeServiceType // MARK: Initialization init(service: SendMoneyPaymentModeServiceType) { self.service = service } // MARK: Converting entities // MARK: Private Functions } // MARK: SendMoneyPaymentMode interactor input interface extension SendMoneyPaymentModeInteractor: SendMoneyPaymentModeInteractorInput { func viewIsReady(for reciepient: Recipient) { let countryCode = reciepient.countryCode ?? "" let id = reciepient.recipientId ?? "" self.service.fetchInformations(countryCode: countryCode, id: id, success: { (model) in self.output?.show(model: model?.payoutMode ?? []) }) { (error) in self.output?.show(error: error) } } func validateAccountNumber(params: [String : String]) { self.service.validate(params: params, success: { self.output?.success() }) { (error) in self.output?.show(error: error) } } // func validate(accountNumber: String) { // accountNumber.isEmpty ? (self.showEmptyAccountNumberError()) : (self._validate(accountNumber: accountNumber)) // } }