Esempio n. 1
0
        /// <summary>
        /// Parent user and sub user transfer asset between accounts.
        /// <para>TransferResponse data</para>
        /// <para>string errorCode</para>
        /// <para>string errorMessage</para>
        /// </summary>
        /// <param name="request">TransferAccountRequest</param>
        /// <returns>TransferAccountResponse</returns>
        public void TransferAccountAsync(TransferAccountRequest request,
                                         System.Action <TransferAccountResponse.TransferResponse, string, string> action = null)
        {
            string url = _urlBuilder.Build(POST_METHOD, "/v1/account/transfer");

            HttpRequest.PostAsync <TransferAccountResponse>(url, request.ToJson()).ContinueWith((task) => {
                if (action != null)
                {
                    var res = task.Result;
                    action(res.data, res.erroCode, res.erroMessage);
                }
            });
        }
Esempio n. 2
0
        /// <summary>
        /// Parent user and sub user transfer asset between accounts.
        /// </summary>
        /// <param name="request">TransferAccountRequest</param>
        /// <returns>TransferAccountResponse</returns>
        public async Task <TransferAccountResponse> TransferAccountAsync(TransferAccountRequest request)
        {
            string url = _urlBuilder.Build(POST_METHOD, "/v1/account/transfer");

            return(await HttpRequest.PostAsync <TransferAccountResponse>(url, request.ToJson()));
        }