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.
35 lines
956 B
35 lines
956 B
//
|
|
// RedeemCashPickUpService.swift
|
|
// GME Remit
|
|
//
|
|
// Created by Amrit Giri on 7/6/20.
|
|
//Copyright © 2020 Gobal Money Express Co. Ltd. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
class RedeemCashPickUpService: RedeemCashPickUpServiceType {
|
|
|
|
func searchControlNumber(
|
|
controlNo: String,
|
|
success: @escaping (TransactionModel) -> Void,
|
|
failure: @escaping (Error) -> Void
|
|
){
|
|
APIRouter
|
|
.searchTxnByControlNumber(controlNumber: controlNo)
|
|
.request(
|
|
needsAuthorization: false,
|
|
success: {(response: ResponseContainerObject<TransactionModel>) in
|
|
if (response.errorCode ?? "") != "0" {
|
|
let error = NSError(domain: "Network", code: 0, message: response.message ?? "")
|
|
failure(error)
|
|
} else {
|
|
if let model = response.data{
|
|
success(model)
|
|
}
|
|
}
|
|
},
|
|
failure: {failure($0)}
|
|
)
|
|
}
|
|
}
|