Esempio n. 1
0
 public async Task <IdResponse> SubmitFile(AccountsFileRequest accountsFileRequest,
                                           CancellationToken cancellationToken = default)
 {
     CheckoutUtils.ValidateParams("accountsFileRequest", accountsFileRequest,
                                  "accountsFileRequest.purpose", accountsFileRequest.Purpose);
     return(await SubmitFileToFilesApi(accountsFileRequest.File, accountsFileRequest.Purpose.Value,
                                       cancellationToken));
 }
Esempio n. 2
0
        private async Task ShouldUploadAccountsFile()
        {
            var fileRequest =
                new AccountsFileRequest
            {
                File        = "./Resources/checkout.jpeg",
                ContentType = new ContentType("image/png"),
                Purpose     = AccountsFilePurpose.Identification
            };

            IdResponse fileResponse = await DefaultApi.AccountsClient().SubmitFile(fileRequest);

            fileResponse.ShouldNotBeNull();
            fileResponse.Id.ShouldNotBeNull();
        }