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

121 lines
3.4 KiB
Markdown
Raw Permalink Normal View History

2022-09-05 00:01:32 +00:00
# SfGate.CompanyProductsApi
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getCompanyProducts**](CompanyProductsApi.md#getCompanyProducts) | **GET** /companyproducts | Get a list of companyproducts
[**postCompanyProducts**](CompanyProductsApi.md#postCompanyProducts) | **POST** /companyproducts | Add a new companyproduct to Taxnexus
## getCompanyProducts
> CompanyProductResponse getCompanyProducts(opts)
Get a list of companyproducts
Return a list of all available CompanyProducts
### 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.CompanyProductsApi();
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?
'companyProductId': "companyProductId_example" // String | Taxnexus CompanyProduct record ID
};
apiInstance.getCompanyProducts(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]
**companyProductId** | **String**| Taxnexus CompanyProduct record ID | [optional]
### Return type
[**CompanyProductResponse**](CompanyProductResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
## postCompanyProducts
> CompanyProductResponse postCompanyProducts(contactRequest)
Add a new companyproduct 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.CompanyProductsApi();
let contactRequest = new SfGate.CompanyProductRequest(); // CompanyProductRequest | An array of new Contact records
apiInstance.postCompanyProducts(contactRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**contactRequest** | [**CompanyProductRequest**](CompanyProductRequest.md)| An array of new Contact records |
### Return type
[**CompanyProductResponse**](CompanyProductResponse.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json