public HistoryRecord CreateNote(HistoryAndNotesEndpointCreateType type, Guid parent, HistoryRecord note) { var request = new HistoryRecordsRequest { note }; return(Client.Put <HistoryRecord, HistoryRecordsResponse>(string.Format("api.xro/2.0/{0}/{1:D}/history", type, parent), request).FirstOrDefault()); }
public async Task <HistoryRecord> CreateNoteAsync(HistoryAndNotesEndpointCreateType type, Guid parent, HistoryRecord note) { var request = new HistoryRecordsRequest { note }; var historyRecords = await Client.PutAsync <HistoryRecord, HistoryRecordsResponse>($"api.xro/2.0/{type}/{parent:D}/history", request).ConfigureAwait(false); return(historyRecords.FirstOrDefault()); }