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.
|
|
// // AddReciepientInteractor.swift // GMERemittance // // Created by gme_2 on 26/08/2018. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. //
import Foundation
class AddReciepientInteractor { // MARK: Properties weak var output: AddReciepientInteractorOutput? private let service: AddReciepientServiceType // MARK: Initialization init(service: AddReciepientServiceType) { self.service = service }
// MARK: Converting entities }
// MARK: AddReciepient interactor input interface
extension AddReciepientInteractor: AddReciepientInteractorInput { func viewIsReady() { self.service.fetch(success: { (model) in self.output?.show(model: model) }) { (error) in self.output?.show(error: error) } } func save(reciepient: Recipient) { let myUsername = Utility.getMyUserName() self.service.save(model: reciepient.serialize(), username: myUsername, success: { (reciepient) in self.output?.success() }) { (error) in self.output?.show(error: error) } } }
|