/// <summary> /// Gets the Contact Notes Apis associated with the given contact. /// </summary> /// <param name="type">The contact type.</param> /// <param name="contactId">The contact id.</param> /// <returns></returns> public IContactNotes GetContactNotes(ContactType type, string contactId) { type.Validate(nameof(type)); Preconditions.NotNullOrEmpty(contactId, nameof(contactId)); return(new ContactNotes(Client, contactId, type == ContactType.Borrower ? "encompass/v1/borrowerContacts" : "encompass/v1/businessContacts")); }
/// <summary> /// Retrieves all contact groups for a given contact type and group type. /// </summary> /// <param name="contactType">The contact type.</param> /// <param name="groupType">The contact group type.</param> /// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> /// <returns></returns> public Task <List <ContactGroup> > GetGroupsAsync(ContactType contactType, ContactGroupType?groupType = null, CancellationToken cancellationToken = default) => GetGroupsAsync(contactType.Validate(nameof(contactType)).GetValue(), groupType?.Validate(nameof(groupType)).GetValue(), cancellationToken);