Пример #1
0
        private Task <string> CreateNoteAsync(ContactNote note, bool populate, CancellationToken cancellationToken = default)
        {
            Preconditions.NotNull(note, nameof(note));
            Preconditions.NullOrEmpty(note.NoteId, $"{nameof(note)}.{nameof(note.NoteId)}");

            return(PostPopulateDirtyAsync(null, nameof(CreateNoteAsync), note, populate, cancellationToken));
        }
Пример #2
0
        private Task UpdateNoteAsync(ContactNote note, bool populate, CancellationToken cancellationToken = default)
        {
            Preconditions.NotNull(note, nameof(note));
            Preconditions.NotNullOrEmpty(note.NoteId, $"{nameof(note)}.{nameof(note.NoteId)}");

            return(PatchPopulateDirtyAsync(note.NoteId, JsonStreamContent.Create(note), nameof(UpdateNoteAsync), note.NoteId, note, populate, cancellationToken));
        }
Пример #3
0
        private Task UpdateNoteAsync(ContactNote note, bool populate, CancellationToken cancellationToken = default)
        {
            Preconditions.NotNull(note, nameof(note));
            Preconditions.NotNullOrEmpty(note.NoteId, $"{nameof(note)}.{nameof(note.NoteId)}");

            note.Dirty = true; // To be removed if Ellie Mae updates API to only update provided properties.
            return(PatchPopulateDirtyAsync(note.NoteId, JsonStreamContent.Create(note), nameof(UpdateNoteAsync), note.NoteId, note, populate, cancellationToken));
        }
Пример #4
0
 /// <summary>
 /// Updates the specified note with the values provided.
 /// </summary>
 /// <param name="note">The note to update.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param>
 /// <returns></returns>
 public Task UpdateNoteAsync(ContactNote note, CancellationToken cancellationToken = default) => UpdateNoteAsync(note, false, cancellationToken);
Пример #5
0
 /// <summary>
 /// Adds a note to the contact and returns the note ID.
 /// </summary>
 /// <param name="note">The note to create.</param>
 /// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param>
 /// <returns></returns>
 public Task <string> CreateNoteAsync(ContactNote note, CancellationToken cancellationToken = default) => CreateNoteAsync(note, false, cancellationToken);