All URIs are relative to http://localhost, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
createModesOfPaymentsResource() | POST /3/modesofpayments | Create a mode of payment |
getModesOfPaymentsResource() | GET /3/modesofpayments/{Code} | Retrieve a single mode of payment |
listModesOfPaymentsResource() | GET /3/modesofpayments | Retrieve a list of modes of payments |
updateModesOfPaymentsResource() | PUT /3/modesofpayments/{Code} | Update a mode of payment |
createModesOfPaymentsResource($mode_of_payment): \FortnoxApi\Model\ModeOfPaymentWrap
Create a mode of payment
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new FortnoxApi\Api\ModesOfPaymentsResourceApi(
// 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 \FortnoxApi\Model\ModeOfPaymentWrap(); // \FortnoxApi\Model\ModeOfPaymentWrap | to create
try {
$result = $apiInstance->createModesOfPaymentsResource($mode_of_payment);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ModesOfPaymentsResourceApi->createModesOfPaymentsResource: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
mode_of_payment | \FortnoxApi\Model\ModeOfPaymentWrap | to create | [optional] |
\FortnoxApi\Model\ModeOfPaymentWrap
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getModesOfPaymentsResource($code): \FortnoxApi\Model\ModeOfPaymentWrap
Retrieve a single mode of payment
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new FortnoxApi\Api\ModesOfPaymentsResourceApi(
// 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 mode of payment
try {
$result = $apiInstance->getModesOfPaymentsResource($code);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ModesOfPaymentsResourceApi->getModesOfPaymentsResource: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | identifies the mode of payment |
\FortnoxApi\Model\ModeOfPaymentWrap
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listModesOfPaymentsResource(): \FortnoxApi\Model\ModeOfPaymentList
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new FortnoxApi\Api\ModesOfPaymentsResourceApi(
// 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->listModesOfPaymentsResource();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ModesOfPaymentsResourceApi->listModesOfPaymentsResource: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
\FortnoxApi\Model\ModeOfPaymentList
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateModesOfPaymentsResource($code, $unit): \FortnoxApi\Model\ModeOfPaymentWrap
Update a mode of payment
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new FortnoxApi\Api\ModesOfPaymentsResourceApi(
// 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 mode of payment
$unit = new \FortnoxApi\Model\ModeOfPaymentWrap(); // \FortnoxApi\Model\ModeOfPaymentWrap | mode of payment to update
try {
$result = $apiInstance->updateModesOfPaymentsResource($code, $unit);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ModesOfPaymentsResourceApi->updateModesOfPaymentsResource: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
code | string | identifies the mode of payment | |
unit | \FortnoxApi\Model\ModeOfPaymentWrap | mode of payment to update | [optional] |
\FortnoxApi\Model\ModeOfPaymentWrap
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]