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
881 B
41 lines
881 B
//
|
|
// DetailNotificationInteractor.swift
|
|
// GME Remit
|
|
//
|
|
// Created by InKwon James Kim on 2020/02/11.
|
|
//Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
class DetailNotificationInteractor {
|
|
|
|
// MARK: Properties
|
|
|
|
weak var output: DetailNotificationInteractorOutput?
|
|
private let service: DetailNotificationServiceType
|
|
|
|
// MARK: Initialization
|
|
|
|
init(service: DetailNotificationServiceType) {
|
|
self.service = service
|
|
}
|
|
|
|
}
|
|
|
|
// MARK: DetailNotification interactor input interface
|
|
|
|
extension DetailNotificationInteractor: DetailNotificationInteractorInput {
|
|
func fetchDetail(_ index: String) {
|
|
service.fetchDetail(
|
|
index: index,
|
|
success: {[weak self] in
|
|
self?.output?.setModel(with: $0)
|
|
},
|
|
failure: {[weak self] in
|
|
self?.output?.setError(with: $0)
|
|
}
|
|
)
|
|
}
|
|
|
|
}
|