just gen-client — покрывает links, cashflow-broker, ручные цены, imports/pending, goals/income/rebalance/tax/benchmarks.
162 lines
5.0 KiB
Markdown
162 lines
5.0 KiB
Markdown
# fintracker_api.api.IncomeApi
|
|
|
|
## Load the API package
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
```
|
|
|
|
All URIs are relative to *http://localhost*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**incomeCalendar**](IncomeApi.md#incomecalendar) | **GET** /api/v1/income/calendar | Calendar
|
|
[**incomeForecast**](IncomeApi.md#incomeforecast) | **GET** /api/v1/income/forecast | Forecast
|
|
[**incomeHistory**](IncomeApi.md#incomehistory) | **GET** /api/v1/income/history | History
|
|
|
|
|
|
# **incomeCalendar**
|
|
> CalendarOut incomeCalendar(scope, dateFrom, dateTo, includePaid)
|
|
|
|
Calendar
|
|
|
|
Payments in a window, one row each; defaults to the next 12 months, forecast only.
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
|
|
final api = FintrackerApi().getIncomeApi();
|
|
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
|
|
final DateTime dateFrom = 2013-10-20; // DateTime |
|
|
final DateTime dateTo = 2013-10-20; // DateTime |
|
|
final bool includePaid = true; // bool |
|
|
|
|
try {
|
|
final response = api.incomeCalendar(scope, dateFrom, dateTo, includePaid);
|
|
print(response);
|
|
} on DioException catch (e) {
|
|
print('Exception when calling IncomeApi->incomeCalendar: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**scope** | **String**| all | account:<id> | portfolio:<id> | [optional] [default to 'all']
|
|
**dateFrom** | **DateTime**| | [optional]
|
|
**dateTo** | **DateTime**| | [optional]
|
|
**includePaid** | **bool**| | [optional] [default to false]
|
|
|
|
### Return type
|
|
|
|
[**CalendarOut**](CalendarOut.md)
|
|
|
|
### Authorization
|
|
|
|
[HTTPBearer](../README.md#HTTPBearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json, application/problem+json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **incomeForecast**
|
|
> ForecastOut incomeForecast(scope, months)
|
|
|
|
Forecast
|
|
|
|
Expected income per month, split by basis, plus the yield it implies.
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
|
|
final api = FintrackerApi().getIncomeApi();
|
|
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
|
|
final int months = 56; // int |
|
|
|
|
try {
|
|
final response = api.incomeForecast(scope, months);
|
|
print(response);
|
|
} on DioException catch (e) {
|
|
print('Exception when calling IncomeApi->incomeForecast: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**scope** | **String**| all | account:<id> | portfolio:<id> | [optional] [default to 'all']
|
|
**months** | **int**| | [optional] [default to 12]
|
|
|
|
### Return type
|
|
|
|
[**ForecastOut**](ForecastOut.md)
|
|
|
|
### Authorization
|
|
|
|
[HTTPBearer](../README.md#HTTPBearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json, application/problem+json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **incomeHistory**
|
|
> HistoryOut incomeHistory(scope, group, dateFrom, dateTo, kind)
|
|
|
|
History
|
|
|
|
Income actually received, grouped by month, kind and currency. `group` exists for the contract's sake and accepts only `month`: the table is stored monthly, and a finer grouping would have to re-read the ledger, which is what the calendar's `paid` rows already do per payment.
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:fintracker_api/api.dart';
|
|
|
|
final api = FintrackerApi().getIncomeApi();
|
|
final String scope = scope_example; // String | all | account:<id> | portfolio:<id>
|
|
final String group = group_example; // String | month
|
|
final DateTime dateFrom = 2013-10-20; // DateTime |
|
|
final DateTime dateTo = 2013-10-20; // DateTime |
|
|
final String kind = kind_example; // String | dividend | coupon | …
|
|
|
|
try {
|
|
final response = api.incomeHistory(scope, group, dateFrom, dateTo, kind);
|
|
print(response);
|
|
} on DioException catch (e) {
|
|
print('Exception when calling IncomeApi->incomeHistory: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**scope** | **String**| all | account:<id> | portfolio:<id> | [optional] [default to 'all']
|
|
**group** | **String**| month | [optional] [default to 'month']
|
|
**dateFrom** | **DateTime**| | [optional]
|
|
**dateTo** | **DateTime**| | [optional]
|
|
**kind** | **String**| dividend | coupon | … | [optional]
|
|
|
|
### Return type
|
|
|
|
[**HistoryOut**](HistoryOut.md)
|
|
|
|
### Authorization
|
|
|
|
[HTTPBearer](../README.md#HTTPBearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json, application/problem+json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|