ynab 2.1.0 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/DEVELOPMENT.md +6 -2
- data/Gemfile.lock +1 -1
- data/README.md +3 -1
- data/Rakefile +3 -1
- data/docs/BulkTransactions.md +1 -1
- data/docs/CategoriesApi.md +22 -0
- data/docs/Category.md +1 -0
- data/docs/ExistingTransaction.md +18 -0
- data/docs/HybridTransaction.md +3 -2
- data/docs/NewTransaction.md +19 -0
- data/docs/PatchCategoryWrapper.md +8 -0
- data/docs/PatchPayeeWrapper.md +8 -0
- data/docs/PatchTransactionsWrapper.md +1 -1
- data/docs/PayeesApi.md +22 -0
- data/docs/PostTransactionsWrapper.md +2 -2
- data/docs/PutTransactionWrapper.md +1 -1
- data/docs/SaveCategory.md +10 -0
- data/docs/SavePayee.md +8 -0
- data/docs/SavePayeeResponse.md +8 -0
- data/docs/SavePayeeResponseData.md +9 -0
- data/docs/SaveTransactionWithIdOrImportId.md +20 -0
- data/docs/SaveTransactionWithOptionalFields.md +2 -3
- data/docs/ScheduledTransactionDetail.md +2 -1
- data/docs/ScheduledTransactionSummary.md +2 -1
- data/docs/TransactionClearedStatus.md +7 -0
- data/docs/TransactionDetail.md +3 -2
- data/docs/TransactionFlagColor.md +7 -0
- data/docs/TransactionSummary.md +3 -2
- data/docs/TransactionsApi.md +7 -7
- data/lib/ynab/api/accounts_api.rb +2 -2
- data/lib/ynab/api/budgets_api.rb +2 -2
- data/lib/ynab/api/categories_api.rb +82 -2
- data/lib/ynab/api/months_api.rb +2 -2
- data/lib/ynab/api/payee_locations_api.rb +2 -2
- data/lib/ynab/api/payees_api.rb +82 -2
- data/lib/ynab/api/scheduled_transactions_api.rb +2 -2
- data/lib/ynab/api/transactions_api.rb +12 -12
- data/lib/ynab/api/user_api.rb +2 -2
- data/lib/ynab/api_client.rb +2 -2
- data/lib/ynab/configuration.rb +14 -11
- data/lib/ynab/models/account.rb +13 -20
- data/lib/ynab/models/account_response.rb +13 -20
- data/lib/ynab/models/account_response_data.rb +13 -20
- data/lib/ynab/models/account_type.rb +2 -2
- data/lib/ynab/models/accounts_response.rb +13 -20
- data/lib/ynab/models/accounts_response_data.rb +13 -20
- data/lib/ynab/models/budget_detail.rb +13 -21
- data/lib/ynab/models/budget_detail_response.rb +13 -20
- data/lib/ynab/models/budget_detail_response_data.rb +13 -20
- data/lib/ynab/models/budget_settings.rb +13 -20
- data/lib/ynab/models/budget_settings_response.rb +13 -20
- data/lib/ynab/models/budget_settings_response_data.rb +13 -20
- data/lib/ynab/models/budget_summary.rb +13 -20
- data/lib/ynab/models/budget_summary_response.rb +13 -20
- data/lib/ynab/models/budget_summary_response_data.rb +13 -20
- data/lib/ynab/models/bulk_response.rb +13 -20
- data/lib/ynab/models/bulk_response_data.rb +13 -20
- data/lib/ynab/models/bulk_response_data_bulk.rb +13 -20
- data/lib/ynab/models/bulk_transactions.rb +14 -21
- data/lib/ynab/models/categories_response.rb +13 -20
- data/lib/ynab/models/categories_response_data.rb +13 -20
- data/lib/ynab/models/category.rb +25 -21
- data/lib/ynab/models/category_group.rb +13 -20
- data/lib/ynab/models/category_group_with_categories.rb +14 -22
- data/lib/ynab/models/category_response.rb +13 -20
- data/lib/ynab/models/category_response_data.rb +13 -20
- data/lib/ynab/models/currency_format.rb +13 -20
- data/lib/ynab/models/date_format.rb +13 -20
- data/lib/ynab/models/error_detail.rb +13 -20
- data/lib/ynab/models/error_response.rb +13 -20
- data/lib/ynab/models/existing_transaction.rb +359 -0
- data/lib/ynab/models/hybrid_transaction.rb +28 -43
- data/lib/ynab/models/hybrid_transactions_response.rb +13 -20
- data/lib/ynab/models/hybrid_transactions_response_data.rb +13 -20
- data/lib/ynab/models/month_detail.rb +13 -21
- data/lib/ynab/models/month_detail_response.rb +13 -20
- data/lib/ynab/models/month_detail_response_data.rb +13 -20
- data/lib/ynab/models/month_summaries_response.rb +13 -20
- data/lib/ynab/models/month_summaries_response_data.rb +13 -20
- data/lib/ynab/models/month_summary.rb +13 -20
- data/lib/ynab/models/new_transaction.rb +377 -0
- data/lib/ynab/models/patch_category_wrapper.rb +213 -0
- data/lib/ynab/models/patch_month_category_wrapper.rb +13 -20
- data/lib/ynab/models/patch_payee_wrapper.rb +213 -0
- data/lib/ynab/models/patch_transactions_wrapper.rb +14 -21
- data/lib/ynab/models/payee.rb +13 -20
- data/lib/ynab/models/payee_location.rb +13 -20
- data/lib/ynab/models/payee_location_response.rb +13 -20
- data/lib/ynab/models/payee_location_response_data.rb +13 -20
- data/lib/ynab/models/payee_locations_response.rb +13 -20
- data/lib/ynab/models/payee_locations_response_data.rb +13 -20
- data/lib/ynab/models/payee_response.rb +13 -20
- data/lib/ynab/models/payee_response_data.rb +13 -20
- data/lib/ynab/models/payees_response.rb +13 -20
- data/lib/ynab/models/payees_response_data.rb +13 -20
- data/lib/ynab/models/post_account_wrapper.rb +13 -20
- data/lib/ynab/models/post_transactions_wrapper.rb +15 -22
- data/lib/ynab/models/put_transaction_wrapper.rb +14 -21
- data/lib/ynab/models/save_account.rb +13 -20
- data/lib/ynab/models/save_category.rb +232 -0
- data/lib/ynab/models/save_category_response.rb +13 -20
- data/lib/ynab/models/save_category_response_data.rb +13 -20
- data/lib/ynab/models/save_month_category.rb +13 -20
- data/lib/ynab/models/save_payee.rb +220 -0
- data/lib/ynab/models/save_payee_response.rb +213 -0
- data/lib/ynab/models/save_payee_response_data.rb +224 -0
- data/lib/ynab/models/save_sub_transaction.rb +13 -20
- data/lib/ynab/models/save_transaction_with_id_or_import_id.rb +388 -0
- data/lib/ynab/models/save_transaction_with_optional_fields.rb +17 -59
- data/lib/ynab/models/save_transactions_response.rb +13 -20
- data/lib/ynab/models/save_transactions_response_data.rb +13 -20
- data/lib/ynab/models/scheduled_sub_transaction.rb +13 -20
- data/lib/ynab/models/scheduled_transaction_detail.rb +26 -32
- data/lib/ynab/models/scheduled_transaction_response.rb +13 -20
- data/lib/ynab/models/scheduled_transaction_response_data.rb +13 -20
- data/lib/ynab/models/scheduled_transaction_summary.rb +26 -31
- data/lib/ynab/models/scheduled_transactions_response.rb +13 -20
- data/lib/ynab/models/scheduled_transactions_response_data.rb +13 -20
- data/lib/ynab/models/sub_transaction.rb +13 -20
- data/lib/ynab/models/transaction_cleared_status.rb +41 -0
- data/lib/ynab/models/transaction_detail.rb +28 -43
- data/lib/ynab/models/transaction_flag_color.rb +45 -0
- data/lib/ynab/models/transaction_response.rb +13 -20
- data/lib/ynab/models/transaction_response_data.rb +13 -20
- data/lib/ynab/models/transaction_summary.rb +28 -42
- data/lib/ynab/models/transactions_import_response.rb +13 -20
- data/lib/ynab/models/transactions_import_response_data.rb +13 -20
- data/lib/ynab/models/transactions_response.rb +13 -20
- data/lib/ynab/models/transactions_response_data.rb +13 -20
- data/lib/ynab/models/user.rb +13 -20
- data/lib/ynab/models/user_response.rb +13 -20
- data/lib/ynab/models/user_response_data.rb +13 -20
- data/lib/ynab/version.rb +1 -1
- data/lib/ynab.rb +13 -12
- data/open_api_spec.yaml +464 -343
- data/ynab.gemspec +4 -3
- metadata +53 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ec5def81c2d3dc67021be1eabb7a365f8901a8a53493c74e0411b664806bb47
|
4
|
+
data.tar.gz: e2f84449d1927f430af4752efb510e4205af2ba174afd57dc76567409f5ecf07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49c09c3862fa6e7f5d844ae8d1351779ea54f919b9f1ceb91b1d373d94f83c5f37ac49231bd1d8219a268aaab2e6e2e99420ac62f238564ee69de23523cdf6b8
|
7
|
+
data.tar.gz: 04ae2f871e3c7981a17c97a1f2695cdab671dc9428346d5081d27900056ae653b357b8b2d84bc41f0c1ba0c87594b64da0e05248e88869615ba5ab779d442716
|
data/DEVELOPMENT.md
CHANGED
@@ -3,9 +3,13 @@
|
|
3
3
|
## Setup
|
4
4
|
|
5
5
|
- Install dependencies: `bundle`
|
6
|
-
- Generate latest client based on
|
7
|
-
-
|
6
|
+
- Generate latest client based on OpenAPI spec:
|
7
|
+
- Install [OpenAPI Generator](https://openapi-generator.tech/), for macOS: `brew install openapi-generator`
|
8
|
+
- Run `bundle exec rake generate`
|
9
|
+
- Run tests: `bundle exec rake spec` or `rspec`
|
8
10
|
|
9
11
|
## Publishing
|
10
12
|
|
11
13
|
Run the "Publish" GitHub Actions workflow
|
14
|
+
|
15
|
+
Note: Use the Publish workflow to bump the version number in `lib/ynab/version.rb`
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -16,6 +16,8 @@ This client is generated using the [OpenAPI Generator](https://openapi-generator
|
|
16
16
|
gem install ynab
|
17
17
|
```
|
18
18
|
|
19
|
+
Note: The current version of this gem requires Ruby version 3.3 or later. If you are using an older version of Ruby, you can install [version 2.1](https://rubygems.org/gems/ynab/versions/2.1.0) of this gem.
|
20
|
+
|
19
21
|
## Usage
|
20
22
|
To use this client you must
|
21
23
|
[obtain an access token](https://api.ynab.com/#authentication-overview) from
|
@@ -78,6 +80,6 @@ The following methods are available in this library.
|
|
78
80
|
|
79
81
|
## License
|
80
82
|
|
81
|
-
Copyright (c)
|
83
|
+
Copyright (c) 2024 You Need A Budget, LLC
|
82
84
|
|
83
85
|
Licensed under the Apache-2.0 license
|
data/Rakefile
CHANGED
@@ -12,12 +12,14 @@ end
|
|
12
12
|
|
13
13
|
task :default => [:spec]
|
14
14
|
|
15
|
+
REQUIRED_RUBY_VERSION = ">= 3.3"
|
16
|
+
|
15
17
|
desc "Run Swagger Code Generator to update the client from the Swagger spec"
|
16
18
|
task :generate do
|
17
19
|
# Download latest swagger spec
|
18
20
|
spec_filename = 'open_api_spec.yaml'
|
19
21
|
sh "wget https://api.ynab.com/papi/#{spec_filename} -O ./#{spec_filename}"
|
20
|
-
sh "openapi-generator generate -i ./#{spec_filename} -g ruby -c config.json -t ./templates -o ./"
|
22
|
+
sh "openapi-generator generate -i ./#{spec_filename} -g ruby --additional-properties=gemRequiredRubyVersion='#{REQUIRED_RUBY_VERSION}' -c config.json -t ./templates -o ./"
|
21
23
|
end
|
22
24
|
|
23
25
|
task :get_current_version do
|
data/docs/BulkTransactions.md
CHANGED
@@ -4,5 +4,5 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **transactions** | [**Array<
|
7
|
+
| **transactions** | [**Array<SaveTransactionWithOptionalFields>**](SaveTransactionWithOptionalFields.md) | | |
|
8
8
|
|
data/docs/CategoriesApi.md
CHANGED
@@ -7,6 +7,7 @@ All URIs are relative to *https://api.ynab.com/v1*
|
|
7
7
|
| [**get_categories**](CategoriesApi.md#get_categories) | **GET** /budgets/{budget_id}/categories | List categories |
|
8
8
|
| [**get_category_by_id**](CategoriesApi.md#get_category_by_id) | **GET** /budgets/{budget_id}/categories/{category_id} | Single category |
|
9
9
|
| [**get_month_category_by_id**](CategoriesApi.md#get_month_category_by_id) | **GET** /budgets/{budget_id}/months/{month}/categories/{category_id} | Single category for a specific budget month |
|
10
|
+
| [**update_category**](CategoriesApi.md#update_category) | **PATCH** /budgets/{budget_id}/categories/{category_id} | Update a category |
|
10
11
|
| [**update_month_category**](CategoriesApi.md#update_month_category) | **PATCH** /budgets/{budget_id}/months/{month}/categories/{category_id} | Update a category for a specific month |
|
11
12
|
|
12
13
|
|
@@ -71,6 +72,27 @@ Returns a single category for a specific budget month. Amounts (budgeted, activ
|
|
71
72
|
[**CategoryResponse**](CategoryResponse.md)
|
72
73
|
|
73
74
|
|
75
|
+
## update_category
|
76
|
+
|
77
|
+
> <SaveCategoryResponse> update_category(budget_id, category_id, data)
|
78
|
+
|
79
|
+
Update a category
|
80
|
+
|
81
|
+
Update a category
|
82
|
+
|
83
|
+
### Parameters
|
84
|
+
|
85
|
+
| Name | Type | Description | Notes |
|
86
|
+
| ---- | ---- | ----------- | ----- |
|
87
|
+
| **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). | |
|
88
|
+
| **category_id** | **String** | The id of the category | |
|
89
|
+
| **data** | [**PatchCategoryWrapper**](PatchCategoryWrapper.md) | The category to update | |
|
90
|
+
|
91
|
+
### Return type
|
92
|
+
|
93
|
+
[**SaveCategoryResponse**](SaveCategoryResponse.md)
|
94
|
+
|
95
|
+
|
74
96
|
## update_month_category
|
75
97
|
|
76
98
|
> <SaveCategoryResponse> update_month_category(budget_id, month, category_id, data)
|
data/docs/Category.md
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
| **activity** | **Integer** | Activity amount in milliunits format | |
|
16
16
|
| **balance** | **Integer** | Balance in milliunits format | |
|
17
17
|
| **goal_type** | **String** | The type of goal, if the category has a goal (TB='Target Category Balance', TBD='Target Category Balance by Date', MF='Monthly Funding', NEED='Plan Your Spending') | [optional] |
|
18
|
+
| **goal_needs_whole_amount** | **Boolean** | Indicates the monthly rollover behavior for \"NEED\"-type goals. When \"true\", the goal will always ask for the target amount in the new month (\"Set Aside\"). When \"false\", previous month category funding is used (\"Refill\"). For other goal types, this field will be null. | [optional] |
|
18
19
|
| **goal_day** | **Integer** | A day offset modifier for the goal's due date. When goal_cadence is 2 (Weekly), this value specifies which day of the week the goal is due (0 = Sunday, 6 = Saturday). Otherwise, this value specifies which day of the month the goal is due (1 = 1st, 31 = 31st, null = Last day of Month). | [optional] |
|
19
20
|
| **goal_cadence** | **Integer** | The goal cadence. Value in range 0-14. There are two subsets of these values which behave differently. For values 0, 1, 2, and 13, the goal's due date repeats every goal_cadence * goal_cadence_frequency, where 0 = None, 1 = Monthly, 2 = Weekly, and 13 = Yearly. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month. For values 3-12 and 14, goal_cadence_frequency is ignored and the goal's due date repeats every goal_cadence, where 3 = Every 2 Months, 4 = Every 3 Months, ..., 12 = Every 11 Months, and 14 = Every 2 Years. | [optional] |
|
20
21
|
| **goal_cadence_frequency** | **Integer** | The goal cadence frequency. When goal_cadence is 0, 1, 2, or 13, a goal's due date repeats every goal_cadence * goal_cadence_frequency. For example, goal_cadence 1 with goal_cadence_frequency 2 means the goal is due every other month. When goal_cadence is 3-12 or 14, goal_cadence_frequency is ignored. | [optional] |
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# YNAB::ExistingTransaction
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **account_id** | **String** | | [optional] |
|
8
|
+
| **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. | [optional] |
|
9
|
+
| **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. | [optional] |
|
10
|
+
| **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] |
|
11
|
+
| **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] |
|
12
|
+
| **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] |
|
13
|
+
| **memo** | **String** | | [optional] |
|
14
|
+
| **cleared** | [**TransactionClearedStatus**](TransactionClearedStatus.md) | | [optional] |
|
15
|
+
| **approved** | **Boolean** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional] |
|
16
|
+
| **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [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
|
+
|
data/docs/HybridTransaction.md
CHANGED
@@ -8,9 +8,10 @@
|
|
8
8
|
| **date** | **Date** | The transaction date in ISO format (e.g. 2016-12-01) | |
|
9
9
|
| **amount** | **Integer** | The transaction amount in milliunits format | |
|
10
10
|
| **memo** | **String** | | [optional] |
|
11
|
-
| **cleared** | **
|
11
|
+
| **cleared** | [**TransactionClearedStatus**](TransactionClearedStatus.md) | | |
|
12
12
|
| **approved** | **Boolean** | Whether or not the transaction is approved | |
|
13
|
-
| **flag_color** | **
|
13
|
+
| **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
|
14
|
+
| **flag_name** | **String** | The customized name of a transaction flag | [optional] |
|
14
15
|
| **account_id** | **String** | | |
|
15
16
|
| **payee_id** | **String** | | [optional] |
|
16
17
|
| **category_id** | **String** | | [optional] |
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# YNAB::NewTransaction
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **account_id** | **String** | | [optional] |
|
8
|
+
| **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. | [optional] |
|
9
|
+
| **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. | [optional] |
|
10
|
+
| **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] |
|
11
|
+
| **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] |
|
12
|
+
| **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] |
|
13
|
+
| **memo** | **String** | | [optional] |
|
14
|
+
| **cleared** | [**TransactionClearedStatus**](TransactionClearedStatus.md) | | [optional] |
|
15
|
+
| **approved** | **Boolean** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional] |
|
16
|
+
| **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [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
|
+
| **import_id** | **String** | If specified, a 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\" transaction 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] |
|
19
|
+
|
@@ -4,5 +4,5 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **transactions** | [**Array<
|
7
|
+
| **transactions** | [**Array<SaveTransactionWithIdOrImportId>**](SaveTransactionWithIdOrImportId.md) | | |
|
8
8
|
|
data/docs/PayeesApi.md
CHANGED
@@ -6,6 +6,7 @@ All URIs are relative to *https://api.ynab.com/v1*
|
|
6
6
|
| ------ | ------------ | ----------- |
|
7
7
|
| [**get_payee_by_id**](PayeesApi.md#get_payee_by_id) | **GET** /budgets/{budget_id}/payees/{payee_id} | Single payee |
|
8
8
|
| [**get_payees**](PayeesApi.md#get_payees) | **GET** /budgets/{budget_id}/payees | List payees |
|
9
|
+
| [**update_payee**](PayeesApi.md#update_payee) | **PATCH** /budgets/{budget_id}/payees/{payee_id} | Update a payee |
|
9
10
|
|
10
11
|
|
11
12
|
## get_payee_by_id
|
@@ -47,3 +48,24 @@ Returns all payees
|
|
47
48
|
|
48
49
|
[**PayeesResponse**](PayeesResponse.md)
|
49
50
|
|
51
|
+
|
52
|
+
## update_payee
|
53
|
+
|
54
|
+
> <SavePayeeResponse> update_payee(budget_id, payee_id, data)
|
55
|
+
|
56
|
+
Update a payee
|
57
|
+
|
58
|
+
Update a payee
|
59
|
+
|
60
|
+
### Parameters
|
61
|
+
|
62
|
+
| Name | Type | Description | Notes |
|
63
|
+
| ---- | ---- | ----------- | ----- |
|
64
|
+
| **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). | |
|
65
|
+
| **payee_id** | **String** | The id of the payee | |
|
66
|
+
| **data** | [**PatchPayeeWrapper**](PatchPayeeWrapper.md) | The payee to update | |
|
67
|
+
|
68
|
+
### Return type
|
69
|
+
|
70
|
+
[**SavePayeeResponse**](SavePayeeResponse.md)
|
71
|
+
|
@@ -4,6 +4,6 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **transaction** | [**
|
8
|
-
| **transactions** | [**Array<
|
7
|
+
| **transaction** | [**NewTransaction**](NewTransaction.md) | | [optional] |
|
8
|
+
| **transactions** | [**Array<NewTransaction>**](NewTransaction.md) | | [optional] |
|
9
9
|
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# YNAB::SaveCategory
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | | [optional] |
|
8
|
+
| **note** | **String** | | [optional] |
|
9
|
+
| **category_group_id** | **String** | | [optional] |
|
10
|
+
|
data/docs/SavePayee.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# YNAB::SaveTransactionWithIdOrImportId
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **account_id** | **String** | | [optional] |
|
8
|
+
| **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. | [optional] |
|
9
|
+
| **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. | [optional] |
|
10
|
+
| **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] |
|
11
|
+
| **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] |
|
12
|
+
| **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] |
|
13
|
+
| **memo** | **String** | | [optional] |
|
14
|
+
| **cleared** | [**TransactionClearedStatus**](TransactionClearedStatus.md) | | [optional] |
|
15
|
+
| **approved** | **Boolean** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional] |
|
16
|
+
| **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [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** | If specified, this id will be used to lookup a transaction by its `id` for the purpose of updating the transaction itself. If not specified, an `import_id` should be supplied. | [optional] |
|
19
|
+
| **import_id** | **String** | If specified, this id will be used to lookup a transaction by its `import_id` for the purpose of updating the transaction itself. If not specified, an `id` should be supplied. You may not provide both an `id` and an `import_id` and updating an `import_id` on an existing transaction is not allowed. | [optional] |
|
20
|
+
|
@@ -11,9 +11,8 @@
|
|
11
11
|
| **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] |
|
12
12
|
| **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] |
|
13
13
|
| **memo** | **String** | | [optional] |
|
14
|
-
| **cleared** | **
|
14
|
+
| **cleared** | [**TransactionClearedStatus**](TransactionClearedStatus.md) | | [optional] |
|
15
15
|
| **approved** | **Boolean** | Whether or not the transaction is approved. If not supplied, transaction will be unapproved by default. | [optional] |
|
16
|
-
| **flag_color** | **
|
17
|
-
| **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] |
|
16
|
+
| **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
|
18
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] |
|
19
18
|
|
@@ -10,7 +10,8 @@
|
|
10
10
|
| **frequency** | **String** | | |
|
11
11
|
| **amount** | **Integer** | The scheduled transaction amount in milliunits format | |
|
12
12
|
| **memo** | **String** | | [optional] |
|
13
|
-
| **flag_color** | **
|
13
|
+
| **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
|
14
|
+
| **flag_name** | **String** | The customized name of a transaction flag | [optional] |
|
14
15
|
| **account_id** | **String** | | |
|
15
16
|
| **payee_id** | **String** | | [optional] |
|
16
17
|
| **category_id** | **String** | | [optional] |
|
@@ -10,7 +10,8 @@
|
|
10
10
|
| **frequency** | **String** | | |
|
11
11
|
| **amount** | **Integer** | The scheduled transaction amount in milliunits format | |
|
12
12
|
| **memo** | **String** | | [optional] |
|
13
|
-
| **flag_color** | **
|
13
|
+
| **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
|
14
|
+
| **flag_name** | **String** | The customized name of a transaction flag | [optional] |
|
14
15
|
| **account_id** | **String** | | |
|
15
16
|
| **payee_id** | **String** | | [optional] |
|
16
17
|
| **category_id** | **String** | | [optional] |
|
data/docs/TransactionDetail.md
CHANGED
@@ -8,9 +8,10 @@
|
|
8
8
|
| **date** | **Date** | The transaction date in ISO format (e.g. 2016-12-01) | |
|
9
9
|
| **amount** | **Integer** | The transaction amount in milliunits format | |
|
10
10
|
| **memo** | **String** | | [optional] |
|
11
|
-
| **cleared** | **
|
11
|
+
| **cleared** | [**TransactionClearedStatus**](TransactionClearedStatus.md) | | |
|
12
12
|
| **approved** | **Boolean** | Whether or not the transaction is approved | |
|
13
|
-
| **flag_color** | **
|
13
|
+
| **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
|
14
|
+
| **flag_name** | **String** | The customized name of a transaction flag | [optional] |
|
14
15
|
| **account_id** | **String** | | |
|
15
16
|
| **payee_id** | **String** | | [optional] |
|
16
17
|
| **category_id** | **String** | | [optional] |
|
data/docs/TransactionSummary.md
CHANGED
@@ -8,9 +8,10 @@
|
|
8
8
|
| **date** | **Date** | The transaction date in ISO format (e.g. 2016-12-01) | |
|
9
9
|
| **amount** | **Integer** | The transaction amount in milliunits format | |
|
10
10
|
| **memo** | **String** | | [optional] |
|
11
|
-
| **cleared** | **
|
11
|
+
| **cleared** | [**TransactionClearedStatus**](TransactionClearedStatus.md) | | |
|
12
12
|
| **approved** | **Boolean** | Whether or not the transaction is approved | |
|
13
|
-
| **flag_color** | **
|
13
|
+
| **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
|
14
|
+
| **flag_name** | **String** | The customized name of a transaction flag | [optional] |
|
14
15
|
| **account_id** | **String** | | |
|
15
16
|
| **payee_id** | **String** | | [optional] |
|
16
17
|
| **category_id** | **String** | | [optional] |
|
data/docs/TransactionsApi.md
CHANGED
@@ -9,8 +9,8 @@ All URIs are relative to *https://api.ynab.com/v1*
|
|
9
9
|
| [**get_transaction_by_id**](TransactionsApi.md#get_transaction_by_id) | **GET** /budgets/{budget_id}/transactions/{transaction_id} | Single transaction |
|
10
10
|
| [**get_transactions**](TransactionsApi.md#get_transactions) | **GET** /budgets/{budget_id}/transactions | List transactions |
|
11
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 |
|
12
|
+
| [**get_transactions_by_category**](TransactionsApi.md#get_transactions_by_category) | **GET** /budgets/{budget_id}/categories/{category_id}/transactions | List category transactions, excluding any pending transactions |
|
13
|
+
| [**get_transactions_by_payee**](TransactionsApi.md#get_transactions_by_payee) | **GET** /budgets/{budget_id}/payees/{payee_id}/transactions | List payee transactions, excluding any pending transactions |
|
14
14
|
| [**import_transactions**](TransactionsApi.md#import_transactions) | **POST** /budgets/{budget_id}/transactions/import | Import transactions |
|
15
15
|
| [**update_transaction**](TransactionsApi.md#update_transaction) | **PUT** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction |
|
16
16
|
| [**update_transactions**](TransactionsApi.md#update_transactions) | **PATCH** /budgets/{budget_id}/transactions | Update multiple transactions |
|
@@ -82,7 +82,7 @@ Returns a single transaction
|
|
82
82
|
|
83
83
|
List transactions
|
84
84
|
|
85
|
-
Returns budget transactions
|
85
|
+
Returns budget transactions, excluding any pending transactions
|
86
86
|
|
87
87
|
### Parameters
|
88
88
|
|
@@ -104,7 +104,7 @@ Returns budget transactions
|
|
104
104
|
|
105
105
|
List account transactions
|
106
106
|
|
107
|
-
Returns all transactions for a specified account
|
107
|
+
Returns all transactions for a specified account, excluding any pending transactions
|
108
108
|
|
109
109
|
### Parameters
|
110
110
|
|
@@ -125,7 +125,7 @@ Returns all transactions for a specified account
|
|
125
125
|
|
126
126
|
> <HybridTransactionsResponse> get_transactions_by_category(budget_id, category_id, opts)
|
127
127
|
|
128
|
-
List category transactions
|
128
|
+
List category transactions, excluding any pending transactions
|
129
129
|
|
130
130
|
Returns all transactions for a specified category
|
131
131
|
|
@@ -148,7 +148,7 @@ Returns all transactions for a specified category
|
|
148
148
|
|
149
149
|
> <HybridTransactionsResponse> get_transactions_by_payee(budget_id, payee_id, opts)
|
150
150
|
|
151
|
-
List payee transactions
|
151
|
+
List payee transactions, excluding any pending transactions
|
152
152
|
|
153
153
|
Returns all transactions for a specified payee
|
154
154
|
|
@@ -220,7 +220,7 @@ Updates multiple transactions, by `id` or `import_id`.
|
|
220
220
|
| Name | Type | Description | Notes |
|
221
221
|
| ---- | ---- | ----------- | ----- |
|
222
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
|
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 its `import_id`. If an `id` is specified, it will always be used for lookup. You should not specify both `id` and `import_id`. Updating an `import_id` on an existing transaction is not allowed; if an `import_id` is specified, it will only be used to lookup the transaction. | |
|
224
224
|
|
225
225
|
### Return type
|
226
226
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.70.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
data/lib/ynab/api/budgets_api.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.70.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.70.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -229,6 +229,86 @@ module YNAB
|
|
229
229
|
return data, status_code, headers
|
230
230
|
end
|
231
231
|
|
232
|
+
# Update a category
|
233
|
+
# Update a category
|
234
|
+
# @param 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).
|
235
|
+
# @param category_id [String] The id of the category
|
236
|
+
# @param data [PatchCategoryWrapper] The category to update
|
237
|
+
# @param [Hash] opts the optional parameters
|
238
|
+
# @return [SaveCategoryResponse]
|
239
|
+
def update_category(budget_id, category_id, data, opts = {})
|
240
|
+
data, _status_code, _headers = update_category_with_http_info(budget_id, category_id, data, opts)
|
241
|
+
data
|
242
|
+
end
|
243
|
+
|
244
|
+
# Update a category
|
245
|
+
# Update a category
|
246
|
+
# @param 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).
|
247
|
+
# @param category_id [String] The id of the category
|
248
|
+
# @param data [PatchCategoryWrapper] The category to update
|
249
|
+
# @param [Hash] opts the optional parameters
|
250
|
+
# @return [Array<(SaveCategoryResponse, Integer, Hash)>] SaveCategoryResponse data, response status code and response headers
|
251
|
+
def update_category_with_http_info(budget_id, category_id, data, opts = {})
|
252
|
+
if @api_client.config.debugging
|
253
|
+
@api_client.config.logger.debug 'Calling API: CategoriesApi.update_category ...'
|
254
|
+
end
|
255
|
+
# verify the required parameter 'budget_id' is set
|
256
|
+
if @api_client.config.client_side_validation && budget_id.nil?
|
257
|
+
fail ArgumentError, "Missing the required parameter 'budget_id' when calling CategoriesApi.update_category"
|
258
|
+
end
|
259
|
+
# verify the required parameter 'category_id' is set
|
260
|
+
if @api_client.config.client_side_validation && category_id.nil?
|
261
|
+
fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoriesApi.update_category"
|
262
|
+
end
|
263
|
+
# verify the required parameter 'data' is set
|
264
|
+
if @api_client.config.client_side_validation && data.nil?
|
265
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling CategoriesApi.update_category"
|
266
|
+
end
|
267
|
+
# resource path
|
268
|
+
local_var_path = '/budgets/{budget_id}/categories/{category_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
|
269
|
+
|
270
|
+
# query parameters
|
271
|
+
query_params = opts[:query_params] || {}
|
272
|
+
|
273
|
+
# header parameters
|
274
|
+
header_params = opts[:header_params] || {}
|
275
|
+
# HTTP header 'Accept' (if needed)
|
276
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
277
|
+
# HTTP header 'Content-Type'
|
278
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
279
|
+
if !content_type.nil?
|
280
|
+
header_params['Content-Type'] = content_type
|
281
|
+
end
|
282
|
+
|
283
|
+
# form parameters
|
284
|
+
form_params = opts[:form_params] || {}
|
285
|
+
|
286
|
+
# http body (model)
|
287
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
|
288
|
+
|
289
|
+
# return_type
|
290
|
+
return_type = opts[:debug_return_type] || 'SaveCategoryResponse'
|
291
|
+
|
292
|
+
# auth_names
|
293
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
294
|
+
|
295
|
+
new_options = opts.merge(
|
296
|
+
:operation => :"CategoriesApi.update_category",
|
297
|
+
:header_params => header_params,
|
298
|
+
:query_params => query_params,
|
299
|
+
:form_params => form_params,
|
300
|
+
:body => post_body,
|
301
|
+
:auth_names => auth_names,
|
302
|
+
:return_type => return_type
|
303
|
+
)
|
304
|
+
|
305
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
306
|
+
if @api_client.config.debugging
|
307
|
+
@api_client.config.logger.debug "API called: CategoriesApi#update_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
308
|
+
end
|
309
|
+
return data, status_code, headers
|
310
|
+
end
|
311
|
+
|
232
312
|
# Update a category for a specific month
|
233
313
|
# Update a category for a specific month. Only `budgeted` amount can be updated.
|
234
314
|
# @param 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).
|
data/lib/ynab/api/months_api.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#Our API uses a REST based design, leverages the JSON data format, and relies upon HTTPS for transport. We respond with meaningful HTTP response codes and if an error occurs, we include error details in the response body. API Documentation is at https://api.ynab.com
|
5
5
|
|
6
|
-
The version of the OpenAPI document: 1.
|
6
|
+
The version of the OpenAPI document: 1.70.0
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
|
9
|
+
Generator version: 7.6.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|