public async Task <OnchainResponse> RetryAsync(RetryData data) { var request = new RetryFailedRequest(data.TransactionId); var response = await _apiClient.ApiEnqueueTransactionRetryPostAsync(request); if (response != null) { return new OnchainResponse { Error = new ErrorResponse { Code = response.Error.Code, Message = response.Error.Message } } } ; return(new OnchainResponse()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <ApiException> ApiEnqueueTransactionRetryPostAsync(this IBitcoinApi operations, RetryFailedRequest model = default(RetryFailedRequest), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { using (var _result = await operations.ApiEnqueueTransactionRetryPostWithHttpMessagesAsync(model, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// </param> public static ApiException ApiEnqueueTransactionRetryPost(this IBitcoinApi operations, RetryFailedRequest model = default(RetryFailedRequest)) { return(System.Threading.Tasks.Task.Factory.StartNew(s => ((IBitcoinApi)s).ApiEnqueueTransactionRetryPostAsync(model), operations, System.Threading.CancellationToken.None, System.Threading.Tasks.TaskCreationOptions.None, System.Threading.Tasks.TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='model'> /// </param> public static ApiException ApiEnqueueTransactionRetryPost(this IBitcoinApi operations, RetryFailedRequest model = default(RetryFailedRequest)) { return(operations.ApiEnqueueTransactionRetryPostAsync(model).GetAwaiter().GetResult()); }