# ps.module.CompanyApi

All URIs are relative to */*

Method | HTTP request | Description
------------- | ------------- | -------------
[**apiVersionCompanyGet**](CompanyApi.md#apiVersionCompanyGet) | **GET** /api/{version}/company | List all company
[**apiVersionCompanyIdBusinesshourPut**](CompanyApi.md#apiVersionCompanyIdBusinesshourPut) | **PUT** /api/{version}/company/{id}/businesshour | Update company business hour
[**apiVersionCompanyIdCallhandlingPut**](CompanyApi.md#apiVersionCompanyIdCallhandlingPut) | **PUT** /api/{version}/company/{id}/callhandling | Update company call handling
[**apiVersionCompanyIdDelete**](CompanyApi.md#apiVersionCompanyIdDelete) | **DELETE** /api/{version}/company/{id} | Delete company
[**apiVersionCompanyIdGet**](CompanyApi.md#apiVersionCompanyIdGet) | **GET** /api/{version}/company/{id} | Retrieves a company
[**apiVersionCompanyIdPut**](CompanyApi.md#apiVersionCompanyIdPut) | **PUT** /api/{version}/company/{id} | Update a company
[**apiVersionCompanyPost**](CompanyApi.md#apiVersionCompanyPost) | **POST** /api/{version}/company | Create a company

<a name="apiVersionCompanyGet"></a>
# **apiVersionCompanyGet**
> apiVersionCompanyGet(version, opts)

List all company

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CompanyApi();
let version = "version_example"; // String | 
let opts = { 
  'tenantId': "tenantId_example", // String | 
  'sMSHandlingActionType': new ps.module.PhoneSpeakEntitiesEnumsSMSHandling(), // PhoneSpeakEntitiesEnumsSMSHandling | 
  'sMSHandlingActionValue': "sMSHandlingActionValue_example", // String | 
  'sortBy': "sortBy_example", // String | 
  'direction': new ps.module.PhoneSpeakEntitiesEnumsListDirection(), // PhoneSpeakEntitiesEnumsListDirection | 
  'search': "search_example", // String | 
  'pageNum': 56, // Number | 
  'limit': 56, // Number | 
  'skipPagination': true // Boolean | 
};
apiInstance.apiVersionCompanyGet(version, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **tenantId** | **String**|  | [optional] 
 **sMSHandlingActionType** | [**PhoneSpeakEntitiesEnumsSMSHandling**](.md)|  | [optional] 
 **sMSHandlingActionValue** | **String**|  | [optional] 
 **sortBy** | **String**|  | [optional] 
 **direction** | [**PhoneSpeakEntitiesEnumsListDirection**](.md)|  | [optional] 
 **search** | **String**|  | [optional] 
 **pageNum** | **Number**|  | [optional] 
 **limit** | **Number**|  | [optional] 
 **skipPagination** | **Boolean**|  | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionCompanyIdBusinesshourPut"></a>
# **apiVersionCompanyIdBusinesshourPut**
> apiVersionCompanyIdBusinesshourPut(idversion)

Update company business hour

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CompanyApi();
let id = "id_example"; // String | The unique id of the company
let version = "version_example"; // String | 

apiInstance.apiVersionCompanyIdBusinesshourPut(idversion, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The unique id of the company | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreCompaniesUpdateCompanyBusinessHourQuery**](PhoneSpeakServiceCoreCompaniesUpdateCompanyBusinessHourQuery.md)| Update company object | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

<a name="apiVersionCompanyIdCallhandlingPut"></a>
# **apiVersionCompanyIdCallhandlingPut**
> apiVersionCompanyIdCallhandlingPut(idversion)

Update company call handling

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CompanyApi();
let id = "id_example"; // String | The unique id of the company
let version = "version_example"; // String | 

apiInstance.apiVersionCompanyIdCallhandlingPut(idversion, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The unique id of the company | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreCompaniesUpdateCompanyCallHandlingQuery**](PhoneSpeakServiceCoreCompaniesUpdateCompanyCallHandlingQuery.md)| Update company object | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

<a name="apiVersionCompanyIdDelete"></a>
# **apiVersionCompanyIdDelete**
> apiVersionCompanyIdDelete(id, version)

Delete company

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CompanyApi();
let id = "id_example"; // String | The unique id of the company
let version = "version_example"; // String | 

apiInstance.apiVersionCompanyIdDelete(id, version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The unique id of the company | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionCompanyIdGet"></a>
# **apiVersionCompanyIdGet**
> apiVersionCompanyIdGet(id, version)

Retrieves a company

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CompanyApi();
let id = "id_example"; // String | The unique id of the company
let version = "version_example"; // String | 

apiInstance.apiVersionCompanyIdGet(id, version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The unique id of the company | 
 **version** | **String**|  | 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: Not defined

<a name="apiVersionCompanyIdPut"></a>
# **apiVersionCompanyIdPut**
> apiVersionCompanyIdPut(idversion)

Update a company

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CompanyApi();
let id = "id_example"; // String | The unique id of the company
let version = "version_example"; // String | 

apiInstance.apiVersionCompanyIdPut(idversion, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **id** | **String**| The unique id of the company | 
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreCompaniesUpdateCompanyQuery**](PhoneSpeakServiceCoreCompaniesUpdateCompanyQuery.md)| Update company object | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json
 - **Accept**: Not defined

<a name="apiVersionCompanyPost"></a>
# **apiVersionCompanyPost**
> apiVersionCompanyPost(version)

Create a company

### Example
```javascript
import ps.module from 'phonespeakv2_api';
let defaultClient = ps.module.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2
let oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new ps.module.CompanyApi();
let version = "version_example"; // String | 

apiInstance.apiVersionCompanyPost(version, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **version** | **String**|  | 
 **body** | [**PhoneSpeakServiceCoreCompaniesCreateCompanyQuery**](PhoneSpeakServiceCoreCompaniesCreateCompanyQuery.md)| Create company object | [optional] 

### Return type

null (empty response body)

### Authorization

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

### HTTP request headers

 - **Content-Type**: audio/x-wav, text/plain, application/octet-stream, application/json-patch+json, application/json, text/json, application/_*+json, application/xml, text/xml, application/_*+xml
 - **Accept**: Not defined

