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.
Files changed (195) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/Gemfile.lock +3 -1
  4. data/README.md +47 -39
  5. data/Rakefile +1 -1
  6. data/docs/Account.md +3 -3
  7. data/docs/AccountsApi.md +12 -12
  8. data/docs/CategoriesApi.md +89 -25
  9. data/docs/Category.md +4 -3
  10. data/docs/CategoryGroupWithCategories.md +1 -1
  11. data/docs/ExistingCategory.md +12 -0
  12. data/docs/MoneyMovement.md +16 -0
  13. data/docs/MoneyMovementGroup.md +12 -0
  14. data/docs/MoneyMovementGroupsResponse.md +8 -0
  15. data/docs/MoneyMovementGroupsResponseData.md +9 -0
  16. data/docs/MoneyMovementsApi.md +89 -0
  17. data/docs/{BudgetSettingsResponse.md → MoneyMovementsResponse.md} +2 -2
  18. data/docs/MoneyMovementsResponseData.md +9 -0
  19. data/docs/MonthDetail.md +2 -2
  20. data/docs/MonthSummary.md +1 -1
  21. data/docs/MonthsApi.md +13 -13
  22. data/docs/NewCategory.md +12 -0
  23. data/docs/PatchCategoryGroupWrapper.md +8 -0
  24. data/docs/PatchCategoryWrapper.md +1 -1
  25. data/docs/PayeeLocationsApi.md +12 -12
  26. data/docs/PayeesApi.md +11 -11
  27. data/docs/{BudgetDetail.md → PlanDetail.md} +4 -4
  28. data/docs/PlanDetailResponse.md +8 -0
  29. data/docs/{BudgetDetailResponseData.md → PlanDetailResponseData.md} +2 -2
  30. data/docs/{BudgetSettings.md → PlanSettings.md} +1 -1
  31. data/docs/{BudgetDetailResponse.md → PlanSettingsResponse.md} +2 -2
  32. data/docs/PlanSettingsResponseData.md +8 -0
  33. data/docs/PlanSummary.md +15 -0
  34. data/docs/PlanSummaryResponse.md +8 -0
  35. data/docs/PlanSummaryResponseData.md +9 -0
  36. data/docs/PlansApi.md +68 -0
  37. data/docs/PostCategoryGroupWrapper.md +8 -0
  38. data/docs/PostCategoryWrapper.md +8 -0
  39. data/docs/SaveCategory.md +2 -1
  40. data/docs/SaveCategoryGroup.md +8 -0
  41. data/docs/SaveCategoryGroupResponse.md +8 -0
  42. data/docs/SaveCategoryGroupResponseData.md +9 -0
  43. data/docs/SaveMonthCategory.md +1 -1
  44. data/docs/ScheduledTransactionsApi.md +20 -20
  45. data/docs/TransactionsApi.md +48 -48
  46. data/docs/UserApi.md +2 -2
  47. data/examples/category-balance.rb +2 -2
  48. data/examples/create-multiple-transactions.rb +2 -2
  49. data/examples/create-transaction.rb +2 -2
  50. data/examples/{budget-list.rb → plan-list.rb} +6 -6
  51. data/examples/{budget-month.rb → plan-month.rb} +9 -10
  52. data/examples/update-category-budgeted.rb +2 -2
  53. data/examples/update-multiple-transactions.rb +3 -3
  54. data/lib/ynab/api/accounts_api.rb +33 -34
  55. data/lib/ynab/api/categories_api.rb +293 -66
  56. data/lib/ynab/api/deprecated_api.rb +11 -11
  57. data/lib/ynab/api/money_movements_api.rb +282 -0
  58. data/lib/ynab/api/months_api.rb +35 -36
  59. data/lib/ynab/api/payee_locations_api.rb +33 -34
  60. data/lib/ynab/api/payees_api.rb +31 -32
  61. data/lib/ynab/api/{budgets_api.rb → plans_api.rb} +54 -55
  62. data/lib/ynab/api/scheduled_transactions_api.rb +55 -56
  63. data/lib/ynab/api/transactions_api.rb +130 -131
  64. data/lib/ynab/api/user_api.rb +2 -3
  65. data/lib/ynab/api_client.rb +0 -2
  66. data/lib/ynab/api_model_base.rb +85 -0
  67. data/lib/ynab/models/account.rb +4 -81
  68. data/lib/ynab/models/account_response.rb +1 -75
  69. data/lib/ynab/models/account_response_data.rb +1 -75
  70. data/lib/ynab/models/accounts_response.rb +1 -75
  71. data/lib/ynab/models/accounts_response_data.rb +1 -75
  72. data/lib/ynab/models/bulk_response.rb +1 -75
  73. data/lib/ynab/models/bulk_response_data.rb +1 -75
  74. data/lib/ynab/models/bulk_response_data_bulk.rb +1 -75
  75. data/lib/ynab/models/bulk_transactions.rb +1 -75
  76. data/lib/ynab/models/categories_response.rb +1 -75
  77. data/lib/ynab/models/categories_response_data.rb +1 -75
  78. data/lib/ynab/models/category.rb +16 -79
  79. data/lib/ynab/models/category_group.rb +1 -75
  80. data/lib/ynab/models/category_group_with_categories.rb +2 -76
  81. data/lib/ynab/models/category_response.rb +1 -75
  82. data/lib/ynab/models/category_response_data.rb +1 -75
  83. data/lib/ynab/models/currency_format.rb +2 -76
  84. data/lib/ynab/models/date_format.rb +2 -76
  85. data/lib/ynab/models/error_detail.rb +1 -75
  86. data/lib/ynab/models/error_response.rb +1 -75
  87. data/lib/ynab/models/existing_category.rb +180 -0
  88. data/lib/ynab/models/existing_transaction.rb +1 -79
  89. data/lib/ynab/models/hybrid_transaction.rb +1 -85
  90. data/lib/ynab/models/hybrid_transactions_response.rb +1 -75
  91. data/lib/ynab/models/hybrid_transactions_response_data.rb +1 -75
  92. data/lib/ynab/models/money_movement.rb +223 -0
  93. data/lib/ynab/models/money_movement_group.rb +179 -0
  94. data/lib/ynab/models/{budget_summary_response.rb → money_movement_groups_response.rb} +4 -78
  95. data/lib/ynab/models/money_movement_groups_response_data.rb +149 -0
  96. data/lib/ynab/models/{budget_settings_response.rb → money_movements_response.rb} +4 -78
  97. data/lib/ynab/models/money_movements_response_data.rb +149 -0
  98. data/lib/ynab/models/month_detail.rb +3 -79
  99. data/lib/ynab/models/month_detail_response.rb +1 -75
  100. data/lib/ynab/models/month_detail_response_data.rb +1 -75
  101. data/lib/ynab/models/month_summaries_response.rb +1 -75
  102. data/lib/ynab/models/month_summaries_response_data.rb +1 -75
  103. data/lib/ynab/models/month_summary.rb +2 -76
  104. data/lib/ynab/models/new_category.rb +180 -0
  105. data/lib/ynab/models/new_transaction.rb +1 -79
  106. data/lib/ynab/models/patch_category_group_wrapper.rb +136 -0
  107. data/lib/ynab/models/patch_category_wrapper.rb +2 -76
  108. data/lib/ynab/models/patch_month_category_wrapper.rb +1 -75
  109. data/lib/ynab/models/patch_payee_wrapper.rb +1 -75
  110. data/lib/ynab/models/patch_transactions_wrapper.rb +1 -75
  111. data/lib/ynab/models/payee.rb +1 -75
  112. data/lib/ynab/models/payee_location.rb +1 -75
  113. data/lib/ynab/models/payee_location_response.rb +1 -75
  114. data/lib/ynab/models/payee_location_response_data.rb +1 -75
  115. data/lib/ynab/models/payee_locations_response.rb +1 -75
  116. data/lib/ynab/models/payee_locations_response_data.rb +1 -75
  117. data/lib/ynab/models/payee_response.rb +1 -75
  118. data/lib/ynab/models/payee_response_data.rb +1 -75
  119. data/lib/ynab/models/payees_response.rb +1 -75
  120. data/lib/ynab/models/payees_response_data.rb +1 -75
  121. data/lib/ynab/models/{budget_detail.rb → plan_detail.rb} +7 -83
  122. data/lib/ynab/models/plan_detail_response.rb +136 -0
  123. data/lib/ynab/models/{budget_detail_response_data.rb → plan_detail_response_data.rb} +4 -78
  124. data/lib/ynab/models/{budget_settings.rb → plan_settings.rb} +5 -79
  125. data/lib/ynab/models/{budget_detail_response.rb → plan_settings_response.rb} +4 -78
  126. data/lib/ynab/models/{budget_settings_response_data.rb → plan_settings_response_data.rb} +4 -78
  127. data/lib/ynab/models/{budget_summary.rb → plan_summary.rb} +7 -83
  128. data/lib/ynab/models/plan_summary_response.rb +136 -0
  129. data/lib/ynab/models/{budget_summary_response_data.rb → plan_summary_response_data.rb} +5 -79
  130. data/lib/ynab/models/post_account_wrapper.rb +1 -75
  131. data/lib/ynab/models/post_category_group_wrapper.rb +136 -0
  132. data/lib/ynab/models/post_category_wrapper.rb +136 -0
  133. data/lib/ynab/models/post_scheduled_transaction_wrapper.rb +1 -75
  134. data/lib/ynab/models/post_transactions_wrapper.rb +1 -75
  135. data/lib/ynab/models/put_scheduled_transaction_wrapper.rb +1 -75
  136. data/lib/ynab/models/put_transaction_wrapper.rb +1 -75
  137. data/lib/ynab/models/save_account.rb +1 -75
  138. data/lib/ynab/models/save_category.rb +18 -81
  139. data/lib/ynab/models/save_category_group.rb +148 -0
  140. data/lib/ynab/models/save_category_group_response.rb +136 -0
  141. data/lib/ynab/models/save_category_group_response_data.rb +147 -0
  142. data/lib/ynab/models/save_category_response.rb +1 -75
  143. data/lib/ynab/models/save_category_response_data.rb +1 -75
  144. data/lib/ynab/models/save_month_category.rb +2 -76
  145. data/lib/ynab/models/save_payee.rb +1 -75
  146. data/lib/ynab/models/save_payee_response.rb +1 -75
  147. data/lib/ynab/models/save_payee_response_data.rb +1 -75
  148. data/lib/ynab/models/save_scheduled_transaction.rb +1 -75
  149. data/lib/ynab/models/save_sub_transaction.rb +1 -75
  150. data/lib/ynab/models/save_transaction_with_id_or_import_id.rb +1 -79
  151. data/lib/ynab/models/save_transaction_with_optional_fields.rb +1 -75
  152. data/lib/ynab/models/save_transactions_response.rb +1 -75
  153. data/lib/ynab/models/save_transactions_response_data.rb +1 -75
  154. data/lib/ynab/models/scheduled_sub_transaction.rb +1 -75
  155. data/lib/ynab/models/scheduled_transaction_detail.rb +1 -80
  156. data/lib/ynab/models/scheduled_transaction_response.rb +1 -75
  157. data/lib/ynab/models/scheduled_transaction_response_data.rb +1 -75
  158. data/lib/ynab/models/scheduled_transaction_summary.rb +1 -75
  159. data/lib/ynab/models/scheduled_transactions_response.rb +1 -75
  160. data/lib/ynab/models/scheduled_transactions_response_data.rb +1 -75
  161. data/lib/ynab/models/sub_transaction.rb +1 -75
  162. data/lib/ynab/models/transaction_detail.rb +1 -85
  163. data/lib/ynab/models/transaction_response.rb +1 -75
  164. data/lib/ynab/models/transaction_response_data.rb +1 -75
  165. data/lib/ynab/models/transaction_summary.rb +1 -75
  166. data/lib/ynab/models/transactions_import_response.rb +1 -75
  167. data/lib/ynab/models/transactions_import_response_data.rb +1 -75
  168. data/lib/ynab/models/transactions_response.rb +1 -75
  169. data/lib/ynab/models/transactions_response_data.rb +1 -75
  170. data/lib/ynab/models/user.rb +1 -75
  171. data/lib/ynab/models/user_response.rb +1 -75
  172. data/lib/ynab/models/user_response_data.rb +1 -75
  173. data/lib/ynab/overrides/transactions_api.rb +6 -6
  174. data/lib/ynab/version.rb +1 -1
  175. data/lib/ynab.rb +28 -13
  176. data/open_api_spec.yaml +1155 -910
  177. data/spec/api/accounts_spec.rb +9 -9
  178. data/spec/api/categories_spec.rb +9 -9
  179. data/spec/api/months_spec.rb +7 -7
  180. data/spec/api/payee_locations_spec.rb +7 -7
  181. data/spec/api/payees_spec.rb +7 -7
  182. data/spec/api/{budgets_spec.rb → plans_spec.rb} +12 -12
  183. data/spec/api/scheduled_transactions_spec.rb +9 -9
  184. data/spec/api/transactions_spec.rb +27 -27
  185. data/spec/fixtures/vcr_cassettes/plans.yml +49 -0
  186. data/spec/fixtures/vcr_cassettes/plans_unauthorized.yml +49 -0
  187. data/templates/gem.mustache +3 -2
  188. data/templates/partial_model_generic.mustache +1 -1
  189. data/ynab.gemspec +1 -2
  190. metadata +62 -27
  191. data/docs/BudgetSettingsResponseData.md +0 -8
  192. data/docs/BudgetSummary.md +0 -15
  193. data/docs/BudgetSummaryResponse.md +0 -8
  194. data/docs/BudgetSummaryResponseData.md +0 -9
  195. 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 single scheduled transaction
