All URIs are relative to https://tripletex.no/v2
Method | HTTP request | Description |
---|---|---|
get | GET /timesheet/timeClock/{id} | Find time clock entry by ID. |
getPresent | GET /timesheet/timeClock/present | Find a user’s present running time clock. |
put | PUT /timesheet/timeClock/{id} | Update time clock by ID. |
search | GET /timesheet/timeClock | Find time clock entries corresponding with sent data. |
start | PUT /timesheet/timeClock/:start | Start time clock. |
stop | PUT /timesheet/timeClock/{id}/:stop | Stop time clock. |
\Tripletex\Model\ResponseWrapperTimeClock get($id, $fields)
Find time clock entry 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\TimesheettimeClockApi(
// 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 TimesheettimeClockApi->get: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | Element ID | |
fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ResponseWrapperTimeClock
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperTimeClock getPresent($employee_id, $fields)
Find a user’s present running time clock.
<?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\TimesheettimeClockApi(
// 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 | Employee ID. Defaults to ID of token owner.
$fields = "fields_example"; // string | Fields filter pattern
try {
$result = $apiInstance->getPresent($employee_id, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheettimeClockApi->getPresent: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
employee_id | int | Employee ID. Defaults to ID of token owner. | [optional] |
fields | string | Fields filter pattern | [optional] |
\Tripletex\Model\ResponseWrapperTimeClock
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperTimeClock put($id, $body)
Update time clock 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\TimesheettimeClockApi(
// 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\TimeClock(); // \Tripletex\Model\TimeClock | Partial object describing what should be updated
try {
$result = $apiInstance->put($id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheettimeClockApi->put: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | Element ID | |
body | \Tripletex\Model\TimeClock | Partial object describing what should be updated | [optional] |
\Tripletex\Model\ResponseWrapperTimeClock
- 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\ListResponseTimeClock search($id, $employee_id, $project_id, $activity_id, $date_from, $date_to, $hour_id, $is_running, $from, $count, $sorting, $fields)
Find time clock entries corresponding with sent data.
<?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\TimesheettimeClockApi(
// 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 = "id_example"; // string | List of IDs
$employee_id = "employee_id_example"; // string | List of IDs
$project_id = "project_id_example"; // string | List of IDs
$activity_id = "activity_id_example"; // string | List of IDs
$date_from = "date_from_example"; // string | From and including
$date_to = "date_to_example"; // string | To and excluding
$hour_id = "hour_id_example"; // string | List of IDs
$is_running = true; // bool | Equals
$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($id, $employee_id, $project_id, $activity_id, $date_from, $date_to, $hour_id, $is_running, $from, $count, $sorting, $fields);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheettimeClockApi->search: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | string | List of IDs | [optional] |
employee_id | string | List of IDs | [optional] |
project_id | string | List of IDs | [optional] |
activity_id | string | List of IDs | [optional] |
date_from | string | From and including | [optional] |
date_to | string | To and excluding | [optional] |
hour_id | string | List of IDs | [optional] |
is_running | bool | Equals | [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\ListResponseTimeClock
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Tripletex\Model\ResponseWrapperTimeClock start($activity_id, $employee_id, $project_id, $date)
Start time clock.
<?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\TimesheettimeClockApi(
// 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
);
$activity_id = 56; // int | Activity ID
$employee_id = 56; // int | Employee ID. Defaults to ID of token owner.
$project_id = 0; // int | Project ID
$date = "date_example"; // string | Optional. Default is today’s date
try {
$result = $apiInstance->start($activity_id, $employee_id, $project_id, $date);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TimesheettimeClockApi->start: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
activity_id | int | Activity ID | |
employee_id | int | Employee ID. Defaults to ID of token owner. | [optional] |
project_id | int | Project ID | [optional] [default to 0] |
date | string | Optional. Default is today’s date | [optional] |
\Tripletex\Model\ResponseWrapperTimeClock
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
stop($id, $version)
Stop time clock.
<?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\TimesheettimeClockApi(
// 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
$version = 0; // int | Number of current version
try {
$apiInstance->stop($id, $version);
} catch (Exception $e) {
echo 'Exception when calling TimesheettimeClockApi->stop: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | Element ID | |
version | int | Number of current version | [optional] [default to 0] |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]