/// <inheritdoc cref="Delete"/>
        public Task <ApiResult <bool> > DeleteAsync(int documentId, AttachmentDocumentType documentType, CancellationToken cancellationToken = default)
        {
            var resource = ResourceUrl + $"{documentId}/{documentType}";

            return(DeleteAsync <bool>(resource, cancellationToken));
        }
Example #2
0
        /// <summary>
        /// Deletes document.
        /// </summary>
        /// <param name="documentId">Id of a document.</param>
        /// <param name="documentType">Type of a document.</param>
        /// <returns><see cref="ApiResult{TData}"/> instance containing <c>true</c> if deletion of a document was successful, otherwise <c>false</c>.</returns>
        public ApiResult <bool> Delete(int documentId, AttachmentDocumentType documentType)
        {
            var resource = ResourceUrl + $"{documentId}/{documentType}";

            return(Delete <bool>(resource));
        }
        /// <inheritdoc cref="Get"/>
        public Task <ApiResult <List <AttachmentGetModel> > > GetAsync(int documentId, AttachmentDocumentType documentType, bool compressed = false, CancellationToken cancellationToken = default)
        {
            var resource = ResourceUrl + $"{documentId}/{documentType}/{compressed}";

            return(GetAsync <List <AttachmentGetModel> >(resource, null, cancellationToken));
        }
Example #4
0
        /// <summary>
        /// Gets document attachment.
        /// </summary>
        /// <param name="documentId">Id of a document.</param>
        /// <param name="documentType">Type of a document.</param>
        /// <param name="compressed"><c>true</c> if the document should be compressed, otherwise <c>false</c>.</param>
        /// <returns><see cref="ApiResult{TData}"/> instance containing list of attachments.</returns>
        public ApiResult <List <AttachmentGetModel> > Get(int documentId, AttachmentDocumentType documentType, bool compressed = false)
        {
            var resource = ResourceUrl + $"{documentId}/{documentType}/{compressed}";

            return(Get <List <AttachmentGetModel> >(resource));
        }