18
+ # Create a scheduled transaction
20
19
  # Creates a single scheduled transaction (a transaction with a future date).
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).
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(budget_id, data, opts = {})
26
- data, _status_code, _headers = create_scheduled_transaction_with_http_info(budget_id, data, opts)
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 single scheduled transaction
29
+ # Create a scheduled transaction
31
30
  # Creates a single scheduled transaction (a transaction with a future date).
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).
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(budget_id, data, opts = {})
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 '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"
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/{budget_id}/scheduled_transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
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
- # Deletes an existing scheduled transaction
92
+ # Delete a scheduled transaction
94
93
  # Deletes a scheduled transaction
95
- # @param budget_id [String] The id of the budget. \&quot;last-used\&quot; can be used to specify the last used budget and \&quot;default\&quot; can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
94
+ # @param plan_id [String] The id of the plan. \&quot;last-used\&quot; can be used to specify the last used plan and \&quot;default\&quot; 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(budget_id, scheduled_transaction_id, opts = {})
100
- data, _status_code, _headers = delete_scheduled_transaction_with_http_info(budget_id, scheduled_transaction_id, opts)
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
- # Deletes an existing scheduled transaction
103
+ # Delete a scheduled transaction
105
104
  # Deletes a scheduled transaction
106
- # @param budget_id [String] The id of the budget. \&quot;last-used\&quot; can be used to specify the last used budget and \&quot;default\&quot; can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
105
+ # @param plan_id [String] The id of the plan. \&quot;last-used\&quot; can be used to specify the last used plan and \&quot;default\&quot; 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(budget_id, scheduled_transaction_id, opts = {})
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 'budget_id' is set
115
- if @api_client.config.client_side_validation && budget_id.nil?
116
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling ScheduledTransactionsApi.delete_scheduled_transaction"
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/{budget_id}/scheduled_transactions/{scheduled_transaction_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'scheduled_transaction_id' + '}', CGI.escape(scheduled_transaction_id.to_s))
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
- # Single scheduled transaction
161
+ # Get a scheduled transaction
163
162
  # Returns a single scheduled transaction
