# Fortnox\FortnoxAssetTypesApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**assetsControllerDoTypesDeleteWithId()**](FortnoxAssetTypesApi.md#assetsControllerDoTypesDeleteWithId) | **DELETE** /3/assets/types/{id} | Delete an asset type |
| [**assetsControllerDoTypesGet()**](FortnoxAssetTypesApi.md#assetsControllerDoTypesGet) | **GET** /3/assets/types | Retrieve a list of asset types |
| [**assetsControllerDoTypesGetWithId()**](FortnoxAssetTypesApi.md#assetsControllerDoTypesGetWithId) | **GET** /3/assets/types/{id} | Retrieve an asset type |
| [**assetsControllerDoTypesPost()**](FortnoxAssetTypesApi.md#assetsControllerDoTypesPost) | **POST** /3/assets/types | Create an asset type |
| [**assetsControllerDoTypesPutWithId()**](FortnoxAssetTypesApi.md#assetsControllerDoTypesPutWithId) | **PUT** /3/assets/types/{id} | Update an asset type |


## `assetsControllerDoTypesDeleteWithId()`

```php
assetsControllerDoTypesDeleteWithId($id)
```

Delete an asset type

Delete an asset

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetTypesApi(
    // 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()
);
$id = 56; // int | id

try {
    $apiInstance->assetsControllerDoTypesDeleteWithId($id);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAssetTypesApi->assetsControllerDoTypesDeleteWithId: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| id | |

### 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)

## `assetsControllerDoTypesGet()`

```php
assetsControllerDoTypesGet(): \Fortnox\Model\FortnoxAnlAssetTypesListResponseWrap
```

Retrieve a list of asset types

Get assets

### Example

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



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

### Parameters

This endpoint does not need any parameter.

### Return type

[**\Fortnox\Model\FortnoxAnlAssetTypesListResponseWrap**](../Model/FortnoxAnlAssetTypesListResponseWrap.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)

## `assetsControllerDoTypesGetWithId()`

```php
assetsControllerDoTypesGetWithId($id): \Fortnox\Model\FortnoxAnlAssetTypesSingleResponseWrap
```

Retrieve an asset type

Retrieve an asset

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetTypesApi(
    // 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()
);
$id = 56; // int | id

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| id | |

### Return type

[**\Fortnox\Model\FortnoxAnlAssetTypesSingleResponseWrap**](../Model/FortnoxAnlAssetTypesSingleResponseWrap.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)

## `assetsControllerDoTypesPost()`

```php
assetsControllerDoTypesPost($create_asset_request): \Fortnox\Model\FortnoxAnlAssetTypesSingleResponseWrap
```

Create an asset type

Update an asset

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetTypesApi(
    // 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()
);
$create_asset_request = new \Fortnox\Model\FortnoxAnlCreateAssetTypeWrap(); // \Fortnox\Model\FortnoxAnlCreateAssetTypeWrap | Request body for update asset

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **create_asset_request** | [**\Fortnox\Model\FortnoxAnlCreateAssetTypeWrap**](../Model/FortnoxAnlCreateAssetTypeWrap.md)| Request body for update asset | [optional] |

### Return type

[**\Fortnox\Model\FortnoxAnlAssetTypesSingleResponseWrap**](../Model/FortnoxAnlAssetTypesSingleResponseWrap.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)

## `assetsControllerDoTypesPutWithId()`

```php
assetsControllerDoTypesPutWithId($id, $update_asset_request): \Fortnox\Model\FortnoxAnlAssetTypesSingleResponseWrap
```

Update an asset type

Update an asset

### Example

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



$apiInstance = new Fortnox\Api\FortnoxAssetTypesApi(
    // 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()
);
$id = 56; // int | id
$update_asset_request = new \Fortnox\Model\FortnoxAnlUpdateAssetTypeWrap(); // \Fortnox\Model\FortnoxAnlUpdateAssetTypeWrap | Request body for update asset

try {
    $result = $apiInstance->assetsControllerDoTypesPutWithId($id, $update_asset_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxAssetTypesApi->assetsControllerDoTypesPutWithId: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| id | |
| **update_asset_request** | [**\Fortnox\Model\FortnoxAnlUpdateAssetTypeWrap**](../Model/FortnoxAnlUpdateAssetTypeWrap.md)| Request body for update asset | [optional] |

### Return type

[**\Fortnox\Model\FortnoxAnlAssetTypesSingleResponseWrap**](../Model/FortnoxAnlAssetTypesSingleResponseWrap.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)
