# TinapiMinka.WalletApi

All URIs are relative to *https://achtin-tst.minka.io/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createWallet**](WalletApi.md#createWallet) | **POST** /wallet | Create a wallet
[**getBalance**](WalletApi.md#getBalance) | **GET** /wallet/{handle}/balance | Get default account  balance of a wallet
[**getWalletByAlias**](WalletApi.md#getWalletByAlias) | **GET** /wallet/{handle} | Get a wallet
[**getWalletBySigner**](WalletApi.md#getWalletBySigner) | **GET** /wallet | Obtiene un wallet por signer
[**sendSms**](WalletApi.md#sendSms) | **POST** /wallet/{solicitadoAlias}/channel/sms | Send sms
[**updateWallet**](WalletApi.md#updateWallet) | **PUT** /wallet/{handle} | Edit a wallet


<a name="createWallet"></a>
# **createWallet**
> WalletResponse createWallet(walletRequest)

Create a wallet

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.WalletApi();
var walletRequest = new TinapiMinka.WalletRequest(); // WalletRequest | 
apiInstance.createWallet(walletRequest).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **walletRequest** | [**WalletRequest**](WalletRequest.md)|  | 

### Return type

[**WalletResponse**](WalletResponse.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

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

<a name="getBalance"></a>
# **getBalance**
> BalanceResponse getBalance(handle, unit)

Get default account  balance of a wallet

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.WalletApi();
var handle = "handle_example"; // String | 
var unit = "unit_example"; // String | 
apiInstance.getBalance(handle, unit).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **handle** | **String**|  | 
 **unit** | **String**|  | 

### Return type

[**BalanceResponse**](BalanceResponse.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

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

<a name="getWalletByAlias"></a>
# **getWalletByAlias**
> GetWalletResponse getWalletByAlias(handle)

Get a wallet

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.WalletApi();
var handle = "handle_example"; // String | 
apiInstance.getWalletByAlias(handle).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

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

### Return type

[**GetWalletResponse**](GetWalletResponse.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

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

<a name="getWalletBySigner"></a>
# **getWalletBySigner**
> WalletsResponse getWalletBySigner(opts)

Obtiene un wallet por signer

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.WalletApi();
var opts = {
  'customQuery': "customQuery_example" // String | 
};
apiInstance.getWalletBySigner(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **customQuery** | **String**|  | [optional] 

### Return type

[**WalletsResponse**](WalletsResponse.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

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

<a name="sendSms"></a>
# **sendSms**
> ErrorResponse sendSms(API_KEY, solicitadoAlias, smsRequest)

Send sms

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.WalletApi();
var API_KEY = "API_KEY_example"; // String | 
var solicitadoAlias = "solicitadoAlias_example"; // String | 
var smsRequest = new TinapiMinka.SmsRequest(); // SmsRequest | 
apiInstance.sendSms(API_KEY, solicitadoAlias, smsRequest).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **API_KEY** | **String**|  | 
 **solicitadoAlias** | **String**|  | 
 **smsRequest** | [**SmsRequest**](SmsRequest.md)|  | 

### Return type

[**ErrorResponse**](ErrorResponse.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

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

<a name="updateWallet"></a>
# **updateWallet**
> WalletUpdateResponse updateWallet(handle, walletUpdateRequest)

Edit a wallet

### Example
```javascript
var TinapiMinka = require('tinapi_minka');
var defaultClient = TinapiMinka.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure API key authorization: XNonce
var XNonce = defaultClient.authentications['XNonce'];
XNonce.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//XNonce.apiKeyPrefix = 'Token';
// Configure OAuth2 access token for authorization: oAuth2ClientCredentials
var oAuth2ClientCredentials = defaultClient.authentications['oAuth2ClientCredentials'];
oAuth2ClientCredentials.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new TinapiMinka.WalletApi();
var handle = "handle_example"; // String | 
var walletUpdateRequest = new TinapiMinka.WalletUpdateRequest(); // WalletUpdateRequest | 
apiInstance.updateWallet(handle, walletUpdateRequest).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **handle** | **String**|  | 
 **walletUpdateRequest** | [**WalletUpdateRequest**](WalletUpdateRequest.md)|  | 

### Return type

[**WalletUpdateResponse**](WalletUpdateResponse.md)

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [XNonce](../README.md#XNonce), [oAuth2ClientCredentials](../README.md#oAuth2ClientCredentials)

### HTTP request headers

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

