ynab 1.31.0 → 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/DEVELOPMENT.md +11 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +42 -0
- data/README.md +3 -3
- data/Rakefile +58 -0
- data/config.json +9 -0
- data/docs/Account.md +25 -0
- data/docs/AccountResponse.md +8 -0
- data/docs/AccountResponseData.md +8 -0
- data/docs/AccountType.md +7 -0
- data/docs/AccountWrapper.md +8 -0
- data/docs/AccountsApi.md +70 -0
- data/docs/AccountsResponse.md +8 -0
- data/docs/AccountsResponseData.md +9 -0
- data/docs/AccountsWrapper.md +9 -0
- data/docs/BudgetDetail.md +24 -0
- data/docs/BudgetDetailAllOf.md +17 -0
- data/docs/BudgetDetailResponse.md +8 -0
- data/docs/BudgetDetailResponseData.md +9 -0
- data/docs/BudgetDetailWrapper.md +9 -0
- data/docs/BudgetSettings.md +9 -0
- data/docs/BudgetSettingsResponse.md +8 -0
- data/docs/BudgetSettingsResponseData.md +8 -0
- data/docs/BudgetSettingsWrapper.md +8 -0
- data/docs/BudgetSummary.md +15 -0
- data/docs/BudgetSummaryResponse.md +8 -0
- data/docs/BudgetSummaryResponseData.md +9 -0
- data/docs/BudgetSummaryWrapper.md +9 -0
- data/docs/BudgetsApi.md +68 -0
- data/docs/BulkIdWrapper.md +8 -0
- data/docs/BulkIds.md +9 -0
- data/docs/BulkResponse.md +8 -0
- data/docs/BulkResponseData.md +8 -0
- data/docs/BulkResponseDataBulk.md +9 -0
- data/docs/BulkTransactionCreateResponse.md +8 -0
- data/docs/BulkTransactionIds.md +8 -0
- data/docs/BulkTransactions.md +8 -0
- data/docs/CategoriesApi.md +94 -0
- data/docs/CategoriesResponse.md +8 -0
- data/docs/CategoriesResponseData.md +9 -0
- data/docs/Category.md +30 -0
- data/docs/CategoryGroup.md +11 -0
- data/docs/CategoryGroupWithCategories.md +12 -0
- data/docs/CategoryGroupWithCategoriesAllOf.md +8 -0
- data/docs/CategoryGroupsWrapper.md +9 -0
- data/docs/CategoryResponse.md +8 -0
- data/docs/CategoryResponseData.md +8 -0
- data/docs/CategoryWrapper.md +9 -0
- data/docs/CurrencyFormat.md +15 -0
- data/docs/DateFormat.md +8 -0
- data/docs/DeprecatedApi.md +28 -0
- data/docs/ErrorDetail.md +10 -0
- data/docs/ErrorResponse.md +8 -0
- data/docs/HybridTransaction.md +30 -0
- data/docs/HybridTransactionAllOf.md +12 -0
- data/docs/HybridTransactionsResponse.md +8 -0
- data/docs/HybridTransactionsResponseData.md +9 -0
- data/docs/HybridTransactionsWrapper.md +8 -0
- data/docs/LoanAccountPeriodicValue.md +7 -0
- data/docs/MonthDetail.md +16 -0
- data/docs/MonthDetailAllOf.md +8 -0
- data/docs/MonthDetailResponse.md +8 -0
- data/docs/MonthDetailResponseData.md +8 -0
- data/docs/MonthDetailWrapper.md +8 -0
- data/docs/MonthSummariesResponse.md +8 -0
- data/docs/MonthSummariesResponseData.md +9 -0
- data/docs/MonthSummariesWrapper.md +9 -0
- data/docs/MonthSummary.md +15 -0
- data/docs/MonthsApi.md +49 -0
- data/docs/PatchMonthCategoryWrapper.md +8 -0
- data/docs/PatchTransactionsWrapper.md +8 -0
- data/docs/Payee.md +11 -0
- data/docs/PayeeLocation.md +12 -0
- data/docs/PayeeLocationResponse.md +8 -0
- data/docs/PayeeLocationResponseData.md +8 -0
- data/docs/PayeeLocationWrapper.md +8 -0
- data/docs/PayeeLocationsApi.md +69 -0
- data/docs/PayeeLocationsResponse.md +8 -0
- data/docs/PayeeLocationsResponseData.md +8 -0
- data/docs/PayeeLocationsWrapper.md +8 -0
- data/docs/PayeeResponse.md +8 -0
- data/docs/PayeeResponseData.md +8 -0
- data/docs/PayeeWrapper.md +8 -0
- data/docs/PayeesApi.md +49 -0
- data/docs/PayeesResponse.md +8 -0
- data/docs/PayeesResponseData.md +9 -0
- data/docs/PayeesWrapper.md +9 -0
- data/docs/PostAccountWrapper.md +8 -0
- data/docs/PostTransactionsWrapper.md +9 -0
- data/docs/PutTransactionWrapper.md +8 -0
- data/docs/SaveAccount.md +10 -0
- data/docs/SaveAccountWrapper.md +8 -0
- data/docs/SaveCategoryResponse.md +8 -0
- data/docs/SaveCategoryResponseData.md +9 -0
- data/docs/SaveMonthCategory.md +8 -0
- data/docs/SaveMonthCategoryWrapper.md +8 -0
- data/docs/SaveSubTransaction.md +12 -0
- data/docs/SaveTransaction.md +19 -0
- data/docs/SaveTransactionWithId.md +20 -0
- data/docs/SaveTransactionWithIdAllOf.md +8 -0
- data/docs/SaveTransactionWithOptionalFields.md +19 -0
- data/docs/SaveTransactionWrapper.md +8 -0
- data/docs/SaveTransactionsResponse.md +8 -0
- data/docs/SaveTransactionsResponseData.md +12 -0
- data/docs/SaveTransactionsWrapper.md +9 -0
- data/docs/ScheduledSubTransaction.md +15 -0
- data/docs/ScheduledTransactionDetail.md +23 -0
- data/docs/ScheduledTransactionDetailAllOf.md +11 -0
- data/docs/ScheduledTransactionResponse.md +8 -0
- data/docs/ScheduledTransactionResponseData.md +8 -0
- data/docs/ScheduledTransactionSummary.md +19 -0
- data/docs/ScheduledTransactionWrapper.md +8 -0
- data/docs/ScheduledTransactionsApi.md +49 -0
- data/docs/ScheduledTransactionsResponse.md +8 -0
- data/docs/ScheduledTransactionsResponseData.md +9 -0
- data/docs/ScheduledTransactionsWrapper.md +8 -0
- data/docs/SubTransaction.md +18 -0
- data/docs/TransactionDetail.md +29 -0
- data/docs/TransactionDetailAllOf.md +11 -0
- data/docs/TransactionResponse.md +8 -0
- data/docs/TransactionResponseData.md +8 -0
- data/docs/TransactionSummary.md +25 -0
- data/docs/TransactionWrapper.md +8 -0
- data/docs/TransactionsApi.md +228 -0
- data/docs/TransactionsImportResponse.md +8 -0
- data/docs/TransactionsImportResponseData.md +8 -0
- data/docs/TransactionsResponse.md +8 -0
- data/docs/TransactionsResponseData.md +9 -0
- data/docs/TransactionsWrapper.md +9 -0
- data/docs/UpdateTransaction.md +20 -0
- data/docs/UpdateTransactionsWrapper.md +8 -0
- data/docs/User.md +8 -0
- data/docs/UserApi.md +25 -0
- data/docs/UserResponse.md +8 -0
- data/docs/UserResponseData.md +8 -0
- data/docs/UserWrapper.md +8 -0
- data/examples/budget-list.rb +21 -0
- data/examples/budget-month.rb +33 -0
- data/examples/category-balance.rb +23 -0
- data/examples/create-multiple-transactions.rb +42 -0
- data/examples/create-transaction.rb +30 -0
- data/examples/update-category-budgeted.rb +25 -0
- data/examples/update-multiple-transactions.rb +20 -0
- data/lib/ynab/api/accounts_api.rb +78 -41
- data/lib/ynab/api/budgets_api.rb +68 -36
- data/lib/ynab/api/categories_api.rb +108 -60
- data/lib/ynab/api/deprecated_api.rb +32 -17
- data/lib/ynab/api/months_api.rb +49 -28
- data/lib/ynab/api/payee_locations_api.rb +73 -41
- data/lib/ynab/api/payees_api.rb +49 -28
- data/lib/ynab/api/scheduled_transactions_api.rb +49 -28
- data/lib/ynab/api/transactions_api.rb +268 -140
- data/lib/ynab/api/user_api.rb +22 -12
- data/lib/ynab/api_client.rb +97 -95
- data/lib/ynab/configuration.rb +101 -14
- data/lib/ynab/models/account.rb +117 -55
- data/lib/ynab/models/account_response.rb +53 -18
- data/lib/ynab/models/account_response_data.rb +53 -18
- data/lib/ynab/models/account_type.rb +30 -20
- data/lib/ynab/models/accounts_response.rb +53 -18
- data/lib/ynab/models/accounts_response_data.rb +54 -19
- data/lib/ynab/models/budget_detail.rb +80 -35
- data/lib/ynab/models/budget_detail_all_of.rb +320 -0
- data/lib/ynab/models/budget_detail_response.rb +53 -18
- data/lib/ynab/models/budget_detail_response_data.rb +54 -19
- data/lib/ynab/models/budget_settings.rb +56 -29
- data/lib/ynab/models/budget_settings_response.rb +53 -18
- data/lib/ynab/models/budget_settings_response_data.rb +53 -18
- data/lib/ynab/models/budget_summary.rb +63 -26
- data/lib/ynab/models/budget_summary_response.rb +53 -18
- data/lib/ynab/models/budget_summary_response_data.rb +54 -20
- data/lib/ynab/models/bulk_response.rb +53 -18
- data/lib/ynab/models/bulk_response_data.rb +53 -18
- data/lib/ynab/models/bulk_response_data_bulk.rb +54 -19
- data/lib/ynab/models/bulk_transactions.rb +53 -18
- data/lib/ynab/models/categories_response.rb +53 -18
- data/lib/ynab/models/categories_response_data.rb +54 -19
- data/lib/ynab/models/category.rb +110 -48
- data/lib/ynab/models/category_group.rb +58 -23
- data/lib/ynab/models/category_group_with_categories.rb +67 -24
- data/lib/ynab/models/{save_month_category_wrapper.rb → category_group_with_categories_all_of.rb} +67 -29
- data/lib/ynab/models/category_response.rb +53 -18
- data/lib/ynab/models/category_response_data.rb +53 -18
- data/lib/ynab/models/currency_format.rb +62 -27
- data/lib/ynab/models/date_format.rb +53 -18
- data/lib/ynab/models/error_detail.rb +55 -20
- data/lib/ynab/models/error_response.rb +53 -18
- data/lib/ynab/models/hybrid_transaction.rb +118 -46
- data/lib/ynab/models/hybrid_transaction_all_of.rb +304 -0
- data/lib/ynab/models/hybrid_transactions_response.rb +53 -18
- data/lib/ynab/models/hybrid_transactions_response_data.rb +54 -19
- data/lib/ynab/models/month_detail.rb +72 -27
- data/lib/ynab/models/{update_transactions_wrapper.rb → month_detail_all_of.rb} +66 -30
- data/lib/ynab/models/month_detail_response.rb +53 -18
- data/lib/ynab/models/month_detail_response_data.rb +53 -18
- data/lib/ynab/models/month_summaries_response.rb +53 -18
- data/lib/ynab/models/month_summaries_response_data.rb +54 -19
- data/lib/ynab/models/month_summary.rb +63 -26
- data/lib/ynab/models/patch_month_category_wrapper.rb +53 -18
- data/lib/ynab/models/patch_transactions_wrapper.rb +53 -18
- data/lib/ynab/models/payee.rb +58 -22
- data/lib/ynab/models/payee_location.rb +58 -23
- data/lib/ynab/models/payee_location_response.rb +53 -18
- data/lib/ynab/models/payee_location_response_data.rb +53 -18
- data/lib/ynab/models/payee_locations_response.rb +53 -18
- data/lib/ynab/models/payee_locations_response_data.rb +53 -18
- data/lib/ynab/models/payee_response.rb +53 -18
- data/lib/ynab/models/payee_response_data.rb +53 -18
- data/lib/ynab/models/payees_response.rb +53 -18
- data/lib/ynab/models/payees_response_data.rb +54 -19
- data/lib/ynab/models/post_account_wrapper.rb +53 -18
- data/lib/ynab/models/post_transactions_wrapper.rb +54 -19
- data/lib/ynab/models/put_transaction_wrapper.rb +53 -18
- data/lib/ynab/models/save_account.rb +77 -20
- data/lib/ynab/models/save_category_response.rb +53 -18
- data/lib/ynab/models/save_category_response_data.rb +54 -19
- data/lib/ynab/models/save_month_category.rb +53 -18
- data/lib/ynab/models/save_sub_transaction.rb +61 -22
- data/lib/ynab/models/save_transaction.rb +88 -33
- data/lib/ynab/models/save_transaction_with_id.rb +102 -46
- data/lib/ynab/models/{save_transactions_wrapper.rb → save_transaction_with_id_all_of.rb} +60 -36
- data/lib/ynab/models/save_transaction_with_optional_fields.rb +81 -33
- data/lib/ynab/models/save_transactions_response.rb +53 -18
- data/lib/ynab/models/save_transactions_response_data.rb +57 -23
- data/lib/ynab/models/scheduled_sub_transaction.rb +66 -27
- data/lib/ynab/models/scheduled_transaction_detail.rb +94 -36
- data/lib/ynab/models/scheduled_transaction_detail_all_of.rb +262 -0
- data/lib/ynab/models/scheduled_transaction_response.rb +53 -18
- data/lib/ynab/models/scheduled_transaction_response_data.rb +53 -18
- data/lib/ynab/models/scheduled_transaction_summary.rb +80 -32
- data/lib/ynab/models/scheduled_transactions_response.rb +53 -18
- data/lib/ynab/models/scheduled_transactions_response_data.rb +54 -19
- data/lib/ynab/models/sub_transaction.rb +71 -29
- data/lib/ynab/models/transaction_detail.rb +112 -44
- data/lib/ynab/models/{save_transaction_wrapper.rb → transaction_detail_all_of.rb} +102 -29
- data/lib/ynab/models/transaction_response.rb +53 -18
- data/lib/ynab/models/transaction_response_data.rb +53 -18
- data/lib/ynab/models/transaction_summary.rb +98 -40
- data/lib/ynab/models/transactions_import_response.rb +53 -18
- data/lib/ynab/models/transactions_import_response_data.rb +53 -18
- data/lib/ynab/models/transactions_response.rb +53 -18
- data/lib/ynab/models/transactions_response_data.rb +54 -19
- data/lib/ynab/models/user.rb +53 -18
- data/lib/ynab/models/user_response.rb +53 -18
- data/lib/ynab/models/user_response_data.rb +53 -18
- data/lib/ynab/version.rb +1 -1
- data/lib/ynab.rb +19 -14
- data/open_api_spec.yaml +3012 -0
- data/templates/api_client.mustache +274 -0
- data/templates/api_client_typhoeus_partial.mustache +156 -0
- data/templates/api_doc.mustache +44 -0
- data/templates/gem.mustache +84 -0
- data/templates/partial_model_generic_doc.mustache +9 -0
- data/ynab.gemspec +38 -0
- metadata +194 -87
- data/lib/ynab/models/loan_account_periodic_value.rb +0 -175
- data/lib/ynab/models/save_account_wrapper.rb +0 -189
- data/lib/ynab/models/update_transaction.rb +0 -407
- data/spec/models/transaction_detail_spec.rb +0 -11
@@ -0,0 +1,18 @@
|
|
1
|
+
# YNAB::SubTransaction
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | |
|
8
|
+
| **transaction_id** | **String** | | |
|
9
|
+
| **amount** | **Integer** | The subtransaction amount in milliunits format | |
|
10
|
+
| **memo** | **String** | | [optional] |
|
11
|
+
| **payee_id** | **String** | | [optional] |
|
12
|
+
| **payee_name** | **String** | | [optional] |
|
13
|
+
| **category_id** | **String** | | [optional] |
|
14
|
+
| **category_name** | **String** | | [optional] |
|
15
|
+
| **transfer_account_id** | **String** | If a transfer, the account_id which the subtransaction transfers to | [optional] |
|
16
|
+
| **transfer_transaction_id** | **String** | If a transfer, the id of transaction on the other side of the transfer | [optional] |
|
17
|
+
| **deleted** | **Boolean** | Whether or not the subtransaction has been deleted. Deleted subtransactions will only be included in delta requests. | |
|
18
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# YNAB::TransactionDetail
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | |
|
8
|
+
| **date** | **Date** | The transaction date in ISO format (e.g. 2016-12-01) | |
|
9
|
+
| **amount** | **Integer** | The transaction amount in milliunits format | |
|
10
|
+
| **memo** | **String** | | [optional] |
|
11
|
+
| **cleared** | **String** | The cleared status of the transaction | |
|
12
|
+
| **approved** | **Boolean** | Whether or not the transaction is approved | |
|
13
|
+
| **flag_color** | **String** | The transaction flag | [optional] |
|
14
|
+
| **account_id** | **String** | | |
|
15
|
+
| **payee_id** | **String** | | [optional] |
|
16
|
+
| **category_id** | **String** | | [optional] |
|
17
|
+
| **transfer_account_id** | **String** | If a transfer transaction, the account to which it transfers | [optional] |
|
18
|
+
| **transfer_transaction_id** | **String** | If a transfer transaction, the id of transaction on the other side of the transfer | [optional] |
|
19
|
+
| **matched_transaction_id** | **String** | If transaction is matched, the id of the matched transaction | [optional] |
|
20
|
+
| **import_id** | **String** | If the transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. | [optional] |
|
21
|
+
| **import_payee_name** | **String** | If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules | [optional] |
|
22
|
+
| **import_payee_name_original** | **String** | If the transaction was imported, the original payee name as it appeared on the statement | [optional] |
|
23
|
+
| **debt_transaction_type** | **String** | If the transaction is a debt/loan account transaction, the type of transaction | [optional] |
|
24
|
+
| **deleted** | **Boolean** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. | |
|
25
|
+
| **account_name** | **String** | | |
|
26
|
+
| **payee_name** | **String** | | [optional] |
|
27
|
+
| **category_name** | **String** | The name of the category. If a split transaction, this will be 'Split'. | [optional] |
|
28
|
+
| **subtransactions** | [**Array<SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. | |
|
29
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# YNAB::TransactionDetailAllOf
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **account_name** | **String** | | |
|
8
|
+
| **payee_name** | **String** | | [optional] |
|
9
|
+
| **category_name** | **String** | The name of the category. If a split transaction, this will be 'Split'. | [optional] |
|
10
|
+
| **subtransactions** | [**Array<SubTransaction>**](SubTransaction.md) | If a split transaction, the subtransactions. | |
|
11
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# YNAB::TransactionSummary
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | | |
|
8
|
+
| **date** | **Date** | The transaction date in ISO format (e.g. 2016-12-01) | |
|
9
|
+
| **amount** | **Integer** | The transaction amount in milliunits format | |
|
10
|
+
| **memo** | **String** | | [optional] |
|
11
|
+
| **cleared** | **String** | The cleared status of the transaction | |
|
12
|
+
| **approved** | **Boolean** | Whether or not the transaction is approved | |
|
13
|
+
| **flag_color** | **String** | The transaction flag | [optional] |
|
14
|
+
| **account_id** | **String** | | |
|
15
|
+
| **payee_id** | **String** | | [optional] |
|
16
|
+
| **category_id** | **String** | | [optional] |
|
17
|
+
| **transfer_account_id** | **String** | If a transfer transaction, the account to which it transfers | [optional] |
|
18
|
+
| **transfer_transaction_id** | **String** | If a transfer transaction, the id of transaction on the other side of the transfer | [optional] |
|
19
|
+
| **matched_transaction_id** | **String** | If transaction is matched, the id of the matched transaction | [optional] |
|
20
|
+
| **import_id** | **String** | If the transaction was imported, this field is a unique (by account) import identifier. If this transaction was imported through File Based Import or Direct Import and not through the API, the import_id will have the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. | [optional] |
|
21
|
+
| **import_payee_name** | **String** | If the transaction was imported, the payee name that was used when importing and before applying any payee rename rules | [optional] |
|
22
|
+
| **import_payee_name_original** | **String** | If the transaction was imported, the original payee name as it appeared on the statement | [optional] |
|
23
|
+
| **debt_transaction_type** | **String** | If the transaction is a debt/loan account transaction, the type of transaction | [optional] |
|
24
|
+
| **deleted** | **Boolean** | Whether or not the transaction has been deleted. Deleted transactions will only be included in delta requests. | |
|
25
|
+
|
@@ -0,0 +1,228 @@
|
|
1
|
+
# YNAB::TransactionsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.ynab.com/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**create_transaction**](TransactionsApi.md#create_transaction) | **POST** /budgets/{budget_id}/transactions | Create a single transaction or multiple transactions |
|
8
|
+
| [**delete_transaction**](TransactionsApi.md#delete_transaction) | **DELETE** /budgets/{budget_id}/transactions/{transaction_id} | Deletes an existing transaction |
|
9
|
+
| [**get_transaction_by_id**](TransactionsApi.md#get_transaction_by_id) | **GET** /budgets/{budget_id}/transactions/{transaction_id} | Single transaction |
|
10
|
+
| [**get_transactions**](TransactionsApi.md#get_transactions) | **GET** /budgets/{budget_id}/transactions | List transactions |
|
11
|
+
| [**get_transactions_by_account**](TransactionsApi.md#get_transactions_by_account) | **GET** /budgets/{budget_id}/accounts/{account_id}/transactions | List account transactions |
|
12
|
+
| [**get_transactions_by_category**](TransactionsApi.md#get_transactions_by_category) | **GET** /budgets/{budget_id}/categories/{category_id}/transactions | List category transactions |
|
13
|
+
| [**get_transactions_by_payee**](TransactionsApi.md#get_transactions_by_payee) | **GET** /budgets/{budget_id}/payees/{payee_id}/transactions | List payee transactions |
|
14
|
+
| [**import_transactions**](TransactionsApi.md#import_transactions) | **POST** /budgets/{budget_id}/transactions/import | Import transactions |
|
15
|
+
| [**update_transaction**](TransactionsApi.md#update_transaction) | **PUT** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction |
|
16
|
+
| [**update_transactions**](TransactionsApi.md#update_transactions) | **PATCH** /budgets/{budget_id}/transactions | Update multiple transactions |
|
17
|
+
|
18
|
+
|
19
|
+
## create_transaction
|
20
|
+
|
21
|
+
> <SaveTransactionsResponse> create_transaction(budget_id, data)
|
22
|
+
|
23
|
+
Create a single transaction or multiple transactions
|
24
|
+
|
25
|
+
Creates a single transaction or multiple transactions. If you provide a body containing a `transaction` object, a single transaction will be created and if you provide a body containing a `transactions` array, multiple transactions will be created. Scheduled transactions cannot be created on this endpoint.
|
26
|
+
|
27
|
+
### Parameters
|
28
|
+
|
29
|
+
| Name | Type | Description | Notes |
|
30
|
+
| ---- | ---- | ----------- | ----- |
|
31
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
32
|
+
| **data** | [**PostTransactionsWrapper**](PostTransactionsWrapper.md) | The transaction or transactions to create. To create a single transaction you can specify a value for the `transaction` object and to create multiple transactions you can specify an array of `transactions`. It is expected that you will only provide a value for one of these objects. | |
|
33
|
+
|
34
|
+
### Return type
|
35
|
+
|
36
|
+
[**SaveTransactionsResponse**](SaveTransactionsResponse.md)
|
37
|
+
|
38
|
+
|
39
|
+
## delete_transaction
|
40
|
+
|
41
|
+
> <TransactionResponse> delete_transaction(budget_id, transaction_id)
|
42
|
+
|
43
|
+
Deletes an existing transaction
|
44
|
+
|
45
|
+
Deletes a transaction
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
| Name | Type | Description | Notes |
|
50
|
+
| ---- | ---- | ----------- | ----- |
|
51
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
52
|
+
| **transaction_id** | **String** | The id of the transaction | |
|
53
|
+
|
54
|
+
### Return type
|
55
|
+
|
56
|
+
[**TransactionResponse**](TransactionResponse.md)
|
57
|
+
|
58
|
+
|
59
|
+
## get_transaction_by_id
|
60
|
+
|
61
|
+
> <TransactionResponse> get_transaction_by_id(budget_id, transaction_id)
|
62
|
+
|
63
|
+
Single transaction
|
64
|
+
|
65
|
+
Returns a single transaction
|
66
|
+
|
67
|
+
### Parameters
|
68
|
+
|
69
|
+
| Name | Type | Description | Notes |
|
70
|
+
| ---- | ---- | ----------- | ----- |
|
71
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
72
|
+
| **transaction_id** | **String** | The id of the transaction | |
|
73
|
+
|
74
|
+
### Return type
|
75
|
+
|
76
|
+
[**TransactionResponse**](TransactionResponse.md)
|
77
|
+
|
78
|
+
|
79
|
+
## get_transactions
|
80
|
+
|
81
|
+
> <TransactionsResponse> get_transactions(budget_id, opts)
|
82
|
+
|
83
|
+
List transactions
|
84
|
+
|
85
|
+
Returns budget transactions
|
86
|
+
|
87
|
+
### Parameters
|
88
|
+
|
89
|
+
| Name | Type | Description | Notes |
|
90
|
+
| ---- | ---- | ----------- | ----- |
|
91
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
92
|
+
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
93
|
+
| **type** | **String** | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. | [optional] |
|
94
|
+
| **last_knowledge_of_server** | **Integer** | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. | [optional] |
|
95
|
+
|
96
|
+
### Return type
|
97
|
+
|
98
|
+
[**TransactionsResponse**](TransactionsResponse.md)
|
99
|
+
|
100
|
+
|
101
|
+
## get_transactions_by_account
|
102
|
+
|
103
|
+
> <TransactionsResponse> get_transactions_by_account(budget_id, account_id, opts)
|
104
|
+
|
105
|
+
List account transactions
|
106
|
+
|
107
|
+
Returns all transactions for a specified account
|
108
|
+
|
109
|
+
### Parameters
|
110
|
+
|
111
|
+
| Name | Type | Description | Notes |
|
112
|
+
| ---- | ---- | ----------- | ----- |
|
113
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
114
|
+
| **account_id** | **String** | The id of the account | |
|
115
|
+
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
116
|
+
| **type** | **String** | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. | [optional] |
|
117
|
+
| **last_knowledge_of_server** | **Integer** | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. | [optional] |
|
118
|
+
|
119
|
+
### Return type
|
120
|
+
|
121
|
+
[**TransactionsResponse**](TransactionsResponse.md)
|
122
|
+
|
123
|
+
|
124
|
+
## get_transactions_by_category
|
125
|
+
|
126
|
+
> <HybridTransactionsResponse> get_transactions_by_category(budget_id, category_id, opts)
|
127
|
+
|
128
|
+
List category transactions
|
129
|
+
|
130
|
+
Returns all transactions for a specified category
|
131
|
+
|
132
|
+
### Parameters
|
133
|
+
|
134
|
+
| Name | Type | Description | Notes |
|
135
|
+
| ---- | ---- | ----------- | ----- |
|
136
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
137
|
+
| **category_id** | **String** | The id of the category | |
|
138
|
+
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
139
|
+
| **type** | **String** | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. | [optional] |
|
140
|
+
| **last_knowledge_of_server** | **Integer** | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. | [optional] |
|
141
|
+
|
142
|
+
### Return type
|
143
|
+
|
144
|
+
[**HybridTransactionsResponse**](HybridTransactionsResponse.md)
|
145
|
+
|
146
|
+
|
147
|
+
## get_transactions_by_payee
|
148
|
+
|
149
|
+
> <HybridTransactionsResponse> get_transactions_by_payee(budget_id, payee_id, opts)
|
150
|
+
|
151
|
+
List payee transactions
|
152
|
+
|
153
|
+
Returns all transactions for a specified payee
|
154
|
+
|
155
|
+
### Parameters
|
156
|
+
|
157
|
+
| Name | Type | Description | Notes |
|
158
|
+
| ---- | ---- | ----------- | ----- |
|
159
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
160
|
+
| **payee_id** | **String** | The id of the payee | |
|
161
|
+
| **since_date** | **Date** | If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30). | [optional] |
|
162
|
+
| **type** | **String** | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. | [optional] |
|
163
|
+
| **last_knowledge_of_server** | **Integer** | The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included. | [optional] |
|
164
|
+
|
165
|
+
### Return type
|
166
|
+
|
167
|
+
[**HybridTransactionsResponse**](HybridTransactionsResponse.md)
|
168
|
+
|
169
|
+
|
170
|
+
## import_transactions
|
171
|
+
|
172
|
+
> <TransactionsImportResponse> import_transactions(budget_id)
|
173
|
+
|
174
|
+
Import transactions
|
175
|
+
|
176
|
+
Imports available transactions on all linked accounts for the given budget. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
|
177
|
+
|
178
|
+
### Parameters
|
179
|
+
|
180
|
+
| Name | Type | Description | Notes |
|
181
|
+
| ---- | ---- | ----------- | ----- |
|
182
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
183
|
+
|
184
|
+
### Return type
|
185
|
+
|
186
|
+
[**TransactionsImportResponse**](TransactionsImportResponse.md)
|
187
|
+
|
188
|
+
|
189
|
+
## update_transaction
|
190
|
+
|
191
|
+
> <TransactionResponse> update_transaction(budget_id, transaction_id, data)
|
192
|
+
|
193
|
+
Updates an existing transaction
|
194
|
+
|
195
|
+
Updates a single transaction
|
196
|
+
|
197
|
+
### Parameters
|
198
|
+
|
199
|
+
| Name | Type | Description | Notes |
|
200
|
+
| ---- | ---- | ----------- | ----- |
|
201
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
202
|
+
| **transaction_id** | **String** | The id of the transaction | |
|
203
|
+
| **data** | [**PutTransactionWrapper**](PutTransactionWrapper.md) | The transaction to update | |
|
204
|
+
|
205
|
+
### Return type
|
206
|
+
|
207
|
+
[**TransactionResponse**](TransactionResponse.md)
|
208
|
+
|
209
|
+
|
210
|
+
## update_transactions
|
211
|
+
|
212
|
+
> <SaveTransactionsResponse> update_transactions(budget_id, data)
|
213
|
+
|
214
|
+
Update multiple transactions
|
215
|
+
|
216
|
+
Updates multiple transactions, by `id` or `import_id`.
|
217
|
+
|
218
|
+
### Parameters
|
219
|
+
|
220
|
+
| Name | Type | Description | Notes |
|
221
|
+
| ---- | ---- | ----------- | ----- |
|
222
|
+
| **budget_id** | **String** | The id of the budget. \"last-used\" can be used to specify the last used budget and \"default\" can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget). | |
|
223
|
+
| **data** | [**PatchTransactionsWrapper**](PatchTransactionsWrapper.md) | The transactions to update. Each transaction must have either an `id` or `import_id` specified. If `id` is specified as null an `import_id` value can be provided which will allow transaction(s) to be updated by their `import_id`. If an `id` is specified, it will always be used for lookup. | |
|
224
|
+
|
225
|
+
### Return type
|
226
|
+
|
227
|
+
[**SaveTransactionsResponse**](SaveTransactionsResponse.md)
|
228
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# YNAB::TransactionsResponseData
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **transactions** | [**Array<TransactionDetail>**](TransactionDetail.md) | | |
|
8
|
+
| **server_knowledge** | **Integer** | The knowledge of the server | |
|
9
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# YNAB::TransactionsWrapper
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**transactions** | [**Array<TransactionDetail>**](TransactionDetail.md) | |
|
7
|
+
**server_knowledge** | **Integer** | The knowledge of the server |
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# YNAB::UpdateTransaction
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**account_id** | **String** | |
|
7
|
+
**date** | **Date** | The transaction date in ISO format (e.g. 2016-12-01). Future dates (scheduled transactions) are not permitted. Split transaction dates cannot be changed and if a different date is supplied it will be ignored. |
|
8
|
+
**amount** | **Integer** | The transaction amount in milliunits format. Split transaction amounts cannot be changed and if a different amount is supplied it will be ignored. |
|
9
|
+
**payee_id** | **String** | The payee for the transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `tranfer_payee_id` on the account resource. | [optional]
|
10
|
+
**payee_name** | **String** | The payee name. If a `payee_name` value is provided and `payee_id` has a null value, the `payee_name` value will be used to resolve the payee by either (1) a matching payee rename rule (only if `import_id` is also specified) or (2) a payee with the same name or (3) creation of a new payee. | [optional]
|
11
|
+
**category_id** | **String** | The category for the transaction. To configure a split transaction, you can specify null for `category_id` and provide a `subtransactions` array as part of the transaction object. If an existing transaction is a split, the `category_id` cannot be changed. Credit Card Payment categories are not permitted and will be ignored if supplied. | [optional]
|
12
|
+
**memo** | **String** | | [optional]
|
13
|
+
**cleared** | **String** | The cleared status of the transaction | [optional]
|
14
|
+
**approved** | **BOOLEAN** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional]
|
15
|
+
**flag_color** | **String** | The transaction flag | [optional]
|
16
|
+
**import_id** | **String** | If specified, the new transaction will be assigned this `import_id` and considered \"imported\". We will also attempt to match this imported transaction to an existing \"user-entered\" transation on the same account, with the same amount, and with a date +/-10 days from the imported transaction date.<br><br>Transactions imported through File Based Import or Direct Import (not through the API) are assigned an import_id in the format: 'YNAB:[milliunit_amount]:[iso_date]:[occurrence]'. For example, a transaction dated 2015-12-30 in the amount of -$294.23 USD would have an import_id of 'YNAB:-294230:2015-12-30:1'. If a second transaction on the same account was imported and had the same date and same amount, its import_id would be 'YNAB:-294230:2015-12-30:2'. Using a consistent format will prevent duplicates through Direct Import and File Based Import.<br><br>If import_id is omitted or specified as null, the transaction will be treated as a \"user-entered\" transaction. As such, it will be eligible to be matched against transactions later being imported (via DI, FBI, or API). | [optional]
|
17
|
+
**subtransactions** | [**Array<SaveSubTransaction>**](SaveSubTransaction.md) | An array of subtransactions to configure a transaction as a split. Updating `subtransactions` on an existing split transaction is not supported. | [optional]
|
18
|
+
**id** | **String** | |
|
19
|
+
|
20
|
+
|
data/docs/User.md
ADDED
data/docs/UserApi.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# YNAB::UserApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.ynab.com/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**get_user**](UserApi.md#get_user) | **GET** /user | User info |
|
8
|
+
|
9
|
+
|
10
|
+
## get_user
|
11
|
+
|
12
|
+
> <UserResponse> get_user
|
13
|
+
|
14
|
+
User info
|
15
|
+
|
16
|
+
Returns authenticated user information
|
17
|
+
|
18
|
+
### Parameters
|
19
|
+
|
20
|
+
This endpoint does not need any parameter.
|
21
|
+
|
22
|
+
### Return type
|
23
|
+
|
24
|
+
[**UserResponse**](UserResponse.md)
|
25
|
+
|
data/docs/UserWrapper.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'ynab'
|
2
|
+
|
3
|
+
access_token = ENV['YNAB_ACCESS_TOKEN']
|
4
|
+
ynab = YNAB::API.new(access_token)
|
5
|
+
|
6
|
+
begin
|
7
|
+
puts 'Fetching budgets...'
|
8
|
+
|
9
|
+
budget_response = ynab.budgets.get_budgets
|
10
|
+
budgets = budget_response.data.budgets
|
11
|
+
|
12
|
+
puts '==========='
|
13
|
+
puts 'BUDGET LIST'
|
14
|
+
puts '==========='
|
15
|
+
|
16
|
+
budgets.each do |budget|
|
17
|
+
puts "[id: #{budget.id}, name: #{budget.name}]"
|
18
|
+
end
|
19
|
+
rescue YNAB::ApiError => e
|
20
|
+
puts "ERROR: id=#{e.id}; name=#{e.name}; detail: #{e.detail}"
|
21
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'ynab'
|
2
|
+
require 'date'
|
3
|
+
|
4
|
+
access_token = ENV['YNAB_ACCESS_TOKEN']
|
5
|
+
ynab = YNAB::API.new(access_token)
|
6
|
+
|
7
|
+
budget_id = ENV['YNAB_BUDGET_ID']
|
8
|
+
|
9
|
+
begin
|
10
|
+
puts 'Fetching month...'
|
11
|
+
|
12
|
+
first_day_of_month_iso = Date.new(Date.today.year, Date.today.month, 1).iso8601
|
13
|
+
current_date = Date.today
|
14
|
+
first_day_of_month = Date.new(current_date.year, current_date.month, 1)
|
15
|
+
month_response = ynab.months.get_budget_month(budget_id, first_day_of_month_iso)
|
16
|
+
budget_month = month_response.data.month
|
17
|
+
|
18
|
+
puts "============"
|
19
|
+
puts "BUDGET MONTH"
|
20
|
+
puts "============"
|
21
|
+
puts " Month: #{budget_month.month}"
|
22
|
+
puts " Note: #{budget_month.note}"
|
23
|
+
puts "To Be Budgeted: #{budget_month.to_be_budgeted}"
|
24
|
+
puts " Age of Money: #{budget_month.age_of_money}"
|
25
|
+
puts " Categories: "
|
26
|
+
|
27
|
+
budget_month.categories.each do |category|
|
28
|
+
puts " #{category.name} - $#{category.balance}"
|
29
|
+
end
|
30
|
+
rescue YNAB::ApiError => e
|
31
|
+
puts "ERROR: id=#{e.id}; name=#{e.name}; detail: #{e.detail}"
|
32
|
+
end
|
33
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'ynab'
|
2
|
+
|
3
|
+
access_token = ENV['YNAB_ACCESS_TOKEN']
|
4
|
+
ynab = YNAB::API.new(access_token)
|
5
|
+
|
6
|
+
budget_id = ENV['YNAB_BUDGET_ID']
|
7
|
+
category_id = 'a191ac84-de09-not-real-6c5ed8cfdabe'
|
8
|
+
|
9
|
+
begin
|
10
|
+
puts 'Fetching category...'
|
11
|
+
|
12
|
+
category_response = ynab.categories.get_category_by_id(budget_id, category_id)
|
13
|
+
category = category_response.data.category
|
14
|
+
|
15
|
+
puts "==========="
|
16
|
+
puts "CATEGORY"
|
17
|
+
puts "==========="
|
18
|
+
puts " Name: #{category.name}"
|
19
|
+
puts " Budgeted: #{category.budgeted}"
|
20
|
+
puts " Balance: #{category.balance}"
|
21
|
+
rescue YNAB::ApiError => e
|
22
|
+
puts "ERROR: id=#{e.id}; name=#{e.name}; detail: #{e.detail}"
|
23
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'date'
|
2
|
+
require 'ynab'
|
3
|
+
|
4
|
+
access_token = ENV['YNAB_ACCESS_TOKEN']
|
5
|
+
ynab = YNAB::API.new(access_token)
|
6
|
+
|
7
|
+
budget_id = ENV['YNAB_BUDGET_ID']
|
8
|
+
account_id = 'f6fe07cb-c895-not-real-acfac0b7f026'
|
9
|
+
category_id = 'a191ac84-de09-not-real-6c5ed8cfdabe'
|
10
|
+
|
11
|
+
data = {
|
12
|
+
transactions: [
|
13
|
+
{
|
14
|
+
account_id: account_id,
|
15
|
+
category_id: category_id,
|
16
|
+
date: Date.today,
|
17
|
+
payee_name: 'A Test Payee',
|
18
|
+
memo: 'I was created through the API',
|
19
|
+
cleared: 'Cleared',
|
20
|
+
approved: true,
|
21
|
+
flag_color: 'Blue',
|
22
|
+
amount: 20000
|
23
|
+
},
|
24
|
+
{
|
25
|
+
account_id: account_id,
|
26
|
+
category_id: category_id,
|
27
|
+
date: Date.today,
|
28
|
+
payee_name: 'Another Test Payee',
|
29
|
+
memo: 'I was also created through the API',
|
30
|
+
cleared: 'Uncleared',
|
31
|
+
approved: false,
|
32
|
+
flag_color: 'Red',
|
33
|
+
amount: 39453
|
34
|
+
}
|
35
|
+
]
|
36
|
+
}
|
37
|
+
|
38
|
+
begin
|
39
|
+
ynab.transactions.create_transaction(budget_id, data)
|
40
|
+
rescue YNAB::ApiError => e
|
41
|
+
puts "ERROR: id=#{e.id}; name=#{e.name}; detail: #{e.detail}"
|
42
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'date'
|
2
|
+
require 'ynab'
|
3
|
+
|
4
|
+
access_token = ENV['YNAB_ACCESS_TOKEN']
|
5
|
+
ynab = YNAB::API.new(access_token)
|
6
|
+
|
7
|
+
budget_id = ENV['YNAB_BUDGET_ID']
|
8
|
+
account_id = 'f6fe07cb-c895-not-real-acfac0b7f026'
|
9
|
+
category_id = 'a191ac84-de09-not-real-6c5ed8cfdabe'
|
10
|
+
|
11
|
+
data = {
|
12
|
+
transaction: {
|
13
|
+
account_id: account_id,
|
14
|
+
category_id: category_id,
|
15
|
+
date: Date.today,
|
16
|
+
payee_name: 'A Test Payee',
|
17
|
+
memo: 'I was created through the API',
|
18
|
+
cleared: 'Cleared',
|
19
|
+
approved: true,
|
20
|
+
flag_color: 'Blue',
|
21
|
+
amount: 20000
|
22
|
+
}
|
23
|
+
}
|
24
|
+
|
25
|
+
begin
|
26
|
+
ynab.transactions.create_transaction(budget_id, data)
|
27
|
+
rescue YNAB::ApiError => e
|
28
|
+
puts "ERROR: id=#{e.id}; name=#{e.name}; detail: #{e.detail}"
|
29
|
+
end
|
30
|
+
|