public GetBudgetResponse GetBudget(GetBudgetRequest request) { var budget = _budgetServiceParams.BudgetRepository.GetBudgetById(request.BudgetId); GetBudgetResponse getBudgetResponse = new GetBudgetResponse(); getBudgetResponse.Name = budget.Name; return(getBudgetResponse); }
public GetBudgetResponse ApiGetBudget(GetBudgetRequest GetBudgetRequest) { var GetBudgetResponse = new GetBudgetResponse(); try { GetBudgetResponse = this.ExecuteApiGetBudget(GetBudgetRequest); } catch (Exception ex) { if (((HttpWebResponse)((WebException)ex.InnerException).Response).StatusCode == HttpStatusCode.Unauthorized) { _apiAuthentication.GetToken(true); GetBudgetResponse = this.ExecuteApiGetBudget(GetBudgetRequest); } } return(GetBudgetResponse); }