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.
Files changed (232) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/Gemfile.lock +4 -2
  4. data/README.md +47 -39
  5. data/Rakefile +3 -3
  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} +55 -56
  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/{budget_summary_response_data.rb → money_movement.rb} +95 -93
  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/{budget_detail_response_data.rb → money_movements_response_data.rb} +13 -85
  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/plan_detail_response_data.rb +147 -0
  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/plan_summary_response_data.rb +147 -0
  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 +1161 -916
  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/plans_spec.rb +55 -0
  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/account.yml +2 -2
  186. data/spec/fixtures/vcr_cassettes/accounts.yml +2 -2
  187. data/spec/fixtures/vcr_cassettes/accounts_unauthorized.yml +2 -2
  188. data/spec/fixtures/vcr_cassettes/bulk_transactions.yml +2 -2
  189. data/spec/fixtures/vcr_cassettes/categories.yml +2 -2
  190. data/spec/fixtures/vcr_cassettes/categories_unauthorized.yml +2 -2
  191. data/spec/fixtures/vcr_cassettes/category.yml +2 -2
  192. data/spec/fixtures/vcr_cassettes/category_transactions.yml +2 -2
  193. data/spec/fixtures/vcr_cassettes/create_account.yml +2 -2
  194. data/spec/fixtures/vcr_cassettes/create_scheduled_transaction.yml +2 -2
  195. data/spec/fixtures/vcr_cassettes/create_transaction.yml +2 -2
  196. data/spec/fixtures/vcr_cassettes/create_transactions.yml +2 -2
  197. data/spec/fixtures/vcr_cassettes/import_transactions.yml +2 -2
  198. data/spec/fixtures/vcr_cassettes/month.yml +2 -2
  199. data/spec/fixtures/vcr_cassettes/month_transactions.yml +2 -2
  200. data/spec/fixtures/vcr_cassettes/months.yml +2 -2
  201. data/spec/fixtures/vcr_cassettes/months_unauthorized.yml +2 -2
  202. data/spec/fixtures/vcr_cassettes/multiple_transactions.yml +2 -2
  203. data/spec/fixtures/vcr_cassettes/patch_month_category.yml +2 -2
  204. data/spec/fixtures/vcr_cassettes/payee.yml +2 -2
  205. data/spec/fixtures/vcr_cassettes/payee_location.yml +2 -2
  206. data/spec/fixtures/vcr_cassettes/payee_locations.yml +2 -2
  207. data/spec/fixtures/vcr_cassettes/payee_locations_unauthorized.yml +2 -2
  208. data/spec/fixtures/vcr_cassettes/payee_transactions.yml +2 -2
  209. data/spec/fixtures/vcr_cassettes/payees.yml +2 -2
  210. data/spec/fixtures/vcr_cassettes/payees_unauthorized.yml +2 -2
  211. data/spec/fixtures/vcr_cassettes/{budget.yml → plan.yml} +3 -3
  212. data/spec/fixtures/vcr_cassettes/{budgets.yml → plans.yml} +3 -3
  213. data/spec/fixtures/vcr_cassettes/{budgets_unauthorized.yml → plans_unauthorized.yml} +3 -3
  214. data/spec/fixtures/vcr_cassettes/scheduled_transaction.yml +2 -2
  215. data/spec/fixtures/vcr_cassettes/scheduled_transactions.yml +2 -2
  216. data/spec/fixtures/vcr_cassettes/scheduled_transactions_unauthorized.yml +2 -2
  217. data/spec/fixtures/vcr_cassettes/transaction.yml +2 -2
  218. data/spec/fixtures/vcr_cassettes/transactions.yml +2 -2
  219. data/spec/fixtures/vcr_cassettes/transactions_invalid_flags.yml +2 -2
  220. data/spec/fixtures/vcr_cassettes/transactions_unauthorized.yml +2 -2
  221. data/spec/fixtures/vcr_cassettes/update_transaction.yml +2 -2
  222. data/spec/fixtures/vcr_cassettes/update_transactions.yml +2 -2
  223. data/templates/gem.mustache +3 -2
  224. data/templates/partial_model_generic.mustache +1 -1
  225. data/ynab.gemspec +1 -2
  226. metadata +64 -33
  227. data/docs/BudgetSettingsResponseData.md +0 -8
  228. data/docs/BudgetSummary.md +0 -15
  229. data/docs/BudgetSummaryResponse.md +0 -8
  230. data/docs/BudgetSummaryResponseData.md +0 -9
  231. data/docs/BudgetsApi.md +0 -68
  232. 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 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 [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(budget_id, data, opts = {})
26
- data, _status_code, _headers = create_transaction_with_http_info(budget_id, data, opts)
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 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 [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(budget_id, data, opts = {})
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 '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 TransactionsApi.create_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 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 = '/budgets/{budget_id}/transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
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
- # Deletes an existing transaction
92
+ # Delete a transaction
94
93
  # Deletes a 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 transaction_id [String] The id of the transaction
97
96
  # @param [Hash] opts the optional parameters
98
97
  # @return [TransactionResponse]
99
- def delete_transaction(budget_id, transaction_id, opts = {})
100
- data, _status_code, _headers = delete_transaction_with_http_info(budget_id, transaction_id, opts)
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
- # Deletes an existing transaction
103
+ # Delete a transaction
105
104
  # Deletes a 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 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(budget_id, transaction_id, opts = {})
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 '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 TransactionsApi.delete_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 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 = '/budgets/{budget_id}/transactions/{transaction_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'transaction_id' + '}', CGI.escape(transaction_id.to_s))
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
- # Single transaction
161
+ # Get a transaction
163
162
  # Returns a single 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 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(budget_id, transaction_id, opts = {})
169
- data, _status_code, _headers = get_transaction_by_id_with_http_info(budget_id, transaction_id, opts)
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
- # Single transaction
172
+ # Get a transaction
174
173
  # Returns a single 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 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(budget_id, transaction_id, opts = {})
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 '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 TransactionsApi.get_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 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 = '/budgets/{budget_id}/transactions/{transaction_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'transaction_id' + '}', CGI.escape(transaction_id.to_s))
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
- # List transactions
232
- # Returns budget transactions, excluding any pending 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).
230
+ # Get all transactions
231
+ # Returns plan transactions, excluding any pending transactions
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 [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. \&quot;uncategorized\&quot; and \&quot;unapproved\&quot; are currently supported.
237
236
  # @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.
238
237
  # @return [TransactionsResponse]
239
- def get_transactions(budget_id, opts = {})
240
- data, _status_code, _headers = get_transactions_with_http_info(budget_id, opts)
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
- # List transactions
245
- # Returns budget transactions, excluding any pending transactions
246
- # @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
+ # Get all transactions
244
+ # Returns plan transactions, excluding any pending transactions
245
+ # @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).
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. \&quot;uncategorized\&quot; and \&quot;unapproved\&quot; are currently supported.
250
249
  # @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.
251
250
  # @return [Array<(TransactionsResponse, Integer, Hash)>] TransactionsResponse data, response status code and response headers
252
- def get_transactions_with_http_info(budget_id, opts = {})
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 'budget_id' is set
257
- if @api_client.config.client_side_validation && budget_id.nil?
258
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.get_transactions"
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 = '/budgets/{budget_id}/transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
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
- # List account transactions
302
+ # Get all account transactions
304
303
  # Returns all transactions for a specified account, excluding any pending transactions
305
- # @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).
304
+ # @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).
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. \&quot;uncategorized\&quot; and \&quot;unapproved\&quot; are currently supported.
310
309
  # @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.
311
310
  # @return [TransactionsResponse]
312
- def get_transactions_by_account(budget_id, account_id, opts = {})
313
- data, _status_code, _headers = get_transactions_by_account_with_http_info(budget_id, account_id, opts)
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
- # List account transactions
316
+ # Get all account transactions
318
317
  # Returns all transactions for a specified account, excluding any pending transactions
319
- # @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).
318
+ # @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).
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. \&quot;uncategorized\&quot; and \&quot;unapproved\&quot; are currently supported.
324
323
  # @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.
325
324
  # @return [Array<(TransactionsResponse, Integer, Hash)>] TransactionsResponse data, response status code and response headers
326
- def get_transactions_by_account_with_http_info(budget_id, account_id, opts = {})
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 'budget_id' is set
331
- if @api_client.config.client_side_validation && budget_id.nil?
332
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.get_transactions_by_account"
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 = '/budgets/{budget_id}/accounts/{account_id}/transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'account_id' + '}', CGI.escape(account_id.to_s))
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
- # List category transactions, excluding any pending transactions
382
- # Returns all transactions for a specified category
383
- # @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).
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. \&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).
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. \&quot;uncategorized\&quot; and \&quot;unapproved\&quot; are currently supported.
388
387
  # @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.
389
388
  # @return [HybridTransactionsResponse]
390
- def get_transactions_by_category(budget_id, category_id, opts = {})
391
- data, _status_code, _headers = get_transactions_by_category_with_http_info(budget_id, category_id, opts)
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
- # List category transactions, excluding any pending transactions
396
- # Returns all transactions for a specified category
397
- # @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).
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. \&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).
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. \&quot;uncategorized\&quot; and \&quot;unapproved\&quot; are currently supported.
402
401
  # @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.
