<repo_name>biwse/biwse-node<file_sep>/src/model/Transaction.js
/**
 * Biwse API V1 Reference
 * This API documentation generated from OpenAPI specification. 
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import ApiClient from '../ApiClient';

/**
 * The Transaction model module.
 * @module model/Transaction
 * @version 1.0.0
 */
class Transaction {
    /**
     * Constructs a new <code>Transaction</code>.
     * @alias module:model/Transaction
     */
    constructor() { 
        
        Transaction.initialize(this);
    }

    /**
     * Initializes the fields of this object.
     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
     * Only for internal use.
     */
    static initialize(obj) { 
    }

    /**
     * Constructs a <code>Transaction</code> from a plain JavaScript object, optionally creating a new instance.
     * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @param {module:model/Transaction} obj Optional instance to populate.
     * @return {module:model/Transaction} The populated <code>Transaction</code> instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new Transaction();

            if (data.hasOwnProperty('tx_hash')) {
                obj['tx_hash'] = ApiClient.convertToType(data['tx_hash'], 'String');
            }
        }
        return obj;
    }


}

/**
 * Sended transaction ID
 * @member {String} tx_hash
 */
Transaction.prototype['tx_hash'] = undefined;






export default Transaction;

<file_sep>/src/model/InvoiceStatus.js
/**
 * Biwse API V1 Reference
 * This API documentation generated from OpenAPI specification. 
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import ApiClient from '../ApiClient';
import InvoiceStatusData from './InvoiceStatusData';

/**
 * The InvoiceStatus model module.
 * @module model/InvoiceStatus
 * @version 1.0.0
 */
class InvoiceStatus {
    /**
     * Constructs a new <code>InvoiceStatus</code>.
     * @alias module:model/InvoiceStatus
     */
    constructor() { 
        
        InvoiceStatus.initialize(this);
    }

    /**
     * Initializes the fields of this object.
     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
     * Only for internal use.
     */
    static initialize(obj) { 
    }