164
- # @param budget_id [String] The id of the budget. \&quot;last-used\&quot; can be used to specify the last used budget and \&quot;default\&quot; can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
163
+ # @param plan_id [String] The id of the plan. \&quot;last-used\&quot; can be used to specify the last used plan and \&quot;default\&quot; 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(budget_id, scheduled_transaction_id, opts = {})
169
- data, _status_code, _headers = get_scheduled_transaction_by_id_with_http_info(budget_id, scheduled_transaction_id, opts)
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
- # Single scheduled transaction
172
+ # Get a scheduled transaction
174
173
  # Returns a single scheduled transaction
175
- # @param budget_id [String] The id of the budget. \&quot;last-used\&quot; can be used to specify the last used budget and \&quot;default\&quot; can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
174
+ # @param plan_id [String] The id of the plan. \&quot;last-used\&quot; can be used to specify the last used plan and \&quot;default\&quot; 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(budget_id, scheduled_transaction_id, opts = {})
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 'budget_id' is set
184
- if @api_client.config.client_side_validation && budget_id.nil?
185
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling ScheduledTransactionsApi.get_scheduled_transaction_by_id"
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/{budget_id}/scheduled_transactions/{scheduled_transaction_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'scheduled_transaction_id' + '}', CGI.escape(scheduled_transaction_id.to_s))
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
- # List scheduled transactions
230
+ # Get all scheduled transactions
232
231
  # Returns all scheduled transactions