403
402
  # @return [Array<(HybridTransactionsResponse, Integer, Hash)>] HybridTransactionsResponse data, response status code and response headers
404
- def get_transactions_by_category_with_http_info(budget_id, category_id, opts = {})
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 'budget_id' is set
409
- if @api_client.config.client_side_validation && budget_id.nil?
410
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.get_transactions_by_category"
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 = '/budgets/{budget_id}/categories/{category_id}/transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
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
- # List transactions in month, excluding any pending transactions
460
- # Returns all transactions for a specified month
461
- # @param budget_id [String] The id of the budget. \&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).
462
- # @param month [String] The budget month in ISO format (e.g. 2016-12-01) (\&quot;current\&quot; can also be used to specify the current calendar month (UTC))
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. \&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).
461
+ # @param month [String] The plan month in ISO format (e.g. 2016-12-01) (\&quot;current\&quot; 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. \&quot;uncategorized\&quot; and \&quot;unapproved\&quot; are currently supported.
466
465
  # @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.
467
- # @return [HybridTransactionsResponse]
468
- def get_transactions_by_month(budget_id, month, opts = {})
469
- data, _status_code, _headers = get_transactions_by_month_with_http_info(budget_id, month, opts)
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
- # List transactions in month, excluding any pending transactions
474
- # Returns all transactions for a specified month
475
- # @param budget_id [String] The id of the budget. \&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).
476
- # @param month [String] The budget month in ISO format (e.g. 2016-12-01) (\&quot;current\&quot; can also be used to specify the current calendar month (UTC))
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. \&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).
475
+ # @param month [String] The plan month in ISO format (e.g. 2016-12-01) (\&quot;current\&quot; 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. \&quot;uncategorized\&quot; and \&quot;unapproved\&quot; are currently supported.
480
479
  # @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.
