ynab 3.2.0 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/Rakefile +6 -5
- data/config.yaml +11 -0
- data/docs/ExistingTransaction.md +1 -1
- data/docs/NewTransaction.md +1 -1
- data/docs/PostScheduledTransactionWrapper.md +8 -0
- data/docs/SaveScheduledTransaction.md +16 -0
- data/docs/SaveTransactionWithIdOrImportId.md +1 -1
- data/docs/SaveTransactionWithOptionalFields.md +1 -1
- data/docs/{SaveTransactionWithIdAllOf.md → ScheduledTransactionFrequency.md} +1 -2
- data/docs/ScheduledTransactionsApi.md +21 -0
- data/docs/TransactionsApi.md +25 -1
- data/lib/ynab/api/accounts_api.rb +1 -4
- data/lib/ynab/api/budgets_api.rb +1 -4
- data/lib/ynab/api/categories_api.rb +1 -4
- data/lib/ynab/api/months_api.rb +1 -4
- data/lib/ynab/api/payee_locations_api.rb +1 -4
- data/lib/ynab/api/payees_api.rb +1 -4
- data/lib/ynab/api/scheduled_transactions_api.rb +75 -4
- data/lib/ynab/api/transactions_api.rb +81 -6
- data/lib/ynab/api/user_api.rb +1 -4
- data/lib/ynab/api_client.rb +1 -4
- data/lib/ynab/api_error.rb +0 -12
- data/lib/ynab/configuration.rb +11 -4
- data/lib/ynab/models/account.rb +1 -4
- data/lib/ynab/models/account_response.rb +1 -4
- data/lib/ynab/models/account_response_data.rb +1 -4
- data/lib/ynab/models/account_type.rb +1 -4
- data/lib/ynab/models/accounts_response.rb +1 -4
- data/lib/ynab/models/accounts_response_data.rb +1 -4
- data/lib/ynab/models/budget_detail.rb +1 -4
- data/lib/ynab/models/budget_detail_response.rb +1 -4
- data/lib/ynab/models/budget_detail_response_data.rb +1 -4
- data/lib/ynab/models/budget_settings.rb +1 -4
- data/lib/ynab/models/budget_settings_response.rb +1 -4
- data/lib/ynab/models/budget_settings_response_data.rb +1 -4
- data/lib/ynab/models/budget_summary.rb +1 -4
- data/lib/ynab/models/budget_summary_response.rb +1 -4
- data/lib/ynab/models/budget_summary_response_data.rb +1 -4
- data/lib/ynab/models/bulk_response.rb +1 -4
- data/lib/ynab/models/bulk_response_data.rb +1 -4
- data/lib/ynab/models/bulk_response_data_bulk.rb +1 -4
- data/lib/ynab/models/bulk_transactions.rb +1 -4
- data/lib/ynab/models/categories_response.rb +1 -4
- data/lib/ynab/models/categories_response_data.rb +1 -4
- data/lib/ynab/models/category.rb +1 -4
- data/lib/ynab/models/category_group.rb +1 -4
- data/lib/ynab/models/category_group_with_categories.rb +1 -4
- data/lib/ynab/models/category_response.rb +1 -4
- data/lib/ynab/models/category_response_data.rb +1 -4
- data/lib/ynab/models/currency_format.rb +1 -4
- data/lib/ynab/models/date_format.rb +1 -4
- data/lib/ynab/models/error_detail.rb +1 -4
- data/lib/ynab/models/error_response.rb +1 -4
- data/lib/ynab/models/existing_transaction.rb +2 -5
- data/lib/ynab/models/hybrid_transaction.rb +1 -4
- data/lib/ynab/models/hybrid_transactions_response.rb +1 -4
- data/lib/ynab/models/hybrid_transactions_response_data.rb +1 -4
- data/lib/ynab/models/month_detail.rb +1 -4
- data/lib/ynab/models/month_detail_response.rb +1 -4
- data/lib/ynab/models/month_detail_response_data.rb +1 -4
- data/lib/ynab/models/month_summaries_response.rb +1 -4
- data/lib/ynab/models/month_summaries_response_data.rb +1 -4
- data/lib/ynab/models/month_summary.rb +1 -4
- data/lib/ynab/models/new_transaction.rb +2 -5
- data/lib/ynab/models/patch_category_wrapper.rb +1 -4
- data/lib/ynab/models/patch_month_category_wrapper.rb +1 -4
- data/lib/ynab/models/patch_payee_wrapper.rb +1 -4
- data/lib/ynab/models/patch_transactions_wrapper.rb +1 -4
- data/lib/ynab/models/payee.rb +1 -4
- data/lib/ynab/models/payee_location.rb +1 -4
- data/lib/ynab/models/payee_location_response.rb +1 -4
- data/lib/ynab/models/payee_location_response_data.rb +1 -4
- data/lib/ynab/models/payee_locations_response.rb +1 -4
- data/lib/ynab/models/payee_locations_response_data.rb +1 -4
- data/lib/ynab/models/payee_response.rb +1 -4
- data/lib/ynab/models/payee_response_data.rb +1 -4
- data/lib/ynab/models/payees_response.rb +1 -4
- data/lib/ynab/models/payees_response_data.rb +1 -4
- data/lib/ynab/models/post_account_wrapper.rb +1 -4
- data/lib/ynab/models/{save_transaction_with_id_all_of.rb → post_scheduled_transaction_wrapper.rb} +23 -32
- data/lib/ynab/models/post_transactions_wrapper.rb +1 -4
- data/lib/ynab/models/put_transaction_wrapper.rb +1 -4
- data/lib/ynab/models/save_account.rb +1 -4
- data/lib/ynab/models/save_category.rb +1 -4
- data/lib/ynab/models/save_category_response.rb +1 -4
- data/lib/ynab/models/save_category_response_data.rb +1 -4
- data/lib/ynab/models/save_month_category.rb +1 -4
- data/lib/ynab/models/save_payee.rb +1 -4
- data/lib/ynab/models/save_payee_response.rb +1 -4
- data/lib/ynab/models/save_payee_response_data.rb +1 -4
- data/lib/ynab/models/{hybrid_transaction_all_of.rb → save_scheduled_transaction.rb} +99 -62
- data/lib/ynab/models/save_sub_transaction.rb +1 -4
- data/lib/ynab/models/save_transaction_with_id_or_import_id.rb +2 -5
- data/lib/ynab/models/save_transaction_with_optional_fields.rb +2 -5
- data/lib/ynab/models/save_transactions_response.rb +1 -4
- data/lib/ynab/models/save_transactions_response_data.rb +1 -4
- data/lib/ynab/models/scheduled_sub_transaction.rb +1 -4
- data/lib/ynab/models/scheduled_transaction_detail.rb +1 -4
- data/lib/ynab/models/scheduled_transaction_frequency.rb +48 -0
- data/lib/ynab/models/scheduled_transaction_response.rb +1 -4
- data/lib/ynab/models/scheduled_transaction_response_data.rb +1 -4
- data/lib/ynab/models/scheduled_transaction_summary.rb +1 -4
- data/lib/ynab/models/scheduled_transactions_response.rb +1 -4
- data/lib/ynab/models/scheduled_transactions_response_data.rb +1 -4
- data/lib/ynab/models/sub_transaction.rb +1 -4
- data/lib/ynab/models/transaction_cleared_status.rb +1 -4
- data/lib/ynab/models/transaction_detail.rb +1 -4
- data/lib/ynab/models/transaction_flag_color.rb +1 -4
- data/lib/ynab/models/transaction_response.rb +1 -4
- data/lib/ynab/models/transaction_response_data.rb +1 -4
- data/lib/ynab/models/transaction_summary.rb +1 -4
- data/lib/ynab/models/transactions_import_response.rb +1 -4
- data/lib/ynab/models/transactions_import_response_data.rb +1 -4
- data/lib/ynab/models/transactions_response.rb +1 -4
- data/lib/ynab/models/transactions_response_data.rb +1 -4
- data/lib/ynab/models/user.rb +1 -4
- data/lib/ynab/models/user_response.rb +1 -4
- data/lib/ynab/models/user_response_data.rb +1 -4
- data/lib/ynab/overrides/transactions_api.rb +0 -12
- data/lib/ynab/version.rb +1 -13
- data/lib/ynab.rb +4 -4
- data/open_api_spec.yaml +190 -4
- data/spec/api/scheduled_transactions_spec.rb +20 -2
- data/spec/api/transactions_spec.rb +10 -0
- data/spec/fixtures/vcr_cassettes/create_scheduled_transaction.yml +63 -0
- data/spec/fixtures/vcr_cassettes/month_transactions.yml +46 -0
- data/templates/README.md +3 -0
- data/templates/api_info.mustache +9 -0
- data/templates/gemspec.mustache +41 -0
- data/ynab.gemspec +3 -6
- metadata +50 -84
- data/docs/AccountWrapper.md +0 -8
- data/docs/AccountsWrapper.md +0 -9
- data/docs/BudgetDetailAllOf.md +0 -17
- data/docs/BudgetDetailWrapper.md +0 -9
- data/docs/BudgetSettingsWrapper.md +0 -8
- data/docs/BudgetSummaryWrapper.md +0 -9
- data/docs/BulkIdWrapper.md +0 -8
- data/docs/BulkIds.md +0 -9
- data/docs/BulkTransactionCreateResponse.md +0 -8
- data/docs/BulkTransactionIds.md +0 -8
- data/docs/CategoryGroupWithCategoriesAllOf.md +0 -8
- data/docs/CategoryGroupsWrapper.md +0 -9
- data/docs/CategoryWrapper.md +0 -9
- data/docs/DeprecatedApi.md +0 -28
- data/docs/HybridTransactionAllOf.md +0 -12
- data/docs/HybridTransactionsWrapper.md +0 -8
- data/docs/LoanAccountPeriodicValue.md +0 -7
- data/docs/MonthDetailAllOf.md +0 -8
- data/docs/MonthDetailWrapper.md +0 -8
- data/docs/MonthSummariesWrapper.md +0 -9
- data/docs/PayeeLocationWrapper.md +0 -8
- data/docs/PayeeLocationsWrapper.md +0 -8
- data/docs/PayeeWrapper.md +0 -8
- data/docs/PayeesWrapper.md +0 -9
- data/docs/SaveAccountWrapper.md +0 -8
- data/docs/SaveMonthCategoryWrapper.md +0 -8
- data/docs/SaveTransaction.md +0 -19
- data/docs/SaveTransactionWithId.md +0 -20
- data/docs/SaveTransactionWrapper.md +0 -8
- data/docs/SaveTransactionsWrapper.md +0 -9
- data/docs/ScheduledTransactionDetailAllOf.md +0 -11
- data/docs/ScheduledTransactionWrapper.md +0 -8
- data/docs/ScheduledTransactionsWrapper.md +0 -8
- data/docs/TransactionDetailAllOf.md +0 -11
- data/docs/TransactionWrapper.md +0 -8
- data/docs/TransactionsWrapper.md +0 -9
- data/docs/UpdateTransaction.md +0 -20
- data/docs/UpdateTransactionsWrapper.md +0 -8
- data/docs/UserWrapper.md +0 -8
- data/lib/ynab/models/budget_detail_all_of.rb +0 -320
- data/lib/ynab/models/category_group_with_categories_all_of.rb +0 -223
- data/lib/ynab/models/month_detail_all_of.rb +0 -223
- data/lib/ynab/models/save_transaction.rb +0 -401
- data/lib/ynab/models/save_transaction_with_id.rb +0 -411
- data/lib/ynab/models/scheduled_transaction_detail_all_of.rb +0 -254
- data/lib/ynab/models/transaction_detail_all_of.rb +0 -254
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60c7893746e3928e8c08f17eea7e059d252453dd6e88c3d759849ccdbb407b86
|
4
|
+
data.tar.gz: 9309fb83f548172ab7e0b0b527459e9a75492bb07cb1f4fa41d7897a3cdd68c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30a0f7f2c0803398e77d4c55c352af4f5a8b84e5d323773f403816ce09a5422fb67a2a831c9a057258ad660dfb91126fa2a894547b53af12f13740b304ae5fb7
|
7
|
+
data.tar.gz: 9e631adfaff0f9232074dae1b5b9fc96f8b428d70b9e75e79cc4aa33f57d7e53e507ab5294c29d2a6e830f974c8950cf51138ccaea45a99b17ee41ecf3e18884
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -68,6 +68,7 @@ The following methods are available in this library.
|
|
68
68
|
| **Transactions** | [transactions.get_transactions(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transactions) | Returns budget transactions |
|
69
69
|
| | [transactions.get_transactions_by_account(budget_id, account_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transactions_by_account) | Returns all transactions for a specified account |
|
70
70
|
| | [transactions.get_transactions_by_category(budget_id, category_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transactions_by_category) | Returns all transactions for a specified category |
|
71
|
+
| | [transactions.get_transactions_by_month(budget_id, month)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transactions_by_month) | Returns all transactions for a specified month |
|
71
72
|
| | [transactions.get_transaction_by_id(budget_id, transaction_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#get_transaction_by_id) | Returns a single transaction |
|
72
73
|
| | [transactions.create_transaction(budget_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#create_transaction) | Creates a single transaction |
|
73
74
|
| | [transactions.create_transactions(budget_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#create_transaction) | Creates multiple transactions |
|
@@ -77,6 +78,7 @@ The following methods are available in this library.
|
|
77
78
|
| | [transactions.import_transactions(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/TransactionsApi.md#import_transactions) | Imports transactions |
|
78
79
|
| **Scheduled Transactions** | [scheduled_transactions.get_scheduled_transactions(budget_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#get_scheduled_transactions) | Returns all scheduled transactions |
|
79
80
|
| | [scheduled_transactions.get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | Returns a single scheduled transaction |
|
81
|
+
| | [scheduled_transactions.create_scheduled_transaction(budget_id, data)](https://github.com/ynab/ynab-sdk-ruby/blob/master/docs/ScheduledTransactionsApi.md#create_scheduled_transaction) | Creates a single scheduled transaction |
|
80
82
|
|
81
83
|
## License
|
82
84
|
|
data/Rakefile
CHANGED
@@ -12,14 +12,15 @@ end
|
|
12
12
|
|
13
13
|
task :default => [:spec]
|
14
14
|
|
15
|
-
|
16
|
-
|
17
|
-
desc "Run Swagger Code Generator to update the client from the Swagger spec"
|
15
|
+
desc "Run OpenAPI Generator to update the client from the spec"
|
18
16
|
task :generate do
|
19
|
-
# Download latest swagger spec
|
20
17
|
spec_filename = 'open_api_spec.yaml'
|
18
|
+
# Download latest spec
|
21
19
|
sh "wget https://api.ynab.com/papi/#{spec_filename} -O ./#{spec_filename}"
|
22
|
-
|
20
|
+
# Remove existing generated files to ensure old files are not included in the gem
|
21
|
+
sh "rm -r docs/ lib/ynab/models/"
|
22
|
+
# Generate the client
|
23
|
+
sh "openapi-generator generate -i ./#{spec_filename} -g ruby -c config.yaml -o ./"
|
23
24
|
end
|
24
25
|
|
25
26
|
task :get_current_version do
|
data/config.yaml
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
gemName: ynab
|
2
|
+
moduleName: YNAB
|
3
|
+
gemSummary: YNAB API Client for Ruby
|
4
|
+
gemDescription: Ruby gem wrapper for the YNAB API. API documentation available at https://api.ynab.com.
|
5
|
+
gemHomepage: https://github.com/ynab/ynab-sdk-ruby
|
6
|
+
gemLicense: Apache-2.0
|
7
|
+
gemAuthor: YNAB
|
8
|
+
gemAuthorEmail: api@ynab.com
|
9
|
+
templateDir: ./templates
|
10
|
+
additionalProperties:
|
11
|
+
gemRequiredRubyVersion: ">= 3.3"
|
data/docs/ExistingTransaction.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
| **account_id** | **String** | | [optional] |
|
8
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
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 `
|
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 `transfer_payee_id` on the account resource. | [optional] |
|
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] |
|
data/docs/NewTransaction.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
| **account_id** | **String** | | [optional] |
|
8
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
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 `
|
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 `transfer_payee_id` on the account resource. | [optional] |
|
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] |
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# YNAB::SaveScheduledTransaction
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **account_id** | **String** | | |
|
8
|
+
| **date** | **Date** | The scheduled transaction date in ISO format (e.g. 2016-12-01). | |
|
9
|
+
| **amount** | **Integer** | The scheduled transaction amount in milliunits format. | [optional] |
|
10
|
+
| **payee_id** | **String** | The payee for the scheduled transaction. To create a transfer between two accounts, use the account transfer payee pointing to the target account. Account transfer payees are specified as `transfer_payee_id` on the account resource. | [optional] |
|
11
|
+
| **payee_name** | **String** | The payee name for the the scheduled transaction. 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 payee with the same name or (2) creation of a new payee. | [optional] |
|
12
|
+
| **category_id** | **String** | The category for the scheduled transaction. Credit Card Payment categories are not permitted. Creating a split scheduled transaction is not currently supported. | [optional] |
|
13
|
+
| **memo** | **String** | | [optional] |
|
14
|
+
| **flag_color** | [**TransactionFlagColor**](TransactionFlagColor.md) | | [optional] |
|
15
|
+
| **frequency** | [**ScheduledTransactionFrequency**](ScheduledTransactionFrequency.md) | | [optional] |
|
16
|
+
|
@@ -7,7 +7,7 @@
|
|
7
7
|
| **account_id** | **String** | | [optional] |
|
8
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
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 `
|
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 `transfer_payee_id` on the account resource. | [optional] |
|
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] |
|
@@ -7,7 +7,7 @@
|
|
7
7
|
| **account_id** | **String** | | [optional] |
|
8
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
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 `
|
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 `transfer_payee_id` on the account resource. | [optional] |
|
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] |
|
@@ -4,10 +4,31 @@ All URIs are relative to *https://api.ynab.com/v1*
|
|
4
4
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
|
+
| [**create_scheduled_transaction**](ScheduledTransactionsApi.md#create_scheduled_transaction) | **POST** /budgets/{budget_id}/scheduled_transactions | Create a single scheduled transaction |
|
7
8
|
| [**get_scheduled_transaction_by_id**](ScheduledTransactionsApi.md#get_scheduled_transaction_by_id) | **GET** /budgets/{budget_id}/scheduled_transactions/{scheduled_transaction_id} | Single scheduled transaction |
|
8
9
|
| [**get_scheduled_transactions**](ScheduledTransactionsApi.md#get_scheduled_transactions) | **GET** /budgets/{budget_id}/scheduled_transactions | List scheduled transactions |
|
9
10
|
|
10
11
|
|
12
|
+
## create_scheduled_transaction
|
13
|
+
|
14
|
+
> <ScheduledTransactionResponse> create_scheduled_transaction(budget_id, data)
|
15
|
+
|
16
|
+
Create a single scheduled transaction
|
17
|
+
|
18
|
+
Creates a single scheduled transaction.
|
19
|
+
|
20
|
+
### Parameters
|
21
|
+
|
22
|
+
| Name | Type | Description | Notes |
|
23
|
+
| ---- | ---- | ----------- | ----- |
|
24
|
+
| **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). | |
|
25
|
+
| **data** | [**PostScheduledTransactionWrapper**](PostScheduledTransactionWrapper.md) | The scheduled transaction to create | |
|
26
|
+
|
27
|
+
### Return type
|
28
|
+
|
29
|
+
[**ScheduledTransactionResponse**](ScheduledTransactionResponse.md)
|
30
|
+
|
31
|
+
|
11
32
|
## get_scheduled_transaction_by_id
|
12
33
|
|
13
34
|
> <ScheduledTransactionResponse> get_scheduled_transaction_by_id(budget_id, scheduled_transaction_id)
|
data/docs/TransactionsApi.md
CHANGED
@@ -10,6 +10,7 @@ All URIs are relative to *https://api.ynab.com/v1*
|
|
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
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_month**](TransactionsApi.md#get_transactions_by_month) | **GET** /budgets/{budget_id}/months/{month}/transactions | List transactions in month, excluding any pending transactions |
|
13
14
|
| [**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
15
|
| [**import_transactions**](TransactionsApi.md#import_transactions) | **POST** /budgets/{budget_id}/transactions/import | Import transactions |
|
15
16
|
| [**update_transaction**](TransactionsApi.md#update_transaction) | **PUT** /budgets/{budget_id}/transactions/{transaction_id} | Updates an existing transaction |
|
@@ -22,7 +23,7 @@ All URIs are relative to *https://api.ynab.com/v1*
|
|
22
23
|
|
23
24
|
Create a single transaction or multiple transactions
|
24
25
|
|
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
|
+
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 (transactions with a future date) cannot be created on this endpoint.
|
26
27
|
|
27
28
|
### Parameters
|
28
29
|
|
@@ -144,6 +145,29 @@ Returns all transactions for a specified category
|
|
144
145
|
[**HybridTransactionsResponse**](HybridTransactionsResponse.md)
|
145
146
|
|
146
147
|
|
148
|
+
## get_transactions_by_month
|
149
|
+
|
150
|
+
> <HybridTransactionsResponse> get_transactions_by_month(budget_id, month, opts)
|
151
|
+
|
152
|
+
List transactions in month, excluding any pending transactions
|
153
|
+
|
154
|
+
Returns all transactions for a specified month
|
155
|
+
|
156
|
+
### Parameters
|
157
|
+
|
158
|
+
| Name | Type | Description | Notes |
|
159
|
+
| ---- | ---- | ----------- | ----- |
|
160
|
+
| **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). | |
|
161
|
+
| **month** | **String** | The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC)) | |
|
162
|
+
| **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] |
|
163
|
+
| **type** | **String** | If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported. | [optional] |
|
164
|
+
| **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] |
|
165
|
+
|
166
|
+
### Return type
|
167
|
+
|
168
|
+
[**HybridTransactionsResponse**](HybridTransactionsResponse.md)
|
169
|
+
|
170
|
+
|
147
171
|
## get_transactions_by_payee
|
148
172
|
|
149
173
|
> <HybridTransactionsResponse> get_transactions_by_payee(budget_id, payee_id, opts)
|
@@ -3,10 +3,7 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
data/lib/ynab/api/budgets_api.rb
CHANGED
@@ -3,10 +3,7 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
data/lib/ynab/api/months_api.rb
CHANGED
@@ -3,10 +3,7 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
data/lib/ynab/api/payees_api.rb
CHANGED
@@ -3,10 +3,7 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -3,10 +3,7 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -19,6 +16,80 @@ module YNAB
|
|
19
16
|
def initialize(api_client = ApiClient.default)
|
20
17
|
@api_client = api_client
|
21
18
|
end
|
19
|
+
# Create a single scheduled transaction
|
20
|
+
# Creates a single scheduled transaction.
|
21
|
+
# @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).
|
22
|
+
# @param data [PostScheduledTransactionWrapper] The scheduled transaction to create
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @return [ScheduledTransactionResponse]
|
25
|
+
def create_scheduled_transaction(budget_id, data, opts = {})
|
26
|
+
data, _status_code, _headers = create_scheduled_transaction_with_http_info(budget_id, data, opts)
|
27
|
+
data
|
28
|
+
end
|
29
|
+
|
30
|
+
# Create a single scheduled transaction
|
31
|
+
# Creates a single scheduled transaction.
|
32
|
+
# @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).
|
33
|
+
# @param data [PostScheduledTransactionWrapper] The scheduled transaction to create
|
34
|
+
# @param [Hash] opts the optional parameters
|
35
|
+
# @return [Array<(ScheduledTransactionResponse, Integer, Hash)>] ScheduledTransactionResponse data, response status code and response headers
|
36
|
+
def create_scheduled_transaction_with_http_info(budget_id, data, opts = {})
|
37
|
+
if @api_client.config.debugging
|
38
|
+
@api_client.config.logger.debug 'Calling API: ScheduledTransactionsApi.create_scheduled_transaction ...'
|
39
|
+
end
|
40
|
+
# verify the required parameter 'budget_id' is set
|
41
|
+
if @api_client.config.client_side_validation && budget_id.nil?
|
42
|
+
fail ArgumentError, "Missing the required parameter 'budget_id' when calling ScheduledTransactionsApi.create_scheduled_transaction"
|
43
|
+
end
|
44
|
+
# verify the required parameter 'data' is set
|
45
|
+
if @api_client.config.client_side_validation && data.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'data' when calling ScheduledTransactionsApi.create_scheduled_transaction"
|
47
|
+
end
|
48
|
+
# resource path
|
49
|
+
local_var_path = '/budgets/{budget_id}/scheduled_transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
|
50
|
+
|
51
|
+
# query parameters
|
52
|
+
query_params = opts[:query_params] || {}
|
53
|
+
|
54
|
+
# header parameters
|
55
|
+
header_params = opts[:header_params] || {}
|
56
|
+
# HTTP header 'Accept' (if needed)
|
57
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
58
|
+
# HTTP header 'Content-Type'
|
59
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
60
|
+
if !content_type.nil?
|
61
|
+
header_params['Content-Type'] = content_type
|
62
|
+
end
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = opts[:form_params] || {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:debug_return_type] || 'ScheduledTransactionResponse'
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
77
|
+
:operation => :"ScheduledTransactionsApi.create_scheduled_transaction",
|
78
|
+
:header_params => header_params,
|
79
|
+
:query_params => query_params,
|
80
|
+
:form_params => form_params,
|
81
|
+
:body => post_body,
|
82
|
+
:auth_names => auth_names,
|
83
|
+
:return_type => return_type
|
84
|
+
)
|
85
|
+
|
86
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: ScheduledTransactionsApi#create_scheduled_transaction\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
|
22
93
|
# Single scheduled transaction
|
23
94
|
# Returns a single scheduled transaction
|
24
95
|
# @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).
|
@@ -3,10 +3,7 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -20,7 +17,7 @@ module YNAB
|
|
20
17
|
@api_client = api_client
|
21
18
|
end
|
22
19
|
# Create a single transaction or multiple transactions
|
23
|
-
# 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.
|
20
|
+
# 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 (transactions with a future date) cannot be created on this endpoint.
|
24
21
|
# @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).
|
25
22
|
# @param data [PostTransactionsWrapper] 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.
|
26
23
|
# @param [Hash] opts the optional parameters
|
@@ -31,7 +28,7 @@ module YNAB
|
|
31
28
|
end
|
32
29
|
|
33
30
|
# Create a single transaction or multiple transactions
|
34
|
-
# 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.
|
31
|
+
# 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 (transactions with a future date) cannot be created on this endpoint.
|
35
32
|
# @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).
|
36
33
|
# @param data [PostTransactionsWrapper] 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.
|
37
34
|
# @param [Hash] opts the optional parameters
|
@@ -459,6 +456,84 @@ module YNAB
|
|
459
456
|
return data, status_code, headers
|
460
457
|
end
|
461
458
|
|
459
|
+
# List transactions in month, excluding any pending transactions
|
460
|
+
# Returns all transactions for a specified month
|
461
|
+
# @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).
|
462
|
+
# @param month [String] The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
463
|
+
# @param [Hash] opts the optional parameters
|
464
|
+
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
465
|
+
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
466
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
|
467
|
+
# @return [HybridTransactionsResponse]
|
468
|
+
def get_transactions_by_month(budget_id, month, opts = {})
|
469
|
+
data, _status_code, _headers = get_transactions_by_month_with_http_info(budget_id, month, opts)
|
470
|
+
data
|
471
|
+
end
|
472
|
+
|
473
|
+
# List transactions in month, excluding any pending transactions
|
474
|
+
# Returns all transactions for a specified month
|
475
|
+
# @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).
|
476
|
+
# @param month [String] The budget month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
477
|
+
# @param [Hash] opts the optional parameters
|
478
|
+
# @option opts [Date] :since_date If specified, only transactions on or after this date will be included. The date should be ISO formatted (e.g. 2016-12-30).
|
479
|
+
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
480
|
+
# @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
|
481
|
+
# @return [Array<(HybridTransactionsResponse, Integer, Hash)>] HybridTransactionsResponse data, response status code and response headers
|
482
|
+
def get_transactions_by_month_with_http_info(budget_id, month, opts = {})
|
483
|
+
if @api_client.config.debugging
|
484
|
+
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_transactions_by_month ...'
|
485
|
+
end
|
486
|
+
# verify the required parameter 'budget_id' is set
|
487
|
+
if @api_client.config.client_side_validation && budget_id.nil?
|
488
|
+
fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.get_transactions_by_month"
|
489
|
+
end
|
490
|
+
# verify the required parameter 'month' is set
|
491
|
+
if @api_client.config.client_side_validation && month.nil?
|
492
|
+
fail ArgumentError, "Missing the required parameter 'month' when calling TransactionsApi.get_transactions_by_month"
|
493
|
+
end
|
494
|
+
# resource path
|
495
|
+
local_var_path = '/budgets/{budget_id}/months/{month}/transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'month' + '}', CGI.escape(month.to_s))
|
496
|
+
|
497
|
+
# query parameters
|
498
|
+
query_params = opts[:query_params] || {}
|
499
|
+
query_params[:'since_date'] = opts[:'since_date'] if !opts[:'since_date'].nil?
|
500
|
+
query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
|
501
|
+
query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
|
502
|
+
|
503
|
+
# header parameters
|
504
|
+
header_params = opts[:header_params] || {}
|
505
|
+
# HTTP header 'Accept' (if needed)
|
506
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
507
|
+
|
508
|
+
# form parameters
|
509
|
+
form_params = opts[:form_params] || {}
|
510
|
+
|
511
|
+
# http body (model)
|
512
|
+
post_body = opts[:debug_body]
|
513
|
+
|
514
|
+
# return_type
|
515
|
+
return_type = opts[:debug_return_type] || 'HybridTransactionsResponse'
|
516
|
+
|
517
|
+
# auth_names
|
518
|
+
auth_names = opts[:debug_auth_names] || ['bearer']
|
519
|
+
|
520
|
+
new_options = opts.merge(
|
521
|
+
:operation => :"TransactionsApi.get_transactions_by_month",
|
522
|
+
:header_params => header_params,
|
523
|
+
:query_params => query_params,
|
524
|
+
:form_params => form_params,
|
525
|
+
:body => post_body,
|
526
|
+
:auth_names => auth_names,
|
527
|
+
:return_type => return_type
|
528
|
+
)
|
529
|
+
|
530
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
531
|
+
if @api_client.config.debugging
|
532
|
+
@api_client.config.logger.debug "API called: TransactionsApi#get_transactions_by_month\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
533
|
+
end
|
534
|
+
return data, status_code, headers
|
535
|
+
end
|
536
|
+
|
462
537
|
# List payee transactions, excluding any pending transactions
|
463
538
|
# Returns all transactions for a specified payee
|
464
539
|
# @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/user_api.rb
CHANGED
@@ -3,10 +3,7 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
data/lib/ynab/api_client.rb
CHANGED
@@ -3,10 +3,7 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
data/lib/ynab/api_error.rb
CHANGED
@@ -1,15 +1,3 @@
|
|
1
|
-
=begin
|
2
|
-
#YNAB API Endpoints
|
3
|
-
|
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.youneedabudget.com
|
5
|
-
|
6
|
-
OpenAPI spec version: 1.0.0
|
7
|
-
|
8
|
-
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
-
Swagger Codegen version: 2.4.0-SNAPSHOT
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
1
|
module YNAB
|
14
2
|
class ApiError < StandardError
|
15
3
|
attr_reader :code, :response_headers, :response_body
|
data/lib/ynab/configuration.rb
CHANGED
@@ -3,10 +3,7 @@
|
|
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
|
-
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
Generator version: 7.6.0
|
6
|
+
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
10
7
|
|
11
8
|
=end
|
12
9
|
|
@@ -79,6 +76,14 @@ module YNAB
|
|
79
76
|
# @return [true, false]
|
80
77
|
attr_accessor :debugging
|
81
78
|
|
79
|
+
# Set this to ignore operation servers for the API client. This is useful when you need to
|
80
|
+
# send requests to a different server than the one specified in the OpenAPI document.
|
81
|
+
# Will default to the base url defined in the spec but can be overridden by setting
|
82
|
+
# `scheme`, `host`, `base_path` directly.
|
83
|
+
# Default to false.
|
84
|
+
# @return [true, false]
|
85
|
+
attr_accessor :ignore_operation_servers
|
86
|
+
|
82
87
|
# Defines the logger used for debugging.
|
83
88
|
# Default to `Rails.logger` (when in Rails) or logging to STDOUT.
|
84
89
|
#
|
@@ -166,6 +171,7 @@ module YNAB
|
|
166
171
|
@timeout = 0
|
167
172
|
@params_encoding = nil
|
168
173
|
@debugging = false
|
174
|
+
@ignore_operation_servers = false
|
169
175
|
@inject_format = false
|
170
176
|
@force_ending_format = false
|
171
177
|
@logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
|
@@ -200,6 +206,7 @@ module YNAB
|
|
200
206
|
|
201
207
|
# Returns base URL for specified operation based on server settings
|
202
208
|
def base_url(operation = nil)
|
209
|
+
return "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') if ignore_operation_servers
|
203
210
|
if operation_server_settings.key?(operation) then
|
204
211
|
index = server_operation_index.fetch(operation, server_index)
|
205
212
|
server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
|