# Cyclos411Api.TransfersApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**chargebackTransfer**](TransfersApi.md#chargebackTransfer) | **POST** /transfers/{key}/chargeback | Perform the chargeback of a transfer
[**getTransferDataForSearch**](TransfersApi.md#getTransferDataForSearch) | **GET** /transfers/data-for-search | Returns data for searching transfers over multiple accounts
[**searchTransfers**](TransfersApi.md#searchTransfers) | **GET** /transfers | Searches for transfers over multiple accounts
[**viewTransfer**](TransfersApi.md#viewTransfer) | **GET** /transfers/{key} | Returns details about a transfer


<a name="chargebackTransfer"></a>
# **chargebackTransfer**
> &#39;String&#39; chargebackTransfer(key, opts)

Perform the chargeback of a transfer

The chargeback generates a new transaction with &#x60;kind&#x60; &#x3D; &#x60;chargeback&#x60;. A new transfer is generated with the same from / to, and negative amount. This will effectively return the amount to the original account. Only top-level transfers can be charged back. For example, a transfer used to charge a fee cannot be charged back. Also, the hability to chargeback a transfer depends on permissions and configuration like the maximum allowed time for the chargeback.  

### 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.TransfersApi();

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

var opts = { 
  'confirmationPassword': "confirmationPassword_example" // String | The password used to confirm this action, if needed. The actual password type, if any, depends on the Cyclos configuration for the current channel. 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **key** | **String**| Either the id or transaction number | 
 **confirmationPassword** | **String**| The password used to confirm this action, if needed. The actual password type, if any, depends on the Cyclos configuration for the current channel.  | [optional] 

### Return type

**&#39;String&#39;**

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json, text/plain

<a name="getTransferDataForSearch"></a>
# **getTransferDataForSearch**
> TransferDataForSearch getTransferDataForSearch(opts)

Returns data for searching transfers over multiple accounts

Returns configuration data for searching transfers over multiple accounts. This operation can only be performed by administrators or brokers over managed users. 

### 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.TransfersApi();

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.getTransferDataForSearch(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **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

[**TransferDataForSearch**](TransferDataForSearch.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="searchTransfers"></a>
# **searchTransfers**
> [TransferResult] searchTransfers(opts)

Searches for transfers over multiple accounts

Searches for transfers over multiple accounts. This operation can only be performed by administrators or brokers over managed users. 

### 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.TransfersApi();

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. 
  '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. 
  '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. 
  'chargedBack': true, // Boolean | When set to either `true` will only return transfers that were charged-back. When set to `false`, will only return transfers that were not charged-back. When left blank will not filter by this creterion. 
  'currency': "currency_example", // String | Either id or internal name of the currency 
  '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. 
  'excludedIds': ["excludedIds_example"], // [String] | List of transfers ids to be excluded from the result. 
  'fromAccountType': "fromAccountType_example", // String | Either id or internal name of the origin account type 
  '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. 
  'orderBy': "orderBy_example", // String | Contains the possible 'order by' values when searching for transfers  Possible values are: * amountAsc: The result is ordered by amount descendant * amountDesc: The result is ordered by amount descendant * dateAsc: The result is ordered by date ascendant * dateDesc: The result is ordered by date descendant 
  '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. 
  'statuses': ["statuses_example"], // [String] | Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, `loan.open` would be a valid internal name. 
  'toAccountType': "toAccountType_example", // String | Either id or internal name of the destination account type 
  '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`. 
  'transferKinds': ["transferKinds_example"], // [String] | Indicates the reason the transfer was created Possible values for each array element are: * accountFee: A transfer generated by an account fee charge * chargeback: A transfer which is a chargeback of another transfer * import: An imported transfer * initialCredit: A transfer which is the initial credit for a newly created account * payment: A transfer generated by a direct payment or accepting a webshop order * recurringPayment: A transfer generated when processing a recurring payment * scheduledPaymentInstallment: A transfer generated when processing a scheduled payment installment * transferFee: A transfer generated by a transfer fee charge 
  '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.searchTransfers(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **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] 
 **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] 
 **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] 
 **chargedBack** | **Boolean**| When set to either &#x60;true&#x60; will only return transfers that were charged-back. When set to &#x60;false&#x60;, will only return transfers that were not charged-back. When left blank will not filter by this creterion.  | [optional] 
 **currency** | **String**| Either id or internal name of the currency  | [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] 
 **excludedIds** | [**[String]**](String.md)| List of transfers ids to be excluded from the result.  | [optional] 
 **fromAccountType** | **String**| Either id or internal name of the origin account type  | [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] 
 **orderBy** | **String**| Contains the possible &#39;order by&#39; values when searching for transfers  Possible values are: * amountAsc: The result is ordered by amount descendant * amountDesc: The result is ordered by amount descendant * dateAsc: The result is ordered by date ascendant * dateDesc: The result is ordered by date descendant  | [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] 
 **statuses** | [**[String]**](String.md)| Transfer statuses used as search criteria. Each array element should be either the identifier or the status qualified internal name, composed by flow internal name, a dot, and the status internal name. For example, &#x60;loan.open&#x60; would be a valid internal name.  | [optional] 
 **toAccountType** | **String**| Either id or internal name of the destination account type  | [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] 
 **transferKinds** | [**[String]**](String.md)| Indicates the reason the transfer was created Possible values for each array element are: * accountFee: A transfer generated by an account fee charge * chargeback: A transfer which is a chargeback of another transfer * import: An imported transfer * initialCredit: A transfer which is the initial credit for a newly created account * payment: A transfer generated by a direct payment or accepting a webshop order * recurringPayment: A transfer generated when processing a recurring payment * scheduledPaymentInstallment: A transfer generated when processing a scheduled payment installment * transferFee: A transfer generated by a transfer fee charge  | [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

[**[TransferResult]**](TransferResult.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="viewTransfer"></a>
# **viewTransfer**
> TransferView viewTransfer(key, opts)

Returns details about a transfer

Returns details about a transfer.

### 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.TransfersApi();

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.viewTransfer(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

[**TransferView**](TransferView.md)

### Authorization

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

### HTTP request headers

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

