public static Task <IEnumerable <Expense> > GetExpensesAsync(this FreeAgentClient client, ExpenseFilter filterBy = ExpenseFilter.All, DateTime?fromDate = null, DateTime?toDate = null) { var view = filterBy.GetMemberValue(); return(client.GetOrCreateAsync(c => c.ExpenseList(client.Configuration.CurrentHeader, view, fromDate, toDate), r => r.Expenses)); }
public static Task <Contact> GetContactAsync(this FreeAgentClient client, Contact contact) { var id = client.ExtractId(contact); return(client.GetContactAsync(id)); }
public static Task <Contact> GetContactAsync(this FreeAgentClient client, int contactId) { return(client.GetOrCreateAsync(c => c.GetContact(client.Configuration.CurrentHeader, contactId), r => r.Contact)); }
public ResourceClient(FreeAgentClient client) : base(client) { }
public CategoryClient(FreeAgentClient client) : base(client) { }
public static Task <NoteItem> GetNoteAsync(this FreeAgentClient client, NoteItem note) { var id = client.ExtractId(note); return(client.GetNoteAsync(id)); }
public static Task <NoteItem> GetNoteAsync(this FreeAgentClient client, int noteId) { return(client.GetOrCreateAsync(c => c.GetNote(client.Configuration.CurrentHeader, noteId), r => r.Note)); }
public BankAccountClient(FreeAgentClient client) : base(client) { }
public BankTransactionExplanationClient(FreeAgentClient client) : base(client) { }
public static Task DeleteBankAccountAsync(this FreeAgentClient client, BankAccount account) { return(client.UpdateOrDeleteAsync(account, (c, id) => c.DeleteBankAccount(client.Configuration.CurrentHeader, id))); }
public CompanyClient(FreeAgentClient client) : base(client) { }
public static Task <BankTransactionExplanation> CreateBankTransactionExplanationAsync(this FreeAgentClient client, BankTransactionExplanation explanation) { return(client.GetOrCreateAsync(c => c.CreateBankTransactionExplanation(client.Configuration.CurrentHeader, explanation.Wrap()), r => r.BankTransactionExplanation)); }
public static Task <BankAccount> CreateBankAccountAsync(this FreeAgentClient client, BankAccount account) { return(client.GetOrCreateAsync(c => c.CreateBankAccount(client.Configuration.CurrentHeader, account.Wrap()), r => r.BankAccount)); }
public static Task <BankAccount> GetBankAccountAsync(this FreeAgentClient client, Uri url) { var id = url.GetId(); return(client.GetBankAccountAsync(id)); }
public static Task UpdateExpenseAsync(this FreeAgentClient client, Expense expense) { return(client.UpdateOrDeleteAsync(expense, (c, id) => c.UpdateExpense(client.Configuration.CurrentHeader, id, expense.Wrap()))); }
public static Task <IEnumerable <Invoice> > ListInvoicesForContactAsync(this FreeAgentClient client, Uri contact) { return(client.GetOrCreateAsync(c => c.ListInvoicesForContact(client.Configuration.CurrentHeader, contact), r => r.Invoices)); }
public static Task <Invoice> CreateInvoice(this FreeAgentClient client, Invoice invoice) { return(client.GetOrCreateAsync(c => c.CreateInvoice(client.Configuration.CurrentHeader, invoice.Wrap()), r => r.Invoice)); }
public static Task <NoteItem> GetNoteAsync(this FreeAgentClient client, Uri url) { var id = url.GetId(); return(client.GetNoteAsync(id)); }
public static Task CreateInvoiceEmail(this FreeAgentClient client, int invoiceId, InvoiceEmail email) { return(client.Execute(c => c.EmailInvoice(client.Configuration.CurrentHeader, invoiceId, email.Wrap()))); }
public static Task DeleteNoteAsync(this FreeAgentClient client, NoteItem note) { return(client.UpdateOrDeleteAsync(note, (c, id) => c.DeleteNote(client.Configuration.CurrentHeader, id))); }
public static Task <Invoice> GetInvoiceAsync(this FreeAgentClient client, Invoice invoice) { var id = client.ExtractId(invoice); return(client.GetInvoiceAsync(id)); }
public UserClient(FreeAgentClient client) : base(client) { }
public static Task <Invoice> GetInvoiceAsync(this FreeAgentClient client, Uri url) { var id = url.GetId(); return(client.GetInvoiceAsync(id)); }
public static Task <Contact> CreateContactAsync(this FreeAgentClient client, Contact contact) { return(client.GetOrCreateAsync(c => c.CreateContact(client.Configuration.CurrentHeader, contact.Wrap()), r => r.Contact)); }
public static Task <InvoicePdf> GetInvoicePdfAsync(this FreeAgentClient client, int invoiceId) { return(client.GetOrCreateAsync(c => c.GetInvoicePdf(client.Configuration.CurrentHeader, invoiceId), r => r.Pdf)); }
public static Task <Contact> GetContactAsync(this FreeAgentClient client, Uri url) { var id = url.GetId(); return(client.GetContactAsync(id)); }
public static Task ChangeInvoiceStatus(this FreeAgentClient client, Invoice invoice, InvoiceStatus newStatus) { var newValue = "mark_as_" + newStatus.GetMemberValue().ToLowerInvariant(); return(client.UpdateOrDeleteAsync(invoice, (c, id) => c.ChangeInvoiceStatus(client.Configuration.CurrentHeader, id, newValue))); }
public static Task DeleteContactAsync(this FreeAgentClient client, Contact contact) { return(client.UpdateOrDeleteAsync(contact, (c, id) => c.DeleteContact(client.Configuration.CurrentHeader, id))); }
public StatementClient(FreeAgentClient freeAgentClient) : base(freeAgentClient) { this.freeAgentClient = freeAgentClient; }
public static Task <Expense> CreateExpenseAsync(this FreeAgentClient client, Expense expense) { return(client.GetOrCreateAsync(c => c.CreateExpense(client.Configuration.CurrentHeader, expense.Wrap()), r => r.Expense)); }
public static Task <IEnumerable <NoteItem> > GetNotesAsync(this FreeAgentClient client, Project project) { var url = client.ExtractUrl(project); return(client.GetOrCreateAsync(c => c.NoteList(client.Configuration.CurrentHeader, null, url.OriginalString), r => r.Notes)); }
public AccountingClient(FreeAgentClient client) : base(client) { }
public BaseClient(FreeAgentClient client) { Client = client; }