Ejemplo n.º 1
0
        /// <summary>
        /// Create new wallet on user account. For use, must authorize User
        /// </summary>
        /// <param name="currencyCode">Currency code.</param>
        /// <param name="name">Wallet name</param>
        /// <param name="walletType">Wallet type: crypto/fiat.</param>
        /// <returns>Created wallet data.</returns>
        public WalletItem CreateNewWallet(string currencyCode, string name, WalletType walletType)
        {
            RestClient rc = new RestClient(config.ApiDoubleBalancesUrl);

            NewWalletRequest nw = new NewWalletRequest(currencyCode, walletType.ToString(), name);

            rc.AddOwnHeaderToRequest(new AutorizeData(config));
            rc.SendPOST(nw);

            return(Tools.TryGetResponse <WalletList>(rc).Balances[0]);
        }
 /// <summary>
 /// Creates a new <see cref="WalletTokenRequest"/> instance.
 /// </summary>
 /// <param name="walletType">The wallet type.</param>
 /// <param name="tokenData">The wallet token data.</param>
 public WalletTokenRequest(WalletType walletType, Dictionary <string, object> tokenData)
 {
     Type      = walletType.ToString();
     TokenData = tokenData;
 }
Ejemplo n.º 3
0
 public BalanceItemModel(WalletType walletType)
 {
     this.WalletType = walletType;
     this.Currency   = walletType.ToString();
 }