Skip to content

Latest commit

 

History

History
172 lines (124 loc) · 5.41 KB

File metadata and controls

172 lines (124 loc) · 5.41 KB

Tripletex\SalarytransactionApi

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

Method HTTP request Description
delete DELETE /salary/transaction/{id} [BETA] Delete salary transaction by ID.
get GET /salary/transaction/{id} [BETA] Find salary transaction by ID.
post POST /salary/transaction [BETA] Create a new salary transaction.

delete

delete($id)

[BETA] Delete salary transaction 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\SalarytransactionApi(
    // 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 SalarytransactionApi->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\ResponseWrapperSalaryTransaction get($id, $fields)

[BETA] Find salary transaction 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\SalarytransactionApi(
    // 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 SalarytransactionApi->get: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

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

Return type

\Tripletex\Model\ResponseWrapperSalaryTransaction

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\ResponseWrapperSalaryTransaction post($body, $generate_tax_deduction)

[BETA] Create a new salary transaction.

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\SalarytransactionApi(
    // 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\SalaryTransaction(); // \Tripletex\Model\SalaryTransaction | JSON representing the new object to be created. Should not have ID and version set.
$generate_tax_deduction = true; // bool | Generate tax deduction

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

Parameters

Name Type Description Notes
body \Tripletex\Model\SalaryTransaction JSON representing the new object to be created. Should not have ID and version set. [optional]
generate_tax_deduction bool Generate tax deduction [optional]

Return type

\Tripletex\Model\ResponseWrapperSalaryTransaction

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]