233
- # @param budget_id [String] The id of the budget. \&quot;last-used\&quot; can be used to specify the last used budget and \&quot;default\&quot; can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
232
+ # @param plan_id [String] The id of the plan. \&quot;last-used\&quot; can be used to specify the last used plan and \&quot;default\&quot; 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 &#x60;last_knowledge_of_server&#x60; will be included.
236
235
  # @return [ScheduledTransactionsResponse]
237
- def get_scheduled_transactions(budget_id, opts = {})
238
- data, _status_code, _headers = get_scheduled_transactions_with_http_info(budget_id, opts)
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
- # List scheduled transactions
241
+ # Get all scheduled transactions
243
242
  # Returns all scheduled transactions
244
- # @param budget_id [String] The id of the budget. \&quot;last-used\&quot; can be used to specify the last used budget and \&quot;default\&quot; can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
243
+ # @param plan_id [String] The id of the plan. \&quot;last-used\&quot; can be used to specify the last used plan and \&quot;default\&quot; 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 &#x60;last_knowledge_of_server&#x60; 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(budget_id, opts = {})
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 'budget_id' is set
253
- if @api_client.config.client_side_validation && budget_id.nil?
254
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling ScheduledTransactionsApi.get_scheduled_transactions"
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/{budget_id}/scheduled_transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
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
- # Updates an existing scheduled transaction
296
+ # Update a scheduled transaction
298
297
  # Updates a single scheduled transaction
