ynab 3.9.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/Gemfile.lock +4 -2
- data/README.md +47 -39
- data/Rakefile +3 -3
- data/docs/Account.md +3 -3
- data/docs/AccountsApi.md +12 -12
- data/docs/CategoriesApi.md +89 -25
- data/docs/Category.md +4 -3
- data/docs/CategoryGroupWithCategories.md +1 -1
- data/docs/ExistingCategory.md +12 -0
- data/docs/MoneyMovement.md +16 -0
- data/docs/MoneyMovementGroup.md +12 -0
- data/docs/MoneyMovementGroupsResponse.md +8 -0
- data/docs/MoneyMovementGroupsResponseData.md +9 -0
- data/docs/MoneyMovementsApi.md +89 -0
- data/docs/{BudgetSettingsResponse.md → MoneyMovementsResponse.md} +2 -2
- data/docs/MoneyMovementsResponseData.md +9 -0
- data/docs/MonthDetail.md +2 -2
- data/docs/MonthSummary.md +1 -1
- data/docs/MonthsApi.md +13 -13
- data/docs/NewCategory.md +12 -0
- data/docs/PatchCategoryGroupWrapper.md +8 -0
- data/docs/PatchCategoryWrapper.md +1 -1
- data/docs/PayeeLocationsApi.md +12 -12
- data/docs/PayeesApi.md +11 -11
- data/docs/{BudgetDetail.md → PlanDetail.md} +4 -4
- data/docs/PlanDetailResponse.md +8 -0
- data/docs/{BudgetDetailResponseData.md → PlanDetailResponseData.md} +2 -2
- data/docs/{BudgetSettings.md → PlanSettings.md} +1 -1
- data/docs/{BudgetDetailResponse.md → PlanSettingsResponse.md} +2 -2
- data/docs/PlanSettingsResponseData.md +8 -0
- data/docs/PlanSummary.md +15 -0
- data/docs/PlanSummaryResponse.md +8 -0
- data/docs/PlanSummaryResponseData.md +9 -0
- data/docs/PlansApi.md +68 -0
- data/docs/PostCategoryGroupWrapper.md +8 -0
- data/docs/PostCategoryWrapper.md +8 -0
- data/docs/SaveCategory.md +2 -1
- data/docs/SaveCategoryGroup.md +8 -0
- data/docs/SaveCategoryGroupResponse.md +8 -0
- data/docs/SaveCategoryGroupResponseData.md +9 -0
- data/docs/SaveMonthCategory.md +1 -1
- data/docs/ScheduledTransactionsApi.md +20 -20
- data/docs/TransactionsApi.md +48 -48
- data/docs/UserApi.md +2 -2
- data/examples/category-balance.rb +2 -2
- data/examples/create-multiple-transactions.rb +2 -2
- data/examples/create-transaction.rb +2 -2
- data/examples/{budget-list.rb → plan-list.rb} +6 -6
- data/examples/{budget-month.rb → plan-month.rb} +9 -10
- data/examples/update-category-budgeted.rb +2 -2
- data/examples/update-multiple-transactions.rb +3 -3
- data/lib/ynab/api/accounts_api.rb +33 -34
- data/lib/ynab/api/categories_api.rb +293 -66
- data/lib/ynab/api/deprecated_api.rb +11 -11
- data/lib/ynab/api/money_movements_api.rb +282 -0
- data/lib/ynab/api/months_api.rb +35 -36
- data/lib/ynab/api/payee_locations_api.rb +33 -34
- data/lib/ynab/api/payees_api.rb +31 -32
- data/lib/ynab/api/{budgets_api.rb → plans_api.rb} +55 -56
- data/lib/ynab/api/scheduled_transactions_api.rb +55 -56
- data/lib/ynab/api/transactions_api.rb +130 -131
- data/lib/ynab/api/user_api.rb +2 -3
- data/lib/ynab/api_client.rb +0 -2
- data/lib/ynab/api_model_base.rb +85 -0
- data/lib/ynab/models/account.rb +4 -81
- data/lib/ynab/models/account_response.rb +1 -75
- data/lib/ynab/models/account_response_data.rb +1 -75
- data/lib/ynab/models/accounts_response.rb +1 -75
- data/lib/ynab/models/accounts_response_data.rb +1 -75
- data/lib/ynab/models/bulk_response.rb +1 -75
- data/lib/ynab/models/bulk_response_data.rb +1 -75
- data/lib/ynab/models/bulk_response_data_bulk.rb +1 -75
- data/lib/ynab/models/bulk_transactions.rb +1 -75
- data/lib/ynab/models/categories_response.rb +1 -75
- data/lib/ynab/models/categories_response_data.rb +1 -75
- data/lib/ynab/models/category.rb +16 -79
- data/lib/ynab/models/category_group.rb +1 -75
- data/lib/ynab/models/category_group_with_categories.rb +2 -76
- data/lib/ynab/models/category_response.rb +1 -75
- data/lib/ynab/models/category_response_data.rb +1 -75
- data/lib/ynab/models/currency_format.rb +2 -76
- data/lib/ynab/models/date_format.rb +2 -76
- data/lib/ynab/models/error_detail.rb +1 -75
- data/lib/ynab/models/error_response.rb +1 -75
- data/lib/ynab/models/existing_category.rb +180 -0
- data/lib/ynab/models/existing_transaction.rb +1 -79
- data/lib/ynab/models/hybrid_transaction.rb +1 -85
- data/lib/ynab/models/hybrid_transactions_response.rb +1 -75
- data/lib/ynab/models/hybrid_transactions_response_data.rb +1 -75
- data/lib/ynab/models/{budget_summary_response_data.rb → money_movement.rb} +95 -93
- data/lib/ynab/models/money_movement_group.rb +179 -0
- data/lib/ynab/models/{budget_summary_response.rb → money_movement_groups_response.rb} +4 -78
- data/lib/ynab/models/money_movement_groups_response_data.rb +149 -0
- data/lib/ynab/models/{budget_settings_response.rb → money_movements_response.rb} +4 -78
- data/lib/ynab/models/{budget_detail_response_data.rb → money_movements_response_data.rb} +13 -85
- data/lib/ynab/models/month_detail.rb +3 -79
- data/lib/ynab/models/month_detail_response.rb +1 -75
- data/lib/ynab/models/month_detail_response_data.rb +1 -75
- data/lib/ynab/models/month_summaries_response.rb +1 -75
- data/lib/ynab/models/month_summaries_response_data.rb +1 -75
- data/lib/ynab/models/month_summary.rb +2 -76
- data/lib/ynab/models/new_category.rb +180 -0
- data/lib/ynab/models/new_transaction.rb +1 -79
- data/lib/ynab/models/patch_category_group_wrapper.rb +136 -0
- data/lib/ynab/models/patch_category_wrapper.rb +2 -76
- data/lib/ynab/models/patch_month_category_wrapper.rb +1 -75
- data/lib/ynab/models/patch_payee_wrapper.rb +1 -75
- data/lib/ynab/models/patch_transactions_wrapper.rb +1 -75
- data/lib/ynab/models/payee.rb +1 -75
- data/lib/ynab/models/payee_location.rb +1 -75
- data/lib/ynab/models/payee_location_response.rb +1 -75
- data/lib/ynab/models/payee_location_response_data.rb +1 -75
- data/lib/ynab/models/payee_locations_response.rb +1 -75
- data/lib/ynab/models/payee_locations_response_data.rb +1 -75
- data/lib/ynab/models/payee_response.rb +1 -75
- data/lib/ynab/models/payee_response_data.rb +1 -75
- data/lib/ynab/models/payees_response.rb +1 -75
- data/lib/ynab/models/payees_response_data.rb +1 -75
- data/lib/ynab/models/{budget_detail.rb → plan_detail.rb} +7 -83
- data/lib/ynab/models/plan_detail_response.rb +136 -0
- data/lib/ynab/models/plan_detail_response_data.rb +147 -0
- data/lib/ynab/models/{budget_settings.rb → plan_settings.rb} +5 -79
- data/lib/ynab/models/{budget_detail_response.rb → plan_settings_response.rb} +4 -78
- data/lib/ynab/models/{budget_settings_response_data.rb → plan_settings_response_data.rb} +4 -78
- data/lib/ynab/models/{budget_summary.rb → plan_summary.rb} +7 -83
- data/lib/ynab/models/plan_summary_response.rb +136 -0
- data/lib/ynab/models/plan_summary_response_data.rb +147 -0
- data/lib/ynab/models/post_account_wrapper.rb +1 -75
- data/lib/ynab/models/post_category_group_wrapper.rb +136 -0
- data/lib/ynab/models/post_category_wrapper.rb +136 -0
- data/lib/ynab/models/post_scheduled_transaction_wrapper.rb +1 -75
- data/lib/ynab/models/post_transactions_wrapper.rb +1 -75
- data/lib/ynab/models/put_scheduled_transaction_wrapper.rb +1 -75
- data/lib/ynab/models/put_transaction_wrapper.rb +1 -75
- data/lib/ynab/models/save_account.rb +1 -75
- data/lib/ynab/models/save_category.rb +18 -81
- data/lib/ynab/models/save_category_group.rb +148 -0
- data/lib/ynab/models/save_category_group_response.rb +136 -0
- data/lib/ynab/models/save_category_group_response_data.rb +147 -0
- data/lib/ynab/models/save_category_response.rb +1 -75
- data/lib/ynab/models/save_category_response_data.rb +1 -75
- data/lib/ynab/models/save_month_category.rb +2 -76
- data/lib/ynab/models/save_payee.rb +1 -75
- data/lib/ynab/models/save_payee_response.rb +1 -75
- data/lib/ynab/models/save_payee_response_data.rb +1 -75
- data/lib/ynab/models/save_scheduled_transaction.rb +1 -75
- data/lib/ynab/models/save_sub_transaction.rb +1 -75
- data/lib/ynab/models/save_transaction_with_id_or_import_id.rb +1 -79
- data/lib/ynab/models/save_transaction_with_optional_fields.rb +1 -75
- data/lib/ynab/models/save_transactions_response.rb +1 -75
- data/lib/ynab/models/save_transactions_response_data.rb +1 -75
- data/lib/ynab/models/scheduled_sub_transaction.rb +1 -75
- data/lib/ynab/models/scheduled_transaction_detail.rb +1 -80
- data/lib/ynab/models/scheduled_transaction_response.rb +1 -75
- data/lib/ynab/models/scheduled_transaction_response_data.rb +1 -75
- data/lib/ynab/models/scheduled_transaction_summary.rb +1 -75
- data/lib/ynab/models/scheduled_transactions_response.rb +1 -75
- data/lib/ynab/models/scheduled_transactions_response_data.rb +1 -75
- data/lib/ynab/models/sub_transaction.rb +1 -75
- data/lib/ynab/models/transaction_detail.rb +1 -85
- data/lib/ynab/models/transaction_response.rb +1 -75
- data/lib/ynab/models/transaction_response_data.rb +1 -75
- data/lib/ynab/models/transaction_summary.rb +1 -75
- data/lib/ynab/models/transactions_import_response.rb +1 -75
- data/lib/ynab/models/transactions_import_response_data.rb +1 -75
- data/lib/ynab/models/transactions_response.rb +1 -75
- data/lib/ynab/models/transactions_response_data.rb +1 -75
- data/lib/ynab/models/user.rb +1 -75
- data/lib/ynab/models/user_response.rb +1 -75
- data/lib/ynab/models/user_response_data.rb +1 -75
- data/lib/ynab/overrides/transactions_api.rb +6 -6
- data/lib/ynab/version.rb +1 -1
- data/lib/ynab.rb +28 -13
- data/open_api_spec.yaml +1161 -916
- data/spec/api/accounts_spec.rb +9 -9
- data/spec/api/categories_spec.rb +9 -9
- data/spec/api/months_spec.rb +7 -7
- data/spec/api/payee_locations_spec.rb +7 -7
- data/spec/api/payees_spec.rb +7 -7
- data/spec/api/plans_spec.rb +55 -0
- data/spec/api/scheduled_transactions_spec.rb +9 -9
- data/spec/api/transactions_spec.rb +27 -27
- data/spec/fixtures/vcr_cassettes/account.yml +2 -2
- data/spec/fixtures/vcr_cassettes/accounts.yml +2 -2
- data/spec/fixtures/vcr_cassettes/accounts_unauthorized.yml +2 -2
- data/spec/fixtures/vcr_cassettes/bulk_transactions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/categories.yml +2 -2
- data/spec/fixtures/vcr_cassettes/categories_unauthorized.yml +2 -2
- data/spec/fixtures/vcr_cassettes/category.yml +2 -2
- data/spec/fixtures/vcr_cassettes/category_transactions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/create_account.yml +2 -2
- data/spec/fixtures/vcr_cassettes/create_scheduled_transaction.yml +2 -2
- data/spec/fixtures/vcr_cassettes/create_transaction.yml +2 -2
- data/spec/fixtures/vcr_cassettes/create_transactions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/import_transactions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/month.yml +2 -2
- data/spec/fixtures/vcr_cassettes/month_transactions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/months.yml +2 -2
- data/spec/fixtures/vcr_cassettes/months_unauthorized.yml +2 -2
- data/spec/fixtures/vcr_cassettes/multiple_transactions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/patch_month_category.yml +2 -2
- data/spec/fixtures/vcr_cassettes/payee.yml +2 -2
- data/spec/fixtures/vcr_cassettes/payee_location.yml +2 -2
- data/spec/fixtures/vcr_cassettes/payee_locations.yml +2 -2
- data/spec/fixtures/vcr_cassettes/payee_locations_unauthorized.yml +2 -2
- data/spec/fixtures/vcr_cassettes/payee_transactions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/payees.yml +2 -2
- data/spec/fixtures/vcr_cassettes/payees_unauthorized.yml +2 -2
- data/spec/fixtures/vcr_cassettes/{budget.yml → plan.yml} +3 -3
- data/spec/fixtures/vcr_cassettes/{budgets.yml → plans.yml} +3 -3
- data/spec/fixtures/vcr_cassettes/{budgets_unauthorized.yml → plans_unauthorized.yml} +3 -3
- data/spec/fixtures/vcr_cassettes/scheduled_transaction.yml +2 -2
- data/spec/fixtures/vcr_cassettes/scheduled_transactions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/scheduled_transactions_unauthorized.yml +2 -2
- data/spec/fixtures/vcr_cassettes/transaction.yml +2 -2
- data/spec/fixtures/vcr_cassettes/transactions.yml +2 -2
- data/spec/fixtures/vcr_cassettes/transactions_invalid_flags.yml +2 -2
- data/spec/fixtures/vcr_cassettes/transactions_unauthorized.yml +2 -2
- data/spec/fixtures/vcr_cassettes/update_transaction.yml +2 -2
- data/spec/fixtures/vcr_cassettes/update_transactions.yml +2 -2
- data/templates/gem.mustache +3 -2
- data/templates/partial_model_generic.mustache +1 -1
- data/ynab.gemspec +1 -2
- metadata +64 -33
- data/docs/BudgetSettingsResponseData.md +0 -8
- data/docs/BudgetSummary.md +0 -15
- data/docs/BudgetSummaryResponse.md +0 -8
- data/docs/BudgetSummaryResponseData.md +0 -9
- data/docs/BudgetsApi.md +0 -68
- data/spec/api/budgets_spec.rb +0 -55
|
@@ -4,7 +4,6 @@
|
|
|
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
6
|
Generated by: OpenAPI Generator (https://openapi-generator.tech)
|
|
7
|
-
|
|
8
7
|
=end
|
|
9
8
|
|
|
10
9
|
require 'cgi'
|
|
@@ -18,35 +17,35 @@ module YNAB
|
|
|
18
17
|
end
|
|
19
18
|
# Create a single transaction or multiple transactions
|
|
20
19
|
# 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.
|
|
21
|
-
# @param
|
|
20
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
22
21
|
# @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.
|
|
23
22
|
# @param [Hash] opts the optional parameters
|
|
24
23
|
# @return [SaveTransactionsResponse]
|
|
25
|
-
def create_transaction(
|
|
26
|
-
data, _status_code, _headers = create_transaction_with_http_info(
|
|
24
|
+
def create_transaction(plan_id, data, opts = {})
|
|
25
|
+
data, _status_code, _headers = create_transaction_with_http_info(plan_id, data, opts)
|
|
27
26
|
data
|
|
28
27
|
end
|
|
29
28
|
|
|
30
29
|
# Create a single transaction or multiple transactions
|
|
31
30
|
# 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.
|
|
32
|
-
# @param
|
|
31
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
33
32
|
# @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.
|
|
34
33
|
# @param [Hash] opts the optional parameters
|
|
35
34
|
# @return [Array<(SaveTransactionsResponse, Integer, Hash)>] SaveTransactionsResponse data, response status code and response headers
|
|
36
|
-
def create_transaction_with_http_info(
|
|
35
|
+
def create_transaction_with_http_info(plan_id, data, opts = {})
|
|
37
36
|
if @api_client.config.debugging
|
|
38
37
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.create_transaction ...'
|
|
39
38
|
end
|
|
40
|
-
# verify the required parameter '
|
|
41
|
-
if @api_client.config.client_side_validation &&
|
|
42
|
-
fail ArgumentError, "Missing the required parameter '
|
|
39
|
+
# verify the required parameter 'plan_id' is set
|
|
40
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling TransactionsApi.create_transaction"
|
|
43
42
|
end
|
|
44
43
|
# verify the required parameter 'data' is set
|
|
45
44
|
if @api_client.config.client_side_validation && data.nil?
|
|
46
45
|
fail ArgumentError, "Missing the required parameter 'data' when calling TransactionsApi.create_transaction"
|
|
47
46
|
end
|
|
48
47
|
# resource path
|
|
49
|
-
local_var_path = '/
|
|
48
|
+
local_var_path = '/plans/{plan_id}/transactions'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s))
|
|
50
49
|
|
|
51
50
|
# query parameters
|
|
52
51
|
query_params = opts[:query_params] || {}
|
|
@@ -90,37 +89,37 @@ module YNAB
|
|
|
90
89
|
return data, status_code, headers
|
|
91
90
|
end
|
|
92
91
|
|
|
93
|
-
#
|
|
92
|
+
# Delete a transaction
|
|
94
93
|
# Deletes a transaction
|
|
95
|
-
# @param
|
|
94
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
96
95
|
# @param transaction_id [String] The id of the transaction
|
|
97
96
|
# @param [Hash] opts the optional parameters
|
|
98
97
|
# @return [TransactionResponse]
|
|
99
|
-
def delete_transaction(
|
|
100
|
-
data, _status_code, _headers = delete_transaction_with_http_info(
|
|
98
|
+
def delete_transaction(plan_id, transaction_id, opts = {})
|
|
99
|
+
data, _status_code, _headers = delete_transaction_with_http_info(plan_id, transaction_id, opts)
|
|
101
100
|
data
|
|
102
101
|
end
|
|
103
102
|
|
|
104
|
-
#
|
|
103
|
+
# Delete a transaction
|
|
105
104
|
# Deletes a transaction
|
|
106
|
-
# @param
|
|
105
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
107
106
|
# @param transaction_id [String] The id of the transaction
|
|
108
107
|
# @param [Hash] opts the optional parameters
|
|
109
108
|
# @return [Array<(TransactionResponse, Integer, Hash)>] TransactionResponse data, response status code and response headers
|
|
110
|
-
def delete_transaction_with_http_info(
|
|
109
|
+
def delete_transaction_with_http_info(plan_id, transaction_id, opts = {})
|
|
111
110
|
if @api_client.config.debugging
|
|
112
111
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.delete_transaction ...'
|
|
113
112
|
end
|
|
114
|
-
# verify the required parameter '
|
|
115
|
-
if @api_client.config.client_side_validation &&
|
|
116
|
-
fail ArgumentError, "Missing the required parameter '
|
|
113
|
+
# verify the required parameter 'plan_id' is set
|
|
114
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
115
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling TransactionsApi.delete_transaction"
|
|
117
116
|
end
|
|
118
117
|
# verify the required parameter 'transaction_id' is set
|
|
119
118
|
if @api_client.config.client_side_validation && transaction_id.nil?
|
|
120
119
|
fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionsApi.delete_transaction"
|
|
121
120
|
end
|
|
122
121
|
# resource path
|
|
123
|
-
local_var_path = '/
|
|
122
|
+
local_var_path = '/plans/{plan_id}/transactions/{transaction_id}'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'transaction_id' + '}', CGI.escape(transaction_id.to_s))
|
|
124
123
|
|
|
125
124
|
# query parameters
|
|
126
125
|
query_params = opts[:query_params] || {}
|
|
@@ -159,37 +158,37 @@ module YNAB
|
|
|
159
158
|
return data, status_code, headers
|
|
160
159
|
end
|
|
161
160
|
|
|
162
|
-
#
|
|
161
|
+
# Get a transaction
|
|
163
162
|
# Returns a single transaction
|
|
164
|
-
# @param
|
|
163
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
165
164
|
# @param transaction_id [String] The id of the transaction
|
|
166
165
|
# @param [Hash] opts the optional parameters
|
|
167
166
|
# @return [TransactionResponse]
|
|
168
|
-
def get_transaction_by_id(
|
|
169
|
-
data, _status_code, _headers = get_transaction_by_id_with_http_info(
|
|
167
|
+
def get_transaction_by_id(plan_id, transaction_id, opts = {})
|
|
168
|
+
data, _status_code, _headers = get_transaction_by_id_with_http_info(plan_id, transaction_id, opts)
|
|
170
169
|
data
|
|
171
170
|
end
|
|
172
171
|
|
|
173
|
-
#
|
|
172
|
+
# Get a transaction
|
|
174
173
|
# Returns a single transaction
|
|
175
|
-
# @param
|
|
174
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
176
175
|
# @param transaction_id [String] The id of the transaction
|
|
177
176
|
# @param [Hash] opts the optional parameters
|
|
178
177
|
# @return [Array<(TransactionResponse, Integer, Hash)>] TransactionResponse data, response status code and response headers
|
|
179
|
-
def get_transaction_by_id_with_http_info(
|
|
178
|
+
def get_transaction_by_id_with_http_info(plan_id, transaction_id, opts = {})
|
|
180
179
|
if @api_client.config.debugging
|
|
181
180
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_transaction_by_id ...'
|
|
182
181
|
end
|
|
183
|
-
# verify the required parameter '
|
|
184
|
-
if @api_client.config.client_side_validation &&
|
|
185
|
-
fail ArgumentError, "Missing the required parameter '
|
|
182
|
+
# verify the required parameter 'plan_id' is set
|
|
183
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
184
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling TransactionsApi.get_transaction_by_id"
|
|
186
185
|
end
|
|
187
186
|
# verify the required parameter 'transaction_id' is set
|
|
188
187
|
if @api_client.config.client_side_validation && transaction_id.nil?
|
|
189
188
|
fail ArgumentError, "Missing the required parameter 'transaction_id' when calling TransactionsApi.get_transaction_by_id"
|
|
190
189
|
end
|
|
191
190
|
# resource path
|
|
192
|
-
local_var_path = '/
|
|
191
|
+
local_var_path = '/plans/{plan_id}/transactions/{transaction_id}'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'transaction_id' + '}', CGI.escape(transaction_id.to_s))
|
|
193
192
|
|
|
194
193
|
# query parameters
|
|
195
194
|
query_params = opts[:query_params] || {}
|
|
@@ -228,37 +227,37 @@ module YNAB
|
|
|
228
227
|
return data, status_code, headers
|
|
229
228
|
end
|
|
230
229
|
|
|
231
|
-
#
|
|
232
|
-
# Returns
|
|
233
|
-
# @param
|
|
230
|
+
# Get all transactions
|
|
231
|
+
# Returns plan transactions, excluding any pending transactions
|
|
232
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
234
233
|
# @param [Hash] opts the optional parameters
|
|
235
234
|
# @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).
|
|
236
235
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
237
236
|
# @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.
|
|
238
237
|
# @return [TransactionsResponse]
|
|
239
|
-
def get_transactions(
|
|
240
|
-
data, _status_code, _headers = get_transactions_with_http_info(
|
|
238
|
+
def get_transactions(plan_id, opts = {})
|
|
239
|
+
data, _status_code, _headers = get_transactions_with_http_info(plan_id, opts)
|
|
241
240
|
data
|
|
242
241
|
end
|
|
243
242
|
|
|
244
|
-
#
|
|
245
|
-
# Returns
|
|
246
|
-
# @param
|
|
243
|
+
# Get all transactions
|
|
244
|
+
# Returns plan transactions, excluding any pending transactions
|
|
245
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
247
246
|
# @param [Hash] opts the optional parameters
|
|
248
247
|
# @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).
|
|
249
248
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
250
249
|
# @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.
|
|
251
250
|
# @return [Array<(TransactionsResponse, Integer, Hash)>] TransactionsResponse data, response status code and response headers
|
|
252
|
-
def get_transactions_with_http_info(
|
|
251
|
+
def get_transactions_with_http_info(plan_id, opts = {})
|
|
253
252
|
if @api_client.config.debugging
|
|
254
253
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_transactions ...'
|
|
255
254
|
end
|
|
256
|
-
# verify the required parameter '
|
|
257
|
-
if @api_client.config.client_side_validation &&
|
|
258
|
-
fail ArgumentError, "Missing the required parameter '
|
|
255
|
+
# verify the required parameter 'plan_id' is set
|
|
256
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
257
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling TransactionsApi.get_transactions"
|
|
259
258
|
end
|
|
260
259
|
# resource path
|
|
261
|
-
local_var_path = '/
|
|
260
|
+
local_var_path = '/plans/{plan_id}/transactions'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s))
|
|
262
261
|
|
|
263
262
|
# query parameters
|
|
264
263
|
query_params = opts[:query_params] || {}
|
|
@@ -300,43 +299,43 @@ module YNAB
|
|
|
300
299
|
return data, status_code, headers
|
|
301
300
|
end
|
|
302
301
|
|
|
303
|
-
#
|
|
302
|
+
# Get all account transactions
|
|
304
303
|
# Returns all transactions for a specified account, excluding any pending transactions
|
|
305
|
-
# @param
|
|
304
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
306
305
|
# @param account_id [String] The id of the account
|
|
307
306
|
# @param [Hash] opts the optional parameters
|
|
308
307
|
# @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).
|
|
309
308
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
310
309
|
# @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.
|
|
311
310
|
# @return [TransactionsResponse]
|
|
312
|
-
def get_transactions_by_account(
|
|
313
|
-
data, _status_code, _headers = get_transactions_by_account_with_http_info(
|
|
311
|
+
def get_transactions_by_account(plan_id, account_id, opts = {})
|
|
312
|
+
data, _status_code, _headers = get_transactions_by_account_with_http_info(plan_id, account_id, opts)
|
|
314
313
|
data
|
|
315
314
|
end
|
|
316
315
|
|
|
317
|
-
#
|
|
316
|
+
# Get all account transactions
|
|
318
317
|
# Returns all transactions for a specified account, excluding any pending transactions
|
|
319
|
-
# @param
|
|
318
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
320
319
|
# @param account_id [String] The id of the account
|
|
321
320
|
# @param [Hash] opts the optional parameters
|
|
322
321
|
# @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).
|
|
323
322
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
324
323
|
# @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.
|
|
325
324
|
# @return [Array<(TransactionsResponse, Integer, Hash)>] TransactionsResponse data, response status code and response headers
|
|
326
|
-
def get_transactions_by_account_with_http_info(
|
|
325
|
+
def get_transactions_by_account_with_http_info(plan_id, account_id, opts = {})
|
|
327
326
|
if @api_client.config.debugging
|
|
328
327
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_transactions_by_account ...'
|
|
329
328
|
end
|
|
330
|
-
# verify the required parameter '
|
|
331
|
-
if @api_client.config.client_side_validation &&
|
|
332
|
-
fail ArgumentError, "Missing the required parameter '
|
|
329
|
+
# verify the required parameter 'plan_id' is set
|
|
330
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
331
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling TransactionsApi.get_transactions_by_account"
|
|
333
332
|
end
|
|
334
333
|
# verify the required parameter 'account_id' is set
|
|
335
334
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
336
335
|
fail ArgumentError, "Missing the required parameter 'account_id' when calling TransactionsApi.get_transactions_by_account"
|
|
337
336
|
end
|
|
338
337
|
# resource path
|
|
339
|
-
local_var_path = '/
|
|
338
|
+
local_var_path = '/plans/{plan_id}/accounts/{account_id}/transactions'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
|
|
340
339
|
|
|
341
340
|
# query parameters
|
|
342
341
|
query_params = opts[:query_params] || {}
|
|
@@ -378,43 +377,43 @@ module YNAB
|
|
|
378
377
|
return data, status_code, headers
|
|
379
378
|
end
|
|
380
379
|
|
|
381
|
-
#
|
|
382
|
-
# Returns all transactions for a specified category
|
|
383
|
-
# @param
|
|
380
|
+
# Get all category transactions
|
|
381
|
+
# Returns all transactions for a specified category, excluding any pending transactions
|
|
382
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
384
383
|
# @param category_id [String] The id of the category
|
|
385
384
|
# @param [Hash] opts the optional parameters
|
|
386
385
|
# @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).
|
|
387
386
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
388
387
|
# @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.
|
|
389
388
|
# @return [HybridTransactionsResponse]
|
|
390
|
-
def get_transactions_by_category(
|
|
391
|
-
data, _status_code, _headers = get_transactions_by_category_with_http_info(
|
|
389
|
+
def get_transactions_by_category(plan_id, category_id, opts = {})
|
|
390
|
+
data, _status_code, _headers = get_transactions_by_category_with_http_info(plan_id, category_id, opts)
|
|
392
391
|
data
|
|
393
392
|
end
|
|
394
393
|
|
|
395
|
-
#
|
|
396
|
-
# Returns all transactions for a specified category
|
|
397
|
-
# @param
|
|
394
|
+
# Get all category transactions
|
|
395
|
+
# Returns all transactions for a specified category, excluding any pending transactions
|
|
396
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
398
397
|
# @param category_id [String] The id of the category
|
|
399
398
|
# @param [Hash] opts the optional parameters
|
|
400
399
|
# @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).
|
|
401
400
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
402
401
|
# @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.
|
|
403
402
|
# @return [Array<(HybridTransactionsResponse, Integer, Hash)>] HybridTransactionsResponse data, response status code and response headers
|
|
404
|
-
def get_transactions_by_category_with_http_info(
|
|
403
|
+
def get_transactions_by_category_with_http_info(plan_id, category_id, opts = {})
|
|
405
404
|
if @api_client.config.debugging
|
|
406
405
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_transactions_by_category ...'
|
|
407
406
|
end
|
|
408
|
-
# verify the required parameter '
|
|
409
|
-
if @api_client.config.client_side_validation &&
|
|
410
|
-
fail ArgumentError, "Missing the required parameter '
|
|
407
|
+
# verify the required parameter 'plan_id' is set
|
|
408
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
409
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling TransactionsApi.get_transactions_by_category"
|
|
411
410
|
end
|
|
412
411
|
# verify the required parameter 'category_id' is set
|
|
413
412
|
if @api_client.config.client_side_validation && category_id.nil?
|
|
414
413
|
fail ArgumentError, "Missing the required parameter 'category_id' when calling TransactionsApi.get_transactions_by_category"
|
|
415
414
|
end
|
|
416
415
|
# resource path
|
|
417
|
-
local_var_path = '/
|
|
416
|
+
local_var_path = '/plans/{plan_id}/categories/{category_id}/transactions'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
|
|
418
417
|
|
|
419
418
|
# query parameters
|
|
420
419
|
query_params = opts[:query_params] || {}
|
|
@@ -456,43 +455,43 @@ module YNAB
|
|
|
456
455
|
return data, status_code, headers
|
|
457
456
|
end
|
|
458
457
|
|
|
459
|
-
#
|
|
460
|
-
# Returns all transactions for a specified month
|
|
461
|
-
# @param
|
|
462
|
-
# @param month [String] The
|
|
458
|
+
# Get all plan month transactions
|
|
459
|
+
# Returns all transactions for a specified month, excluding any pending transactions
|
|
460
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
461
|
+
# @param month [String] The plan month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
|
463
462
|
# @param [Hash] opts the optional parameters
|
|
464
463
|
# @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
464
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
466
465
|
# @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 [
|
|
468
|
-
def get_transactions_by_month(
|
|
469
|
-
data, _status_code, _headers = get_transactions_by_month_with_http_info(
|
|
466
|
+
# @return [TransactionsResponse]
|
|
467
|
+
def get_transactions_by_month(plan_id, month, opts = {})
|
|
468
|
+
data, _status_code, _headers = get_transactions_by_month_with_http_info(plan_id, month, opts)
|
|
470
469
|
data
|
|
471
470
|
end
|
|
472
471
|
|
|
473
|
-
#
|
|
474
|
-
# Returns all transactions for a specified month
|
|
475
|
-
# @param
|
|
476
|
-
# @param month [String] The
|
|
472
|
+
# Get all plan month transactions
|
|
473
|
+
# Returns all transactions for a specified month, excluding any pending transactions
|
|
474
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
475
|
+
# @param month [String] The plan month in ISO format (e.g. 2016-12-01) (\"current\" can also be used to specify the current calendar month (UTC))
|
|
477
476
|
# @param [Hash] opts the optional parameters
|
|
478
477
|
# @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
478
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
480
479
|
# @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<(
|
|
482
|
-
def get_transactions_by_month_with_http_info(
|
|
480
|
+
# @return [Array<(TransactionsResponse, Integer, Hash)>] TransactionsResponse data, response status code and response headers
|
|
481
|
+
def get_transactions_by_month_with_http_info(plan_id, month, opts = {})
|
|
483
482
|
if @api_client.config.debugging
|
|
484
483
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_transactions_by_month ...'
|
|
485
484
|
end
|
|
486
|
-
# verify the required parameter '
|
|
487
|
-
if @api_client.config.client_side_validation &&
|
|
488
|
-
fail ArgumentError, "Missing the required parameter '
|
|
485
|
+
# verify the required parameter 'plan_id' is set
|
|
486
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
487
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling TransactionsApi.get_transactions_by_month"
|
|
489
488
|
end
|
|
490
489
|
# verify the required parameter 'month' is set
|
|
491
490
|
if @api_client.config.client_side_validation && month.nil?
|
|
492
491
|
fail ArgumentError, "Missing the required parameter 'month' when calling TransactionsApi.get_transactions_by_month"
|
|
493
492
|
end
|
|
494
493
|
# resource path
|
|
495
|
-
local_var_path = '/
|
|
494
|
+
local_var_path = '/plans/{plan_id}/months/{month}/transactions'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'month' + '}', CGI.escape(month.to_s))
|
|
496
495
|
|
|
497
496
|
# query parameters
|
|
498
497
|
query_params = opts[:query_params] || {}
|
|
@@ -512,7 +511,7 @@ module YNAB
|
|
|
512
511
|
post_body = opts[:debug_body]
|
|
513
512
|
|
|
514
513
|
# return_type
|
|
515
|
-
return_type = opts[:debug_return_type] || '
|
|
514
|
+
return_type = opts[:debug_return_type] || 'TransactionsResponse'
|
|
516
515
|
|
|
517
516
|
# auth_names
|
|
518
517
|
auth_names = opts[:debug_auth_names] || ['bearer']
|
|
@@ -534,43 +533,43 @@ module YNAB
|
|
|
534
533
|
return data, status_code, headers
|
|
535
534
|
end
|
|
536
535
|
|
|
537
|
-
#
|
|
538
|
-
# Returns all transactions for a specified payee
|
|
539
|
-
# @param
|
|
536
|
+
# Get all payee transactions
|
|
537
|
+
# Returns all transactions for a specified payee, excluding any pending transactions
|
|
538
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
540
539
|
# @param payee_id [String] The id of the payee
|
|
541
540
|
# @param [Hash] opts the optional parameters
|
|
542
541
|
# @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).
|
|
543
542
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
544
543
|
# @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.
|
|
545
544
|
# @return [HybridTransactionsResponse]
|
|
546
|
-
def get_transactions_by_payee(
|
|
547
|
-
data, _status_code, _headers = get_transactions_by_payee_with_http_info(
|
|
545
|
+
def get_transactions_by_payee(plan_id, payee_id, opts = {})
|
|
546
|
+
data, _status_code, _headers = get_transactions_by_payee_with_http_info(plan_id, payee_id, opts)
|
|
548
547
|
data
|
|
549
548
|
end
|
|
550
549
|
|
|
551
|
-
#
|
|
552
|
-
# Returns all transactions for a specified payee
|
|
553
|
-
# @param
|
|
550
|
+
# Get all payee transactions
|
|
551
|
+
# Returns all transactions for a specified payee, excluding any pending transactions
|
|
552
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
554
553
|
# @param payee_id [String] The id of the payee
|
|
555
554
|
# @param [Hash] opts the optional parameters
|
|
556
555
|
# @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).
|
|
557
556
|
# @option opts [String] :type If specified, only transactions of the specified type will be included. \"uncategorized\" and \"unapproved\" are currently supported.
|
|
558
557
|
# @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.
|
|
559
558
|
# @return [Array<(HybridTransactionsResponse, Integer, Hash)>] HybridTransactionsResponse data, response status code and response headers
|
|
560
|
-
def get_transactions_by_payee_with_http_info(
|
|
559
|
+
def get_transactions_by_payee_with_http_info(plan_id, payee_id, opts = {})
|
|
561
560
|
if @api_client.config.debugging
|
|
562
561
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.get_transactions_by_payee ...'
|
|
563
562
|
end
|
|
564
|
-
# verify the required parameter '
|
|
565
|
-
if @api_client.config.client_side_validation &&
|
|
566
|
-
fail ArgumentError, "Missing the required parameter '
|
|
563
|
+
# verify the required parameter 'plan_id' is set
|
|
564
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
565
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling TransactionsApi.get_transactions_by_payee"
|
|
567
566
|
end
|
|
568
567
|
# verify the required parameter 'payee_id' is set
|
|
569
568
|
if @api_client.config.client_side_validation && payee_id.nil?
|
|
570
569
|
fail ArgumentError, "Missing the required parameter 'payee_id' when calling TransactionsApi.get_transactions_by_payee"
|
|
571
570
|
end
|
|
572
571
|
# resource path
|
|
573
|
-
local_var_path = '/
|
|
572
|
+
local_var_path = '/plans/{plan_id}/payees/{payee_id}/transactions'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'payee_id' + '}', CGI.escape(payee_id.to_s))
|
|
574
573
|
|
|
575
574
|
# query parameters
|
|
576
575
|
query_params = opts[:query_params] || {}
|
|
@@ -613,30 +612,30 @@ module YNAB
|
|
|
613
612
|
end
|
|
614
613
|
|
|
615
614
|
# Import transactions
|
|
616
|
-
# Imports available transactions on all linked accounts for the given
|
|
617
|
-
# @param
|
|
615
|
+
# Imports available transactions on all linked accounts for the given plan. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
|
|
616
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
618
617
|
# @param [Hash] opts the optional parameters
|
|
619
618
|
# @return [TransactionsImportResponse]
|
|
620
|
-
def import_transactions(
|
|
621
|
-
data, _status_code, _headers = import_transactions_with_http_info(
|
|
619
|
+
def import_transactions(plan_id, opts = {})
|
|
620
|
+
data, _status_code, _headers = import_transactions_with_http_info(plan_id, opts)
|
|
622
621
|
data
|
|
623
622
|
end
|
|
624
623
|
|
|
625
624
|
# Import transactions
|
|
626
|
-
# Imports available transactions on all linked accounts for the given
|
|
627
|
-
# @param
|
|
625
|
+
# Imports available transactions on all linked accounts for the given plan. Linked accounts allow transactions to be imported directly from a specified financial institution and this endpoint initiates that import. Sending a request to this endpoint is the equivalent of clicking \"Import\" on each account in the web application or tapping the \"New Transactions\" banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
|
|
626
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
628
627
|
# @param [Hash] opts the optional parameters
|
|
629
628
|
# @return [Array<(TransactionsImportResponse, Integer, Hash)>] TransactionsImportResponse data, response status code and response headers
|
|
630
|
-
def import_transactions_with_http_info(
|
|
629
|
+
def import_transactions_with_http_info(plan_id, opts = {})
|
|
631
630
|
if @api_client.config.debugging
|
|
632
631
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.import_transactions ...'
|
|
633
632
|
end
|
|
634
|
-
# verify the required parameter '
|
|
635
|
-
if @api_client.config.client_side_validation &&
|
|
636
|
-
fail ArgumentError, "Missing the required parameter '
|
|
633
|
+
# verify the required parameter 'plan_id' is set
|
|
634
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
635
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling TransactionsApi.import_transactions"
|
|
637
636
|
end
|
|
638
637
|
# resource path
|
|
639
|
-
local_var_path = '/
|
|
638
|
+
local_var_path = '/plans/{plan_id}/transactions/import'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s))
|
|
640
639
|
|
|
641
640
|
# query parameters
|
|
642
641
|
query_params = opts[:query_params] || {}
|
|
@@ -675,32 +674,32 @@ module YNAB
|
|
|
675
674
|
return data, status_code, headers
|
|
676
675
|
end
|
|
677
676
|
|
|
678
|
-
#
|
|
677
|
+
# Update a transaction
|
|
679
678
|
# Updates a single transaction
|
|
680
|
-
# @param
|
|
679
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
681
680
|
# @param transaction_id [String] The id of the transaction
|
|
682
681
|
# @param data [PutTransactionWrapper] The transaction to update
|
|
683
682
|
# @param [Hash] opts the optional parameters
|
|
684
683
|
# @return [TransactionResponse]
|
|
685
|
-
def update_transaction(
|
|
686
|
-
data, _status_code, _headers = update_transaction_with_http_info(
|
|
684
|
+
def update_transaction(plan_id, transaction_id, data, opts = {})
|
|
685
|
+
data, _status_code, _headers = update_transaction_with_http_info(plan_id, transaction_id, data, opts)
|
|
687
686
|
data
|
|
688
687
|
end
|
|
689
688
|
|
|
690
|
-
#
|
|
689
|
+
# Update a transaction
|
|
691
690
|
# Updates a single transaction
|
|
692
|
-
# @param
|
|
691
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
693
692
|
# @param transaction_id [String] The id of the transaction
|
|
694
693
|
# @param data [PutTransactionWrapper] The transaction to update
|
|
695
694
|
# @param [Hash] opts the optional parameters
|
|
696
695
|
# @return [Array<(TransactionResponse, Integer, Hash)>] TransactionResponse data, response status code and response headers
|
|
697
|
-
def update_transaction_with_http_info(
|
|
696
|
+
def update_transaction_with_http_info(plan_id, transaction_id, data, opts = {})
|
|
698
697
|
if @api_client.config.debugging
|
|
699
698
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.update_transaction ...'
|
|
700
699
|
end
|
|
701
|
-
# verify the required parameter '
|
|
702
|
-
if @api_client.config.client_side_validation &&
|
|
703
|
-
fail ArgumentError, "Missing the required parameter '
|
|
700
|
+
# verify the required parameter 'plan_id' is set
|
|
701
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
702
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling TransactionsApi.update_transaction"
|
|
704
703
|
end
|
|
705
704
|
# verify the required parameter 'transaction_id' is set
|
|
706
705
|
if @api_client.config.client_side_validation && transaction_id.nil?
|
|
@@ -711,7 +710,7 @@ module YNAB
|
|
|
711
710
|
fail ArgumentError, "Missing the required parameter 'data' when calling TransactionsApi.update_transaction"
|
|
712
711
|
end
|
|
713
712
|
# resource path
|
|
714
|
-
local_var_path = '/
|
|
713
|
+
local_var_path = '/plans/{plan_id}/transactions/{transaction_id}'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'transaction_id' + '}', CGI.escape(transaction_id.to_s))
|
|
715
714
|
|
|
716
715
|
# query parameters
|
|
717
716
|
query_params = opts[:query_params] || {}
|
|
@@ -757,35 +756,35 @@ module YNAB
|
|
|
757
756
|
|
|
758
757
|
# Update multiple transactions
|
|
759
758
|
# Updates multiple transactions, by `id` or `import_id`.
|
|
760
|
-
# @param
|
|
759
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
761
760
|
# @param data [PatchTransactionsWrapper] 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.
|
|
762
761
|
# @param [Hash] opts the optional parameters
|
|
763
762
|
# @return [SaveTransactionsResponse]
|
|
764
|
-
def update_transactions(
|
|
765
|
-
data, _status_code, _headers = update_transactions_with_http_info(
|
|
763
|
+
def update_transactions(plan_id, data, opts = {})
|
|
764
|
+
data, _status_code, _headers = update_transactions_with_http_info(plan_id, data, opts)
|
|
766
765
|
data
|
|
767
766
|
end
|
|
768
767
|
|
|
769
768
|
# Update multiple transactions
|
|
770
769
|
# Updates multiple transactions, by `id` or `import_id`.
|
|
771
|
-
# @param
|
|
770
|
+
# @param plan_id [String] The id of the plan. \"last-used\" can be used to specify the last used plan and \"default\" can be used if default plan selection is enabled (see: https://api.ynab.com/#oauth-default-plan).
|
|
772
771
|
# @param data [PatchTransactionsWrapper] 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.
|
|
773
772
|
# @param [Hash] opts the optional parameters
|
|
774
773
|
# @return [Array<(SaveTransactionsResponse, Integer, Hash)>] SaveTransactionsResponse data, response status code and response headers
|
|
775
|
-
def update_transactions_with_http_info(
|
|
774
|
+
def update_transactions_with_http_info(plan_id, data, opts = {})
|
|
776
775
|
if @api_client.config.debugging
|
|
777
776
|
@api_client.config.logger.debug 'Calling API: TransactionsApi.update_transactions ...'
|
|
778
777
|
end
|
|
779
|
-
# verify the required parameter '
|
|
780
|
-
if @api_client.config.client_side_validation &&
|
|
781
|
-
fail ArgumentError, "Missing the required parameter '
|
|
778
|
+
# verify the required parameter 'plan_id' is set
|
|
779
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
780
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling TransactionsApi.update_transactions"
|
|
782
781
|
end
|
|
783
782
|
# verify the required parameter 'data' is set
|
|
784
783
|
if @api_client.config.client_side_validation && data.nil?
|
|
785
784
|
fail ArgumentError, "Missing the required parameter 'data' when calling TransactionsApi.update_transactions"
|
|
786
785
|
end
|
|
787
786
|
# resource path
|
|
788
|
-
local_var_path = '/
|
|
787
|
+
local_var_path = '/plans/{plan_id}/transactions'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s))
|
|
789
788
|
|
|
790
789
|
# query parameters
|
|
791
790
|
query_params = opts[:query_params] || {}
|