# Fortnox\FortnoxInvoiceAccrualsApi



All URIs are relative to https://api.fortnox.se, except if the operation defines another base path.

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**invoiceAccrualControllerDoCreate()**](FortnoxInvoiceAccrualsApi.md#invoiceAccrualControllerDoCreate) | **POST** /3/invoiceaccruals | Create an invoice accrual |
| [**invoiceAccrualControllerDoDelete()**](FortnoxInvoiceAccrualsApi.md#invoiceAccrualControllerDoDelete) | **DELETE** /3/invoiceaccruals/{InvoiceNumber} | Remove an invoice accrual |
| [**invoiceAccrualControllerDoIndex()**](FortnoxInvoiceAccrualsApi.md#invoiceAccrualControllerDoIndex) | **GET** /3/invoiceaccruals | Retrieve a list of invoice accruals |
| [**invoiceAccrualControllerDoShow()**](FortnoxInvoiceAccrualsApi.md#invoiceAccrualControllerDoShow) | **GET** /3/invoiceaccruals/{InvoiceNumber} | Retrieve a single invoice accrual |
| [**invoiceAccrualControllerDoUpdate()**](FortnoxInvoiceAccrualsApi.md#invoiceAccrualControllerDoUpdate) | **PUT** /3/invoiceaccruals/{InvoiceNumber} | Update an invoice accrual |


## `invoiceAccrualControllerDoCreate()`

```php
invoiceAccrualControllerDoCreate($invoice_accrual): \Fortnox\Model\FortnoxKfInvoiceAccrualSingleItemWrap
```

Create an invoice accrual

Create an invoice accrual

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoiceAccrualsApi(
    // 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 \Fortnox\Model\FortnoxKfInvoiceAccrualSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxKfInvoiceAccrualSinglePayloadItemWrap | Request body for create invoice accrual

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **invoice_accrual** | [**\Fortnox\Model\FortnoxKfInvoiceAccrualSinglePayloadItemWrap**](../Model/FortnoxKfInvoiceAccrualSinglePayloadItemWrap.md)| Request body for create invoice accrual | [optional] |

### Return type

[**\Fortnox\Model\FortnoxKfInvoiceAccrualSingleItemWrap**](../Model/FortnoxKfInvoiceAccrualSingleItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `invoiceAccrualControllerDoDelete()`

```php
invoiceAccrualControllerDoDelete($invoice_number)
```

Remove an invoice accrual

Delete an invoice accrual

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoiceAccrualsApi(
    // 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 = 'invoice_number_example'; // string | Invoice number of invoice accrual to delete

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **invoice_number** | **string**| Invoice number of invoice accrual to delete | |

### Return type

void (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `invoiceAccrualControllerDoIndex()`

```php
invoiceAccrualControllerDoIndex(): \Fortnox\Model\FortnoxKfInvoiceAccrualListItemWrap
```

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
<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new Fortnox\Api\FortnoxInvoiceAccrualsApi(
    // 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->invoiceAccrualControllerDoIndex();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxInvoiceAccrualsApi->invoiceAccrualControllerDoIndex: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

This endpoint does not need any parameter.

### Return type

[**\Fortnox\Model\FortnoxKfInvoiceAccrualListItemWrap**](../Model/FortnoxKfInvoiceAccrualListItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `invoiceAccrualControllerDoShow()`

```php
invoiceAccrualControllerDoShow($invoice_number): \Fortnox\Model\FortnoxKfInvoiceAccrualSingleItemWrap
```

Retrieve a single invoice accrual

Retrieve an invoice accrual

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoiceAccrualsApi(
    // 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 = 'invoice_number_example'; // string | Invoice number of invoice accrual to show

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **invoice_number** | **string**| Invoice number of invoice accrual to show | |

### Return type

[**\Fortnox\Model\FortnoxKfInvoiceAccrualSingleItemWrap**](../Model/FortnoxKfInvoiceAccrualSingleItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `invoiceAccrualControllerDoUpdate()`

```php
invoiceAccrualControllerDoUpdate($invoice_number, $invoice_accrual): \Fortnox\Model\FortnoxKfInvoiceAccrualSingleItemWrap
```

Update an invoice accrual

Update an invoice accrual

### Example

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



$apiInstance = new Fortnox\Api\FortnoxInvoiceAccrualsApi(
    // 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 = 'invoice_number_example'; // string | Invoice number of invoice accrual to update
$invoice_accrual = new \Fortnox\Model\FortnoxKfInvoiceAccrualSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxKfInvoiceAccrualSinglePayloadItemWrap | Request body for update invoice accrual

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **invoice_number** | **string**| Invoice number of invoice accrual to update | |
| **invoice_accrual** | [**\Fortnox\Model\FortnoxKfInvoiceAccrualSinglePayloadItemWrap**](../Model/FortnoxKfInvoiceAccrualSinglePayloadItemWrap.md)| Request body for update invoice accrual | [optional] |

### Return type

[**\Fortnox\Model\FortnoxKfInvoiceAccrualSingleItemWrap**](../Model/FortnoxKfInvoiceAccrualSingleItemWrap.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
