All URIs are relative to https://tripletex.no/v2
| Method | HTTP request | Description |
|---|---|---|
| post | POST /division | [BETA] Create division. |
| postList | POST /division/list | [BETA] Create divisions. |
| put | PUT /division/{id} | [BETA] Update division information. |
| putList | PUT /division/list | [BETA] Update multiple divisions. |
| search | GET /division | [BETA] Get divisions. |
\Tripletex\Model\ResponseWrapperDivision post($body)
[BETA] Create division.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\DivisionApi(
// 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
);
$body = new \Tripletex\Model\Division(); // \Tripletex\Model\Division | JSON representing the new object to be created. Should not have ID and version set.
try {
$result = $apiInstance->post($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DivisionApi->post: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \Tripletex\Model\Division | JSON representing the new object to be created. Should not have ID and version set. | [optional] |
\Tripletex\Model\ResponseWrapperDivision
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseDivision postList($body)
[BETA] Create divisions.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\DivisionApi(
// 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
);
$body = array(new \Tripletex\Model\Division()); // \Tripletex\Model\Division[] | JSON representing a list of new object to be created. Should not have ID and version set.
try {
$result = $apiInstance->postList($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DivisionApi->postList: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \Tripletex\Model\Division[] | JSON representing a list of new object to be created. Should not have ID and version set. | [optional] |
\Tripletex\Model\ListResponseDivision
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperDivision put($id, $body)
[BETA] Update division information.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\DivisionApi(
// 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 = 56; // int | Element ID
$body = new \Tripletex\Model\Division(); // \Tripletex\Model\Division | Partial object describing what should be updated
try {
$result = $apiInstance->put($id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DivisionApi->put: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| id | int | Element ID | |
| body | \Tripletex\Model\Division | Partial object describing what should be updated | [optional] |
\Tripletex\Model\ResponseWrapperDivision
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseDivision putList($body)
[BETA] Update multiple divisions.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\DivisionApi(
// 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
);
$body = array(new \Tripletex\Model\Division()); // \Tripletex\Model\Division[] | JSON representing updates to object. Should have ID and version set.
try {
$result = $apiInstance->putList($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DivisionApi->putList: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| body | \Tripletex\Model\Division[] | JSON representing updates to object. Should have ID and version set. | [optional] |
\Tripletex\Model\ListResponseDivision
- Content-Type: application/json; charset=utf-8
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseDivision search($from, $count, $sorting, $fields)
[BETA] Get divisions.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: tokenAuthScheme
$config = Tripletex\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Tripletex\Api\DivisionApi(
// 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
);
$from = 56; // int | From index
$count = 56; // int | Number of elements to return
$sorting = "sorting_example"; // string | Sorting pattern
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->search($from, $count, $sorting, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DivisionApi->search: ', $e->getMessage(), PHP_EOL;
}
?>| Name | Type | Description | Notes |
|---|---|---|---|
| from | int | From index | [optional] |
| count | int | Number of elements to return | [optional] |
| sorting | string | Sorting pattern | [optional] |
| fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ListResponseDivision
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]