lib/client/sf-gate/docs/IndustriesApi.md

121 lines
3.3 KiB
Markdown
Raw Normal View History

2022-09-05 00:01:32 +00:00
# SfGate.IndustriesApi
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getIndustries**](IndustriesApi.md#getIndustries) | **GET** /industries | Get a list of industries
[**postIndustries**](IndustriesApi.md#postIndustries) | **POST** /industries | Add a new industry to Taxnexus
## getIndustries
> IndustryResponse getIndustries(opts)
Get a list of industries
Return a list of all available Industries
### Example
```javascript
import SfGate from 'sf_gate';
let defaultClient = SfGate.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new SfGate.IndustriesApi();
let opts = {
'limit': 789, // Number | How many objects to return at one time
'offset': 789, // Number | How many objects to skip?
'active': true, // Boolean | Only retrieve active records?
'industryId': "industryId_example" // String | Taxnexus Industry record ID
};
apiInstance.getIndustries(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | **Number**| How many objects to return at one time | [optional]
**offset** | **Number**| How many objects to skip? | [optional]
**active** | **Boolean**| Only retrieve active records? | [optional]
**industryId** | **String**| Taxnexus Industry record ID | [optional]
### Return type
[**IndustryResponse**](IndustryResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## postIndustries
> IndustryResponse postIndustries(industryRequest)
Add a new industry to Taxnexus
Industry record to be added
### Example
```javascript
import SfGate from 'sf_gate';
let defaultClient = SfGate.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
let apiInstance = new SfGate.IndustriesApi();
let industryRequest = new SfGate.IndustryRequest(); // IndustryRequest | An array of new Industry records
apiInstance.postIndustries(industryRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**industryRequest** | [**IndustryRequest**](IndustryRequest.md)| An array of new Industry records |
### Return type
[**IndustryResponse**](IndustryResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json