299
- # @param budget_id [String] The id of the budget. \&quot;last-used\&quot; can be used to specify the last used budget and \&quot;default\&quot; can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
298
+ # @param plan_id [String] The id of the plan. \&quot;last-used\&quot; can be used to specify the last used plan and \&quot;default\&quot; 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(budget_id, scheduled_transaction_id, put_scheduled_transaction_wrapper, opts = {})
305
- data, _status_code, _headers = update_scheduled_transaction_with_http_info(budget_id, scheduled_transaction_id, put_scheduled_transaction_wrapper, opts)
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
- # Updates an existing scheduled transaction
308
+ # Update a scheduled transaction
310
309
  # Updates a single scheduled transaction
311
- # @param budget_id [String] The id of the budget. \&quot;last-used\&quot; can be used to specify the last used budget and \&quot;default\&quot; can be used if default budget selection is enabled (see: https://api.ynab.com/#oauth-default-budget).
310
+ # @param plan_id [String] The id of the plan. \&quot;last-used\&quot; can be used to specify the last used plan and \&quot;default\&quot; 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(budget_id, scheduled_transaction_id, put_scheduled_transaction_wrapper, opts = {})
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 'budget_id' is set
321
- if @api_client.config.client_side_validation && budget_id.nil?
322
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling ScheduledTransactionsApi.update_scheduled_transaction"
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/{budget_id}/scheduled_transactions/{scheduled_transaction_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'scheduled_transaction_id' + '}', CGI.escape(scheduled_transaction_id.to_s))
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] || {}