public IList <PensionListModel> GetPensions(string userId) { IList <PensionListModel> result = null; using (var httpClient = new HttpClientExtended()) { var response = httpClient.GetList <PersonalFinanceManager.DTOs.Pension.PensionList>($"/Pension/GetList/{userId}"); result = response.Select(AutoMapper.Mapper.Map <PensionListModel>).ToList(); } return(result); }
public IList <PaymentMethodListModel> GetPaymentMethods() { IList <PaymentMethodListModel> result = null; using (var httpClient = new HttpClientExtended()) { var response = httpClient.GetList <PersonalFinanceManager.DTOs.PaymentMethod.PaymentMethodList>($"/PaymentMethod/GetList"); result = response.Select(AutoMapper.Mapper.Map <PaymentMethodListModel>).ToList(); } return(result); }
public IList <ExpenditureTypeListModel> GetExpenditureTypes() { IList <ExpenditureTypeListModel> result = null; using (var httpClient = new HttpClientExtended()) { var response = httpClient.GetList <PersonalFinanceManager.DTOs.ExpenseType.ExpenseTypeList>($"/ExpenseType/GetList"); result = response.Select(AutoMapper.Mapper.Map <ExpenditureTypeListModel>).ToList(); } return(result); }
public IList <TaxListModel> GetTaxesByType(string currentUser, TaxType incomeTax) { IList <TaxListModel> result = null; using (var httpClient = new HttpClientExtended()) { var taxTypeId = (int)TaxType.IncomeTax; var response = httpClient.GetList <PersonalFinanceManager.DTOs.Tax.TaxList>($"/Tax/GetTaxesByType/{currentUser}/{taxTypeId}"); result = response.Select(AutoMapper.Mapper.Map <TaxListModel>).ToList(); } return(result); }