All URIs are relative to https://tripletex.no/v2
Method | HTTP request | Description |
---|---|---|
get | GET /employee/employment/{id} | Find employment by ID. |
post | POST /employee/employment | [BETA] Create employment. |
put | PUT /employee/employment/{id} | [BETA] Update employemnt. |
search | GET /employee/employment | Find all employments for employee. |
\Tripletex\Model\ResponseWrapperEmployment get($id, $fields)
Find employment by ID.
<?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\EmployeeemploymentApi(
// 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
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->get($id, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmployeeemploymentApi->get: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | Element ID | |
fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ResponseWrapperEmployment
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperEmployment post($body)
[BETA] Create employment.
<?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\EmployeeemploymentApi(
// 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\Employment(); // \Tripletex\Model\Employment | 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 EmployeeemploymentApi->post: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Tripletex\Model\Employment | JSON representing the new object to be created. Should not have ID and version set. | [optional] |
\Tripletex\Model\ResponseWrapperEmployment
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperEmployment put($id, $body)
[BETA] Update employemnt.
<?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\EmployeeemploymentApi(
// 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\Employment(); // \Tripletex\Model\Employment | Partial object describing what should be updated
try {
$result = $apiInstance->put($id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmployeeemploymentApi->put: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | Element ID | |
body | \Tripletex\Model\Employment | Partial object describing what should be updated | [optional] |
\Tripletex\Model\ResponseWrapperEmployment
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ListResponseEmployment search($employee_id, $from, $count, $sorting, $fields)
Find all employments for employee.
<?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\EmployeeemploymentApi(
// 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
);
$employee_id = 56; // int | Element ID
$from = 0; // int | From index
$count = 1000; // int | Number of elements to return
$sorting = "sorting_example"; // string | Sorting pattern
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->search($employee_id, $from, $count, $sorting, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmployeeemploymentApi->search: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
employee_id | int | Element ID | [optional] |
from | int | From index | [optional] [default to 0] |
count | int | Number of elements to return | [optional] [default to 1000] |
sorting | string | Sorting pattern | [optional] |
fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ListResponseEmployment
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]