Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
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.AccountIds;
import io.nem.sdk.openapi.jersey2.model.AccountInfoDTO;
import io.nem.sdk.openapi.jersey2.model.ModelError;
import io.nem.sdk.openapi.jersey2.model.TransactionInfoDTO;
import io.nem.sdk.openapi.jersey2.model.TransactionTypeEnum;
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 AccountRoutesApi {
private ApiClient apiClient;
public AccountRoutesApi() {
this(Configuration.getDefaultApiClient());
}
public AccountRoutesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Get confirmed transactions
* Gets an array of transactions for which an account is the sender or receiver.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @param pageSize Number of transactions to return for each request. (optional, default to 10)
* @param id Transaction identifier up to which transactions are returned. (optional)
* @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. (optional, default to "-id")
* @param type Transaction type to filter by. (optional)
* @return List<TransactionInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public List getAccountConfirmedTransactions(String accountId, Integer pageSize, String id, String ordering, TransactionTypeEnum type) throws ApiException {
return getAccountConfirmedTransactionsWithHttpInfo(accountId, pageSize, id, ordering, type).getData();
}
/**
* Get confirmed transactions
* Gets an array of transactions for which an account is the sender or receiver.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @param pageSize Number of transactions to return for each request. (optional, default to 10)
* @param id Transaction identifier up to which transactions are returned. (optional)
* @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. (optional, default to "-id")
* @param type Transaction type to filter by. (optional)
* @return ApiResponse<List<TransactionInfoDTO>>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public ApiResponse> getAccountConfirmedTransactionsWithHttpInfo(String accountId, Integer pageSize, String id, String ordering, TransactionTypeEnum type) throws ApiException {
Object localVarPostBody = new Object();
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling getAccountConfirmedTransactions");
}
// create path and map variables
String localVarPath = "/account/{accountId}/transactions"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageSize", pageSize));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "ordering", ordering));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));
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 incoming transactions
* Gets an array of incoming transactions. A transaction is said to be incoming with respect to an account if the account is the recipient of the transaction.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @param pageSize Number of transactions to return for each request. (optional, default to 10)
* @param id Transaction identifier up to which transactions are returned. (optional)
* @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. (optional, default to "-id")
* @param type Transaction type to filter by. (optional)
* @return List<TransactionInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public List getAccountIncomingTransactions(String accountId, Integer pageSize, String id, String ordering, TransactionTypeEnum type) throws ApiException {
return getAccountIncomingTransactionsWithHttpInfo(accountId, pageSize, id, ordering, type).getData();
}
/**
* Get incoming transactions
* Gets an array of incoming transactions. A transaction is said to be incoming with respect to an account if the account is the recipient of the transaction.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @param pageSize Number of transactions to return for each request. (optional, default to 10)
* @param id Transaction identifier up to which transactions are returned. (optional)
* @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. (optional, default to "-id")
* @param type Transaction type to filter by. (optional)
* @return ApiResponse<List<TransactionInfoDTO>>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public ApiResponse> getAccountIncomingTransactionsWithHttpInfo(String accountId, Integer pageSize, String id, String ordering, TransactionTypeEnum type) throws ApiException {
Object localVarPostBody = new Object();
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling getAccountIncomingTransactions");
}
// create path and map variables
String localVarPath = "/account/{accountId}/transactions/incoming"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageSize", pageSize));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "ordering", ordering));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));
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 account information
* Returns the account information.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @return AccountInfoDTO
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
404
ResourceNotFound
-
409
InvalidArgument
-
*/
public AccountInfoDTO getAccountInfo(String accountId) throws ApiException {
return getAccountInfoWithHttpInfo(accountId).getData();
}
/**
* Get account information
* Returns the account information.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @return ApiResponse<AccountInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
404
ResourceNotFound
-
409
InvalidArgument
-
*/
public ApiResponse getAccountInfoWithHttpInfo(String accountId) throws ApiException {
Object localVarPostBody = new Object();
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling getAccountInfo");
}
// create path and map variables
String localVarPath = "/account/{accountId}"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.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 outgoing transactions
* Gets an array of outgoing transactions. A transaction is said to be outgoing with respect to an account if the account is the sender of the transaction.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @param pageSize Number of transactions to return for each request. (optional, default to 10)
* @param id Transaction identifier up to which transactions are returned. (optional)
* @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. (optional, default to "-id")
* @param type Transaction type to filter by. (optional)
* @return List<TransactionInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public List getAccountOutgoingTransactions(String accountId, Integer pageSize, String id, String ordering, TransactionTypeEnum type) throws ApiException {
return getAccountOutgoingTransactionsWithHttpInfo(accountId, pageSize, id, ordering, type).getData();
}
/**
* Get outgoing transactions
* Gets an array of outgoing transactions. A transaction is said to be outgoing with respect to an account if the account is the sender of the transaction.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @param pageSize Number of transactions to return for each request. (optional, default to 10)
* @param id Transaction identifier up to which transactions are returned. (optional)
* @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. (optional, default to "-id")
* @param type Transaction type to filter by. (optional)
* @return ApiResponse<List<TransactionInfoDTO>>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public ApiResponse> getAccountOutgoingTransactionsWithHttpInfo(String accountId, Integer pageSize, String id, String ordering, TransactionTypeEnum type) throws ApiException {
Object localVarPostBody = new Object();
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling getAccountOutgoingTransactions");
}
// create path and map variables
String localVarPath = "/account/{accountId}/transactions/outgoing"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageSize", pageSize));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "ordering", ordering));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));
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 aggregate bonded transactions information
* Gets an array of aggregate bonded transactions where the account is the sender or requires to cosign the transaction.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @param pageSize Number of transactions to return for each request. (optional, default to 10)
* @param id Transaction identifier up to which transactions are returned. (optional)
* @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. (optional, default to "-id")
* @param type Transaction type to filter by. (optional)
* @return List<TransactionInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public List getAccountPartialTransactions(String accountId, Integer pageSize, String id, String ordering, TransactionTypeEnum type) throws ApiException {
return getAccountPartialTransactionsWithHttpInfo(accountId, pageSize, id, ordering, type).getData();
}
/**
* Get aggregate bonded transactions information
* Gets an array of aggregate bonded transactions where the account is the sender or requires to cosign the transaction.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @param pageSize Number of transactions to return for each request. (optional, default to 10)
* @param id Transaction identifier up to which transactions are returned. (optional)
* @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. (optional, default to "-id")
* @param type Transaction type to filter by. (optional)
* @return ApiResponse<List<TransactionInfoDTO>>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public ApiResponse> getAccountPartialTransactionsWithHttpInfo(String accountId, Integer pageSize, String id, String ordering, TransactionTypeEnum type) throws ApiException {
Object localVarPostBody = new Object();
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling getAccountPartialTransactions");
}
// create path and map variables
String localVarPath = "/account/{accountId}/transactions/partial"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageSize", pageSize));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "ordering", ordering));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));
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 unconfirmed transactions
* Gets the array of transactions not included in a block where an account is the sender or receiver.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @param pageSize Number of transactions to return for each request. (optional, default to 10)
* @param id Transaction identifier up to which transactions are returned. (optional)
* @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. (optional, default to "-id")
* @param type Transaction type to filter by. (optional)
* @return List<TransactionInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public List getAccountUnconfirmedTransactions(String accountId, Integer pageSize, String id, String ordering, TransactionTypeEnum type) throws ApiException {
return getAccountUnconfirmedTransactionsWithHttpInfo(accountId, pageSize, id, ordering, type).getData();
}
/**
* Get unconfirmed transactions
* Gets the array of transactions not included in a block where an account is the sender or receiver.
* @param accountId Account public key or address enconded using a 32-character set. (required)
* @param pageSize Number of transactions to return for each request. (optional, default to 10)
* @param id Transaction identifier up to which transactions are returned. (optional)
* @param ordering Ordering criteria: * -id - Descending order by id. * id - Ascending order by id. (optional, default to "-id")
* @param type Transaction type to filter by. (optional)
* @return ApiResponse<List<TransactionInfoDTO>>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
409
InvalidArgument
-
*/
public ApiResponse> getAccountUnconfirmedTransactionsWithHttpInfo(String accountId, Integer pageSize, String id, String ordering, TransactionTypeEnum type) throws ApiException {
Object localVarPostBody = new Object();
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException(400, "Missing the required parameter 'accountId' when calling getAccountUnconfirmedTransactions");
}
// create path and map variables
String localVarPath = "/account/{accountId}/transactions/unconfirmed"
.replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "pageSize", pageSize));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "id", id));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "ordering", ordering));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "type", type));
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 accounts information
* Returns the account information for an array of accounts.
* @param accountIds (optional)
* @return List<AccountInfoDTO>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
400
InvalidContent
-
409
InvalidArgument
-
*/
public List getAccountsInfo(AccountIds accountIds) throws ApiException {
return getAccountsInfoWithHttpInfo(accountIds).getData();
}
/**
* Get accounts information
* Returns the account information for an array of accounts.
* @param accountIds (optional)
* @return ApiResponse<List<AccountInfoDTO>>
* @throws ApiException if fails to make API call
* @http.response.details
Status Code
Description
Response Headers
200
success
-
400
InvalidContent
-
409
InvalidArgument
-
*/
public ApiResponse> getAccountsInfoWithHttpInfo(AccountIds accountIds) throws ApiException {
Object localVarPostBody = accountIds;
// create path and map variables
String localVarPath = "/account";
// 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);
}
}