public void Test_CardRegistrationData()
        {
            var userId = this.GetJohn().Id;
            var cardRegistrationPost = new CardRegistrationPostDTO(userId,
                CurrencyIso.EUR,
               CardType.CB_VISA_MASTERCARD);
            var cardRegistrationGet = this.Api.CardRegistrations.Create(cardRegistrationPost);

            var cardRegistrationDataPost = new CardRegistrationDataPostDTO(cardRegistrationGet.PreregistrationData,
                cardRegistrationGet.AccessKey, "4970100000000154", "1218", "123", cardRegistrationGet.CardRegistrationURL);
            var cardRegistrationDataGet = this.Api.CardRegistrations.RegisterCardData(cardRegistrationDataPost);

            var cardRegistrationPut = new CardRegistrationPutDTO();
            cardRegistrationPut.RegistrationData = cardRegistrationDataGet.RegistrationData;
            var cardRegistrationPutGet = this.Api.CardRegistrations.Update(cardRegistrationPut, cardRegistrationGet.Id);
        }
        public void Test_CardRegistrations_Update()
        {
            try
            {
                CardRegistrationDTO cardRegistration = this.GetJohnsCardRegistration();
                CardRegistrationPutDTO cardRegistrationPut = new CardRegistrationPutDTO();
                String registrationData = this.GetPaylineCorrectRegistartionData(cardRegistration);
                cardRegistrationPut.RegistrationData = registrationData;

                CardRegistrationDTO getCardRegistration = this.Api.CardRegistrations.Update(cardRegistrationPut, cardRegistration.Id);

                Assert.AreEqual(registrationData, getCardRegistration.RegistrationData);
                Assert.IsNotNull(getCardRegistration.CardId);
                Assert.AreEqual("VALIDATED", getCardRegistration.Status);
                Assert.AreEqual("000000", getCardRegistration.ResultCode);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }
 /// <summary>Updates card registration.</summary>
 /// <param name="cardRegistration">Card registration instance to be updated.</param>
 /// <param name="cardRegistrationId">Card registration identifier.</param>
 /// <returns>Card registration object returned from API.</returns>
 public CardRegistrationDTO Update(CardRegistrationPutDTO cardRegistration, String cardRegistrationId)
 {
     return this.UpdateObject<CardRegistrationDTO, CardRegistrationPutDTO>(MethodKey.CardRegistrationSave, cardRegistration, cardRegistrationId);
 }