/// <summary> /// Search all the expenses that belongs to the user, which the token is tied to /// </summary> public async Task <IEnumerable <Expense> > GetExpensesAsync(ExpenseFilter filter) { var url = QueryStringUrl.GetUrl("/expense", filter.ToQueryStringDictionary()); return(await _httpClient.GetListAsync <expensereadables, expensereadablesExpense, Expense>(url, x => x.expense, Expense.FromNative)); }
public async Task <IEnumerable <ClientProject> > GetClientProjectsAsync(ClientProjectFilter filter) { var url = QueryStringUrl.GetUrl("/client-project", filter.ToQueryStringDictionary()); return(await _httpClient.GetListAsync <clientprojectreadables, clientprojectreadable, ClientProject>(url, x => x.clientprojectreadable, ClientProject.FromNative)); }
public async Task <IEnumerable <ClientInvoice> > GetClientInvoicesAsync(ClientInvoiceFilter filter) { var url = QueryStringUrl.GetUrl("/client/invoice", filter.ToQueryStringDictionary()); return(await _httpClient.GetListAsync <clientinvoices, clientinvoice, ClientInvoice>(url, x => x.clientinvoice, ClientInvoice.FromNative)); }
public async Task <ItemCreated> CreateClientInvoiceAsync(ClientInvoiceCreate item, ClientInvoiceCreateOptions options) { var url = QueryStringUrl.GetUrl("/client/invoice", options.ToQueryStringDictionary()); return(await _httpClient.PutAsync <clientinvoice, ItemCreated>(url, item.ToNative())); }
public async Task <IEnumerable <Event> > GetEventsAsync(EventFilter filter) { var url = QueryStringUrl.GetUrl("/event", filter.ToQueryStringDictionary()); return(await _httpClient.GetListAsync <eventreadables, eventreadable, Event>(url, x => x.eventreadable, Event.FromNative)); }