# Fortnox\FortnoxModesOfPaymentsApi



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

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**modeOfPaymentControllerDoCreate()**](FortnoxModesOfPaymentsApi.md#modeOfPaymentControllerDoCreate) | **POST** /3/modesofpayments | Create a mode of payment |
| [**modeOfPaymentControllerDoDelete()**](FortnoxModesOfPaymentsApi.md#modeOfPaymentControllerDoDelete) | **DELETE** /3/modesofpayments/{Code} | Remove a mode of payment |
| [**modeOfPaymentControllerDoIndex()**](FortnoxModesOfPaymentsApi.md#modeOfPaymentControllerDoIndex) | **GET** /3/modesofpayments | Retrieve a list of modes of payments |
| [**modeOfPaymentControllerDoShow()**](FortnoxModesOfPaymentsApi.md#modeOfPaymentControllerDoShow) | **GET** /3/modesofpayments/{Code} | Retrieve a single mode of payment |
| [**modeOfPaymentControllerDoUpdate()**](FortnoxModesOfPaymentsApi.md#modeOfPaymentControllerDoUpdate) | **PUT** /3/modesofpayments/{Code} | Update a mode of payment |


## `modeOfPaymentControllerDoCreate()`

```php
modeOfPaymentControllerDoCreate($mode_of_payment): \Fortnox\Model\FortnoxModeOfPaymentSingleItemWrap
```

Create a mode of payment

Create a mode of payment

### Example

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



$apiInstance = new Fortnox\Api\FortnoxModesOfPaymentsApi(
    // 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()
);
$mode_of_payment = new \Fortnox\Model\FortnoxModeOfPaymentSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxModeOfPaymentSinglePayloadItemWrap | Request body for create mode of payment

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

### Parameters

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

### Return type

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

## `modeOfPaymentControllerDoDelete()`

```php
modeOfPaymentControllerDoDelete($code)
```

Remove a mode of payment

Delete a mode of payment

### Example

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



$apiInstance = new Fortnox\Api\FortnoxModesOfPaymentsApi(
    // 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 | Code of mode of payment to delete

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| Code of mode of payment 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)

## `modeOfPaymentControllerDoIndex()`

```php
modeOfPaymentControllerDoIndex(): \Fortnox\Model\FortnoxModeOfPaymentListItemWrap
```

Retrieve a list of modes of payments

The modes of payments register can return a list of records or a single record. By specifying a Code in the URL, a single record will be returned. Not specifying a Code will return a list of records.

### Example

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



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

### Parameters

This endpoint does not need any parameter.

### Return type

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

## `modeOfPaymentControllerDoShow()`

```php
modeOfPaymentControllerDoShow($code): \Fortnox\Model\FortnoxModeOfPaymentSingleItemWrap
```

Retrieve a single mode of payment

Retrieve a mode of payment

### Example

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



$apiInstance = new Fortnox\Api\FortnoxModesOfPaymentsApi(
    // 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 | Code of mode of payment to show

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| Code of mode of payment to show | |

### Return type

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

## `modeOfPaymentControllerDoUpdate()`

```php
modeOfPaymentControllerDoUpdate($code, $unit): \Fortnox\Model\FortnoxModeOfPaymentSingleItemWrap
```

Update a mode of payment

Update a mode of payment

### Example

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



$apiInstance = new Fortnox\Api\FortnoxModesOfPaymentsApi(
    // 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 | Code of mode of payment to update
$unit = new \Fortnox\Model\FortnoxModeOfPaymentSinglePayloadItemWrap(); // \Fortnox\Model\FortnoxModeOfPaymentSinglePayloadItemWrap | Request body for update mode of payment

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

### Parameters

| Name | Type | Description  | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **code** | **string**| Code of mode of payment to update | |
| **unit** | [**\Fortnox\Model\FortnoxModeOfPaymentSinglePayloadItemWrap**](../Model/FortnoxModeOfPaymentSinglePayloadItemWrap.md)| Request body for update mode of payment | [optional] |

### Return type

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