Skip to content

Latest commit

 

History

History
331 lines (237 loc) · 11.4 KB

File metadata and controls

331 lines (237 loc) · 11.4 KB

Swagger\Client\ActivityApi

All URIs are relative to https://api.tripletex.io/v2

Method HTTP request Description
activityForTimeSheetGetForTimeSheet GET /activity/>forTimeSheet Find applicable time sheet activities for an employee on a specific day.
activityGet GET /activity/{id} Find activity by ID.
activityListPostList POST /activity/list Add multiple activities.
activityPost POST /activity Add activity.
activitySearch GET /activity Find activities corresponding with sent data.

activityForTimeSheetGetForTimeSheet

\Swagger\Client\Model\ListResponseActivity activityForTimeSheetGetForTimeSheet($project_id, $employee_id, $date, $from, $count, $sorting, $fields)

Find applicable time sheet activities for an employee on a specific day.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: tokenAuthScheme
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\ActivityApi(
    // 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
);
$project_id = 56; // int | Project ID
$employee_id = 56; // int | Employee ID. Defaults to ID of token owner.
$date = "date_example"; // string | yyyy-MM-dd. Defaults to today.
$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->activityForTimeSheetGetForTimeSheet($project_id, $employee_id, $date, $from, $count, $sorting, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ActivityApi->activityForTimeSheetGetForTimeSheet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
project_id int Project ID
employee_id int Employee ID. Defaults to ID of token owner. [optional]
date string yyyy-MM-dd. Defaults to today. [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]

Return type

\Swagger\Client\Model\ListResponseActivity

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

activityGet

\Swagger\Client\Model\ResponseWrapperActivity activityGet($id, $fields)

Find activity by ID.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: tokenAuthScheme
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\ActivityApi(
    // 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->activityGet($id, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ActivityApi->activityGet: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int Element ID
fields string Fields filter pattern [optional]

Return type

\Swagger\Client\Model\ResponseWrapperActivity

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

activityListPostList

\Swagger\Client\Model\ListResponseActivity activityListPostList($body)

Add multiple activities.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: tokenAuthScheme
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\ActivityApi(
    // 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 \Swagger\Client\Model\Activity()); // \Swagger\Client\Model\Activity[] | JSON representing a list of new objects to be created. Should not have ID and version set.

try {
    $result = $apiInstance->activityListPostList($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ActivityApi->activityListPostList: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Swagger\Client\Model\Activity[] JSON representing a list of new objects to be created. Should not have ID and version set. [optional]

Return type

\Swagger\Client\Model\ListResponseActivity

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

activityPost

\Swagger\Client\Model\ResponseWrapperActivity activityPost($body)

Add activity.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: tokenAuthScheme
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\ActivityApi(
    // 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 \Swagger\Client\Model\Activity(); // \Swagger\Client\Model\Activity | JSON representing the new object to be created. Should not have ID and version set.

try {
    $result = $apiInstance->activityPost($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ActivityApi->activityPost: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
body \Swagger\Client\Model\Activity JSON representing the new object to be created. Should not have ID and version set. [optional]

Return type

\Swagger\Client\Model\ResponseWrapperActivity

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

activitySearch

\Swagger\Client\Model\ListResponseActivity activitySearch($id, $name, $number, $description, $is_project_activity, $is_general, $is_chargeable, $is_task, $is_inactive, $from, $count, $sorting, $fields)

Find activities corresponding with sent data.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure HTTP basic authorization: tokenAuthScheme
$config = Swagger\Client\Configuration::getDefaultConfiguration()
              ->setUsername('YOUR_USERNAME')
              ->setPassword('YOUR_PASSWORD');


$apiInstance = new Swagger\Client\Api\ActivityApi(
    // 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
$name = "name_example"; // string | Containing
$number = "number_example"; // string | Equals
$description = "description_example"; // string | Containing
$is_project_activity = true; // bool | Equals
$is_general = true; // bool | Equals
$is_chargeable = true; // bool | Equals
$is_task = true; // bool | Equals
$is_inactive = 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->activitySearch($id, $name, $number, $description, $is_project_activity, $is_general, $is_chargeable, $is_task, $is_inactive, $from, $count, $sorting, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ActivityApi->activitySearch: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string List of IDs [optional]
name string Containing [optional]
number string Equals [optional]
description string Containing [optional]
is_project_activity bool Equals [optional]
is_general bool Equals [optional]
is_chargeable bool Equals [optional]
is_task bool Equals [optional]
is_inactive 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]

Return type

\Swagger\Client\Model\ListResponseActivity

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]