Пример #1
0
        internal async Task <IdDoc> AddApplicantIdDoc(string applicantId, IdDoc idDoc, string documentFilePath, string documentContentType)
        {
            var fileName    = Path.GetFileName(documentFilePath);
            var bytes       = File.ReadAllBytes(documentFilePath);
            var content     = Convert.ToBase64String(bytes);
            var idDocCreate = new IdDocCreate
            {
                Metadata  = idDoc,
                ImageFile = new ImageFile
                {
                    Content     = content,
                    ContentType = documentContentType,
                    FileName    = fileName
                }
            };
            var resultIdDoc = await Client.AddApplicantIdDocAsync(applicantId, idDocCreate);

            return(resultIdDoc);
        }
Пример #2
0
 /// <inheritdoc />
 public async Task <IdDoc> AddApplicantIdDocAsync(string applicantId, IdDocCreate body, CancellationToken cancellationToken) =>
 await Task.FromResult(new IdDoc());
Пример #3
0
 /// <inheritdoc />
 public async Task <IdDoc> AddApplicantIdDocAsync(string applicantId, IdDocCreate body) =>
 await AddApplicantIdDocAsync(applicantId, body, CancellationToken.None);