public void Test_Wallets_Save() { WalletDTO wallet = this.GetJohnsWallet(); WalletPutDTO walletPut = new WalletPutDTO(); walletPut.Description = wallet.Description + " - changed"; walletPut.Owners = wallet.Owners; walletPut.Tag = wallet.Tag; WalletDTO saveWallet = this.Api.Wallets.Update(walletPut, wallet.Id); Assert.AreEqual(wallet.Id, saveWallet.Id); Assert.AreEqual(wallet.Description + " - changed", saveWallet.Description); }
public void Test_Wallets_Save() { WalletDTO wallet = TestHelper.GetJohnsWallet(); WalletPutDTO walletPut = new WalletPutDTO(); walletPut.Description = wallet.Description + " - changed"; walletPut.Owners = wallet.Owners; walletPut.Tag = wallet.Tag; WalletDTO saveWallet = _objectToTest.Update(walletPut, wallet.Id).Result; Assert.Equal(wallet.Id, saveWallet.Id); Assert.Equal(wallet.Description + " - changed", saveWallet.Description); }
public async Task Test_Wallets_Save() { WalletDTO wallet = await this.GetJohnsWallet(); WalletPutDTO walletPut = new WalletPutDTO { Description = wallet.Description + " - changed", Owners = wallet.Owners, Tag = wallet.Tag }; WalletDTO saveWallet = await this.Api.Wallets.UpdateAsync(walletPut, wallet.Id); Assert.AreEqual(wallet.Id, saveWallet.Id); Assert.AreEqual(wallet.Description + " - changed", saveWallet.Description); }
/// <summary>Updates wallet.</summary> /// <param name="wallet">Wallet object to save.</param> /// <param name="walletId">Wallet identifier.</param> /// <returns>Wallet instance returned from API.</returns> public WalletDTO Update(WalletPutDTO wallet, String walletId) { return(this.UpdateObject <WalletDTO, WalletPutDTO>(MethodKey.WalletsSave, wallet, walletId)); }
public async Task <WalletDTO> Update(WalletPutDTO wallet, string walletId) { var targetUrl = $"{_baseUrl}/wallets/{walletId}"; return(await UpdateEntity <WalletDTO, WalletPutDTO>(targetUrl, wallet)); }
/// <summary>Updates wallet.</summary> /// <param name="wallet">Wallet object to save.</param> /// <param name="walletId">Wallet identifier.</param> /// <returns>Wallet instance returned from API.</returns> public async Task <WalletDTO> UpdateAsync(WalletPutDTO wallet, String walletId) { return(await this.UpdateObjectAsync <WalletDTO, WalletPutDTO>(MethodKey.WalletsSave, wallet, walletId)); }