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.
 
 
 
 

41 lines
868 B

//
// 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)
}
)
}
}