    /**
     * Constructs a <code>InvoiceStatus</code> from a plain JavaScript object, optionally creating a new instance.
     * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @param {module:model/InvoiceStatus} obj Optional instance to populate.
     * @return {module:model/InvoiceStatus} The populated <code>InvoiceStatus</code> instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new InvoiceStatus();

            if (data.hasOwnProperty('msg')) {
                obj['msg'] = ApiClient.convertToType(data['msg'], 'String');
            }
            if (data.hasOwnProperty('data')) {
                obj['data'] = InvoiceStatusData.constructFromObject(data['data']);
            }
        }
        return obj;
    }


}

/**
 * Invoice's amount
 * @member {String} msg
 */
InvoiceStatus.prototype['msg'] = undefined;

/**
 * @member {module:model/InvoiceStatusData} data
 */
InvoiceStatus.prototype['data'] = undefined;






export default InvoiceStatus;

<file_sep>/docs/InvoiceStatus.md
# biwse.InvoiceStatus

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**msg** | **String** | Invoice&#39;s amount | [optional] 
**data** | [**InvoiceStatusData**](InvoiceStatusData.md) |  | [optional] 


<file_sep>/test/api/AppApi.spec.js
/**
 * Biwse API V1 Reference
 * This API documentation generated from OpenAPI specification. 
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

(function(root, factory) {
  if (typeof define === 'function' && define.amd) {
    // AMD.
    define(['expect.js', process.cwd()+'/src/index'], factory);
  } else if (typeof module === 'object' && module.exports) {
    // CommonJS-like environments that support module.exports, like Node.
    factory(require('expect.js'), require(process.cwd()+'/src/index'));
  } else {
    // Browser globals (root is window)
    factory(root.expect, root.biwse);
  }
}(this, function(expect, biwse) {
  'use strict';

  var instance;

  beforeEach(function() {
    instance = new biwse.AppApi();
  });

  var getProperty = function(object, getter, property) {
    // Use getter method if present; otherwise, get the property directly.
    if (typeof object[getter] === 'function')
      return object[getter]();
    else
      return object[property];
  }

  var setProperty = function(object, setter, property, value) {
    // Use setter method if present; otherwise, set the property directly.
    if (typeof object[setter] === 'function')
      object[setter](value);
    else
      object[property] = value;
  }

  describe('AppApi', function() {
    describe('createAddress', function() {
      it('should call createAddress successfully', function(done) {
        //uncomment below and update the code to test createAddress
        //instance.createAddress(function(error) {
        //  if (error) throw error;
        //expect().to.be();
        //});
        done();
      });
    });
    describe('createInvoice', function() {
      it('should call createInvoice successfully', function(done) {
        //uncomment below and update the code to test createInvoice
        //instance.createInvoice(function(error) {
        //  if (error) throw error;
        //expect().to.be();
        //});
        done();
      });
    });
    describe('createWalletInvoice', function() {
      it('should call createWalletInvoice successfully', function(done) {
        //uncomment below and update the code to test createWalletInvoice
        //instance.createWalletInvoice(function(error) {
        //  if (error) throw error;
        //expect().to.be();
        //});
        done();
      });
    });
    describe('getBalance', function() {
      it('should call getBalance successfully', function(done) {
        //uncomment below and update the code to test getBalance
        //instance.getBalance(function(error) {
        //  if (error) throw error;
        //expect().to.be();
        //});
        done();
      });
    });
    describe('getInvoice', function() {
      it('should call getInvoice successfully', function(done) {
        //uncomment below and update the code to test getInvoice
        //instance.getInvoice(function(error) {
        //  if (error) throw error;
        //expect().to.be();
        //});
        done();
      });
    });
    describe('sendOnePayment', function() {
      it('should call sendOnePayment successfully', function(done) {
        //uncomment below and update the code to test sendOnePayment
        //instance.sendOnePayment(function(error) {
        //  if (error) throw error;
        //expect().to.be();
        //});
        done();
      });
    });
    describe('sendPayments', function() {
      it('should call sendPayments successfully', function(done) {
        //uncomment below and update the code to test sendPayments
        //instance.sendPayments(function(error) {
        //  if (error) throw error;
        //expect().to.be();
        //});
        done();
      });
    });
  });

}));
<file_sep>/src/model/InvoiceStatusData.js
/**
 * Biwse API V1 Reference
 * This API documentation generated from OpenAPI specification. 
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import ApiClient from '../ApiClient';

/**
 * The InvoiceStatusData model module.
 * @module model/InvoiceStatusData
 * @version 1.0.0
 */
class InvoiceStatusData {
    /**
     * Constructs a new <code>InvoiceStatusData</code>.
     * @alias module:model/InvoiceStatusData
     */
    constructor() { 
        
        InvoiceStatusData.initialize(this);
    }

    /**
     * Initializes the fields of this object.
     * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
     * Only for internal use.
     */
    static initialize(obj) { 
    }

