Skip to content

Latest commit

 

History

History
283 lines (206 loc) · 8.86 KB

SpendingApi.md

File metadata and controls

283 lines (206 loc) · 8.86 KB

Swagger\Client\SpendingApi

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

spendingDelete($id)

Deletes a spending.

Deletes the spending identified by the ID given in path.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
id int

Return type

void (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

spendingList

\Swagger\Client\Model\SpendingList spendingList($page, $per_page)

Lists all spending

Returns a list of your spending items, ordered by the due date.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
page int [optional] [default to 1]
per_page int [optional] [default to 25]

Return type

\Swagger\Client\Model\SpendingList

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

spendingSave

\Swagger\Client\Model\Spending spendingSave($body)

Creates a new spending.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
body \Swagger\Client\Model\SpendingSave [optional]

Return type

\Swagger\Client\Model\Spending

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

spendingShow

\Swagger\Client\Model\Spending spendingShow($id)

Retrieves one specific spending.

Retrives the spending identified by the given ID in path.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
id int

Return type

\Swagger\Client\Model\Spending

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

spendingUpdate

\Swagger\Client\Model\Spending spendingUpdate($id, $body)

Updates a spending item.

Updates the spending item identified by the ID given in path.

Example

<?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;
}
?>

Parameters

Name Type Description Notes
id int
body \Swagger\Client\Model\SpendingSave [optional]

Return type

\Swagger\Client\Model\Spending

Authorization

api_key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]