// // GmeContactsInteractor.swift // GMERemittance // // Created by gme_2 on 25/08/2018. //Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved. // import Foundation class GmeContactsInteractor { // MARK: Properties weak var output: GmeContactsInteractorOutput? private let service: GmeContactsServiceType private let model: [Branch]? // MARK: Initialization init(service: GmeContactsServiceType, model: [Branch]?) { self.service = service self.model = model } // MARK: Converting entities } // MARK: GmeContacts interactor input interface extension GmeContactsInteractor: GmeContactsInteractorInput { func fetchBranches() { service.fetchBranches( success: { self.output?.setBranchModel(with: $0) }, failure: { self.output?.setBranchesError(with: $0) } ) } }