Skip to content

Latest commit

 

History

History
282 lines (188 loc) · 8.24 KB

InvoiceAccrualsResourceApi.md

File metadata and controls

282 lines (188 loc) · 8.24 KB

FortnoxApi\InvoiceAccrualsResourceApi

All URIs are relative to http://localhost, except if the operation defines another base path.

Method HTTP request Description
createInvoiceAccrualsResource() POST /3/invoiceaccruals/ Create an invoice accrual
getInvoiceAccrualsResource() GET /3/invoiceaccruals/{InvoiceNumber} Retrieve a single invoice accrual
listInvoiceAccrualsResource() GET /3/invoiceaccruals/ Retrieve a list of invoice accruals
removeInvoiceAccrualsResource() DELETE /3/invoiceaccruals/{InvoiceNumber} Remove an invoice accrual
updateInvoiceAccrualsResource() PUT /3/invoiceaccruals/{InvoiceNumber} Update an invoice accrual

createInvoiceAccrualsResource()

createInvoiceAccrualsResource($invoice_accrual): \FortnoxApi\Model\InvoiceAccrualWrap

Create an invoice accrual

Example

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



$apiInstance = new FortnoxApi\Api\InvoiceAccrualsResourceApi(
    // 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()
);
$invoice_accrual = new \FortnoxApi\Model\InvoiceAccrualWrap(); // \FortnoxApi\Model\InvoiceAccrualWrap | invoice accrual to create

try {
    $result = $apiInstance->createInvoiceAccrualsResource($invoice_accrual);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InvoiceAccrualsResourceApi->createInvoiceAccrualsResource: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
invoice_accrual \FortnoxApi\Model\InvoiceAccrualWrap invoice accrual to create [optional]

Return type

\FortnoxApi\Model\InvoiceAccrualWrap

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

getInvoiceAccrualsResource()

getInvoiceAccrualsResource($invoice_number): \FortnoxApi\Model\InvoiceAccrualWrap

Retrieve a single invoice accrual

Example

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



$apiInstance = new FortnoxApi\Api\InvoiceAccrualsResourceApi(
    // 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()
);
$invoice_number = 56; // int | identifies the invoice accrual

try {
    $result = $apiInstance->getInvoiceAccrualsResource($invoice_number);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InvoiceAccrualsResourceApi->getInvoiceAccrualsResource: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
invoice_number int identifies the invoice accrual

Return type

\FortnoxApi\Model\InvoiceAccrualWrap

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

listInvoiceAccrualsResource()

listInvoiceAccrualsResource(): \FortnoxApi\Model\InvoiceAccrualListItemList

Retrieve a list of invoice accruals

The invoice accruals register can return a list of records or a single record. By specifying a InvoiceNumber in the URL, a single record will be returned. Not specifying a InvoiceNumber will return a list of records.

Example

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



$apiInstance = new FortnoxApi\Api\InvoiceAccrualsResourceApi(
    // 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()
);

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

Parameters

This endpoint does not need any parameter.

Return type

\FortnoxApi\Model\InvoiceAccrualListItemList

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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

removeInvoiceAccrualsResource()

removeInvoiceAccrualsResource($invoice_number)

Remove an invoice accrual

Example

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



$apiInstance = new FortnoxApi\Api\InvoiceAccrualsResourceApi(
    // 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()
);
$invoice_number = 56; // int | identifies the invoice accrual

try {
    $apiInstance->removeInvoiceAccrualsResource($invoice_number);
} catch (Exception $e) {
    echo 'Exception when calling InvoiceAccrualsResourceApi->removeInvoiceAccrualsResource: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
invoice_number int identifies the invoice accrual

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

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

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

updateInvoiceAccrualsResource()

updateInvoiceAccrualsResource($invoice_number, $invoice_accrual): \FortnoxApi\Model\InvoiceAccrualWrap

Update an invoice accrual

Example

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



$apiInstance = new FortnoxApi\Api\InvoiceAccrualsResourceApi(
    // 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()
);
$invoice_number = 56; // int | identifies the invoice accrual
$invoice_accrual = new \FortnoxApi\Model\InvoiceAccrualWrap(); // \FortnoxApi\Model\InvoiceAccrualWrap | invoice accrual to update

try {
    $result = $apiInstance->updateInvoiceAccrualsResource($invoice_number, $invoice_accrual);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InvoiceAccrualsResourceApi->updateInvoiceAccrualsResource: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
invoice_number int identifies the invoice accrual
invoice_accrual \FortnoxApi\Model\InvoiceAccrualWrap invoice accrual to update [optional]

Return type

\FortnoxApi\Model\InvoiceAccrualWrap

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

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