public string Create(ForteTransaction trans) { ForteException errTran = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "CreateTransaction" }; var response = Requestor.PostString(_url, trans, _strUser, _strPassword, _strAuthAccountID); if (!(response.IndexOf("#ERROR#") == -1)) { errTran.ForteError.ErrorType = "#ERROR#"; errTran.ForteError.Message = response; throw errTran; } else if (!(response.IndexOf("NotFound") == -1)) { errTran.ForteError.ErrorType = "NotFound"; errTran.ForteError.Message = response; throw errTran; } else if (!(response.IndexOf("BadRequest") == -1)) { errTran.ForteError.ErrorType = "BadRequest"; errTran.ForteError.Message = response; throw errTran; } else { return response; } }
public string Create(ForteTransaction trans) { ForteException errTran = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "CreateTransaction" }; var response = Requestor.PostString(_url, trans, _strUser, _strPassword, _strAuthAccountID); if (!(response.IndexOf("#ERROR#") == -1)) { errTran.ForteError.ErrorType = "#ERROR#"; errTran.ForteError.Message = response; throw errTran; } else if (!(response.IndexOf("NotFound") == -1)) { errTran.ForteError.ErrorType = "NotFound"; errTran.ForteError.Message = response; throw errTran; } else if (!(response.IndexOf("BadRequest") == -1)) { errTran.ForteError.ErrorType = "BadRequest"; errTran.ForteError.Message = response; throw errTran; } else { return(response); } }
public ForteTransaction GetTransaction() { ForteTransaction forteTransaction = new ForteTransaction(); ForteException errTran = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "GetTransaction" }; string strtranResult = Requestor.Get(_url, _strUser, _strPassword, _strAuthAccountID); if (!(strtranResult.IndexOf("#ERROR#") == -1)) { errTran.ForteError.ErrorType = "#ERROR#"; errTran.ForteError.Message = strtranResult; throw errTran; } else if (!(strtranResult.IndexOf("NotFound") == -1)) { errTran.ForteError.ErrorType = "NotFound"; errTran.ForteError.Message = strtranResult; throw errTran; } else if (!(strtranResult.IndexOf("BadRequest") == -1)) { errTran.ForteError.ErrorType = "BadRequest"; errTran.ForteError.Message = strtranResult; throw errTran; } else { forteTransaction = Mapper <ForteTransaction> .MapFromJson(strtranResult); return(forteTransaction); } }
public ForteTransaction GetTransaction() { ForteTransaction forteTransaction = new ForteTransaction(); ForteException errTran = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "GetTransaction" }; string strtranResult = Requestor.Get(_url, _strUser, _strPassword, _strAuthAccountID); if (!(strtranResult.IndexOf("#ERROR#") == -1)) { errTran.ForteError.ErrorType = "#ERROR#"; errTran.ForteError.Message = strtranResult; throw errTran; } else if (!(strtranResult.IndexOf("NotFound") == -1)) { errTran.ForteError.ErrorType = "NotFound"; errTran.ForteError.Message = strtranResult; throw errTran; } else if (!(strtranResult.IndexOf("BadRequest") == -1)) { errTran.ForteError.ErrorType = "BadRequest"; errTran.ForteError.Message = strtranResult; throw errTran; } else { forteTransaction = Mapper<ForteTransaction>.MapFromJson(strtranResult); return forteTransaction; } }