# Cyclos411Api.TransactionsApi

All URIs are relative to *https://138.197.145.149:8080/cyclos/eCloudAtm/api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getTransactionsDataForSearch**](TransactionsApi.md#getTransactionsDataForSearch) | **GET** /{owner}/transactions/data-for-search | Returns data for searching transactions of an account owner
[**searchTransactions**](TransactionsApi.md#searchTransactions) | **GET** /{owner}/transactions | Searches transactions of an account owner
[**viewTransaction**](TransactionsApi.md#viewTransaction) | **GET** /transactions/{key} | Returns details about a transaction


<a name="getTransactionsDataForSearch"></a>
# **getTransactionsDataForSearch**
> TransactionDataForSearch getTransactionsDataForSearch(owner, opts)

Returns data for searching transactions of an account owner

Returns data which can be used to filter a transaction search

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');
var defaultClient = Cyclos411Api.ApiClient.instance;

// Configure API key authorization: accessClient
var accessClient = defaultClient.authentications['accessClient'];
accessClient.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//accessClient.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

// Configure API key authorization: session
var session = defaultClient.authentications['session'];
session.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//session.apiKeyPrefix = 'Token';

var apiInstance = new Cyclos411Api.TransactionsApi();

var owner = "owner_example"; // String | Can be one of: * a user identification value, such as id, username, e-mail, phone, etc.   Id is always allowed, others depend on Cyclos configuration. Note that   a valid numeric value is always considered as id. For example, when   using another identification method that can be numeric only, prefix   the value with a single quote (like in Excel spreadsheets), for   example, `'1234567890`;     * `self` for the currently authenticated user; * `system` for data that belongs to the system. 

var opts = { 
  'fields': ["fields_example"] // [String] | Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: `a,b.b1,c.-c1,c.-c2` will return the fields `a`, `b` (containing only the `b1` field) and `c` (containing all its fields except for `c1` or `c2`).  
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **owner** | **String**| Can be one of: * a user identification value, such as id, username, e-mail, phone, etc.   Id is always allowed, others depend on Cyclos configuration. Note that   a valid numeric value is always considered as id. For example, when   using another identification method that can be numeric only, prefix   the value with a single quote (like in Excel spreadsheets), for   example, &#x60;&#39;1234567890&#x60;;     * &#x60;self&#x60; for the currently authenticated user; * &#x60;system&#x60; for data that belongs to the system.  | 
 **fields** | [**[String]**](String.md)| Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: &#x60;a,b.b1,c.-c1,c.-c2&#x60; will return the fields &#x60;a&#x60;, &#x60;b&#x60; (containing only the &#x60;b1&#x60; field) and &#x60;c&#x60; (containing all its fields except for &#x60;c1&#x60; or &#x60;c2&#x60;).   | [optional] 

### Return type

[**TransactionDataForSearch**](TransactionDataForSearch.md)

### Authorization

[accessClient](../README.md#accessClient), [basic](../README.md#basic), [session](../README.md#session)

### HTTP request headers

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

<a name="searchTransactions"></a>
# **searchTransactions**
> [TransactionResult] searchTransactions(owner, opts)

Searches transactions of an account owner

Returns the transactions of a given account owner that match the specified criteria. Each result will will be relative to this owner. The amount may be positive or negative, depending on whether this owner has performed or received the transaction. 

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');
var defaultClient = Cyclos411Api.ApiClient.instance;

// Configure API key authorization: accessClient
var accessClient = defaultClient.authentications['accessClient'];
accessClient.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//accessClient.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

// Configure API key authorization: session
var session = defaultClient.authentications['session'];
session.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//session.apiKeyPrefix = 'Token';

var apiInstance = new Cyclos411Api.TransactionsApi();

var owner = "owner_example"; // String | Can be one of: * a user identification value, such as id, username, e-mail, phone, etc.   Id is always allowed, others depend on Cyclos configuration. Note that   a valid numeric value is always considered as id. For example, when   using another identification method that can be numeric only, prefix   the value with a single quote (like in Excel spreadsheets), for   example, `'1234567890`;     * `self` for the currently authenticated user; * `system` for data that belongs to the system. 

var opts = { 
  'fields': ["fields_example"], // [String] | Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: `a,b.b1,c.-c1,c.-c2` will return the fields `a`, `b` (containing only the `b1` field) and `c` (containing all its fields except for `c1` or `c2`).  
  'accessClients': ["accessClients_example"], // [String] | References to access clients (id or token) used to perform / receive the  transfer. 
  'accountTypes': ["accountTypes_example"], // [String] | The account types 
  'amountRange': [new Cyclos411Api.BigDecimal()], // [BigDecimal] | The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma. 
  'authorizationStatuses': ["authorizationStatuses_example"], // [String] | The status regarding authorization a transaction is in. If configured, transactions can require one or more levels of authorization in order to be processed. If a transaction has the this status null, it means it never went through the authorization process.  Possible values for each array element are: * authorized: The transaction was fully authorized and is processed * canceled: The authorization submission was canceled by the submitter * denied: The authorization was denied * pending: The transaction is pending authorization 
  'broker': "broker_example", // String | Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator. 
  'by': "by_example", // String | Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator. 
  'channels': ["channels_example"], // [String] | Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator. 
  'datePeriod': [new Date("2013-10-20T19:20:30+01:00")], // [Date] | The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma. 
  'direction': "direction_example", // String | Indicates whether from an account POV a transfer is a credit or debit Possible values are: * credit: The transfer impacts the balance positively * debit: The transfer impacts the balance negatively 
  'excludedIds': ["excludedIds_example"], // [String] | List of transfers ids to be excluded from the result. 
  'externalPaymentStatuses': ["externalPaymentStatuses_example"], // [String] | The status of an external payment Possible values for each array element are: * canceled: The external payment was canceled * expired: The external payment has expired without the destination user activation * failed: The external payment has failed processing * pending: The external payment is pending, awaiting the destination user to be activated in Cyclos * processed: The external payment was processed, and the destination payment was created 
  'fromCurrentAccessClient': true, // Boolean | Flag indicating whether to include only transfers by the current access client. 
  'groups': ["groups_example"], // [String] | Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator. 
  'includeGeneratedByAccessClient': true, // Boolean | Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a `ticket` or `paymentRequest` was processed then a new transfer will be generated. 
  'kinds': ["kinds_example"], // [String] | The kind of a transaction  Possible values for each array element are: * chargeback: Chargeback of a given transfer * externalPayment: A payment to an external user * import: An imported transaction * order: Transaction generated by confirming an order * payment: A direct payment * paymentRequest: A request for another user to accept a payment  * recurringPayment: A payment which is processed again periodically * scheduledPayment: A scheduled payment which is either a payment scheduled for a future date or has multiple installments * ticket: A payment whose the payer is unknown 
  'page': 56, // Number | The page number (zero-based) of the search. The default value is zero. 
  'pageSize': 56, // Number | The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting. 
  'paymentRequestStatuses': ["paymentRequestStatuses_example"], // [String] | The status of a payment request Possible values for each array element are: * canceled: The payment request was canceled * denied: The payment request was denied by the receiver * expired: The payment request has expired - the received did not respond until the expiration date * open: The payment request is open and can be accepted * processed: The payment request was processed, and either a direct or scheduled payment was created from it * scheduled: The payment request has been accepted, and scheduled for processing on a future date 
  'recurringPaymentStatuses': ["recurringPaymentStatuses_example"], // [String] | The status of a recurring payment Possible values for each array element are: * canceled: The recurring payment was manually canceled * closed: The recurring payment is closed, as the last scheduled occurrence was processed * open: The recurring payment is open, as there are more future occurrences 
  'scheduledPaymentStatuses': ["scheduledPaymentStatuses_example"], // [String] | The status of a scheduled payment Possible values for each array element are: * blocked: The scheduled payment is blocked - won't have any installment processed until being unblocked again * canceled: The scheduled payment, as well as all open installments were canceled * closed: The scheduled payment is closed * open: The scheduled payment has open installments 
  'ticketStatuses': ["ticketStatuses_example"], // [String] | The status of a ticket Possible values for each array element are: * approved: The ticket was approved by the payer and is waiting to be processed by the receiver to generate the payment * canceled: The ticket was canceled by the receiver before being approved * expired: The ticket has expired without being approved by a payer or canceled by the receiver until the expiration date * open: The ticket was created, but not approved yet * processed: The ticket was approved and processed and the payment was generated 
  'transactionNumber': "transactionNumber_example", // String | The transaction number of the matching transfer 
  'transferFilters': ["transferFilters_example"], // [String] | Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format `accountType.transferFilter`. 
  'transferTypes': ["transferTypes_example"], // [String] | Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format `accountType.transferType`. 
  'user': "user_example" // String | Reference a user that should have either received / performed the transfer. 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **owner** | **String**| Can be one of: * a user identification value, such as id, username, e-mail, phone, etc.   Id is always allowed, others depend on Cyclos configuration. Note that   a valid numeric value is always considered as id. For example, when   using another identification method that can be numeric only, prefix   the value with a single quote (like in Excel spreadsheets), for   example, &#x60;&#39;1234567890&#x60;;     * &#x60;self&#x60; for the currently authenticated user; * &#x60;system&#x60; for data that belongs to the system.  | 
 **fields** | [**[String]**](String.md)| Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: &#x60;a,b.b1,c.-c1,c.-c2&#x60; will return the fields &#x60;a&#x60;, &#x60;b&#x60; (containing only the &#x60;b1&#x60; field) and &#x60;c&#x60; (containing all its fields except for &#x60;c1&#x60; or &#x60;c2&#x60;).   | [optional] 
 **accessClients** | [**[String]**](String.md)| References to access clients (id or token) used to perform / receive the  transfer.  | [optional] 
 **accountTypes** | [**[String]**](String.md)| The account types  | [optional] 
 **amountRange** | [**[BigDecimal]**](BigDecimal.md)| The minimum / maximum amount. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.  | [optional] 
 **authorizationStatuses** | [**[String]**](String.md)| The status regarding authorization a transaction is in. If configured, transactions can require one or more levels of authorization in order to be processed. If a transaction has the this status null, it means it never went through the authorization process.  Possible values for each array element are: * authorized: The transaction was fully authorized and is processed * canceled: The authorization submission was canceled by the submitter * denied: The authorization was denied * pending: The transaction is pending authorization  | [optional] 
 **broker** | **String**| Reference to the broker of users involved in transfers. Is only taken into account if authenticated as administrator.  | [optional] 
 **by** | **String**| Reference to the user that was authenticated when the transfer was performed. Is only taken into account if authenticated as administrator.  | [optional] 
 **channels** | [**[String]**](String.md)| Reference to the channel used to perform / receive the transfer. Only taken into account if authenticated as administrator.  | [optional] 
 **datePeriod** | [**[Date]**](Date.md)| The minimum / maximum transfer date. Is expressed an array, with the lower bound as first element, and the upper bound as second element. When only one element, will have just the lower bound. To specify only the upper bound, prefix the value with a comma.  | [optional] 
 **direction** | **String**| Indicates whether from an account POV a transfer is a credit or debit Possible values are: * credit: The transfer impacts the balance positively * debit: The transfer impacts the balance negatively  | [optional] 
 **excludedIds** | [**[String]**](String.md)| List of transfers ids to be excluded from the result.  | [optional] 
 **externalPaymentStatuses** | [**[String]**](String.md)| The status of an external payment Possible values for each array element are: * canceled: The external payment was canceled * expired: The external payment has expired without the destination user activation * failed: The external payment has failed processing * pending: The external payment is pending, awaiting the destination user to be activated in Cyclos * processed: The external payment was processed, and the destination payment was created  | [optional] 
 **fromCurrentAccessClient** | **Boolean**| Flag indicating whether to include only transfers by the current access client.  | [optional] 
 **groups** | [**[String]**](String.md)| Reference to the user group used to perform / receive the transfer. Only taken into account if authenticated as administrator.  | [optional] 
 **includeGeneratedByAccessClient** | **Boolean**| Flag indicating whether to include or not the generated transfer. Only valid if there is at least one access client specified. For example if a &#x60;ticket&#x60; or &#x60;paymentRequest&#x60; was processed then a new transfer will be generated.  | [optional] 
 **kinds** | [**[String]**](String.md)| The kind of a transaction  Possible values for each array element are: * chargeback: Chargeback of a given transfer * externalPayment: A payment to an external user * import: An imported transaction * order: Transaction generated by confirming an order * payment: A direct payment * paymentRequest: A request for another user to accept a payment  * recurringPayment: A payment which is processed again periodically * scheduledPayment: A scheduled payment which is either a payment scheduled for a future date or has multiple installments * ticket: A payment whose the payer is unknown  | [optional] 
 **page** | **Number**| The page number (zero-based) of the search. The default value is zero.  | [optional] 
 **pageSize** | **Number**| The maximum number of records that will be returned on the search. The default value is 40. The maximum number of returned results is configured in Cyclos, and even if more than that is requested, it will be limited by that setting.  | [optional] 
 **paymentRequestStatuses** | [**[String]**](String.md)| The status of a payment request Possible values for each array element are: * canceled: The payment request was canceled * denied: The payment request was denied by the receiver * expired: The payment request has expired - the received did not respond until the expiration date * open: The payment request is open and can be accepted * processed: The payment request was processed, and either a direct or scheduled payment was created from it * scheduled: The payment request has been accepted, and scheduled for processing on a future date  | [optional] 
 **recurringPaymentStatuses** | [**[String]**](String.md)| The status of a recurring payment Possible values for each array element are: * canceled: The recurring payment was manually canceled * closed: The recurring payment is closed, as the last scheduled occurrence was processed * open: The recurring payment is open, as there are more future occurrences  | [optional] 
 **scheduledPaymentStatuses** | [**[String]**](String.md)| The status of a scheduled payment Possible values for each array element are: * blocked: The scheduled payment is blocked - won&#39;t have any installment processed until being unblocked again * canceled: The scheduled payment, as well as all open installments were canceled * closed: The scheduled payment is closed * open: The scheduled payment has open installments  | [optional] 
 **ticketStatuses** | [**[String]**](String.md)| The status of a ticket Possible values for each array element are: * approved: The ticket was approved by the payer and is waiting to be processed by the receiver to generate the payment * canceled: The ticket was canceled by the receiver before being approved * expired: The ticket has expired without being approved by a payer or canceled by the receiver until the expiration date * open: The ticket was created, but not approved yet * processed: The ticket was approved and processed and the payment was generated  | [optional] 
 **transactionNumber** | **String**| The transaction number of the matching transfer  | [optional] 
 **transferFilters** | [**[String]**](String.md)| Reference to the transfer filters, which filters transfers by type. May be either the internal id or qualified transfer filter internal name, in the format &#x60;accountType.transferFilter&#x60;.  | [optional] 
 **transferTypes** | [**[String]**](String.md)| Reference to the transfer types for filter. May be either the internal id or qualified transfer type internal name, in the format &#x60;accountType.transferType&#x60;.  | [optional] 
 **user** | **String**| Reference a user that should have either received / performed the transfer.  | [optional] 

### Return type

[**[TransactionResult]**](TransactionResult.md)

### Authorization

[accessClient](../README.md#accessClient), [basic](../README.md#basic), [session](../README.md#session)

### HTTP request headers

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

<a name="viewTransaction"></a>
# **viewTransaction**
> TransactionView viewTransaction(key, opts)

Returns details about a transaction

Returns details about a transaction.

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');
var defaultClient = Cyclos411Api.ApiClient.instance;

// Configure API key authorization: accessClient
var accessClient = defaultClient.authentications['accessClient'];
accessClient.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//accessClient.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

// Configure API key authorization: session
var session = defaultClient.authentications['session'];
session.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//session.apiKeyPrefix = 'Token';

var apiInstance = new Cyclos411Api.TransactionsApi();

var key = "key_example"; // String | Either the id or transaction number

var opts = { 
  'fields': ["fields_example"] // [String] | Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: `a,b.b1,c.-c1,c.-c2` will return the fields `a`, `b` (containing only the `b1` field) and `c` (containing all its fields except for `c1` or `c2`).  
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **key** | **String**| Either the id or transaction number | 
 **fields** | [**[String]**](String.md)| Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: &#x60;a,b.b1,c.-c1,c.-c2&#x60; will return the fields &#x60;a&#x60;, &#x60;b&#x60; (containing only the &#x60;b1&#x60; field) and &#x60;c&#x60; (containing all its fields except for &#x60;c1&#x60; or &#x60;c2&#x60;).   | [optional] 

### Return type

[**TransactionView**](TransactionView.md)

### Authorization

[accessClient](../README.md#accessClient), [basic](../README.md#basic), [session](../README.md#session)

### HTTP request headers

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

