Browse Source

api for detail

pull/1/head
gme_2 6 years ago
parent
commit
17eb892976
  1. 8
      GMERemittance/Module/ResendExchange/Application Logic/Service/ResendExchangeService.swift

8
GMERemittance/Module/ResendExchange/Application Logic/Service/ResendExchangeService.swift

@ -21,14 +21,14 @@ class ResendExchangeService: ResendExchangeServiceType {
protocol FetchResendDetailService: ApiServiceType {
func fetch(transactionId: String, success: @escaping (SendMoneyReciept?) -> (), failure: @escaping (Error) -> ())
func fetch(transactionId: String, success: @escaping (ResendExchangeRate?) -> (), failure: @escaping (Error) -> ())
}
extension FetchResendDetailService {
func fetch(transactionId: String, success: @escaping (SendMoneyReciept?) -> (), failure: @escaping (Error) -> ()) {
let url = oldBaseUrl + "mobile/receipt/" + transactionId
self.auth.request(method: .post, url: url, params: nil, success: { (response: SendMoneyRecieptContainer) in
func fetch(transactionId: String, success: @escaping (ResendExchangeRate?) -> (), failure: @escaping (Error) -> ()) {
let url = baseUrl + "v1/resend/detail/" + "\(transactionId)"
self.auth.request(method: .get, url: url, params: nil, success: { (response: ResendDetailModelContainer) in
if (response.errorCode ?? "") == "1" {
let error = NSError.init(domain: "Network", code: 0, userInfo: [NSLocalizedDescriptionKey : response.message ?? ""])
failure(error)

Loading…
Cancel
Save