io.swagger.client.api

## Class ContractsApi

- java.lang.Object
- - io.swagger.client.api.ContractsApi

-     public class ContractsApi
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContractsApi()`
    `ContractsApi(ApiClient apiClient)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `WorkflowStateTransition` | `contractActionGet(Integer contractId, Integer actionId)` Gets the action matching the specified action ID.
    `com.squareup.okhttp.Call` | `contractActionGetAsync(Integer contractId, Integer actionId, ApiCallback<WorkflowStateTransition> callback)` (asynchronously) Gets the action matching the specified action ID.
    `com.squareup.okhttp.Call` | `contractActionGetCall(Integer contractId, Integer actionId, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)` Build call for contractActionGet
    `ApiResponse<WorkflowStateTransition>` | `contractActionGetWithHttpInfo(Integer contractId, Integer actionId)` Gets the action matching the specified action ID.
    `LedgerActionOutput` | `contractActionPost(Integer contractId, WorkflowActionInput actionInformation)` Executes an action for the specified smart contract instance and action ID.
    `com.squareup.okhttp.Call` | `contractActionPostAsync(Integer contractId, WorkflowActionInput actionInformation, ApiCallback<LedgerActionOutput> callback)` (asynchronously) Executes an action for the specified smart contract instance and action ID.
    `com.squareup.okhttp.Call` | `contractActionPostCall(Integer contractId, WorkflowActionInput actionInformation, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)` Build call for contractActionPost
    `ApiResponse<LedgerActionOutput>` | `contractActionPostWithHttpInfo(Integer contractId, WorkflowActionInput actionInformation)` Executes an action for the specified smart contract instance and action ID.
    `WorkflowStateTransitionList` | `contractActionsGet(Integer contractId, Integer top, Integer skip)` Lists all actions, which can be taken by the given user and current state of the specified smart contract instance.
    `com.squareup.okhttp.Call` | `contractActionsGetAsync(Integer contractId, Integer top, Integer skip, ApiCallback<WorkflowStateTransitionList> callback)` (asynchronously) Lists all actions, which can be taken by the given user and current state of the specified smart contract instance.
    `com.squareup.okhttp.Call` | `contractActionsGetCall(Integer contractId, Integer top, Integer skip, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)` Build call for contractActionsGet
    `ApiResponse<WorkflowStateTransitionList>` | `contractActionsGetWithHttpInfo(Integer contractId, Integer top, Integer skip)` Lists all actions, which can be taken by the given user and current state of the specified smart contract instance.
    `Contract` | `contractGet(Integer contractId)` Creates and deploys a new smart contract instance by adding the instance to the Workbench database and sending a transaction to the blockchain.
    `com.squareup.okhttp.Call` | `contractGetAsync(Integer contractId, ApiCallback<Contract> callback)` (asynchronously) Creates and deploys a new smart contract instance by adding the instance to the Workbench database and sending a transaction to the blockchain.
    `com.squareup.okhttp.Call` | `contractGetCall(Integer contractId, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)` Build call for contractGet
    `ApiResponse<Contract>` | `contractGetWithHttpInfo(Integer contractId)` Creates and deploys a new smart contract instance by adding the instance to the Workbench database and sending a transaction to the blockchain.
    `WorkflowActionInput` | `contractPost(WorkflowActionInput workflowActionInput, Integer workflowId, Integer contractCodeId, Integer connectionId)` Gets the smart contract instance matching a specific workflow instance ID.
    `com.squareup.okhttp.Call` | `contractPostAsync(WorkflowActionInput workflowActionInput, Integer workflowId, Integer contractCodeId, Integer connectionId, ApiCallback<WorkflowActionInput> callback)` (asynchronously) Gets the smart contract instance matching a specific workflow instance ID.
    `com.squareup.okhttp.Call` | `contractPostCall(WorkflowActionInput workflowActionInput, Integer workflowId, Integer contractCodeId, Integer connectionId, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)` Build call for contractPost
    `ApiResponse<WorkflowActionInput>` | `contractPostWithHttpInfo(WorkflowActionInput workflowActionInput, Integer workflowId, Integer contractCodeId, Integer connectionId)` Gets the smart contract instance matching a specific workflow instance ID.
    `ContractList` | `contractsGet(Integer top, Integer skip, Integer workflowId)` Lists the smart contract instances of the specified workflow.
    `com.squareup.okhttp.Call` | `contractsGetAsync(Integer top, Integer skip, Integer workflowId, ApiCallback<ContractList> callback)` (asynchronously) Lists the smart contract instances of the specified workflow.
    `com.squareup.okhttp.Call` | `contractsGetCall(Integer top, Integer skip, Integer workflowId, ProgressResponseBody.ProgressListener progressListener, ProgressRequestBody.ProgressRequestListener progressRequestListener)` Build call for contractsGet
    `ApiResponse<ContractList>` | `contractsGetWithHttpInfo(Integer top, Integer skip, Integer workflowId)` Lists the smart contract instances of the specified workflow.
    `ApiClient` | `getApiClient()`
    `void` | `setApiClient(ApiClient apiClient)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ContractsApi

          public ContractsApi()

    - #### ContractsApi

          public ContractsApi(ApiClient apiClient)

  - ### Method Detail

    - #### getApiClient

          public ApiClient getApiClient()

    - #### setApiClient

          public void setApiClient(ApiClient apiClient)

    - #### contractActionGetCall

          public com.squareup.okhttp.Call contractActionGetCall(Integer contractId,
                                                                Integer actionId,
                                                                ProgressResponseBody.ProgressListener progressListener,
                                                                ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                         throws ApiException

      Build call for contractActionGet
      Parameters:
        `contractId` - The id of the contract (required)
        `actionId` - The id of the action (required)
        `progressListener` - Progress listener
        `progressRequestListener` - Progress request listener
      Returns:
        Call to execute
      Throws:
        `ApiException` - If fail to serialize the request body object

    - #### contractActionGet

          public WorkflowStateTransition contractActionGet(Integer contractId,
                                                           Integer actionId)
                                                    throws ApiException

      Gets the action matching the specified action ID. Users get the action if the user can take the action given the current state of the specified smart contract instance and the user's associated application role or smart contract instance role.
      Parameters:
        `contractId` - The id of the contract (required)
        `actionId` - The id of the action (required)
      Returns:
        WorkflowStateTransition
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractActionGetWithHttpInfo

          public ApiResponse<WorkflowStateTransition> contractActionGetWithHttpInfo(Integer contractId,
                                                                                    Integer actionId)
                                                                             throws ApiException

      Gets the action matching the specified action ID. Users get the action if the user can take the action given the current state of the specified smart contract instance and the user's associated application role or smart contract instance role.
      Parameters:
        `contractId` - The id of the contract (required)
        `actionId` - The id of the action (required)
      Returns:
        ApiResponse<WorkflowStateTransition>
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractActionGetAsync

          public com.squareup.okhttp.Call contractActionGetAsync(Integer contractId,
                                                                 Integer actionId,
                                                                 ApiCallback<WorkflowStateTransition> callback)
                                                          throws ApiException

      (asynchronously) Gets the action matching the specified action ID. Users get the action if the user can take the action given the current state of the specified smart contract instance and the user's associated application role or smart contract instance role.
      Parameters:
        `contractId` - The id of the contract (required)
        `actionId` - The id of the action (required)
        `callback` - The callback to be executed when the API call finishes
      Returns:
        The request call
      Throws:
        `ApiException` - If fail to process the API call, e.g. serializing the request body object

    - #### contractActionPostCall

          public com.squareup.okhttp.Call contractActionPostCall(Integer contractId,
                                                                 WorkflowActionInput actionInformation,
                                                                 ProgressResponseBody.ProgressListener progressListener,
                                                                 ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                          throws ApiException

      Build call for contractActionPost
      Parameters:
        `contractId` - The id of the workflow instance (required)
        `actionInformation` - Parameters for a particular action (optional)
        `progressListener` - Progress listener
        `progressRequestListener` - Progress request listener
      Returns:
        Call to execute
      Throws:
        `ApiException` - If fail to serialize the request body object

    - #### contractActionPost

          public LedgerActionOutput contractActionPost(Integer contractId,
                                                       WorkflowActionInput actionInformation)
                                                throws ApiException

      Executes an action for the specified smart contract instance and action ID. Users are only able to execute the action given the current state of the specified smart contract instance and the user's associated application role or smart contract instance role.
      Parameters:
        `contractId` - The id of the workflow instance (required)
        `actionInformation` - Parameters for a particular action (optional)
      Returns:
        LedgerActionOutput
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractActionPostWithHttpInfo

          public ApiResponse<LedgerActionOutput> contractActionPostWithHttpInfo(Integer contractId,
                                                                                WorkflowActionInput actionInformation)
                                                                         throws ApiException

      Executes an action for the specified smart contract instance and action ID. Users are only able to execute the action given the current state of the specified smart contract instance and the user's associated application role or smart contract instance role.
      Parameters:
        `contractId` - The id of the workflow instance (required)
        `actionInformation` - Parameters for a particular action (optional)
      Returns:
        ApiResponse<LedgerActionOutput>
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractActionPostAsync

          public com.squareup.okhttp.Call contractActionPostAsync(Integer contractId,
                                                                  WorkflowActionInput actionInformation,
                                                                  ApiCallback<LedgerActionOutput> callback)
                                                           throws ApiException

      (asynchronously) Executes an action for the specified smart contract instance and action ID. Users are only able to execute the action given the current state of the specified smart contract instance and the user's associated application role or smart contract instance role.
      Parameters:
        `contractId` - The id of the workflow instance (required)
        `actionInformation` - Parameters for a particular action (optional)
        `callback` - The callback to be executed when the API call finishes
      Returns:
        The request call
      Throws:
        `ApiException` - If fail to process the API call, e.g. serializing the request body object

    - #### contractActionsGetCall

          public com.squareup.okhttp.Call contractActionsGetCall(Integer contractId,
                                                                 Integer top,
                                                                 Integer skip,
                                                                 ProgressResponseBody.ProgressListener progressListener,
                                                                 ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                          throws ApiException

      Build call for contractActionsGet
      Parameters:
        `contractId` - The id of the contract (required)
        `top` - The maximum number of items to return (optional)
        `skip` - The number of items to skip before returning (optional)
        `progressListener` - Progress listener
        `progressRequestListener` - Progress request listener
      Returns:
        Call to execute
      Throws:
        `ApiException` - If fail to serialize the request body object

    - #### contractActionsGet

          public WorkflowStateTransitionList contractActionsGet(Integer contractId,
                                                                Integer top,
                                                                Integer skip)
                                                         throws ApiException

      Lists all actions, which can be taken by the given user and current state of the specified smart contract instance. Users get all applicable actions if the user has an associated application role or is associated with a smart contract instance role for the current state of the specified smart contract instance.
      Parameters:
        `contractId` - The id of the contract (required)
        `top` - The maximum number of items to return (optional)
        `skip` - The number of items to skip before returning (optional)
      Returns:
        WorkflowStateTransitionList
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractActionsGetWithHttpInfo

          public ApiResponse<WorkflowStateTransitionList> contractActionsGetWithHttpInfo(Integer contractId,
                                                                                         Integer top,
                                                                                         Integer skip)
                                                                                  throws ApiException

      Lists all actions, which can be taken by the given user and current state of the specified smart contract instance. Users get all applicable actions if the user has an associated application role or is associated with a smart contract instance role for the current state of the specified smart contract instance.
      Parameters:
        `contractId` - The id of the contract (required)
        `top` - The maximum number of items to return (optional)
        `skip` - The number of items to skip before returning (optional)
      Returns:
        ApiResponse<WorkflowStateTransitionList>
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractActionsGetAsync

          public com.squareup.okhttp.Call contractActionsGetAsync(Integer contractId,
                                                                  Integer top,
                                                                  Integer skip,
                                                                  ApiCallback<WorkflowStateTransitionList> callback)
                                                           throws ApiException

      (asynchronously) Lists all actions, which can be taken by the given user and current state of the specified smart contract instance. Users get all applicable actions if the user has an associated application role or is associated with a smart contract instance role for the current state of the specified smart contract instance.
      Parameters:
        `contractId` - The id of the contract (required)
        `top` - The maximum number of items to return (optional)
        `skip` - The number of items to skip before returning (optional)
        `callback` - The callback to be executed when the API call finishes
      Returns:
        The request call
      Throws:
        `ApiException` - If fail to process the API call, e.g. serializing the request body object

    - #### contractGetCall

          public com.squareup.okhttp.Call contractGetCall(Integer contractId,
                                                          ProgressResponseBody.ProgressListener progressListener,
                                                          ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                   throws ApiException

      Build call for contractGet
      Parameters:
        `contractId` - The id of the contract (required)
        `progressListener` - Progress listener
        `progressRequestListener` - Progress request listener
      Returns:
        Call to execute
      Throws:
        `ApiException` - If fail to serialize the request body object

    - #### contractGet

          public Contract contractGet(Integer contractId)
                               throws ApiException

      Creates and deploys a new smart contract instance by adding the instance to the Workbench database and sending a transaction to the blockchain. This method can only be performed by users who are specified within the Initiators collection of the workflow within the Workbench application configuration.
      Parameters:
        `contractId` - The id of the contract (required)
      Returns:
        Contract
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractGetWithHttpInfo

          public ApiResponse<Contract> contractGetWithHttpInfo(Integer contractId)
                                                        throws ApiException

      Creates and deploys a new smart contract instance by adding the instance to the Workbench database and sending a transaction to the blockchain. This method can only be performed by users who are specified within the Initiators collection of the workflow within the Workbench application configuration.
      Parameters:
        `contractId` - The id of the contract (required)
      Returns:
        ApiResponse<Contract>
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractGetAsync

          public com.squareup.okhttp.Call contractGetAsync(Integer contractId,
                                                           ApiCallback<Contract> callback)
                                                    throws ApiException

      (asynchronously) Creates and deploys a new smart contract instance by adding the instance to the Workbench database and sending a transaction to the blockchain. This method can only be performed by users who are specified within the Initiators collection of the workflow within the Workbench application configuration.
      Parameters:
        `contractId` - The id of the contract (required)
        `callback` - The callback to be executed when the API call finishes
      Returns:
        The request call
      Throws:
        `ApiException` - If fail to process the API call, e.g. serializing the request body object

    - #### contractPostCall

          public com.squareup.okhttp.Call contractPostCall(WorkflowActionInput workflowActionInput,
                                                           Integer workflowId,
                                                           Integer contractCodeId,
                                                           Integer connectionId,
                                                           ProgressResponseBody.ProgressListener progressListener,
                                                           ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                    throws ApiException

      Build call for contractPost
      Parameters:
        `workflowActionInput` - The set of all contract action parameters. (optional)
        `workflowId` - The ID of the workflow. (optional)
        `contractCodeId` - The ID of the ledger implementation. (optional)
        `connectionId` - The ID of chain instance running on the ledger. (optional)
        `progressListener` - Progress listener
        `progressRequestListener` - Progress request listener
      Returns:
        Call to execute
      Throws:
        `ApiException` - If fail to serialize the request body object

    - #### contractPost

          public WorkflowActionInput contractPost(WorkflowActionInput workflowActionInput,
                                                  Integer workflowId,
                                                  Integer contractCodeId,
                                                  Integer connectionId)
                                           throws ApiException

      Gets the smart contract instance matching a specific workflow instance ID. Users who are Workbench administrators get the smart contract instance. Non-Workbench administrators get the smart contract instance if they have at least one associated application role or is associated with the smart contract instance.
      Parameters:
        `workflowActionInput` - The set of all contract action parameters. (optional)
        `workflowId` - The ID of the workflow. (optional)
        `contractCodeId` - The ID of the ledger implementation. (optional)
        `connectionId` - The ID of chain instance running on the ledger. (optional)
      Returns:
        WorkflowActionInput
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractPostWithHttpInfo

          public ApiResponse<WorkflowActionInput> contractPostWithHttpInfo(WorkflowActionInput workflowActionInput,
                                                                           Integer workflowId,
                                                                           Integer contractCodeId,
                                                                           Integer connectionId)
                                                                    throws ApiException

      Gets the smart contract instance matching a specific workflow instance ID. Users who are Workbench administrators get the smart contract instance. Non-Workbench administrators get the smart contract instance if they have at least one associated application role or is associated with the smart contract instance.
      Parameters:
        `workflowActionInput` - The set of all contract action parameters. (optional)
        `workflowId` - The ID of the workflow. (optional)
        `contractCodeId` - The ID of the ledger implementation. (optional)
        `connectionId` - The ID of chain instance running on the ledger. (optional)
      Returns:
        ApiResponse<WorkflowActionInput>
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractPostAsync

          public com.squareup.okhttp.Call contractPostAsync(WorkflowActionInput workflowActionInput,
                                                            Integer workflowId,
                                                            Integer contractCodeId,
                                                            Integer connectionId,
                                                            ApiCallback<WorkflowActionInput> callback)
                                                     throws ApiException

      (asynchronously) Gets the smart contract instance matching a specific workflow instance ID. Users who are Workbench administrators get the smart contract instance. Non-Workbench administrators get the smart contract instance if they have at least one associated application role or is associated with the smart contract instance.
      Parameters:
        `workflowActionInput` - The set of all contract action parameters. (optional)
        `workflowId` - The ID of the workflow. (optional)
        `contractCodeId` - The ID of the ledger implementation. (optional)
        `connectionId` - The ID of chain instance running on the ledger. (optional)
        `callback` - The callback to be executed when the API call finishes
      Returns:
        The request call
      Throws:
        `ApiException` - If fail to process the API call, e.g. serializing the request body object

    - #### contractsGetCall

          public com.squareup.okhttp.Call contractsGetCall(Integer top,
                                                           Integer skip,
                                                           Integer workflowId,
                                                           ProgressResponseBody.ProgressListener progressListener,
                                                           ProgressRequestBody.ProgressRequestListener progressRequestListener)
                                                    throws ApiException

      Build call for contractsGet
      Parameters:
        `top` - The maximum number of items to return (optional)
        `skip` - The number of items to skip before returning (optional)
        `workflowId` - The ID of the associated workflow (optional)
        `progressListener` - Progress listener
        `progressRequestListener` - Progress request listener
      Returns:
        Call to execute
      Throws:
        `ApiException` - If fail to serialize the request body object

    - #### contractsGet

          public ContractList contractsGet(Integer top,
                                           Integer skip,
                                           Integer workflowId)
                                    throws ApiException

      Lists the smart contract instances of the specified workflow. Users who are Workbench administrators get all smart contract instances. Non-Workbench administrators get all smart contract instances for which they have at least one associated application role or is associated with a smart contract instance role.
      Parameters:
        `top` - The maximum number of items to return (optional)
        `skip` - The number of items to skip before returning (optional)
        `workflowId` - The ID of the associated workflow (optional)
      Returns:
        ContractList
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractsGetWithHttpInfo

          public ApiResponse<ContractList> contractsGetWithHttpInfo(Integer top,
                                                                    Integer skip,
                                                                    Integer workflowId)
                                                             throws ApiException

      Lists the smart contract instances of the specified workflow. Users who are Workbench administrators get all smart contract instances. Non-Workbench administrators get all smart contract instances for which they have at least one associated application role or is associated with a smart contract instance role.
      Parameters:
        `top` - The maximum number of items to return (optional)
        `skip` - The number of items to skip before returning (optional)
        `workflowId` - The ID of the associated workflow (optional)
      Returns:
        ApiResponse<ContractList>
      Throws:
        `ApiException` - If fail to call the API, e.g. server error or cannot deserialize the response body

    - #### contractsGetAsync

          public com.squareup.okhttp.Call contractsGetAsync(Integer top,
                                                            Integer skip,
                                                            Integer workflowId,
                                                            ApiCallback<ContractList> callback)
                                                     throws ApiException

      (asynchronously) Lists the smart contract instances of the specified workflow. Users who are Workbench administrators get all smart contract instances. Non-Workbench administrators get all smart contract instances for which they have at least one associated application role or is associated with a smart contract instance role.
      Parameters:
        `top` - The maximum number of items to return (optional)
        `skip` - The number of items to skip before returning (optional)
        `workflowId` - The ID of the associated workflow (optional)
        `callback` - The callback to be executed when the API call finishes
      Returns:
        The request call
      Throws:
        `ApiException` - If fail to process the API call, e.g. serializing the request body object

Copyright © 2018. All rights reserved.