# VerityReputation.TransactionApi

All URIs are relative to *http://springserver.cfapps.io/verity/core*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createTransaction**](TransactionApi.md#createTransaction) | **POST** /transaction | create transaction
[**getTransaction**](TransactionApi.md#getTransaction) | **GET** /transaction/{uuid} | get transaction
[**getTransactionsByAgent**](TransactionApi.md#getTransactionsByAgent) | **GET** /transaction/agent/{agentId} | get Transactions by AgentId


<a name="createTransaction"></a>
# **createTransaction**
> Transaction createTransaction(opts)

create transaction

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.TransactionApi();

var opts = { 
  'body': new VerityReputation.Transaction() // Transaction | 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createTransaction(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Transaction**](Transaction.md)|  | [optional] 

### Return type

[**Transaction**](Transaction.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="getTransaction"></a>
# **getTransaction**
> Transaction getTransaction(uuid)

get transaction

Get a specific transaction by id

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.TransactionApi();

var uuid = "uuid_example"; // String | 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getTransaction(uuid, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **uuid** | **String**|  | 

### Return type

[**Transaction**](Transaction.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="getTransactionsByAgent"></a>
# **getTransactionsByAgent**
> [Transaction] getTransactionsByAgent(agentId, pageNumber, pageSize, startDate, endDate, opts)

get Transactions by AgentId

Get all transaction for an agent. Use query parameters to limit results. Transactions will be returned where the agent is both the source or the target unless limited by the &#39;direction&#39; parameter.

### Example
```javascript
var VerityReputation = require('verity_reputation');

var apiInstance = new VerityReputation.TransactionApi();

var agentId = "agentId_example"; // String | 

var pageNumber = 56; // Number | starting page number. Must be > 0.

var pageSize = 56; // Number | number of records to return per page.

var startDate = "startDate_example"; // String | 

var endDate = "endDate_example"; // String | 

var opts = { 
  'direction': "direction_example" // String | limit by source or target, e.g. the the agent is sending or receving the transaction.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getTransactionsByAgent(agentId, pageNumber, pageSize, startDate, endDate, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **agentId** | **String**|  | 
 **pageNumber** | **Number**| starting page number. Must be &gt; 0. | 
 **pageSize** | **Number**| number of records to return per page. | 
 **startDate** | **String**|  | 
 **endDate** | **String**|  | 
 **direction** | **String**| limit by source or target, e.g. the the agent is sending or receving the transaction. | [optional] 

### Return type

[**[Transaction]**](Transaction.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

