All URIs are relative to https://api.billingo.hu/v3
Method | HTTP request | Description |
---|---|---|
spendingDelete | DELETE /spendings/{id} | Deletes a spending. |
spendingList | GET /spendings | Lists all spending |
spendingSave | POST /spendings | Creates a new spending. |
spendingShow | GET /spendings/{id} | Retrieves one specific spending. |
spendingUpdate | PUT /spendings/{id} | Updates a spending item. |
spendingDelete($id)
Deletes a spending.
Deletes the spending identified by the ID given in path.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
$apiInstance = new Swagger\Client\Api\SpendingApi(
// 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(),
$config
);
$id = 56; // int |
try {
$apiInstance->spendingDelete($id);
} catch (Exception $e) {
echo 'Exception when calling SpendingApi->spendingDelete: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\SpendingList spendingList($page, $per_page)
Lists all spending
Returns a list of your spending items, ordered by the due date.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
$apiInstance = new Swagger\Client\Api\SpendingApi(
// 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(),
$config
);
$page = 1; // int |
$per_page = 25; // int |
try {
$result = $apiInstance->spendingList($page, $per_page);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SpendingApi->spendingList: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
page | int | [optional] [default to 1] | |
per_page | int | [optional] [default to 25] |
\Swagger\Client\Model\SpendingList
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Spending spendingSave($body)
Creates a new spending.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
$apiInstance = new Swagger\Client\Api\SpendingApi(
// 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(),
$config
);
$body = new \Swagger\Client\Model\SpendingSave(); // \Swagger\Client\Model\SpendingSave |
try {
$result = $apiInstance->spendingSave($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SpendingApi->spendingSave: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
body | \Swagger\Client\Model\SpendingSave | [optional] |
\Swagger\Client\Model\Spending
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Spending spendingShow($id)
Retrieves one specific spending.
Retrives the spending identified by the given ID in path.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
$apiInstance = new Swagger\Client\Api\SpendingApi(
// 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(),
$config
);
$id = 56; // int |
try {
$result = $apiInstance->spendingShow($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SpendingApi->spendingShow: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int |
\Swagger\Client\Model\Spending
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
\Swagger\Client\Model\Spending spendingUpdate($id, $body)
Updates a spending item.
Updates the spending item identified by the ID given in path.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: api_key
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer');
$apiInstance = new Swagger\Client\Api\SpendingApi(
// 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(),
$config
);
$id = 56; // int |
$body = new \Swagger\Client\Model\SpendingSave(); // \Swagger\Client\Model\SpendingSave |
try {
$result = $apiInstance->spendingUpdate($id, $body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling SpendingApi->spendingUpdate: ', $e->getMessage(), PHP_EOL;
}
?>
Name | Type | Description | Notes |
---|---|---|---|
id | int | ||
body | \Swagger\Client\Model\SpendingSave | [optional] |
\Swagger\Client\Model\Spending
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]