Skip to content

Latest commit

 

History

History
294 lines (216 loc) · 9.13 KB

File metadata and controls

294 lines (216 loc) · 9.13 KB

Tripletex\InventoryApi

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

Method HTTP request Description
delete DELETE /inventory/{id} [BETA] Delete inventory.
get GET /inventory/{id} Get inventory by ID.
post POST /inventory [BETA] Create new inventory.
put PUT /inventory/{id} [BETA] Update inventory.
search GET /inventory Find inventory corresponding with sent data.

delete

delete($id)

[BETA] Delete inventory.

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\InventoryApi(
    // 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

try {
    $apiInstance->delete($id);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->delete: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id int Element ID

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]

get

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

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

Parameters

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

Return type

\Tripletex\Model\ResponseWrapperInventory

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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

post

\Tripletex\Model\ResponseWrapperInventory post($body)

[BETA] Create new inventory.

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

Parameters

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

Return type

\Tripletex\Model\ResponseWrapperInventory

Authorization

tokenAuthScheme

HTTP request headers

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

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

put

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

[BETA] Update inventory.

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

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

Parameters

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

Return type

\Tripletex\Model\ResponseWrapperInventory

Authorization

tokenAuthScheme

HTTP request headers

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

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

search

\Tripletex\Model\ListResponseInventory search($id, $name, $is_main_inventory, $is_inactive, $from, $count, $sorting, $fields)

Find inventory 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\InventoryApi(
    // 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
$is_main_inventory = true; // bool | Equals
$is_inactive = true; // bool | Equals
$from = 56; // int | From index
$count = 56; // 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, $is_main_inventory, $is_inactive, $from, $count, $sorting, $fields);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InventoryApi->search: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
id string List of IDs [optional]
name string Containing [optional]
is_main_inventory bool Equals [optional]
is_inactive bool Equals [optional]
from int From index [optional]
count int Number of elements to return [optional]
sorting string Sorting pattern [optional]
fields string Fields filter pattern [optional]

Return type

\Tripletex\Model\ListResponseInventory

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: Not defined
  • Accept: /

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