Exemplo n.º 1
0
        public async Task <CancelTransactionReceipt> CancelTransfersAsync(CancelTransfersRequest cancelTransfersRequest)
        {
            var client  = new RestClient(baseUrl + _investorId + "/funds/cancel");
            var request = new RestRequest(Method.POST);

            request.AddHeader(authorization, _apiKey);
            request.AddParameter("application/json", JsonConvert.SerializeObject(cancelTransfersRequest), ParameterType.RequestBody);
            IRestResponse response = await client.ExecuteTaskAsync(request);

            return(JsonConvert.DeserializeObject <CancelTransactionReceipt>(response.Content));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Cancels or removes transfers. If transfer is in SEEDING state, stops seeding. Else, removes transfer entry. Does not remove their files.
 /// </summary>
 public async Task CancelTransfers(CancelTransfersRequest request)
 {
     await _apiClient.ExecutePostAsync("transfers/cancel", request);
 }