Esempio n. 1
0
        internal static Task <string> AddAttachmentToJournalTransaction(VismaNetAuthorization auth, string batch,
                                                                        byte[] bytes,
                                                                        string fileName,
                                                                        JournalTransactionModule module = JournalTransactionModule.ModuleGL)
        {
            var url = GetApiUrlForController(VismaNetControllers.JournalTransactionV2, $"/module/{module.ToString().Substring(6)}/{batch}/attachment");

            return(AddAttachmentToController <string>(auth, url, bytes, fileName));
        }
Esempio n. 2
0
 public async Task <string> AddAttachmentToJournalTransaction(string batchNumber, byte[] byteArray, string fileName, JournalTransactionModule module = JournalTransactionModule.ModuleGL)
 {
     if (byteArray == default(byte[]))
     {
         throw new ArgumentNullException(nameof(byteArray), "ByteArray is missing");
     }
     if (string.IsNullOrEmpty(fileName) || string.IsNullOrEmpty(Path.GetExtension(fileName)))
     {
         throw new ArgumentNullException(nameof(fileName), "File name must be provided and have an extention");
     }
     return(await VismaNetApiHelper.AddAttachmentToJournalTransaction(Authorization, batchNumber, byteArray, fileName, module));
 }
Esempio n. 3
0
 public async Task <string> AddAttachmentToJournalTransaction(string batchNumber, string content, string fileName, JournalTransactionModule module = JournalTransactionModule.ModuleGL)
 {
     return(await AddAttachmentToJournalTransaction(batchNumber, Encoding.UTF8.GetBytes(content), fileName, module));
 }