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.
61 lines
1.6 KiB
61 lines
1.6 KiB
//
|
|
// MessageComposeInteractor.swift
|
|
// GMERemittance
|
|
//
|
|
// Created by gme_2 on 02/10/2018.
|
|
//Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
class MessageComposeInteractor {
|
|
|
|
// MARK: Properties
|
|
|
|
weak var output: MessageComposeInteractorOutput?
|
|
private let service: MessageComposeServiceType
|
|
|
|
// MARK: Initialization
|
|
|
|
init(service: MessageComposeServiceType) {
|
|
self.service = service
|
|
}
|
|
|
|
// MARK: Converting entities
|
|
}
|
|
|
|
// MARK: MessageCompose interactor input interface
|
|
|
|
extension MessageComposeInteractor: MessageComposeInteractorInput {
|
|
func cancel(control: String, transId: String, subject: String, body: String) {
|
|
let param = [
|
|
"controlNo" : control,
|
|
"tranId" : transId,
|
|
"body": body,
|
|
"subject": subject,
|
|
"UserId": Utility.getMyUserName()
|
|
]
|
|
self.service.cancelTransactionRequest(param: param, success: { (message) in
|
|
self.output?.show(model: message)
|
|
}) { (error) in
|
|
self.output?.show(error: error)
|
|
}
|
|
}
|
|
|
|
|
|
func edit(control: String, transId: String, subject: String, body: String) {
|
|
let param = [
|
|
"controlNo" : control,
|
|
"tranId" : transId,
|
|
"body": body,
|
|
"subject": subject,
|
|
"UserId": Utility.getMyUserName()
|
|
]
|
|
self.service.editTransactionRequest(param: param, success: { (message) in
|
|
self.output?.show(model: message)
|
|
}) { (error) in
|
|
self.output?.show(error: error)
|
|
}
|
|
}
|
|
|
|
}
|