public Task AssignDocumentAttachmentsRawAsync(string documentId, string attachmentEntities, AssignmentAction action, CancellationToken cancellationToken = default) { action.Validate(nameof(action)); var queryParameters = new QueryParameters(new QueryParameter(nameof(action), action.AsString(EnumJsonConverter.CamelCaseNameFormat))); return(AssignDocumentAttachmentsRawAsync(documentId, attachmentEntities, queryParameters.ToString(), cancellationToken)); }
public Task AssignDocumentAttachmentsAsync(string documentId, AssignmentAction action, IEnumerable <EntityReference> attachmentEntities, CancellationToken cancellationToken = default) { Preconditions.NotNullOrEmpty(documentId, nameof(documentId)); action.Validate(nameof(action)); Preconditions.NotNullOrEmpty(attachmentEntities, nameof(attachmentEntities)); var queryParameters = new QueryParameters(new QueryParameter(nameof(action), action.AsString(EnumJsonConverter.CamelCaseNameFormat))); return(PatchAsync($"{documentId}/attachments", queryParameters.ToString(), JsonStreamContent.Create(attachmentEntities), nameof(AssignDocumentAttachmentsAsync), documentId, cancellationToken)); }
/// <inheritdoc/> public Task AssignDocumentAttachmentsAsync(string documentId, AssignmentAction action, IEnumerable <EntityReference> attachmentEntities, CancellationToken cancellationToken = default) => AssignDocumentAttachmentsAsync(documentId, action.Validate(nameof(action)).GetValue() !, attachmentEntities, cancellationToken);
/// <summary> /// Adds or removes contacts in a contact group. /// </summary> /// <param name="groupId">The unique identifier of the contact group to update.</param> /// <param name="action">Whether to add or remove the contact.</param> /// <param name="contacts">The contacts to add or remove.</param> /// <param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="CancellationToken.None"/>.</param> /// <returns></returns> public Task AssignGroupContactsAsync(string groupId, AssignmentAction action, IEnumerable <EntityReference> contacts, CancellationToken cancellationToken = default) => AssignGroupContactsAsync(groupId, action.Validate(nameof(action)).GetValue(), contacts, cancellationToken);