All URIs are relative to https://demo.troi.software/api/v2/rest, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
accountsGet() | GET /accounts | Fetch all Accounts for the given clientId |
accountsIdDelete() | DELETE /accounts/{id} | Delete Account |
accountsIdGet() | GET /accounts/{id} | Fetch Account given Account ID |
accountsIdPut() | PUT /accounts/{id} | Update Account |
accountsPost() | POST /accounts | Save Account |
accountsGet($client_id, $account_group_id, $account_is_cash_or_bank): \Troi\Model\ApiAccount[]
Fetch all Accounts for the given clientId
Fetch all Accounts for the given clientId
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Troi\Api\AccountsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$client_id = 1; // int | Fetch all Accounts for the given clientId
$account_group_id = 1; // int | Fetch all Accounts for the given accountGroupId
$account_is_cash_or_bank = true; // bool | Fetch all Accounts for the given account_is_cash_or_bank flag
try {
$result = $apiInstance->accountsGet($client_id, $account_group_id, $account_is_cash_or_bank);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountsApi->accountsGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
client_id | int | Fetch all Accounts for the given clientId | |
account_group_id | int | Fetch all Accounts for the given accountGroupId | [optional] |
account_is_cash_or_bank | bool | Fetch all Accounts for the given account_is_cash_or_bank flag | [optional] |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
accountsIdDelete($id): int
Delete Account
Delete Account
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Troi\Api\AccountsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 1; // int | Account id
try {
$result = $apiInstance->accountsIdDelete($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountsApi->accountsIdDelete: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | Account id |
int
- Content-Type: Not defined
- Accept:
text/html
,application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
accountsIdGet($id): \Troi\Model\ApiAccount
Fetch Account given Account ID
Fetch Account given Account ID
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Troi\Api\AccountsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 1; // int | Account id
try {
$result = $apiInstance->accountsIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountsApi->accountsIdGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | Account id |
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
accountsIdPut($id, $api_account): \Troi\Model\ApiSyncItem[]
Update Account
Update Account
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Troi\Api\AccountsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 1; // int | Account id
$api_account = new \Troi\Model\ApiAccount(); // \Troi\Model\ApiAccount
try {
$result = $apiInstance->accountsIdPut($id, $api_account);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountsApi->accountsIdPut: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | int | Account id | |
api_account | \Troi\Model\ApiAccount |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
accountsPost($accounts_post_request): \Troi\Model\ApiSyncItem[]
Save Account
Save Account
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
$config = Troi\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Troi\Api\AccountsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$accounts_post_request = new \Troi\Model\AccountsPostRequest(); // \Troi\Model\AccountsPostRequest
try {
$result = $apiInstance->accountsPost($accounts_post_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountsApi->accountsPost: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
accounts_post_request | \Troi\Model\AccountsPostRequest |
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]