Ejemplo n.º 1
0
        private static void PrintWithdrawalMoney(WithdrawalRequestInfo output)
        {
            if (output.HasBalanceRequest)
            {
                Console.WriteLine(output.BalanceRequestId);
                Console.WriteLine(output.Amount);

                Console.WriteLine(output.BankName);
                Console.WriteLine(output.HasBalanceRequest);
                Console.WriteLine(output.Iban);
            }
            else
            {
                if (output.BankList != null)
                {
                    foreach (var bank in output.BankList)
                    {
                        Console.WriteLine(bank.Key);
                        Console.WriteLine(bank.Value);
                        Console.WriteLine("--------------------");
                    }
                }

                if (output.FriendlyNameList != null)
                {
                    foreach (var bank in output.FriendlyNameList)
                    {
                        Console.WriteLine(bank.Key);
                        Console.WriteLine(bank.Value);
                        Console.WriteLine("--------------------");
                    }
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Send the withdrawal money request, and return the withdrawal money request info.
        /// </summary>
        /// <returns>If a request is already, return the withdrawal money info. Null if there was an error</returns>
        public WithdrawalRequestInfo MakeWithdrawalRequest(WithdrawalRequest model)
        {
            WithdrawalRequestInfo result = null;

            var response = SendRequest(HttpVerbs.Post, "api/WithdrawalMoney", model, true);

            if (response != null)
            {
                result = JsonConvert.DeserializeObject <WithdrawalRequestInfo>(response.Content.ReadAsStringAsync().Result);
            }

            return(result);
        }