Skip to content

Latest commit

 

History

History
254 lines (178 loc) · 8.07 KB

ProjectcategoryApi.md

File metadata and controls

254 lines (178 loc) · 8.07 KB

Tripletex\ProjectcategoryApi

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

Method HTTP request Description
get GET /project/category/{id} Find project category by ID.
post POST /project/category Add new project category.
put PUT /project/category/{id} Update project category.
search GET /project/category Find project categories corresponding with sent data.

get

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

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

Parameters

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

Return type

\Tripletex\Model\ResponseWrapperProjectCategory

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]

post

\Tripletex\Model\ResponseWrapperProjectCategory post($body)

Add new project category.

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\ProjectcategoryApi(
    // 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\ProjectCategory(); // \Tripletex\Model\ProjectCategory | 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 ProjectcategoryApi->post: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Tripletex\Model\ResponseWrapperProjectCategory

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]

put

\Tripletex\Model\ResponseWrapperProjectCategory put($id, $body)

Update project category.

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\ProjectcategoryApi(
    // 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\ProjectCategory(); // \Tripletex\Model\ProjectCategory | Partial object describing what should be updated

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

Parameters

Name Type Description Notes
id int Element ID
body \Tripletex\Model\ProjectCategory Partial object describing what should be updated [optional]

Return type

\Tripletex\Model\ResponseWrapperProjectCategory

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]

search

\Tripletex\Model\ListResponseProjectCategory search($id, $name, $number, $description, $from, $count, $sorting, $fields)

Find project categories corresponding with sent data.

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\ProjectcategoryApi(
    // 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
$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, $name, $number, $description, $from, $count, $sorting, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ProjectcategoryApi->search: ', $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]
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\ListResponseProjectCategory

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]