# Serverproto.ApiApi

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**addCustomer**](ApiApi.md#addCustomer) | **POST** /v1/admin/customer | 
[**addInventory**](ApiApi.md#addInventory) | **POST** /v1/admin/inventory | 
[**addProduct**](ApiApi.md#addProduct) | **POST** /v1/admin/product | 
[**addUser**](ApiApi.md#addUser) | **POST** /v1/admin/user | 
[**adminLogin**](ApiApi.md#adminLogin) | **POST** /v1/login_admin | 
[**customerAnalytics**](ApiApi.md#customerAnalytics) | **POST** /v1/secure/analytics | 
[**customerAnalyticsRevenue**](ApiApi.md#customerAnalyticsRevenue) | **POST** /v1/secure/analytics/revenue | 
[**customers**](ApiApi.md#customers) | **POST** /v1/admin/customers | 
[**disableCustomer**](ApiApi.md#disableCustomer) | **POST** /v1/admin/customer/disable/{id} | 
[**disableInsurance**](ApiApi.md#disableInsurance) | **POST** /v1/secure/insurance/off | 
[**enableCustomer**](ApiApi.md#enableCustomer) | **POST** /v1/admin/customer/enable/{id} | 
[**enableInsurance**](ApiApi.md#enableInsurance) | **POST** /v1/secure/insurance/on | 
[**getUser**](ApiApi.md#getUser) | **POST** /v1/admin/user/{id} | 
[**insurances**](ApiApi.md#insurances) | **POST** /v1/secure/insurances | 
[**inventory**](ApiApi.md#inventory) | **POST** /v1/secure/inventory | 
[**inventoryPAR**](ApiApi.md#inventoryPAR) | **POST** /v1/secure/inventory/par | 
[**login**](ApiApi.md#login) | **POST** /v1/login | 
[**products**](ApiApi.md#products) | **POST** /v1/secure/products | 
[**registerSale**](ApiApi.md#registerSale) | **POST** /v1/secure/sale | 
[**removeCustomer**](ApiApi.md#removeCustomer) | **DELETE** /v1/admin/customer/{id} | 
[**removeProduct**](ApiApi.md#removeProduct) | **DELETE** /v1/admin/product/{id} | 
[**removeUser**](ApiApi.md#removeUser) | **DELETE** /v1/admin/user/{id} | 
[**updateCustomer**](ApiApi.md#updateCustomer) | **PATCH** /v1/admin/customer | 
[**updateProduct**](ApiApi.md#updateProduct) | **PATCH** /v1/admin/product | 
[**updateUser**](ApiApi.md#updateUser) | **PATCH** /v1/admin/user | 
[**users**](ApiApi.md#users) | **POST** /v1/admin/users | 


<a name="addCustomer"></a>
# **addCustomer**
> Status addCustomer(body)



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var body = new Serverproto.Customer(); // Customer | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Customer**](Customer.md)|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="addInventory"></a>
# **addInventory**
> Status addInventory(body)



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var body = new Serverproto.AddInventoryRQ(); // AddInventoryRQ | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**AddInventoryRQ**](AddInventoryRQ.md)|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="addProduct"></a>
# **addProduct**
> Status addProduct(body)



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var body = new Serverproto.Product(); // Product | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Product**](Product.md)|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="addUser"></a>
# **addUser**
> Status addUser(body)



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var body = new Serverproto.User(); // User | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**User**](User.md)|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="adminLogin"></a>
# **adminLogin**
> LoginRS adminLogin()



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

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

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

### Return type

[**LoginRS**](LoginRS.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="customerAnalytics"></a>
# **customerAnalytics**
> CustomerAnalytic customerAnalytics()



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

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

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

### Return type

[**CustomerAnalytic**](CustomerAnalytic.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="customerAnalyticsRevenue"></a>
# **customerAnalyticsRevenue**
> RevenueChartRS customerAnalyticsRevenue()



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

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

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

### Return type

[**RevenueChartRS**](RevenueChartRS.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="customers"></a>
# **customers**
> Customer customers(body)



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var body = new Serverproto.PagingRQ(); // PagingRQ | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**PagingRQ**](PagingRQ.md)|  | 

### Return type

[**Customer**](Customer.md)

### Authorization

No authorization required

### HTTP request headers

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

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



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var id = 789; // Number | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="disableInsurance"></a>
# **disableInsurance**
> Status disableInsurance()



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

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

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

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

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



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var id = 789; // Number | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="enableInsurance"></a>
# **enableInsurance**
> Status enableInsurance()



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

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

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

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

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



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var id = 789; // Number | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**|  | 

### Return type

[**User**](User.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="insurances"></a>
# **insurances**
> InsurancesRS insurances()



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

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

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

### Return type

[**InsurancesRS**](InsurancesRS.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="inventory"></a>
# **inventory**
> InventoryRS inventory()



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

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

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

### Return type

[**InventoryRS**](InventoryRS.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="inventoryPAR"></a>
# **inventoryPAR**
> Status inventoryPAR()



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

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

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

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="login"></a>
# **login**
> LoginRS login()



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

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

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

### Return type

[**LoginRS**](LoginRS.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="products"></a>
# **products**
> Product products(body)



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var body = new Serverproto.PagingRQ(); // PagingRQ | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**PagingRQ**](PagingRQ.md)|  | 

### Return type

[**Product**](Product.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="registerSale"></a>
# **registerSale**
> Status registerSale(body)



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var body = new Serverproto.Sale(); // Sale | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Sale**](Sale.md)|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

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



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var id = 789; // Number | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

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



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var id = 789; // Number | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

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



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var id = 789; // Number | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **Number**|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="updateCustomer"></a>
# **updateCustomer**
> Status updateCustomer(body)



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var body = new Serverproto.Customer(); // Customer | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Customer**](Customer.md)|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="updateProduct"></a>
# **updateProduct**
> Status updateProduct(body)



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var body = new Serverproto.Product(); // Product | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**Product**](Product.md)|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="updateUser"></a>
# **updateUser**
> Status updateUser(body)



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var body = new Serverproto.User(); // User | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**User**](User.md)|  | 

### Return type

[**Status**](Status.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="users"></a>
# **users**
> User users(body)



### Example
```javascript
var Serverproto = require('serverproto');

var apiInstance = new Serverproto.ApiApi();

var body = new Serverproto.PagingRQ(); // PagingRQ | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**PagingRQ**](PagingRQ.md)|  | 

### Return type

[**User**](User.md)

### Authorization

No authorization required

### HTTP request headers

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