481
- # @return [Array<(HybridTransactionsResponse, Integer, Hash)>] HybridTransactionsResponse data, response status code and response headers
482
- def get_transactions_by_month_with_http_info(budget_id, month, opts = {})
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 'budget_id' is set
487
- if @api_client.config.client_side_validation && budget_id.nil?
488
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.get_transactions_by_month"
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 = '/budgets/{budget_id}/months/{month}/transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'month' + '}', CGI.escape(month.to_s))
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] || 'HybridTransactionsResponse'
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
- # List payee transactions, excluding any pending transactions
538
- # Returns all transactions for a specified payee
539
- # @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).
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. \&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).
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. \&quot;uncategorized\&quot; and \&quot;unapproved\&quot; are currently supported.
544
543
  # @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.
545
544
  # @return [HybridTransactionsResponse]
546
- def get_transactions_by_payee(budget_id, payee_id, opts = {})
547
- data, _status_code, _headers = get_transactions_by_payee_with_http_info(budget_id, payee_id, opts)
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
- # List payee transactions, excluding any pending transactions
552
- # Returns all transactions for a specified payee
553
- # @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).
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. \&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).
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. \&quot;uncategorized\&quot; and \&quot;unapproved\&quot; are currently supported.
558
557
  # @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.
559
558
  # @return [Array<(HybridTransactionsResponse, Integer, Hash)>] HybridTransactionsResponse data, response status code and response headers
