# EyondCoreApi.StocksApi

All URIs are relative to *https://eyondcoreapi.azurewebsites.net*

Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteStock**](StocksApi.md#deleteStock) | **DELETE** /api/Stocks/delete/client/{clientId}/warehouse/{warhId}/productVariant/{prodVarId} | 
[**getStock**](StocksApi.md#getStock) | **GET** /api/Stocks/{clientId} | 
[**getStock_0**](StocksApi.md#getStock_0) | **GET** /api/Stocks/client/{clientId}/warehouse/{warhId} | 
[**getStock_1**](StocksApi.md#getStock_1) | **GET** /api/Stocks/client/{id}/warehouse/{warhId}/productVariant/{prodVarId} | 
[**postStock**](StocksApi.md#postStock) | **POST** /api/Stocks/add | 
[**putStock**](StocksApi.md#putStock) | **PUT** /api/Stocks/modify/client/{clientId}/warehouse/{warhId}/productVariant/{prodVarId} | 
[**shift**](StocksApi.md#shift) | **PUT** /api/Stocks/shift/client/{clientId}/sourceWarehouse/{sourceWarhId}/destWarehouse/{destWarhId}/quantity/{quantity} | 


<a name="deleteStock"></a>
# **deleteStock**
> Stock deleteStock(clientId, warhId, prodVarId)



### Example
```javascript
var EyondCoreApi = require('eyond_core_api');
var defaultClient = EyondCoreApi.ApiClient.instance;

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

var apiInstance = new EyondCoreApi.StocksApi();

var clientId = 789; // Number | 

var warhId = 789; // Number | 

var prodVarId = 789; // Number | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **clientId** | **Number**|  | 
 **warhId** | **Number**|  | 
 **prodVarId** | **Number**|  | 

### Return type

[**Stock**](Stock.md)

### Authorization

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

### HTTP request headers

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

<a name="getStock"></a>
# **getStock**
> [Stock] getStock(clientId)



### Example
```javascript
var EyondCoreApi = require('eyond_core_api');
var defaultClient = EyondCoreApi.ApiClient.instance;

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

var apiInstance = new EyondCoreApi.StocksApi();

var clientId = 789; // Number | 


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

### Parameters

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

### Return type

[**[Stock]**](Stock.md)

### Authorization

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

### HTTP request headers

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

<a name="getStock_0"></a>
# **getStock_0**
> [Stock] getStock_0(clientId, warhId)



### Example
```javascript
var EyondCoreApi = require('eyond_core_api');
var defaultClient = EyondCoreApi.ApiClient.instance;

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

var apiInstance = new EyondCoreApi.StocksApi();

var clientId = 789; // Number | 

var warhId = 789; // Number | 


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **clientId** | **Number**|  | 
 **warhId** | **Number**|  | 

### Return type

[**[Stock]**](Stock.md)

### Authorization

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

### HTTP request headers

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

<a name="getStock_1"></a>
# **getStock_1**
> Stock getStock_1(warhId, prodVarId, id, opts)



### Example
```javascript
var EyondCoreApi = require('eyond_core_api');
var defaultClient = EyondCoreApi.ApiClient.instance;

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

var apiInstance = new EyondCoreApi.StocksApi();

var warhId = 789; // Number | 

var prodVarId = 789; // Number | 

var id = "id_example"; // String | 

var opts = { 
  'clientId': 789 // Number | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **warhId** | **Number**|  | 
 **prodVarId** | **Number**|  | 
 **id** | **String**|  | 
 **clientId** | **Number**|  | [optional] 

### Return type

[**Stock**](Stock.md)

### Authorization

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

### HTTP request headers

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

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



### Example
```javascript
var EyondCoreApi = require('eyond_core_api');
var defaultClient = EyondCoreApi.ApiClient.instance;

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

var apiInstance = new EyondCoreApi.StocksApi();

var opts = { 
  'stockModel': new EyondCoreApi.Stock() // Stock | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **stockModel** | [**Stock**](Stock.md)|  | [optional] 

### Return type

[**Stock**](Stock.md)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json-patch+json, application/json, text/json, application/_*+json
 - **Accept**: text/plain, application/json, text/json

<a name="putStock"></a>
# **putStock**
> putStock(clientId, warhId, prodVarId, opts)



### Example
```javascript
var EyondCoreApi = require('eyond_core_api');
var defaultClient = EyondCoreApi.ApiClient.instance;

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

var apiInstance = new EyondCoreApi.StocksApi();

var clientId = 789; // Number | 

var warhId = 789; // Number | 

var prodVarId = 789; // Number | 

var opts = { 
  'stockModel': new EyondCoreApi.Stock() // Stock | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **clientId** | **Number**|  | 
 **warhId** | **Number**|  | 
 **prodVarId** | **Number**|  | 
 **stockModel** | [**Stock**](Stock.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json-patch+json, application/json, text/json, application/_*+json
 - **Accept**: Not defined

<a name="shift"></a>
# **shift**
> shift(clientId, sourceWarhId, destWarhId, quantity, opts)



### Example
```javascript
var EyondCoreApi = require('eyond_core_api');
var defaultClient = EyondCoreApi.ApiClient.instance;

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

var apiInstance = new EyondCoreApi.StocksApi();

var clientId = 789; // Number | 

var sourceWarhId = 789; // Number | 

var destWarhId = 789; // Number | 

var quantity = 56; // Number | 

var opts = { 
  'stockModel': new EyondCoreApi.Stock() // Stock | 
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **clientId** | **Number**|  | 
 **sourceWarhId** | **Number**|  | 
 **destWarhId** | **Number**|  | 
 **quantity** | **Number**|  | 
 **stockModel** | [**Stock**](Stock.md)|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: application/json-patch+json, application/json, text/json, application/_*+json
 - **Accept**: Not defined

