Example #1
0
        /// <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));
        }
Example #2
0
        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));
        }
Example #3
0
        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));
        }
Example #4
0
        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()));
        }
Example #5
0
        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));
        }