public virtual string Create(ForteCustomer customer) { ForteException errCust = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "CreateCustomer" }; var response = Requestor.PostString(_url, customer, _strUser, _strPassword, _strAuthAccountID); if (!(response.IndexOf("#ERROR#") == -1)) { errCust.ForteError.ErrorType = "#ERROR#"; errCust.ForteError.Message = response; throw errCust; } else if (!(response.IndexOf("NotFound") == -1)) { errCust.ForteError.ErrorType = "NotFound"; errCust.ForteError.Message = response; throw errCust; } else if (!(response.IndexOf("BadRequest") == -1)) { errCust.ForteError.ErrorType = "BadRequest"; errCust.ForteError.Message = response; throw errCust; } else { return response; } }
public virtual string Create(ForteCustomer customer) { ForteException errCust = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "CreateCustomer" }; var response = Requestor.PostString(_url, customer, _strUser, _strPassword, _strAuthAccountID); if (!(response.IndexOf("#ERROR#") == -1)) { errCust.ForteError.ErrorType = "#ERROR#"; errCust.ForteError.Message = response; throw errCust; } else if (!(response.IndexOf("NotFound") == -1)) { errCust.ForteError.ErrorType = "NotFound"; errCust.ForteError.Message = response; throw errCust; } else if (!(response.IndexOf("BadRequest") == -1)) { errCust.ForteError.ErrorType = "BadRequest"; errCust.ForteError.Message = response; throw errCust; } else { return(response); } }
public virtual ForteCustomer GetCustomer() { ForteCustomer custResult = new ForteCustomer(); ForteException errCust = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "GetCustomer" }; string strcustResult = Requestor.Get(_url, _strUser, _strPassword, _strAuthAccountID); if (!(strcustResult.IndexOf("#ERROR#") == -1)) { errCust.ForteError.ErrorType = "#ERROR#"; errCust.ForteError.Message = strcustResult; throw errCust; } else if (!(strcustResult.IndexOf("NotFound") == -1)) { errCust.ForteError.ErrorType = "NotFound"; errCust.ForteError.Message = strcustResult; throw errCust; } else if (!(strcustResult.IndexOf("BadRequest") == -1)) { errCust.ForteError.ErrorType = "BadRequest"; errCust.ForteError.Message = strcustResult; throw errCust; } else { custResult = Mapper <ForteCustomer> .MapFromJson(strcustResult); return(custResult); } }
public virtual ForteCustomer GetCustomer() { ForteCustomer custResult = new ForteCustomer(); ForteException errCust = new ForteException() { HttpStatusCode = System.Net.HttpStatusCode.OK, Source = "GetCustomer" }; string strcustResult = Requestor.Get(_url, _strUser, _strPassword, _strAuthAccountID); if (!(strcustResult.IndexOf("#ERROR#") == -1)) { errCust.ForteError.ErrorType = "#ERROR#"; errCust.ForteError.Message = strcustResult; throw errCust; } else if (!(strcustResult.IndexOf("NotFound") == -1)) { errCust.ForteError.ErrorType = "NotFound"; errCust.ForteError.Message = strcustResult; throw errCust; } else if (!(strcustResult.IndexOf("BadRequest") == -1)) { errCust.ForteError.ErrorType = "BadRequest"; errCust.ForteError.Message = strcustResult; throw errCust; } else { custResult = Mapper<ForteCustomer>.MapFromJson(strcustResult); return custResult; } }