# NodeSwaggerApi.VersionApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**checkVersion**](VersionApi.md#checkVersion) | **POST** /version/check | 
[**createVersion**](VersionApi.md#createVersion) | **POST** /version | 
[**deleteVersion**](VersionApi.md#deleteVersion) | **DELETE** /version/{id} | 
[**getVersions**](VersionApi.md#getVersions) | **GET** /version | 


<a name="checkVersion"></a>
# **checkVersion**
> VersionCheck checkVersion(details)



check mobile version

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');

var apiInstance = new NodeSwaggerApi.VersionApi();

var details = new NodeSwaggerApi.Version(); // Version | version check details


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **details** | [**Version**](Version.md)| version check details | 

### Return type

[**VersionCheck**](VersionCheck.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="createVersion"></a>
# **createVersion**
> Version createVersion(createVersion)



Create version

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');

var apiInstance = new NodeSwaggerApi.VersionApi();

var createVersion = new NodeSwaggerApi.Version(); // Version | version create details


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **createVersion** | [**Version**](Version.md)| version create details | 

### Return type

[**Version**](Version.md)

### Authorization

No authorization required

### HTTP request headers

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

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



Deletes a version

### 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.VersionApi();

var id = "id_example"; // String | version id


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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| version id | 

### Return type

[**CommonSuccess**](CommonSuccess.md)

### Authorization

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

### HTTP request headers

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

<a name="getVersions"></a>
# **getVersions**
> [Version] getVersions(opts)



Returns version 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.VersionApi();

var opts = { 
  'version': "version_example", // String | if you want spesific version you want to give version name
  'type': "type_example" // String | if you want spesific version you want to give version type
};

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

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**| if you want spesific version you want to give version name | [optional] 
 **type** | **String**| if you want spesific version you want to give version type | [optional] 

### Return type

[**[Version]**](Version.md)

### Authorization

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

### HTTP request headers

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

