public static Task DeleteContactAsync(this FreeAgentClient client, Attachment attachment) { return(client.UpdateOrDeleteAsync(attachment, (c, id) => c.DeleteAttachment(client.Configuration.CurrentHeader, id))); }
public static Task UpdateProjectAsync(this FreeAgentClient client, Project contact) { return(client.UpdateOrDeleteAsync(contact, (c, id) => c.UpdateProject(client.Configuration.CurrentHeader, id, contact.Wrap()))); }
public static Task DeleteProjectAsync(this FreeAgentClient client, Contact project) { return(client.UpdateOrDeleteAsync(project, (c, id) => c.DeleteContact(client.Configuration.CurrentHeader, id))); }
public static Task UpdateCurrentUserAsync(this FreeAgentClient client, User user) { return(client.UpdateOrDeleteAsync(user, (c, id) => c.UpdateCurrentUser(client.Configuration.CurrentHeader, user.Wrap()))); }
public static Task DeleteContactAsync(this FreeAgentClient client, User user) { return(client.UpdateOrDeleteAsync(user, (c, id) => c.DeleteUser(client.Configuration.CurrentHeader, id))); }
public static Task UpdateTimeslipAsync(this FreeAgentClient client, Timeslip timeslip) { return(client.UpdateOrDeleteAsync(timeslip, (c, id) => c.UpdateTimeslip(client.Configuration.CurrentHeader, id, timeslip.Wrap()))); }
public static Task DeleteTimeslipAsync(this FreeAgentClient client, Timeslip timeslip) { return(client.UpdateOrDeleteAsync(timeslip, (c, id) => c.DeleteBankAccount(client.Configuration.CurrentHeader, id))); }
public static Task DeleteExpenseAsync(this FreeAgentClient client, Expense expense) { return(client.UpdateOrDeleteAsync(expense, (c, id) => c.DeleteExpense(client.Configuration.CurrentHeader, id))); }
public static Task DeleteNoteAsync(this FreeAgentClient client, NoteItem note) { return(client.UpdateOrDeleteAsync(note, (c, id) => c.DeleteNote(client.Configuration.CurrentHeader, 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 DeleteBankAccountAsync(this FreeAgentClient client, BankAccount account) { return(client.UpdateOrDeleteAsync(account, (c, id) => c.DeleteBankAccount(client.Configuration.CurrentHeader, id))); }
public static Task DeleteBillAsync(this FreeAgentClient client, Bill bill) { return(client.UpdateOrDeleteAsync(bill, (c, id) => c.DeleteBill(client.Configuration.CurrentHeader, id))); }