示例#1
0
 /// <summary>Updates KycDocument.</summary>
 /// <param name="userId">User identifier.</param>
 /// <param name="kycDocument">KycDocument entity instance to be updated.</param>
 /// <param name="kycDocumentId">KycDocument identifier.</param>
 /// <returns>KycDocument object returned from API.</returns>
 public KycDocumentDTO UpdateKycDocument(String userId, KycDocumentPutDTO kycDocument, String kycDocumentId)
 {
     return this.UpdateObject<KycDocumentDTO, KycDocumentPutDTO>(MethodKey.UsersSaveKycDocument, kycDocument, userId, kycDocumentId);
 }
        public void Test_Users_SaveKycDocument()
        {
            try
            {
                UserNaturalDTO john = this.GetJohn();
                KycDocumentDTO kycDocument = this.GetJohnsKycDocument();

                KycDocumentPutDTO kycDocumentPut = new KycDocumentPutDTO
                {
                    Status = KycStatus.VALIDATION_ASKED
                };

                KycDocumentDTO result = this.Api.Users.UpdateKycDocument(john.Id, kycDocumentPut, kycDocument.Id);

                Assert.IsNotNull(result);
                Assert.IsTrue(kycDocument.Type == result.Type);
                Assert.IsTrue(result.Status == KycStatus.VALIDATION_ASKED);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }