All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.nem.sdk.openapi.jersey2.api.TransactionRoutesApi Maven / Gradle / Ivy

There is a newer version: 0.8.4
Show newest version
package io.nem.sdk.openapi.jersey2.api;

import io.nem.sdk.openapi.jersey2.invoker.ApiException;
import io.nem.sdk.openapi.jersey2.invoker.ApiClient;
import io.nem.sdk.openapi.jersey2.invoker.ApiResponse;
import io.nem.sdk.openapi.jersey2.invoker.Configuration;
import io.nem.sdk.openapi.jersey2.invoker.Pair;

import javax.ws.rs.core.GenericType;

import io.nem.sdk.openapi.jersey2.model.AnnounceTransactionInfoDTO;
import io.nem.sdk.openapi.jersey2.model.Cosignature;
import io.nem.sdk.openapi.jersey2.model.ModelError;
import io.nem.sdk.openapi.jersey2.model.TransactionHashes;
import io.nem.sdk.openapi.jersey2.model.TransactionIds;
import io.nem.sdk.openapi.jersey2.model.TransactionInfoDTO;
import io.nem.sdk.openapi.jersey2.model.TransactionPayload;
import io.nem.sdk.openapi.jersey2.model.TransactionStatusDTO;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2020-02-07T22:44:38.001Z[UTC]")
public class TransactionRoutesApi {
  private ApiClient apiClient;

  public TransactionRoutesApi() {
    this(Configuration.getDefaultApiClient());
  }

  public TransactionRoutesApi(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  public ApiClient getApiClient() {
    return apiClient;
  }

  public void setApiClient(ApiClient apiClient) {
    this.apiClient = apiClient;
  }

  /**
   * Announce a cosignature transaction
   * Announces a cosignature transaction to the network.
   * @param cosignature  (required)
   * @return AnnounceTransactionInfoDTO
   * @throws ApiException if fails to make API call
   * @http.response.details
     
Status Code Description Response Headers
202 success -
400 InvalidContent -
409 InvalidArgument -
*/ public AnnounceTransactionInfoDTO announceCosignatureTransaction(Cosignature cosignature) throws ApiException { return announceCosignatureTransactionWithHttpInfo(cosignature).getData(); } /** * Announce a cosignature transaction * Announces a cosignature transaction to the network. * @param cosignature (required) * @return ApiResponse<AnnounceTransactionInfoDTO> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 success -
400 InvalidContent -
409 InvalidArgument -
*/ public ApiResponse announceCosignatureTransactionWithHttpInfo(Cosignature cosignature) throws ApiException { Object localVarPostBody = cosignature; // verify the required parameter 'cosignature' is set if (cosignature == null) { throw new ApiException(400, "Missing the required parameter 'cosignature' when calling announceCosignatureTransaction"); } // create path and map variables String localVarPath = "/transaction/cosignature"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Announce an aggregate bonded transaction * Announces an aggregate bonded transaction to the network. * @param transactionPayload (required) * @return AnnounceTransactionInfoDTO * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 success -
400 InvalidContent -
409 InvalidArgument -
*/ public AnnounceTransactionInfoDTO announcePartialTransaction(TransactionPayload transactionPayload) throws ApiException { return announcePartialTransactionWithHttpInfo(transactionPayload).getData(); } /** * Announce an aggregate bonded transaction * Announces an aggregate bonded transaction to the network. * @param transactionPayload (required) * @return ApiResponse<AnnounceTransactionInfoDTO> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 success -
400 InvalidContent -
409 InvalidArgument -
*/ public ApiResponse announcePartialTransactionWithHttpInfo(TransactionPayload transactionPayload) throws ApiException { Object localVarPostBody = transactionPayload; // verify the required parameter 'transactionPayload' is set if (transactionPayload == null) { throw new ApiException(400, "Missing the required parameter 'transactionPayload' when calling announcePartialTransaction"); } // create path and map variables String localVarPath = "/transaction/partial"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Announce a new transaction * Announces a transaction to the network. We recommended to use the NEM2-SDK to announce transactions as they should be serialized. * @param transactionPayload (required) * @return AnnounceTransactionInfoDTO * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 success -
400 InvalidContent -
409 InvalidArgument -
*/ public AnnounceTransactionInfoDTO announceTransaction(TransactionPayload transactionPayload) throws ApiException { return announceTransactionWithHttpInfo(transactionPayload).getData(); } /** * Announce a new transaction * Announces a transaction to the network. We recommended to use the NEM2-SDK to announce transactions as they should be serialized. * @param transactionPayload (required) * @return ApiResponse<AnnounceTransactionInfoDTO> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
202 success -
400 InvalidContent -
409 InvalidArgument -
*/ public ApiResponse announceTransactionWithHttpInfo(TransactionPayload transactionPayload) throws ApiException { Object localVarPostBody = transactionPayload; // verify the required parameter 'transactionPayload' is set if (transactionPayload == null) { throw new ApiException(400, "Missing the required parameter 'transactionPayload' when calling announceTransaction"); } // create path and map variables String localVarPath = "/transaction"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get transaction information * Returns transaction information given a transactionId or hash. * @param transactionId Transaction identifier or hash. (required) * @return TransactionInfoDTO * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
404 ResourceNotFound -
409 InvalidArgument -
*/ public TransactionInfoDTO getTransaction(String transactionId) throws ApiException { return getTransactionWithHttpInfo(transactionId).getData(); } /** * Get transaction information * Returns transaction information given a transactionId or hash. * @param transactionId Transaction identifier or hash. (required) * @return ApiResponse<TransactionInfoDTO> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
404 ResourceNotFound -
409 InvalidArgument -
*/ public ApiResponse getTransactionWithHttpInfo(String transactionId) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'transactionId' is set if (transactionId == null) { throw new ApiException(400, "Missing the required parameter 'transactionId' when calling getTransaction"); } // create path and map variables String localVarPath = "/transaction/{transactionId}" .replaceAll("\\{" + "transactionId" + "\\}", apiClient.escapeString(transactionId.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get transaction status * Returns the transaction status for a given hash. * @param hash Transaction hash. (required) * @return TransactionStatusDTO * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
404 ResourceNotFound -
409 InvalidArgument -
*/ public TransactionStatusDTO getTransactionStatus(String hash) throws ApiException { return getTransactionStatusWithHttpInfo(hash).getData(); } /** * Get transaction status * Returns the transaction status for a given hash. * @param hash Transaction hash. (required) * @return ApiResponse<TransactionStatusDTO> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
404 ResourceNotFound -
409 InvalidArgument -
*/ public ApiResponse getTransactionStatusWithHttpInfo(String hash) throws ApiException { Object localVarPostBody = new Object(); // verify the required parameter 'hash' is set if (hash == null) { throw new ApiException(400, "Missing the required parameter 'hash' when calling getTransactionStatus"); } // create path and map variables String localVarPath = "/transaction/{hash}/status" .replaceAll("\\{" + "hash" + "\\}", apiClient.escapeString(hash.toString())); // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType localVarReturnType = new GenericType() {}; return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get transactions information * Returns transactions information for a given array of transactionIds. * @param transactionIds (required) * @return List<TransactionInfoDTO> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
400 InvalidContent -
409 InvalidArgument -
*/ public List getTransactions(TransactionIds transactionIds) throws ApiException { return getTransactionsWithHttpInfo(transactionIds).getData(); } /** * Get transactions information * Returns transactions information for a given array of transactionIds. * @param transactionIds (required) * @return ApiResponse<List<TransactionInfoDTO>> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
400 InvalidContent -
409 InvalidArgument -
*/ public ApiResponse> getTransactionsWithHttpInfo(TransactionIds transactionIds) throws ApiException { Object localVarPostBody = transactionIds; // verify the required parameter 'transactionIds' is set if (transactionIds == null) { throw new ApiException(400, "Missing the required parameter 'transactionIds' when calling getTransactions"); } // create path and map variables String localVarPath = "/transaction"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } /** * Get transactions status * Returns an array of transaction statuses for a given array of transaction hashes. * @param transactionHashes (required) * @return List<TransactionStatusDTO> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
400 InvalidContent -
409 InvalidArgument -
*/ public List getTransactionsStatuses(TransactionHashes transactionHashes) throws ApiException { return getTransactionsStatusesWithHttpInfo(transactionHashes).getData(); } /** * Get transactions status * Returns an array of transaction statuses for a given array of transaction hashes. * @param transactionHashes (required) * @return ApiResponse<List<TransactionStatusDTO>> * @throws ApiException if fails to make API call * @http.response.details
Status Code Description Response Headers
200 success -
400 InvalidContent -
409 InvalidArgument -
*/ public ApiResponse> getTransactionsStatusesWithHttpInfo(TransactionHashes transactionHashes) throws ApiException { Object localVarPostBody = transactionHashes; // verify the required parameter 'transactionHashes' is set if (transactionHashes == null) { throw new ApiException(400, "Missing the required parameter 'transactionHashes' when calling getTransactionsStatuses"); } // create path and map variables String localVarPath = "/transaction/statuses"; // query params List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); String[] localVarAuthNames = new String[] { }; GenericType> localVarReturnType = new GenericType>() {}; return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy