mirror of https://github.com/vernonkeenan/lib
165 lines
4.0 KiB
Markdown
165 lines
4.0 KiB
Markdown
# SfGate.TenantsApi
|
|
|
|
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**getTenants**](TenantsApi.md#getTenants) | **GET** /tenants | Get a list Tenants
|
|
[**putTenants**](TenantsApi.md#putTenants) | **PUT** /tenants | Update Tenants
|
|
[**tenants**](TenantsApi.md#tenants) | **POST** /tenants | Create new Tenants
|
|
|
|
|
|
|
|
## getTenants
|
|
|
|
> TenantResponse getTenants(opts)
|
|
|
|
Get a list Tenants
|
|
|
|
Return a list of Tenant records from the datastore
|
|
|
|
### 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.TenantsApi();
|
|
let opts = {
|
|
'tenantId': "tenantId_example", // String | Taxnexus Record Id of a Tenant
|
|
'limit': 789, // Number | How many objects to return at one time
|
|
'offset': 789 // Number | How many objects to skip?
|
|
};
|
|
apiInstance.getTenants(opts, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**tenantId** | **String**| Taxnexus Record Id of a Tenant | [optional]
|
|
**limit** | **Number**| How many objects to return at one time | [optional]
|
|
**offset** | **Number**| How many objects to skip? | [optional]
|
|
|
|
### Return type
|
|
|
|
[**TenantResponse**](TenantResponse.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
|
|
## putTenants
|
|
|
|
> TenantResponse putTenants(cTenantRequest)
|
|
|
|
Update Tenants
|
|
|
|
Update Tenant in Taxnexus
|
|
|
|
### 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.TenantsApi();
|
|
let cTenantRequest = new SfGate.TenantRequest(); // TenantRequest | An array of Tenant records
|
|
apiInstance.putTenants(cTenantRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**cTenantRequest** | [**TenantRequest**](TenantRequest.md)| An array of Tenant records |
|
|
|
|
### Return type
|
|
|
|
[**TenantResponse**](TenantResponse.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
|
|
## tenants
|
|
|
|
> TenantResponse tenants(cTenantRequest)
|
|
|
|
Create new Tenants
|
|
|
|
Create Tenants in Taxnexus
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import SfGate from 'sf_gate';
|
|
|
|
let apiInstance = new SfGate.TenantsApi();
|
|
let cTenantRequest = new SfGate.TenantRequest(); // TenantRequest | An array of Tenant records
|
|
apiInstance.tenants(cTenantRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**cTenantRequest** | [**TenantRequest**](TenantRequest.md)| An array of Tenant records |
|
|
|
|
### Return type
|
|
|
|
[**TenantResponse**](TenantResponse.md)
|
|
|
|
### Authorization
|
|
|
|
No authorization required
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|