mirror of https://github.com/vernonkeenan/lib
231 lines
6.2 KiB
Markdown
231 lines
6.2 KiB
Markdown
|
# SfGate.AccountsApi
|
||
|
|
||
|
All URIs are relative to *http://sf-gate.vernonkeenan.com:8080/v1*
|
||
|
|
||
|
Method | HTTP request | Description
|
||
|
------------- | ------------- | -------------
|
||
|
[**deleteAccount**](AccountsApi.md#deleteAccount) | **DELETE** /accounts | Delete An Account
|
||
|
[**getAccounts**](AccountsApi.md#getAccounts) | **GET** /accounts | Get a list of accounts
|
||
|
[**postAccounts**](AccountsApi.md#postAccounts) | **POST** /accounts | Add a new account to Taxnexus
|
||
|
[**putAccount**](AccountsApi.md#putAccount) | **PUT** /accounts | Update a single account
|
||
|
|
||
|
|
||
|
|
||
|
## deleteAccount
|
||
|
|
||
|
> DeleteResponse deleteAccount(opts)
|
||
|
|
||
|
Delete An Account
|
||
|
|
||
|
Delete Taxnexus Account record
|
||
|
|
||
|
### 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.AccountsApi();
|
||
|
let opts = {
|
||
|
'accountId': "accountId_example" // String | Taxnexus Record Id of an Account
|
||
|
};
|
||
|
apiInstance.deleteAccount(opts, (error, data, response) => {
|
||
|
if (error) {
|
||
|
console.error(error);
|
||
|
} else {
|
||
|
console.log('API called successfully. Returned data: ' + data);
|
||
|
}
|
||
|
});
|
||
|
```
|
||
|
|
||
|
### Parameters
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**accountId** | **String**| Taxnexus Record Id of an Account | [optional]
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**DeleteResponse**](DeleteResponse.md)
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: Not defined
|
||
|
- **Accept**: application/json
|
||
|
|
||
|
|
||
|
## getAccounts
|
||
|
|
||
|
> AccountResponse getAccounts(opts)
|
||
|
|
||
|
Get a list of accounts
|
||
|
|
||
|
Return a list of all available Accounts
|
||
|
|
||
|
### 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.AccountsApi();
|
||
|
let opts = {
|
||
|
'limit': 789, // Number | How many objects to return at one time
|
||
|
'name': "name_example", // String | The Name of this Object
|
||
|
'offset': 789, // Number | How many objects to skip?
|
||
|
'active': true, // Boolean | Only retrieve active records?
|
||
|
'accountId': "accountId_example", // String | Taxnexus Record Id of an Account
|
||
|
'email': "email_example" // String | Email address used for identity lookup
|
||
|
};
|
||
|
apiInstance.getAccounts(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]
|
||
|
**name** | **String**| The Name of this Object | [optional]
|
||
|
**offset** | **Number**| How many objects to skip? | [optional]
|
||
|
**active** | **Boolean**| Only retrieve active records? | [optional]
|
||
|
**accountId** | **String**| Taxnexus Record Id of an Account | [optional]
|
||
|
**email** | **String**| Email address used for identity lookup | [optional]
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**AccountResponse**](AccountResponse.md)
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: Not defined
|
||
|
- **Accept**: application/json
|
||
|
|
||
|
|
||
|
## postAccounts
|
||
|
|
||
|
> AccountResponse postAccounts(accountRequest)
|
||
|
|
||
|
Add a new account to Taxnexus
|
||
|
|
||
|
Account 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.AccountsApi();
|
||
|
let accountRequest = new SfGate.AccountRequest(); // AccountRequest | A request with an array of Account Objects
|
||
|
apiInstance.postAccounts(accountRequest, (error, data, response) => {
|
||
|
if (error) {
|
||
|
console.error(error);
|
||
|
} else {
|
||
|
console.log('API called successfully. Returned data: ' + data);
|
||
|
}
|
||
|
});
|
||
|
```
|
||
|
|
||
|
### Parameters
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**accountRequest** | [**AccountRequest**](AccountRequest.md)| A request with an array of Account Objects |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**AccountResponse**](AccountResponse.md)
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: application/json
|
||
|
- **Accept**: application/json
|
||
|
|
||
|
|
||
|
## putAccount
|
||
|
|
||
|
> AccountResponse putAccount(accountRequest)
|
||
|
|
||
|
Update a single account
|
||
|
|
||
|
Update a single account specified by accountId
|
||
|
|
||
|
### 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.AccountsApi();
|
||
|
let accountRequest = new SfGate.AccountRequest(); // AccountRequest | A request with an array of Account Objects
|
||
|
apiInstance.putAccount(accountRequest, (error, data, response) => {
|
||
|
if (error) {
|
||
|
console.error(error);
|
||
|
} else {
|
||
|
console.log('API called successfully. Returned data: ' + data);
|
||
|
}
|
||
|
});
|
||
|
```
|
||
|
|
||
|
### Parameters
|
||
|
|
||
|
|
||
|
Name | Type | Description | Notes
|
||
|
------------- | ------------- | ------------- | -------------
|
||
|
**accountRequest** | [**AccountRequest**](AccountRequest.md)| A request with an array of Account Objects |
|
||
|
|
||
|
### Return type
|
||
|
|
||
|
[**AccountResponse**](AccountResponse.md)
|
||
|
|
||
|
### Authorization
|
||
|
|
||
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
||
|
|
||
|
### HTTP request headers
|
||
|
|
||
|
- **Content-Type**: application/json
|
||
|
- **Accept**: application/json
|
||
|
|