public void Test_BankingAlias_Update()
        {
            try
            {
                UserNaturalDTO john       = this.GetJohn();
                WalletPostDTO  walletPost = new WalletPostDTO(new List <string> {
                    john.Id
                }, "WALLET IN EUR", CurrencyIso.EUR);
                WalletDTO wallet = this.Api.Wallets.Create(walletPost);
                BankingAliasIbanPostDTO bankingAliasIban = new BankingAliasIbanPostDTO(
                    john.FirstName + " " + john.LastName, CountryIso.LU)
                {
                    Tag = "Tag test"
                };
                BankingAliasDTO    bankingAliasCreated = Api.BankingAlias.CreateIban(wallet.Id, bankingAliasIban);
                BankingAliasPutDTO bankingAliasPut     = new BankingAliasPutDTO
                {
                    Active = false
                };

                BankingAliasDTO bankingAlias = this.Api.BankingAlias.Update(bankingAliasPut, bankingAliasCreated.Id);

                BankingAliasDTO bankingAliasGet = this.Api.BankingAlias.Get(bankingAliasCreated.Id);

                Assert.IsFalse(bankingAliasGet.Active);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }
Ejemplo n.º 2
0
 /// <summary>Updates bank account.</summary>
 /// <param name="bankingAlias">Banking alias instance to be updated.</param>
 /// <param name="bankingAliasId">Banking alias identifier.</param>
 /// <returns>Banking alias object returned from API.</returns>
 public BankingAliasDTO Update(BankingAliasPutDTO bankingAlias, String bankingAliasId)
 {
     return(this.UpdateObject <BankingAliasDTO, BankingAliasPutDTO>(MethodKey.BankingAliasSave, bankingAlias, bankingAliasId));
 }
 /// <summary>Updates bank account.</summary>
 /// <param name="bankingAlias">Banking alias instance to be updated.</param>
 /// <param name="bankingAliasId">Banking alias identifier.</param>
 /// <returns>Banking alias object returned from API.</returns>
 public async Task <BankingAliasDTO> Update(BankingAliasPutDTO bankingAlias, String bankingAliasId)
 {
     return(await this.UpdateObject <BankingAliasDTO, BankingAliasPutDTO>(MethodKey.BankingAliasSave, bankingAlias, bankingAliasId));
 }
        public async Task <BankingAliasDTO> Update(BankingAliasPutDTO bankingAlias, string bankingAliasId)
        {
            var targetUrl = $"{_baseUrl}//bankingaliases/{bankingAliasId}";

            return(await UpdateEntity <BankingAliasDTO, BankingAliasPutDTO>(targetUrl, bankingAlias));
        }