コード例 #1
0
ファイル: APIHelper.cs プロジェクト: Flave1/Expense-Manager
 public TR ProcessAPI <T, TR>(T serviceObj, out APIOutMessage msg) where T : class where TR : new()
 {
     try
     {
         _request.AddJsonBody(serviceObj);
         var apiResponse  = _client.Execute(_request);
         var responseCode = (int)apiResponse.StatusCode;
         msg.Code = responseCode;
         if (responseCode >= 200 && responseCode < 300)
         {
             var deserializedResponse = new RequestResponseHelper().Deserialize <TR>(apiResponse, null, out msg.TechMessage);
             if (deserializedResponse == null)
             {
                 msg.Message = "Unable to process response from the server. Please re-check your transaction status";
                 msg.Code    = -1;
                 return(default);
コード例 #2
0
ファイル: APIHelper.cs プロジェクト: Flave1/Expense-Manager
 internal object ProcessAPI <T1, T2>(VoucherNumber regObj, out APIOutMessage msg)
 {
     throw new NotImplementedException();
 }