コード例 #1
0
 internal static TimeslipWrapper Wrap(this Timeslip timeslip)
 {
     return(new TimeslipWrapper {
         Timeslip = timeslip
     });
 }
コード例 #2
0
 public static Task DeleteTimeslipAsync(this FreeAgentClient client, Timeslip timeslip)
 {
     return(client.UpdateOrDeleteAsync(timeslip, (c, id) => c.DeleteBankAccount(client.Configuration.CurrentHeader, id)));
 }
コード例 #3
0
 public static Task <Timeslip> CreateTimeslipAsync(this FreeAgentClient client, Timeslip timeslip)
 {
     return(client.GetOrCreateAsync(c => c.CreateTimeslips(client.Configuration.CurrentHeader, timeslip.Wrap()), r => r.Timeslip));
 }
コード例 #4
0
 public static Task UpdateTimeslipAsync(this FreeAgentClient client, Timeslip timeslip)
 {
     return(client.UpdateOrDeleteAsync(timeslip, (c, id) => c.UpdateTimeslip(client.Configuration.CurrentHeader, id, timeslip.Wrap())));
 }
コード例 #5
0
        public static Task <Timeslip> GetTimeslipAsync(this FreeAgentClient client, Timeslip timeslip)
        {
            var id = client.ExtractId(timeslip);

            return(client.GetTimeslipAsync(id));
        }