ynab 3.9.0 → 4.9.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 +3 -1
- data/README.md +47 -39
- data/Rakefile +1 -1
- 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} +54 -55
- 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/money_movement.rb +223 -0
- 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/money_movements_response_data.rb +149 -0
- 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/{budget_detail_response_data.rb → plan_detail_response_data.rb} +4 -78
- 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/{budget_summary_response_data.rb → plan_summary_response_data.rb} +5 -79
- 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 +1155 -910
- 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/{budgets_spec.rb → plans_spec.rb} +12 -12
- data/spec/api/scheduled_transactions_spec.rb +9 -9
- data/spec/api/transactions_spec.rb +27 -27
- data/spec/fixtures/vcr_cassettes/plans.yml +49 -0
- data/spec/fixtures/vcr_cassettes/plans_unauthorized.yml +49 -0
- data/templates/gem.mustache +3 -2
- data/templates/partial_model_generic.mustache +1 -1
- data/ynab.gemspec +1 -2
- metadata +62 -27
- 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
|
@@ -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'
|
|
@@ -16,37 +15,37 @@ module YNAB
|
|
|
16
15
|
def initialize(api_client = ApiClient.default)
|
|
17
16
|
@api_client = api_client
|
|
18
17
|
end
|
|
19
|
-
# Create a
|
|
18
|
+
# Create a scheduled transaction
|
|
20
19
|
# Creates a single scheduled transaction (a transaction with a future date).
|
|
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 [PostScheduledTransactionWrapper] The scheduled transaction to create
|
|
23
22
|
# @param [Hash] opts the optional parameters
|
|
24
23
|
# @return [ScheduledTransactionResponse]
|
|
25
|
-
def create_scheduled_transaction(
|
|
26
|
-
data, _status_code, _headers = create_scheduled_transaction_with_http_info(
|
|
24
|
+
def create_scheduled_transaction(plan_id, data, opts = {})
|
|
25
|
+
data, _status_code, _headers = create_scheduled_transaction_with_http_info(plan_id, data, opts)
|
|
27
26
|
data
|
|
28
27
|
end
|
|
29
28
|
|
|
30
|
-
# Create a
|
|
29
|
+
# Create a scheduled transaction
|
|
31
30
|
# Creates a single scheduled transaction (a transaction with a future date).
|
|
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 [PostScheduledTransactionWrapper] The scheduled transaction to create
|
|
34
33
|
# @param [Hash] opts the optional parameters
|
|
35
34
|
# @return [Array<(ScheduledTransactionResponse, Integer, Hash)>] ScheduledTransactionResponse data, response status code and response headers
|
|
36
|
-
def create_scheduled_transaction_with_http_info(
|
|
35
|
+
def create_scheduled_transaction_with_http_info(plan_id, data, opts = {})
|
|
37
36
|
if @api_client.config.debugging
|
|
38
37
|
@api_client.config.logger.debug 'Calling API: ScheduledTransactionsApi.create_scheduled_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 ScheduledTransactionsApi.create_scheduled_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 ScheduledTransactionsApi.create_scheduled_transaction"
|
|
47
46
|
end
|
|
48
47
|
# resource path
|
|
49
|
-
local_var_path = '/budgets/{
|
|
48
|
+
local_var_path = '/budgets/{plan_id}/scheduled_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 scheduled transaction
|
|
94
93
|
# Deletes a scheduled 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 scheduled_transaction_id [String] The id of the scheduled transaction
|
|
97
96
|
# @param [Hash] opts the optional parameters
|
|
98
97
|
# @return [ScheduledTransactionResponse]
|
|
99
|
-
def delete_scheduled_transaction(
|
|
100
|
-
data, _status_code, _headers = delete_scheduled_transaction_with_http_info(
|
|
98
|
+
def delete_scheduled_transaction(plan_id, scheduled_transaction_id, opts = {})
|
|
99
|
+
data, _status_code, _headers = delete_scheduled_transaction_with_http_info(plan_id, scheduled_transaction_id, opts)
|
|
101
100
|
data
|
|
102
101
|
end
|
|
103
102
|
|
|
104
|
-
#
|
|
103
|
+
# Delete a scheduled transaction
|
|
105
104
|
# Deletes a scheduled 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 scheduled_transaction_id [String] The id of the scheduled transaction
|
|
108
107
|
# @param [Hash] opts the optional parameters
|
|
109
108
|
# @return [Array<(ScheduledTransactionResponse, Integer, Hash)>] ScheduledTransactionResponse data, response status code and response headers
|
|
110
|
-
def delete_scheduled_transaction_with_http_info(
|
|
109
|
+
def delete_scheduled_transaction_with_http_info(plan_id, scheduled_transaction_id, opts = {})
|
|
111
110
|
if @api_client.config.debugging
|
|
112
111
|
@api_client.config.logger.debug 'Calling API: ScheduledTransactionsApi.delete_scheduled_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 ScheduledTransactionsApi.delete_scheduled_transaction"
|
|
117
116
|
end
|
|
118
117
|
# verify the required parameter 'scheduled_transaction_id' is set
|
|
119
118
|
if @api_client.config.client_side_validation && scheduled_transaction_id.nil?
|
|
120
119
|
fail ArgumentError, "Missing the required parameter 'scheduled_transaction_id' when calling ScheduledTransactionsApi.delete_scheduled_transaction"
|
|
121
120
|
end
|
|
122
121
|
# resource path
|
|
123
|
-
local_var_path = '/budgets/{
|
|
122
|
+
local_var_path = '/budgets/{plan_id}/scheduled_transactions/{scheduled_transaction_id}'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'scheduled_transaction_id' + '}', CGI.escape(scheduled_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 scheduled transaction
|
|
163
162
|
# Returns a single scheduled 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 scheduled_transaction_id [String] The id of the scheduled transaction
|
|
166
165
|
# @param [Hash] opts the optional parameters
|
|
167
166
|
# @return [ScheduledTransactionResponse]
|
|
168
|
-
def get_scheduled_transaction_by_id(
|
|
169
|
-
data, _status_code, _headers = get_scheduled_transaction_by_id_with_http_info(
|
|
167
|
+
def get_scheduled_transaction_by_id(plan_id, scheduled_transaction_id, opts = {})
|
|
168
|
+
data, _status_code, _headers = get_scheduled_transaction_by_id_with_http_info(plan_id, scheduled_transaction_id, opts)
|
|
170
169
|
data
|
|
171
170
|
end
|
|
172
171
|
|
|
173
|
-
#
|
|
172
|
+
# Get a scheduled transaction
|
|
174
173
|
# Returns a single scheduled 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 scheduled_transaction_id [String] The id of the scheduled transaction
|
|
177
176
|
# @param [Hash] opts the optional parameters
|
|
178
177
|
# @return [Array<(ScheduledTransactionResponse, Integer, Hash)>] ScheduledTransactionResponse data, response status code and response headers
|
|
179
|
-
def get_scheduled_transaction_by_id_with_http_info(
|
|
178
|
+
def get_scheduled_transaction_by_id_with_http_info(plan_id, scheduled_transaction_id, opts = {})
|
|
180
179
|
if @api_client.config.debugging
|
|
181
180
|
@api_client.config.logger.debug 'Calling API: ScheduledTransactionsApi.get_scheduled_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 ScheduledTransactionsApi.get_scheduled_transaction_by_id"
|
|
186
185
|
end
|
|
187
186
|
# verify the required parameter 'scheduled_transaction_id' is set
|
|
188
187
|
if @api_client.config.client_side_validation && scheduled_transaction_id.nil?
|
|
189
188
|
fail ArgumentError, "Missing the required parameter 'scheduled_transaction_id' when calling ScheduledTransactionsApi.get_scheduled_transaction_by_id"
|
|
190
189
|
end
|
|
191
190
|
# resource path
|
|
192
|
-
local_var_path = '/budgets/{
|
|
191
|
+
local_var_path = '/budgets/{plan_id}/scheduled_transactions/{scheduled_transaction_id}'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'scheduled_transaction_id' + '}', CGI.escape(scheduled_transaction_id.to_s))
|
|
193
192
|
|
|
194
193
|
# query parameters
|
|
195
194
|
query_params = opts[:query_params] || {}
|
|
@@ -228,33 +227,33 @@ module YNAB
|
|
|
228
227
|
return data, status_code, headers
|
|
229
228
|
end
|
|
230
229
|
|
|
231
|
-
#
|
|
230
|
+
# Get all scheduled transactions
|
|
232
231
|
# Returns all scheduled transactions
|
|
233
|
-
# @param
|
|
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 [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
|
|
236
235
|
# @return [ScheduledTransactionsResponse]
|
|
237
|
-
def get_scheduled_transactions(
|
|
238
|
-
data, _status_code, _headers = get_scheduled_transactions_with_http_info(
|
|
236
|
+
def get_scheduled_transactions(plan_id, opts = {})
|
|
237
|
+
data, _status_code, _headers = get_scheduled_transactions_with_http_info(plan_id, opts)
|
|
239
238
|
data
|
|
240
239
|
end
|
|
241
240
|
|
|
242
|
-
#
|
|
241
|
+
# Get all scheduled transactions
|
|
243
242
|
# Returns all scheduled transactions
|
|
244
|
-
# @param
|
|
243
|
+
# @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).
|
|
245
244
|
# @param [Hash] opts the optional parameters
|
|
246
245
|
# @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.
|
|
247
246
|
# @return [Array<(ScheduledTransactionsResponse, Integer, Hash)>] ScheduledTransactionsResponse data, response status code and response headers
|
|
248
|
-
def get_scheduled_transactions_with_http_info(
|
|
247
|
+
def get_scheduled_transactions_with_http_info(plan_id, opts = {})
|
|
249
248
|
if @api_client.config.debugging
|
|
250
249
|
@api_client.config.logger.debug 'Calling API: ScheduledTransactionsApi.get_scheduled_transactions ...'
|
|
251
250
|
end
|
|
252
|
-
# verify the required parameter '
|
|
253
|
-
if @api_client.config.client_side_validation &&
|
|
254
|
-
fail ArgumentError, "Missing the required parameter '
|
|
251
|
+
# verify the required parameter 'plan_id' is set
|
|
252
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
253
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling ScheduledTransactionsApi.get_scheduled_transactions"
|
|
255
254
|
end
|
|
256
255
|
# resource path
|
|
257
|
-
local_var_path = '/budgets/{
|
|
256
|
+
local_var_path = '/budgets/{plan_id}/scheduled_transactions'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s))
|
|
258
257
|
|
|
259
258
|
# query parameters
|
|
260
259
|
query_params = opts[:query_params] || {}
|
|
@@ -294,32 +293,32 @@ module YNAB
|
|
|
294
293
|
return data, status_code, headers
|
|
295
294
|
end
|
|
296
295
|
|
|
297
|
-
#
|
|
296
|
+
# Update a scheduled transaction
|
|
298
297
|
# Updates a single scheduled transaction
|
|
299
|
-
# @param
|
|
298
|
+
# @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).
|
|
300
299
|
# @param scheduled_transaction_id [String] The id of the scheduled transaction
|
|
301
300
|
# @param put_scheduled_transaction_wrapper [PutScheduledTransactionWrapper] The scheduled transaction to update
|
|
302
301
|
# @param [Hash] opts the optional parameters
|
|
303
302
|
# @return [ScheduledTransactionResponse]
|
|
304
|
-
def update_scheduled_transaction(
|
|
305
|
-
data, _status_code, _headers = update_scheduled_transaction_with_http_info(
|
|
303
|
+
def update_scheduled_transaction(plan_id, scheduled_transaction_id, put_scheduled_transaction_wrapper, opts = {})
|
|
304
|
+
data, _status_code, _headers = update_scheduled_transaction_with_http_info(plan_id, scheduled_transaction_id, put_scheduled_transaction_wrapper, opts)
|
|
306
305
|
data
|
|
307
306
|
end
|
|
308
307
|
|
|
309
|
-
#
|
|
308
|
+
# Update a scheduled transaction
|
|
310
309
|
# Updates a single scheduled transaction
|
|
311
|
-
# @param
|
|
310
|
+
# @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).
|
|
312
311
|
# @param scheduled_transaction_id [String] The id of the scheduled transaction
|
|
313
312
|
# @param put_scheduled_transaction_wrapper [PutScheduledTransactionWrapper] The scheduled transaction to update
|
|
314
313
|
# @param [Hash] opts the optional parameters
|
|
315
314
|
# @return [Array<(ScheduledTransactionResponse, Integer, Hash)>] ScheduledTransactionResponse data, response status code and response headers
|
|
316
|
-
def update_scheduled_transaction_with_http_info(
|
|
315
|
+
def update_scheduled_transaction_with_http_info(plan_id, scheduled_transaction_id, put_scheduled_transaction_wrapper, opts = {})
|
|
317
316
|
if @api_client.config.debugging
|
|
318
317
|
@api_client.config.logger.debug 'Calling API: ScheduledTransactionsApi.update_scheduled_transaction ...'
|
|
319
318
|
end
|
|
320
|
-
# verify the required parameter '
|
|
321
|
-
if @api_client.config.client_side_validation &&
|
|
322
|
-
fail ArgumentError, "Missing the required parameter '
|
|
319
|
+
# verify the required parameter 'plan_id' is set
|
|
320
|
+
if @api_client.config.client_side_validation && plan_id.nil?
|
|
321
|
+
fail ArgumentError, "Missing the required parameter 'plan_id' when calling ScheduledTransactionsApi.update_scheduled_transaction"
|
|
323
322
|
end
|
|
324
323
|
# verify the required parameter 'scheduled_transaction_id' is set
|
|
325
324
|
if @api_client.config.client_side_validation && scheduled_transaction_id.nil?
|
|
@@ -330,7 +329,7 @@ module YNAB
|
|
|
330
329
|
fail ArgumentError, "Missing the required parameter 'put_scheduled_transaction_wrapper' when calling ScheduledTransactionsApi.update_scheduled_transaction"
|
|
331
330
|
end
|
|
332
331
|
# resource path
|
|
333
|
-
local_var_path = '/budgets/{
|
|
332
|
+
local_var_path = '/budgets/{plan_id}/scheduled_transactions/{scheduled_transaction_id}'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'scheduled_transaction_id' + '}', CGI.escape(scheduled_transaction_id.to_s))
|
|
334
333
|
|
|
335
334
|
# query parameters
|
|
336
335
|
query_params = opts[:query_params] || {}
|