# NodeSwaggerApi.DocumentChargeApi

All URIs are relative to *https://api.supremepay.lk:3011/api/admin*

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteDocumentCharge**](DocumentChargeApi.md#deleteDocumentCharge) | **DELETE** /loans/documents/charges/{id} | 
[**getDocumentChargeDetails**](DocumentChargeApi.md#getDocumentChargeDetails) | **GET** /loans/documents/charge | 
[**getDocumentChargeDetailsById**](DocumentChargeApi.md#getDocumentChargeDetailsById) | **GET** /loans/documents/charges/{id} | 
[**saveDocumentCharge**](DocumentChargeApi.md#saveDocumentCharge) | **POST** /loans/documents/charges | 
[**updateDocumentCharge**](DocumentChargeApi.md#updateDocumentCharge) | **PUT** /loans/documents/charges | 


<a name="deleteDocumentCharge"></a>
# **deleteDocumentCharge**
> deleteDocumentCharge(id)



Deletes a document charge

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

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

var apiInstance = new NodeSwaggerApi.DocumentChargeApi();

var id = "id_example"; // String | if you want delete specific document charge you want to give document charge id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.deleteDocumentCharge(id, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want delete specific document charge you want to give document charge id | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

<a name="getDocumentChargeDetails"></a>
# **getDocumentChargeDetails**
> DocumentCharge getDocumentChargeDetails()



Returns document charge details

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

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

var apiInstance = new NodeSwaggerApi.DocumentChargeApi();

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

### Parameters
This endpoint does not need any parameter.

### Return type

[**DocumentCharge**](DocumentCharge.md)

### Authorization

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

### HTTP request headers

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

<a name="getDocumentChargeDetailsById"></a>
# **getDocumentChargeDetailsById**
> DocumentCharge getDocumentChargeDetailsById(id)



Returns document charge details according to the id

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

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

var apiInstance = new NodeSwaggerApi.DocumentChargeApi();

var id = "id_example"; // String | if you want specific document charge you want to give documentcharge id


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| if you want specific document charge you want to give documentcharge id | 

### Return type

[**DocumentCharge**](DocumentCharge.md)

### Authorization

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

### HTTP request headers

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

<a name="saveDocumentCharge"></a>
# **saveDocumentCharge**
> DocumentCharge saveDocumentCharge(documentChargeDetails)



Save document charge

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

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

var apiInstance = new NodeSwaggerApi.DocumentChargeApi();

var documentChargeDetails = new NodeSwaggerApi.DocumentCharge(); // DocumentCharge | document charge details


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **documentChargeDetails** | [**DocumentCharge**](DocumentCharge.md)| document charge details | 

### Return type

[**DocumentCharge**](DocumentCharge.md)

### Authorization

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

### HTTP request headers

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

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



Updates a single document charge

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

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

var apiInstance = new NodeSwaggerApi.DocumentChargeApi();

var opts = { 
  'body': new NodeSwaggerApi.DocumentCharge() // DocumentCharge | Updated document charge object
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**DocumentCharge**](DocumentCharge.md)| Updated document charge object | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

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