560
- def get_transactions_by_payee_with_http_info(budget_id, payee_id, opts = {})
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 'budget_id' is set
565
- if @api_client.config.client_side_validation && budget_id.nil?
566
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.get_transactions_by_payee"
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 = '/budgets/{budget_id}/payees/{payee_id}/transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'payee_id' + '}', CGI.escape(payee_id.to_s))
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 budget. 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.
617
- # @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).
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. \&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).
618
617
  # @param [Hash] opts the optional parameters
619
618
  # @return [TransactionsImportResponse]
620
- def import_transactions(budget_id, opts = {})
621
- data, _status_code, _headers = import_transactions_with_http_info(budget_id, opts)
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 budget. 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 \&quot;Import\&quot; on each account in the web application or tapping the \&quot;New Transactions\&quot; banner in the mobile applications. The response for this endpoint contains the transaction ids that have been imported.
627
- # @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).
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 \&quot;Import\&quot; on each account in the web application or tapping the \&quot;New Transactions\&quot; 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. \&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).
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(budget_id, opts = {})
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 'budget_id' is set
635
- if @api_client.config.client_side_validation && budget_id.nil?
636
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.import_transactions"
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 = '/budgets/{budget_id}/transactions/import'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
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
- # Updates an existing transaction
677
+ # Update a transaction
679
678
  # Updates a single transaction
680
- # @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).
679
+ # @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).
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(budget_id, transaction_id, data, opts = {})
686
- data, _status_code, _headers = update_transaction_with_http_info(budget_id, transaction_id, data, opts)
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
- # Updates an existing transaction
689
+ # Update a transaction
691
690
  # Updates a single transaction
692
- # @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).
691
+ # @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).
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(budget_id, transaction_id, data, opts = {})
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 'budget_id' is set
702
- if @api_client.config.client_side_validation && budget_id.nil?
703
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.update_transaction"
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 = '/budgets/{budget_id}/transactions/{transaction_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'transaction_id' + '}', CGI.escape(transaction_id.to_s))
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 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).
759
+ # @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).
761
760
  # @param data [PatchTransactionsWrapper] The transactions to update. Each transaction must have either an &#x60;id&#x60; or &#x60;import_id&#x60; specified. If &#x60;id&#x60; is specified as null an &#x60;import_id&#x60; value can be provided which will allow transaction(s) to be updated by its &#x60;import_id&#x60;. If an &#x60;id&#x60; is specified, it will always be used for lookup. You should not specify both &#x60;id&#x60; and &#x60;import_id&#x60;. Updating an &#x60;import_id&#x60; on an existing transaction is not allowed; if an &#x60;import_id&#x60; 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(budget_id, data, opts = {})
765
- data, _status_code, _headers = update_transactions_with_http_info(budget_id, data, opts)
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 &#x60;id&#x60; or &#x60;import_id&#x60;.
771
- # @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).
770
+ # @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).
772
771
  # @param data [PatchTransactionsWrapper] The transactions to update. Each transaction must have either an &#x60;id&#x60; or &#x60;import_id&#x60; specified. If &#x60;id&#x60; is specified as null an &#x60;import_id&#x60; value can be provided which will allow transaction(s) to be updated by its &#x60;import_id&#x60;. If an &#x60;id&#x60; is specified, it will always be used for lookup. You should not specify both &#x60;id&#x60; and &#x60;import_id&#x60;. Updating an &#x60;import_id&#x60; on an existing transaction is not allowed; if an &#x60;import_id&#x60; 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(budget_id, data, opts = {})
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 'budget_id' is set
780
- if @api_client.config.client_side_validation && budget_id.nil?
781
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling TransactionsApi.update_transactions"
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 = '/budgets/{budget_id}/transactions'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
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] || {}