Skip to content

Latest commit

 

History

History
319 lines (226 loc) · 10.4 KB

EmployeeentitlementApi.md

File metadata and controls

319 lines (226 loc) · 10.4 KB

Tripletex\EmployeeentitlementApi

All URIs are relative to https://tripletex.no/v2

Method HTTP request Description
client GET /employee/entitlement/client [BETA] Find all entitlements at client for user.
get GET /employee/entitlement/{id} Get entitlement by ID.
grantClientEntitlementsByTemplate PUT /employee/entitlement/:grantClientEntitlementsByTemplate [BETA] Update employee entitlements in client account.
grantEntitlementsByTemplate PUT /employee/entitlement/:grantEntitlementsByTemplate [BETA] Update employee entitlements.
search GET /employee/entitlement Find all entitlements for user.

client

\Tripletex\Model\ListResponseEntitlement client($employee_id, $customer_id, $from, $count, $sorting, $fields)

[BETA] Find all entitlements at client for user.

Example

<?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\EmployeeentitlementApi(
    // 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.
$customer_id = 56; // int | Client 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->client($employee_id, $customer_id, $from, $count, $sorting, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling EmployeeentitlementApi->client: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
employee_id int Employee ID. Defaults to ID of token owner. [optional]
customer_id int Client 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]

Return type

\Tripletex\Model\ListResponseEntitlement

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]

get

\Tripletex\Model\ResponseWrapperEntitlement get($id, $fields)

Get entitlement by ID.

Example

<?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\EmployeeentitlementApi(
    // 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 EmployeeentitlementApi->get: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Tripletex\Model\ResponseWrapperEntitlement

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]

grantClientEntitlementsByTemplate

grantClientEntitlementsByTemplate($employee_id, $customer_id, $template, $add_to_existing)

[BETA] Update employee entitlements in client account.

Example

<?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\EmployeeentitlementApi(
    // 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
$customer_id = 56; // int | Client ID
$template = "template_example"; // string | Template
$add_to_existing = false; // bool | Add template to existing entitlements

try {
    $apiInstance->grantClientEntitlementsByTemplate($employee_id, $customer_id, $template, $add_to_existing);
} catch (Exception $e) {
    echo 'Exception when calling EmployeeentitlementApi->grantClientEntitlementsByTemplate: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
employee_id int Employee ID
customer_id int Client ID
template string Template
add_to_existing bool Add template to existing entitlements [optional] [default to false]

Return type

void (empty response body)

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]

grantEntitlementsByTemplate

grantEntitlementsByTemplate($employee_id, $template)

[BETA] Update employee entitlements.

The user will only receive the entitlements which are possible with the registered user type

Example

<?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\EmployeeentitlementApi(
    // 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
$template = "template_example"; // string | Template

try {
    $apiInstance->grantEntitlementsByTemplate($employee_id, $template);
} catch (Exception $e) {
    echo 'Exception when calling EmployeeentitlementApi->grantEntitlementsByTemplate: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
employee_id int Employee ID
template string Template

Return type

void (empty response body)

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]

search

\Tripletex\Model\ListResponseEntitlement search($employee_id, $from, $count, $sorting, $fields)

Find all entitlements for user.

Example

<?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\EmployeeentitlementApi(
    // 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.
$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 EmployeeentitlementApi->search: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
employee_id int Employee ID. Defaults to ID of token owner. [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

\Tripletex\Model\ListResponseEntitlement

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]