    /**
     * Constructs a <code>InvoiceStatusData</code> from a plain JavaScript object, optionally creating a new instance.
     * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
     * @param {Object} data The plain JavaScript object bearing properties of interest.
     * @param {module:model/InvoiceStatusData} obj Optional instance to populate.
     * @return {module:model/InvoiceStatusData} The populated <code>InvoiceStatusData</code> instance.
     */
    static constructFromObject(data, obj) {
        if (data) {
            obj = obj || new InvoiceStatusData();

            if (data.hasOwnProperty('amount')) {
                obj['amount'] = ApiClient.convertToType(data['amount'], 'Number');
            }
            if (data.hasOwnProperty('confs')) {
                obj['confs'] = ApiClient.convertToType(data['confs'], 'Number');
            }
            if (data.hasOwnProperty('address')) {
                obj['address'] = ApiClient.convertToType(data['address'], 'String');
            }
            if (data.hasOwnProperty('tx_hash')) {
                obj['tx_hash'] = ApiClient.convertToType(data['tx_hash'], 'String');
            }
            if (data.hasOwnProperty('type')) {
                obj['type'] = ApiClient.convertToType(data['type'], 'Boolean');
            }
            if (data.hasOwnProperty('accepted')) {
                obj['accepted'] = ApiClient.convertToType(data['accepted'], 'Boolean');
            }
            if (data.hasOwnProperty('verification_hash')) {
                obj['verification_hash'] = ApiClient.convertToType(data['verification_hash'], 'String');
            }
        }
        return obj;
    }


}

/**
 * Invoice's amount
 * @member {Number} amount
 */
InvoiceStatusData.prototype['amount'] = undefined;

/**
 * Number of transaction confirmations
 * @member {Number} confs
 */
InvoiceStatusData.prototype['confs'] = undefined;

/**
 * Payment receieved on address
 * @member {String} address
 */
InvoiceStatusData.prototype['address'] = undefined;

/**
 * Transaction hash
 * @member {String} tx_hash
 */
InvoiceStatusData.prototype['tx_hash'] = undefined;

/**
 * Currency type
 * @member {Boolean} type
 */
InvoiceStatusData.prototype['type'] = undefined;

/**
 * Payment accepted or not
 * @member {Boolean} accepted
 */
InvoiceStatusData.prototype['accepted'] = undefined;

/**
 * Verification hash
 * @member {String} verification_hash
 */
InvoiceStatusData.prototype['verification_hash'] = undefined;






export default InvoiceStatusData;

<file_sep>/docs/AppApi.md
# biwse.AppApi

All URIs are relative to *https://api.biwse.com/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createAddress**](AppApi.md#createAddress) | **POST** /app/{appId}/{coin}/address | Create new address
[**createInvoice**](AppApi.md#createInvoice) | **POST** /app/{appId}/invoice | Create invoice
[**createWalletInvoice**](AppApi.md#createWalletInvoice) | **POST** /app/{appId}/{coin}/invoice | Create wallet invoice
[**getBalance**](AppApi.md#getBalance) | **GET** /app/{appId}/{coin}/balance | Retrieve wallet balance
[**getInvoice**](AppApi.md#getInvoice) | **GET** /app/{appId}/invoice/{invoiceId} | Retreive invoice info
[**sendOnePayment**](AppApi.md#sendOnePayment) | **POST** /app/{appId}/{coin}/send | Send one payment
[**sendPayments**](AppApi.md#sendPayments) | **POST** /app/{appId}/{coin}/multi_send | Send payments



## createAddress

> Address createAddress(appId, coin)

Create new address

Create new receive address for yor wallet. 

### Example

```javascript
import biwse from 'biwse';
let defaultClient = biwse.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new biwse.AppApi();
let appId = "appId_example"; // String | The application identidier
let coin = "coin_example"; // String | The wallet identidier
apiInstance.createAddress(appId, coin).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **appId** | **String**| The application identidier | 
 **coin** | **String**| The wallet identidier | 

### Return type

[**Address**](Address.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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


## createInvoice

> AppInvoiceCreated createInvoice(appId, appInvoice)

Create invoice

Create new invoice. In response you get url of invoice page 

### Example

```javascript
import biwse from 'biwse';
let defaultClient = biwse.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new biwse.AppApi();
let appId = "appId_example"; // String | The application identidier
let appInvoice = new biwse.AppInvoice(); // AppInvoice | 
apiInstance.createInvoice(appId, appInvoice).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **appId** | **String**| The application identidier | 
 **appInvoice** | [**AppInvoice**](AppInvoice.md)|  | 

### Return type

[**AppInvoiceCreated**](AppInvoiceCreated.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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


## createWalletInvoice

> WalletInvoiceCreated createWalletInvoice(appId, coin, walletInvoice)

Create wallet invoice

Create new invoice for specific wallet. In response you get url of invoice page. 

### Example

```javascript
import biwse from 'biwse';
let defaultClient = biwse.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new biwse.AppApi();
let appId = "appId_example"; // String | The application identidier
let coin = "coin_example"; // String | The wallet identidier
let walletInvoice = new biwse.WalletInvoice(); // WalletInvoice | 
apiInstance.createWalletInvoice(appId, coin, walletInvoice).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **appId** | **String**| The application identidier | 
 **coin** | **String**| The wallet identidier | 
 **walletInvoice** | [**WalletInvoice**](WalletInvoice.md)|  | 

### Return type

[**WalletInvoiceCreated**](WalletInvoiceCreated.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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


## getBalance

> WalletBalance getBalance(appId, coin)

Retrieve wallet balance

Retrieve wallet confirmed and total balance  

### Example

```javascript
import biwse from 'biwse';
let defaultClient = biwse.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new biwse.AppApi();
let appId = "appId_example"; // String | The application identidier
let coin = "coin_example"; // String | The wallet identidier
apiInstance.getBalance(appId, coin).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **appId** | **String**| The application identidier | 
 **coin** | **String**| The wallet identidier | 

### Return type

[**WalletBalance**](WalletBalance.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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


## getInvoice

> InvoiceStatus getInvoice(appId, invoiceId)

Retreive invoice info

Retrieve invoice with specified identifier string 

### Example

```javascript
import biwse from 'biwse';
let defaultClient = biwse.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new biwse.AppApi();
let appId = "appId_example"; // String | The application identidier
let invoiceId = "invoiceId_example"; // String | Invoice ID
apiInstance.getInvoice(appId, invoiceId).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **appId** | **String**| The application identidier | 
 **invoiceId** | **String**| Invoice ID | 

### Return type

[**InvoiceStatus**](InvoiceStatus.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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


## sendOnePayment

> Transaction sendOnePayment(appId, coin, payment)

Send one payment

Send one payments from wallet to one recipient 

### Example

```javascript
import biwse from 'biwse';
let defaultClient = biwse.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new biwse.AppApi();
let appId = "appId_example"; // String | The application identidier
let coin = "coin_example"; // String | The wallet identidier
let payment = new biwse.Payment(); // Payment | 
apiInstance.sendOnePayment(appId, coin, payment).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **appId** | **String**| The application identidier | 
 **coin** | **String**| The wallet identidier | 
 **payment** | [**Payment**](Payment.md)|  | 

### Return type

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

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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


## sendPayments

> Transaction sendPayments(appId, coin, payments)

Send payments

Send payments from wallet to one or many recipents 

### Example

```javascript
import biwse from 'biwse';
let defaultClient = biwse.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
let bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

let apiInstance = new biwse.AppApi();
let appId = "appId_example"; // String | The application identidier
let coin = "coin_example"; // String | The wallet identidier
let payments = new biwse.Payments(); // Payments | 
apiInstance.sendPayments(appId, coin, payments).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

```

### Parameters


Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **appId** | **String**| The application identidier | 
 **coin** | **String**| The wallet identidier | 
 **payments** | [**Payments**](Payments.md)|  | 

### Return type

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

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

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

<file_sep>/docs/AppInvoice.md
# biwse.AppInvoice

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**amountUsd** | **Number** | Invoice&#39;s amount | 
**callbackLink** | **String** | Callback url | [optional] 
**successUrl** | **String** | Redirect user after payment | [optional] 
**invoiceNumber** | **String** | Your invoice internal identifier | [optional] 


<file_sep>/docs/InvoiceStatusData.md
# biwse.InvoiceStatusData

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**amount** | **Number** | Invoice&#39;s amount | [optional] 
**confs** | **Number** | Number of transaction confirmations | [optional] 
**address** | **String** | Payment receieved on address | [optional] 
**txHash** | **String** | Transaction hash | [optional] 
**type** | **Boolean** | Currency type | [optional] 
**accepted** | **Boolean** | Payment accepted or not | [optional] 
**verificationHash** | **String** | Verification hash | [optional] 


<file_sep>/docs/Transaction.md
# biwse.Transaction

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**txHash** | **String** | Sended transaction ID | [optional] 


<file_sep>/src/api/AppApi.js
/**
 * Biwse API V1 Reference
 * This API documentation generated from OpenAPI specification. 
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */


import ApiClient from "../ApiClient";
import Address from '../model/Address';
import AppInvoice from '../model/AppInvoice';
import AppInvoiceCreated from '../model/AppInvoiceCreated';
import InvoiceStatus from '../model/InvoiceStatus';
import Payment from '../model/Payment';
import Payments from '../model/Payments';
import Transaction from '../model/Transaction';
import WalletBalance from '../model/WalletBalance';
import WalletInvoice from '../model/WalletInvoice';
import WalletInvoiceCreated from '../model/WalletInvoiceCreated';

/**
* App service.
* @module api/AppApi
* @version 1.0.0
*/
export default class AppApi {

    /**
    * Constructs a new AppApi. 
    * @alias module:api/AppApi
    * @class
    * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
    * default to {@link module:ApiClient#instance} if unspecified.
    */
    constructor(apiClient) {
        this.apiClient = apiClient || ApiClient.instance;
    }



    /**
     * Create new address
     * Create new receive address for yor wallet. 
     * @param {String} appId The application identidier
     * @param {String} coin The wallet identidier
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Address} and HTTP response
     */
    createAddressWithHttpInfo(appId, coin) {
      let postBody = null;
      // verify the required parameter 'appId' is set
      if (appId === undefined || appId === null) {
        throw new Error("Missing the required parameter 'appId' when calling createAddress");
      }
      // verify the required parameter 'coin' is set
      if (coin === undefined || coin === null) {
        throw new Error("Missing the required parameter 'coin' when calling createAddress");
      }

      let pathParams = {
        'appId': appId,
        'coin': coin
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['bearerAuth'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = Address;
      return this.apiClient.callApi(
        '/app/{appId}/{coin}/address', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * Create new address
     * Create new receive address for yor wallet. 
     * @param {String} appId The application identidier
     * @param {String} coin The wallet identidier
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Address}
     */
    createAddress(appId, coin) {
      return this.createAddressWithHttpInfo(appId, coin)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * Create invoice
     * Create new invoice. In response you get url of invoice page 
     * @param {String} appId The application identidier
     * @param {module:model/AppInvoice} appInvoice 
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AppInvoiceCreated} and HTTP response
     */
    createInvoiceWithHttpInfo(appId, appInvoice) {
      let postBody = appInvoice;
      // verify the required parameter 'appId' is set
      if (appId === undefined || appId === null) {
        throw new Error("Missing the required parameter 'appId' when calling createInvoice");
      }
      // verify the required parameter 'appInvoice' is set
      if (appInvoice === undefined || appInvoice === null) {
        throw new Error("Missing the required parameter 'appInvoice' when calling createInvoice");
      }

      let pathParams = {
        'appId': appId
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['bearerAuth'];
      let contentTypes = ['application/json'];
      let accepts = ['application/json'];
      let returnType = AppInvoiceCreated;
      return this.apiClient.callApi(
        '/app/{appId}/invoice', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * Create invoice
     * Create new invoice. In response you get url of invoice page 
     * @param {String} appId The application identidier
     * @param {module:model/AppInvoice} appInvoice 
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AppInvoiceCreated}
     */
    createInvoice(appId, appInvoice) {
      return this.createInvoiceWithHttpInfo(appId, appInvoice)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * Create wallet invoice
     * Create new invoice for specific wallet. In response you get url of invoice page. 
     * @param {String} appId The application identidier
     * @param {String} coin The wallet identidier
     * @param {module:model/WalletInvoice} walletInvoice 
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WalletInvoiceCreated} and HTTP response
     */
    createWalletInvoiceWithHttpInfo(appId, coin, walletInvoice) {
      let postBody = walletInvoice;
      // verify the required parameter 'appId' is set
      if (appId === undefined || appId === null) {
        throw new Error("Missing the required parameter 'appId' when calling createWalletInvoice");
      }
      // verify the required parameter 'coin' is set
      if (coin === undefined || coin === null) {
        throw new Error("Missing the required parameter 'coin' when calling createWalletInvoice");
      }
      // verify the required parameter 'walletInvoice' is set
      if (walletInvoice === undefined || walletInvoice === null) {
        throw new Error("Missing the required parameter 'walletInvoice' when calling createWalletInvoice");
      }

      let pathParams = {
        'appId': appId,
        'coin': coin
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['bearerAuth'];
      let contentTypes = ['application/json'];
      let accepts = ['application/json'];
      let returnType = WalletInvoiceCreated;
      return this.apiClient.callApi(
        '/app/{appId}/{coin}/invoice', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * Create wallet invoice
     * Create new invoice for specific wallet. In response you get url of invoice page. 
     * @param {String} appId The application identidier
     * @param {String} coin The wallet identidier
     * @param {module:model/WalletInvoice} walletInvoice 
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WalletInvoiceCreated}
     */
    createWalletInvoice(appId, coin, walletInvoice) {
      return this.createWalletInvoiceWithHttpInfo(appId, coin, walletInvoice)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * Retrieve wallet balance
     * Retrieve wallet confirmed and total balance  
     * @param {String} appId The application identidier
     * @param {String} coin The wallet identidier
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/WalletBalance} and HTTP response
     */
    getBalanceWithHttpInfo(appId, coin) {
      let postBody = null;
      // verify the required parameter 'appId' is set
      if (appId === undefined || appId === null) {
        throw new Error("Missing the required parameter 'appId' when calling getBalance");
      }
      // verify the required parameter 'coin' is set
      if (coin === undefined || coin === null) {
        throw new Error("Missing the required parameter 'coin' when calling getBalance");
      }

      let pathParams = {
        'appId': appId,
        'coin': coin
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['bearerAuth'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = WalletBalance;
      return this.apiClient.callApi(
        '/app/{appId}/{coin}/balance', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * Retrieve wallet balance
     * Retrieve wallet confirmed and total balance  
     * @param {String} appId The application identidier
     * @param {String} coin The wallet identidier
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/WalletBalance}
     */
    getBalance(appId, coin) {
      return this.getBalanceWithHttpInfo(appId, coin)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * Retreive invoice info
     * Retrieve invoice with specified identifier string 
     * @param {String} appId The application identidier
     * @param {String} invoiceId Invoice ID
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InvoiceStatus} and HTTP response
     */
    getInvoiceWithHttpInfo(appId, invoiceId) {
      let postBody = null;
      // verify the required parameter 'appId' is set
      if (appId === undefined || appId === null) {
        throw new Error("Missing the required parameter 'appId' when calling getInvoice");
      }
      // verify the required parameter 'invoiceId' is set
      if (invoiceId === undefined || invoiceId === null) {
        throw new Error("Missing the required parameter 'invoiceId' when calling getInvoice");
      }

      let pathParams = {
        'appId': appId,
        'invoiceId': invoiceId
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['bearerAuth'];
      let contentTypes = [];
      let accepts = ['application/json'];
      let returnType = InvoiceStatus;
      return this.apiClient.callApi(
        '/app/{appId}/invoice/{invoiceId}', 'GET',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * Retreive invoice info
     * Retrieve invoice with specified identifier string 
     * @param {String} appId The application identidier
     * @param {String} invoiceId Invoice ID
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InvoiceStatus}
     */
    getInvoice(appId, invoiceId) {
      return this.getInvoiceWithHttpInfo(appId, invoiceId)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * Send one payment
     * Send one payments from wallet to one recipient 
     * @param {String} appId The application identidier
     * @param {String} coin The wallet identidier
     * @param {module:model/Payment} payment 
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Transaction} and HTTP response
     */
    sendOnePaymentWithHttpInfo(appId, coin, payment) {
      let postBody = payment;
      // verify the required parameter 'appId' is set
      if (appId === undefined || appId === null) {
        throw new Error("Missing the required parameter 'appId' when calling sendOnePayment");
      }
      // verify the required parameter 'coin' is set
      if (coin === undefined || coin === null) {
        throw new Error("Missing the required parameter 'coin' when calling sendOnePayment");
      }
      // verify the required parameter 'payment' is set
      if (payment === undefined || payment === null) {
        throw new Error("Missing the required parameter 'payment' when calling sendOnePayment");
      }

      let pathParams = {
        'appId': appId,
        'coin': coin
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['bearerAuth'];
      let contentTypes = ['application/json'];
      let accepts = ['application/json'];
      let returnType = Transaction;
      return this.apiClient.callApi(
        '/app/{appId}/{coin}/send', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * Send one payment
     * Send one payments from wallet to one recipient 
     * @param {String} appId The application identidier
     * @param {String} coin The wallet identidier
     * @param {module:model/Payment} payment 
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Transaction}
     */
    sendOnePayment(appId, coin, payment) {
      return this.sendOnePaymentWithHttpInfo(appId, coin, payment)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


    /**
     * Send payments
     * Send payments from wallet to one or many recipents 
     * @param {String} appId The application identidier
     * @param {String} coin The wallet identidier
     * @param {module:model/Payments} payments 
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Transaction} and HTTP response
     */
    sendPaymentsWithHttpInfo(appId, coin, payments) {
      let postBody = payments;
      // verify the required parameter 'appId' is set
      if (appId === undefined || appId === null) {
        throw new Error("Missing the required parameter 'appId' when calling sendPayments");
      }
      // verify the required parameter 'coin' is set
      if (coin === undefined || coin === null) {
        throw new Error("Missing the required parameter 'coin' when calling sendPayments");
      }
      // verify the required parameter 'payments' is set
      if (payments === undefined || payments === null) {
        throw new Error("Missing the required parameter 'payments' when calling sendPayments");
      }

      let pathParams = {
        'appId': appId,
        'coin': coin
      };
      let queryParams = {
      };
      let headerParams = {
      };
      let formParams = {
      };

      let authNames = ['bearerAuth'];
      let contentTypes = ['application/json'];
      let accepts = ['application/json'];
      let returnType = Transaction;
      return this.apiClient.callApi(
        '/app/{appId}/{coin}/multi_send', 'POST',
        pathParams, queryParams, headerParams, formParams, postBody,
        authNames, contentTypes, accepts, returnType, null
      );
    }

    /**
     * Send payments
     * Send payments from wallet to one or many recipents 
     * @param {String} appId The application identidier
     * @param {String} coin The wallet identidier
     * @param {module:model/Payments} payments 
     * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Transaction}
     */
    sendPayments(appId, coin, payments) {
      return this.sendPaymentsWithHttpInfo(appId, coin, payments)
        .then(function(response_and_data) {
          return response_and_data.data;
        });
    }


}
<file_sep>/docs/Payments.md
# biwse.Payments

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**payments** | [**[Payment]**](Payment.md) | Payments array | [optional] 


<file_sep>/docs/Payment.md
# biwse.Payment

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**address** | **String** | Recipient address | 
**amount** | **Number** | Amount to send. | 


<file_sep>/docs/WalletBalance.md
# biwse.WalletBalance

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**total** | **Number** | Total wallet balance. | [optional] 
**confirmed** | **Number** | Fund in wallet available to withdrawal. | [optional] 


<file_sep>/README.md
# Biwse Node.js Library

This API client generated from OpenAPI specification.

## Installation

```shell
npm install --save biwse
```


## Example


```javascript
const biwse = require('biwse');

const defaultClient = biwse.ApiClient.instance;
// Configure Bearer access token for authorization: bearerAuth
const bearerAuth = defaultClient.authentications['bearerAuth'];
bearerAuth.accessToken = "YOUR ACCESS TOKEN"

const api = new biwse.AppApi()
const appId = "YOUR APP ID"; // {String} The application identidier
const coin = "btc"; // {String} The wallet identidier
api.createAddress(appId, coin).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});


```

## Documentation for API Endpoints

All URIs are relative to *https://api.biwse.com/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*biwse.AppApi* | [**createAddress**](docs/AppApi.md#createAddress) | **POST** /app/{appId}/{coin}/address | Create new address
*biwse.AppApi* | [**createInvoice**](docs/AppApi.md#createInvoice) | **POST** /app/{appId}/invoice | Create invoice
*biwse.AppApi* | [**createWalletInvoice**](docs/AppApi.md#createWalletInvoice) | **POST** /app/{appId}/{coin}/invoice | Create wallet invoice
*biwse.AppApi* | [**getBalance**](docs/AppApi.md#getBalance) | **GET** /app/{appId}/{coin}/balance | Retrieve wallet balance
*biwse.AppApi* | [**getInvoice**](docs/AppApi.md#getInvoice) | **GET** /app/{appId}/invoice/{invoiceId} | Retreive invoice info
*biwse.AppApi* | [**sendOnePayment**](docs/AppApi.md#sendOnePayment) | **POST** /app/{appId}/{coin}/send | Send one payment
*biwse.AppApi* | [**sendPayments**](docs/AppApi.md#sendPayments) | **POST** /app/{appId}/{coin}/multi_send | Send payments




<file_sep>/docs/WalletInvoice.md
# biwse.WalletInvoice

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**amount** | **Number** | Invoice&#39;s amount | 
**callbackLink** | **String** | Callback url | [optional] 
**successUrl** | **String** | Redirect user after payment | [optional] 


