# Fortnox\FortnoxTermsOfPaymentsApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**termsOfPaymentControllerDoCreate()**](FortnoxTermsOfPaymentsApi.md#termsOfPaymentControllerDoCreate) | **POST** /3/termsofpayments | Create a term of payment |
| [**termsOfPaymentControllerDoDelete()**](FortnoxTermsOfPaymentsApi.md#termsOfPaymentControllerDoDelete) | **DELETE** /3/termsofpayments/{Code} | Remove a term of payment |
| [**termsOfPaymentControllerDoIndex()**](FortnoxTermsOfPaymentsApi.md#termsOfPaymentControllerDoIndex) | **GET** /3/termsofpayments | Retrieve a list of all terms of payments |
| [**termsOfPaymentControllerDoShow()**](FortnoxTermsOfPaymentsApi.md#termsOfPaymentControllerDoShow) | **GET** /3/termsofpayments/{Code} | Retrieve a single terms of payment |
| [**termsOfPaymentControllerDoUpdate()**](FortnoxTermsOfPaymentsApi.md#termsOfPaymentControllerDoUpdate) | **PUT** /3/termsofpayments/{Code} | Update a term of payment |


## `termsOfPaymentControllerDoCreate()`

```php
termsOfPaymentControllerDoCreate($terms_of_payment): \Fortnox\Model\FortnoxTermsOfPaymentSingleItemWrap
```

Create a term of payment

Create a terms of payment

### Example

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



$apiInstance = new Fortnox\Api\FortnoxTermsOfPaymentsApi(
    // 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()
);
$terms_of_payment = new \Fortnox\Model\FortnoxTermsOfPaymentSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxTermsOfPaymentSinglePayloadItemWrap | Request body for create terms of payment

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **terms_of_payment** | [**\Fortnox\Model\FortnoxTermsOfPaymentSinglePayloadItemWrap**](../Model/FortnoxTermsOfPaymentSinglePayloadItemWrap.md)| Request body for create terms of payment | [optional] |

### Return type

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

## `termsOfPaymentControllerDoDelete()`

```php
termsOfPaymentControllerDoDelete($code)
```

Remove a term of payment

Delete a terms of payment

### Example

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



$apiInstance = new Fortnox\Api\FortnoxTermsOfPaymentsApi(
    // 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()
);
$code = 'code_example'; // string | identifies the terms of payment

try {
    $apiInstance->termsOfPaymentControllerDoDelete($code);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxTermsOfPaymentsApi->termsOfPaymentControllerDoDelete: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| identifies the terms of payment | |

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

## `termsOfPaymentControllerDoIndex()`

```php
termsOfPaymentControllerDoIndex(): \Fortnox\Model\FortnoxTermsOfPaymentListItemWrap
```

Retrieve a list of all terms of payments

Get terms of payments

### Example

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



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

### Parameters

This endpoint does not need any parameter.

### Return type

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

## `termsOfPaymentControllerDoShow()`

```php
termsOfPaymentControllerDoShow($code): \Fortnox\Model\FortnoxTermsOfPaymentSingleItemWrap
```

Retrieve a single terms of payment

Retrieve a terms of payment

### Example

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



$apiInstance = new Fortnox\Api\FortnoxTermsOfPaymentsApi(
    // 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()
);
$code = 'code_example'; // string | identifies the terms of payment

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| identifies the terms of payment | |

### Return type

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

## `termsOfPaymentControllerDoUpdate()`

```php
termsOfPaymentControllerDoUpdate($code, $term_of_payment): \Fortnox\Model\FortnoxTermsOfPaymentSingleItemWrap
```

Update a term of payment

Update a terms of payment

### Example

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



$apiInstance = new Fortnox\Api\FortnoxTermsOfPaymentsApi(
    // 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()
);
$code = 'code_example'; // string | identifies the term of payment
$term_of_payment = new \Fortnox\Model\FortnoxTermsOfPaymentSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxTermsOfPaymentSinglePayloadItemWrap | Request body for update terms of payment

try {
    $result = $apiInstance->termsOfPaymentControllerDoUpdate($code, $term_of_payment);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling FortnoxTermsOfPaymentsApi->termsOfPaymentControllerDoUpdate: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| identifies the term of payment | |
| **term_of_payment** | [**\Fortnox\Model\FortnoxTermsOfPaymentSinglePayloadItemWrap**](../Model/FortnoxTermsOfPaymentSinglePayloadItemWrap.md)| Request body for update terms of payment | [optional] |

### Return type

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