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,33 +15,181 @@ module YNAB
16
15
  def initialize(api_client = ApiClient.default)
17
16
  @api_client = api_client
18
17
  end
19
- # List categories
20
- # Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
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).
18
+ # Create a category
19
+ # Creates a new category
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)
21
+ # @param data [PostCategoryWrapper] The category to create.
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [SaveCategoryResponse]
24
+ def create_category(plan_id, data, opts = {})
25
+ data, _status_code, _headers = create_category_with_http_info(plan_id, data, opts)
26
+ data
27
+ end
28
+
29
+ # Create a category
30
+ # Creates a new category
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)
32
+ # @param data [PostCategoryWrapper] The category to create.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(SaveCategoryResponse, Integer, Hash)>] SaveCategoryResponse data, response status code and response headers
35
+ def create_category_with_http_info(plan_id, data, opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.create_category ...'
38
+ end
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 CategoriesApi.create_category"
42
+ end
43
+ # verify the required parameter 'data' is set
44
+ if @api_client.config.client_side_validation && data.nil?
45
+ fail ArgumentError, "Missing the required parameter 'data' when calling CategoriesApi.create_category"
46
+ end
47
+ # resource path
48
+ local_var_path = '/budgets/{plan_id}/categories'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s))
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+ # HTTP header 'Content-Type'
58
+ content_type = @api_client.select_header_content_type(['application/json'])
59
+ if !content_type.nil?
60
+ header_params['Content-Type'] = content_type
61
+ end
62
+
63
+ # form parameters
64
+ form_params = opts[:form_params] || {}
65
+
66
+ # http body (model)
67
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
68
+
69
+ # return_type
70
+ return_type = opts[:debug_return_type] || 'SaveCategoryResponse'
71
+
72
+ # auth_names
73
+ auth_names = opts[:debug_auth_names] || ['bearer']
74
+
75
+ new_options = opts.merge(
76
+ :operation => :"CategoriesApi.create_category",
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: CategoriesApi#create_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # Create a category group
93
+ # Creates a new category group
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)
95
+ # @param data [PostCategoryGroupWrapper] The category group to create.
96
+ # @param [Hash] opts the optional parameters
97
+ # @return [SaveCategoryGroupResponse]
98
+ def create_category_group(plan_id, data, opts = {})
99
+ data, _status_code, _headers = create_category_group_with_http_info(plan_id, data, opts)
100
+ data
101
+ end
102
+
103
+ # Create a category group
104
+ # Creates a new category group
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)
106
+ # @param data [PostCategoryGroupWrapper] The category group to create.
107
+ # @param [Hash] opts the optional parameters
108
+ # @return [Array<(SaveCategoryGroupResponse, Integer, Hash)>] SaveCategoryGroupResponse data, response status code and response headers
109
+ def create_category_group_with_http_info(plan_id, data, opts = {})
110
+ if @api_client.config.debugging
111
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.create_category_group ...'
112
+ end
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 CategoriesApi.create_category_group"
116
+ end
117
+ # verify the required parameter 'data' is set
118
+ if @api_client.config.client_side_validation && data.nil?
119
+ fail ArgumentError, "Missing the required parameter 'data' when calling CategoriesApi.create_category_group"
120
+ end
121
+ # resource path
122
+ local_var_path = '/budgets/{plan_id}/category_groups'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s))
123
+
124
+ # query parameters
125
+ query_params = opts[:query_params] || {}
126
+
127
+ # header parameters
128
+ header_params = opts[:header_params] || {}
129
+ # HTTP header 'Accept' (if needed)
130
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
131
+ # HTTP header 'Content-Type'
132
+ content_type = @api_client.select_header_content_type(['application/json'])
133
+ if !content_type.nil?
134
+ header_params['Content-Type'] = content_type
135
+ end
136
+
137
+ # form parameters
138
+ form_params = opts[:form_params] || {}
139
+
140
+ # http body (model)
141
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
142
+
143
+ # return_type
144
+ return_type = opts[:debug_return_type] || 'SaveCategoryGroupResponse'
145
+
146
+ # auth_names
147
+ auth_names = opts[:debug_auth_names] || ['bearer']
148
+
149
+ new_options = opts.merge(
150
+ :operation => :"CategoriesApi.create_category_group",
151
+ :header_params => header_params,
152
+ :query_params => query_params,
153
+ :form_params => form_params,
154
+ :body => post_body,
155
+ :auth_names => auth_names,
156
+ :return_type => return_type
157
+ )
158
+
159
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
160
+ if @api_client.config.debugging
161
+ @api_client.config.logger.debug "API called: CategoriesApi#create_category_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
162
+ end
163
+ return data, status_code, headers
164
+ end
165
+
166
+ # Get all categories
167
+ # Returns all categories grouped by category group. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
168
+ # @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).
22
169
  # @param [Hash] opts the optional parameters
23
170
  # @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.
24
171
  # @return [CategoriesResponse]
25
- def get_categories(budget_id, opts = {})
26
- data, _status_code, _headers = get_categories_with_http_info(budget_id, opts)
172
+ def get_categories(plan_id, opts = {})
173
+ data, _status_code, _headers = get_categories_with_http_info(plan_id, opts)
27
174
  data
28
175
  end
29
176
 
30
- # List categories
31
- # Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
32
- # @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).
177
+ # Get all categories
178
+ # Returns all categories grouped by category group. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
179
+ # @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).
33
180
  # @param [Hash] opts the optional parameters
34
181
  # @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.
35
182
  # @return [Array<(CategoriesResponse, Integer, Hash)>] CategoriesResponse data, response status code and response headers
36
- def get_categories_with_http_info(budget_id, opts = {})
183
+ def get_categories_with_http_info(plan_id, opts = {})
37
184
  if @api_client.config.debugging
38
185
  @api_client.config.logger.debug 'Calling API: CategoriesApi.get_categories ...'
39
186
  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 CategoriesApi.get_categories"
187
+ # verify the required parameter 'plan_id' is set
188
+ if @api_client.config.client_side_validation && plan_id.nil?
189
+ fail ArgumentError, "Missing the required parameter 'plan_id' when calling CategoriesApi.get_categories"
43
190
  end
44
191
  # resource path
45
- local_var_path = '/budgets/{budget_id}/categories'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
192
+ local_var_path = '/budgets/{plan_id}/categories'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s))
46
193
 
47
194
  # query parameters
48
195
  query_params = opts[:query_params] || {}
@@ -82,37 +229,37 @@ module YNAB
82
229
  return data, status_code, headers
83
230
  end
84
231
 
85
- # Single category
86
- # Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
87
- # @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
+ # Get a category
233
+ # Returns a single category. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
234
+ # @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).
88
235
  # @param category_id [String] The id of the category
89
236
  # @param [Hash] opts the optional parameters
90
237
  # @return [CategoryResponse]
91
- def get_category_by_id(budget_id, category_id, opts = {})
92
- data, _status_code, _headers = get_category_by_id_with_http_info(budget_id, category_id, opts)
238
+ def get_category_by_id(plan_id, category_id, opts = {})
239
+ data, _status_code, _headers = get_category_by_id_with_http_info(plan_id, category_id, opts)
93
240
  data
94
241
  end
95
242
 
96
- # Single category
97
- # Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
98
- # @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 a category
244
+ # Returns a single category. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
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).
99
246
  # @param category_id [String] The id of the category
100
247
  # @param [Hash] opts the optional parameters
101
248
  # @return [Array<(CategoryResponse, Integer, Hash)>] CategoryResponse data, response status code and response headers
102
- def get_category_by_id_with_http_info(budget_id, category_id, opts = {})
249
+ def get_category_by_id_with_http_info(plan_id, category_id, opts = {})
103
250
  if @api_client.config.debugging
104
251
  @api_client.config.logger.debug 'Calling API: CategoriesApi.get_category_by_id ...'
105
252
  end
106
- # verify the required parameter 'budget_id' is set
107
- if @api_client.config.client_side_validation && budget_id.nil?
108
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling CategoriesApi.get_category_by_id"
253
+ # verify the required parameter 'plan_id' is set
254
+ if @api_client.config.client_side_validation && plan_id.nil?
255
+ fail ArgumentError, "Missing the required parameter 'plan_id' when calling CategoriesApi.get_category_by_id"
109
256
  end
110
257
  # verify the required parameter 'category_id' is set
111
258
  if @api_client.config.client_side_validation && category_id.nil?
112
259
  fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoriesApi.get_category_by_id"
113
260
  end
114
261
  # resource path
115
- local_var_path = '/budgets/{budget_id}/categories/{category_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
262
+ local_var_path = '/budgets/{plan_id}/categories/{category_id}'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
116
263
 
117
264
  # query parameters
118
265
  query_params = opts[:query_params] || {}
@@ -151,32 +298,32 @@ module YNAB
151
298
  return data, status_code, headers
152
299
  end
153
300
 
154
- # Single category for a specific budget month
155
- # Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
156
- # @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).
157
- # @param month [Date] 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))
301
+ # Get a category for a specific plan month
302
+ # Returns a single category for a specific plan month. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
303
+ # @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).
304
+ # @param month [Date] 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))
158
305
  # @param category_id [String] The id of the category
159
306
  # @param [Hash] opts the optional parameters
160
307
  # @return [CategoryResponse]
161
- def get_month_category_by_id(budget_id, month, category_id, opts = {})
162
- data, _status_code, _headers = get_month_category_by_id_with_http_info(budget_id, month, category_id, opts)
308
+ def get_month_category_by_id(plan_id, month, category_id, opts = {})
309
+ data, _status_code, _headers = get_month_category_by_id_with_http_info(plan_id, month, category_id, opts)
163
310
  data
164
311
  end
165
312
 
166
- # Single category for a specific budget month
167
- # Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
168
- # @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).
169
- # @param month [Date] 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))
313
+ # Get a category for a specific plan month
314
+ # Returns a single category for a specific plan month. Amounts (assigned, activity, available, etc.) are specific to the current plan month (UTC).
315
+ # @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).
316
+ # @param month [Date] 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))
170
317
  # @param category_id [String] The id of the category
171
318
  # @param [Hash] opts the optional parameters
172
319
  # @return [Array<(CategoryResponse, Integer, Hash)>] CategoryResponse data, response status code and response headers
173
- def get_month_category_by_id_with_http_info(budget_id, month, category_id, opts = {})
320
+ def get_month_category_by_id_with_http_info(plan_id, month, category_id, opts = {})
174
321
  if @api_client.config.debugging
175
322
  @api_client.config.logger.debug 'Calling API: CategoriesApi.get_month_category_by_id ...'
176
323
  end
177
- # verify the required parameter 'budget_id' is set
178
- if @api_client.config.client_side_validation && budget_id.nil?
179
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling CategoriesApi.get_month_category_by_id"
324
+ # verify the required parameter 'plan_id' is set
325
+ if @api_client.config.client_side_validation && plan_id.nil?
326
+ fail ArgumentError, "Missing the required parameter 'plan_id' when calling CategoriesApi.get_month_category_by_id"
180
327
  end
181
328
  # verify the required parameter 'month' is set
182
329
  if @api_client.config.client_side_validation && month.nil?
@@ -187,7 +334,7 @@ module YNAB
187
334
  fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoriesApi.get_month_category_by_id"
188
335
  end
189
336
  # resource path
190
- local_var_path = '/budgets/{budget_id}/months/{month}/categories/{category_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'month' + '}', CGI.escape(month.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
337
+ local_var_path = '/budgets/{plan_id}/months/{month}/categories/{category_id}'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'month' + '}', CGI.escape(month.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
191
338
 
192
339
  # query parameters
193
340
  query_params = opts[:query_params] || {}
@@ -228,30 +375,30 @@ module YNAB
228
375
 
229
376
  # Update a category
230
377
  # Update a category
231
- # @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).
378
+ # @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).
232
379
  # @param category_id [String] The id of the category
233
380
  # @param data [PatchCategoryWrapper] The category to update
234
381
  # @param [Hash] opts the optional parameters
235
382
  # @return [SaveCategoryResponse]
236
- def update_category(budget_id, category_id, data, opts = {})
237
- data, _status_code, _headers = update_category_with_http_info(budget_id, category_id, data, opts)
383
+ def update_category(plan_id, category_id, data, opts = {})
384
+ data, _status_code, _headers = update_category_with_http_info(plan_id, category_id, data, opts)
238
385
  data
239
386
  end
240
387
 
241
388
  # Update a category
242
389
  # Update a category
243
- # @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).
390
+ # @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).
244
391
  # @param category_id [String] The id of the category
245
392
  # @param data [PatchCategoryWrapper] The category to update
246
393
  # @param [Hash] opts the optional parameters
247
394
  # @return [Array<(SaveCategoryResponse, Integer, Hash)>] SaveCategoryResponse data, response status code and response headers
248
- def update_category_with_http_info(budget_id, category_id, data, opts = {})
395
+ def update_category_with_http_info(plan_id, category_id, data, opts = {})
249
396
  if @api_client.config.debugging
250
397
  @api_client.config.logger.debug 'Calling API: CategoriesApi.update_category ...'
251
398
  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 CategoriesApi.update_category"
399
+ # verify the required parameter 'plan_id' is set
400
+ if @api_client.config.client_side_validation && plan_id.nil?
401
+ fail ArgumentError, "Missing the required parameter 'plan_id' when calling CategoriesApi.update_category"
255
402
  end
256
403
  # verify the required parameter 'category_id' is set
257
404
  if @api_client.config.client_side_validation && category_id.nil?
@@ -262,7 +409,7 @@ module YNAB
262
409
  fail ArgumentError, "Missing the required parameter 'data' when calling CategoriesApi.update_category"
263
410
  end
264
411
  # resource path
265
- local_var_path = '/budgets/{budget_id}/categories/{category_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
412
+ local_var_path = '/budgets/{plan_id}/categories/{category_id}'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
266
413
 
267
414
  # query parameters
268
415
  query_params = opts[:query_params] || {}
@@ -306,34 +453,114 @@ module YNAB
306
453
  return data, status_code, headers
307
454
  end
308
455
 
456
+ # Update a category group
457
+ # Update a category group
458
+ # @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).
459
+ # @param category_group_id [String] The id of the category group
460
+ # @param data [PatchCategoryGroupWrapper] The category group to update
461
+ # @param [Hash] opts the optional parameters
462
+ # @return [SaveCategoryGroupResponse]
463
+ def update_category_group(plan_id, category_group_id, data, opts = {})
464
+ data, _status_code, _headers = update_category_group_with_http_info(plan_id, category_group_id, data, opts)
465
+ data
466
+ end
467
+
468
+ # Update a category group
469
+ # Update a category group
470
+ # @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).
471
+ # @param category_group_id [String] The id of the category group
472
+ # @param data [PatchCategoryGroupWrapper] The category group to update
473
+ # @param [Hash] opts the optional parameters
474
+ # @return [Array<(SaveCategoryGroupResponse, Integer, Hash)>] SaveCategoryGroupResponse data, response status code and response headers
475
+ def update_category_group_with_http_info(plan_id, category_group_id, data, opts = {})
476
+ if @api_client.config.debugging
477
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.update_category_group ...'
478
+ end
479
+ # verify the required parameter 'plan_id' is set
480
+ if @api_client.config.client_side_validation && plan_id.nil?
481
+ fail ArgumentError, "Missing the required parameter 'plan_id' when calling CategoriesApi.update_category_group"
482
+ end
483
+ # verify the required parameter 'category_group_id' is set
484
+ if @api_client.config.client_side_validation && category_group_id.nil?
485
+ fail ArgumentError, "Missing the required parameter 'category_group_id' when calling CategoriesApi.update_category_group"
486
+ end
487
+ # verify the required parameter 'data' is set
488
+ if @api_client.config.client_side_validation && data.nil?
489
+ fail ArgumentError, "Missing the required parameter 'data' when calling CategoriesApi.update_category_group"
490
+ end
491
+ # resource path
492
+ local_var_path = '/budgets/{plan_id}/category_groups/{category_group_id}'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'category_group_id' + '}', CGI.escape(category_group_id.to_s))
493
+
494
+ # query parameters
495
+ query_params = opts[:query_params] || {}
496
+
497
+ # header parameters
498
+ header_params = opts[:header_params] || {}
499
+ # HTTP header 'Accept' (if needed)
500
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
501
+ # HTTP header 'Content-Type'
502
+ content_type = @api_client.select_header_content_type(['application/json'])
503
+ if !content_type.nil?
504
+ header_params['Content-Type'] = content_type
505
+ end
506
+
507
+ # form parameters
508
+ form_params = opts[:form_params] || {}
509
+
510
+ # http body (model)
511
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
512
+
513
+ # return_type
514
+ return_type = opts[:debug_return_type] || 'SaveCategoryGroupResponse'
515
+
516
+ # auth_names
517
+ auth_names = opts[:debug_auth_names] || ['bearer']
518
+
519
+ new_options = opts.merge(
520
+ :operation => :"CategoriesApi.update_category_group",
521
+ :header_params => header_params,
522
+ :query_params => query_params,
523
+ :form_params => form_params,
524
+ :body => post_body,
525
+ :auth_names => auth_names,
526
+ :return_type => return_type
527
+ )
528
+
529
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
530
+ if @api_client.config.debugging
531
+ @api_client.config.logger.debug "API called: CategoriesApi#update_category_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
532
+ end
533
+ return data, status_code, headers
534
+ end
535
+
309
536
  # Update a category for a specific month
310
- # Update a category for a specific month. Only `budgeted` amount can be updated.
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).
312
- # @param month [Date] 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))
537
+ # Update a category for a specific month. Only `budgeted` (assigned) amount can be updated.
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).
539
+ # @param month [Date] 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))
313
540
  # @param category_id [String] The id of the category
314
- # @param data [PatchMonthCategoryWrapper] The category to update. Only &#x60;budgeted&#x60; amount can be updated and any other fields specified will be ignored.
541
+ # @param data [PatchMonthCategoryWrapper] The category to update. Only &#x60;budgeted&#x60; (assigned) amount can be updated and any other fields specified will be ignored.
315
542
  # @param [Hash] opts the optional parameters
316
543
  # @return [SaveCategoryResponse]
317
- def update_month_category(budget_id, month, category_id, data, opts = {})
318
- data, _status_code, _headers = update_month_category_with_http_info(budget_id, month, category_id, data, opts)
544
+ def update_month_category(plan_id, month, category_id, data, opts = {})
545
+ data, _status_code, _headers = update_month_category_with_http_info(plan_id, month, category_id, data, opts)
319
546
  data
320
547
  end
321
548
 
322
549
  # Update a category for a specific month
323
- # Update a category for a specific month. Only &#x60;budgeted&#x60; amount can be updated.
324
- # @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).
325
- # @param month [Date] 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))
550
+ # Update a category for a specific month. Only &#x60;budgeted&#x60; (assigned) amount can be updated.
551
+ # @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).
552
+ # @param month [Date] 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))
326
553
  # @param category_id [String] The id of the category
327
- # @param data [PatchMonthCategoryWrapper] The category to update. Only &#x60;budgeted&#x60; amount can be updated and any other fields specified will be ignored.
554
+ # @param data [PatchMonthCategoryWrapper] The category to update. Only &#x60;budgeted&#x60; (assigned) amount can be updated and any other fields specified will be ignored.
328
555
  # @param [Hash] opts the optional parameters
329
556
  # @return [Array<(SaveCategoryResponse, Integer, Hash)>] SaveCategoryResponse data, response status code and response headers
330
- def update_month_category_with_http_info(budget_id, month, category_id, data, opts = {})
557
+ def update_month_category_with_http_info(plan_id, month, category_id, data, opts = {})
331
558
  if @api_client.config.debugging
332
559
  @api_client.config.logger.debug 'Calling API: CategoriesApi.update_month_category ...'
333
560
  end
334
- # verify the required parameter 'budget_id' is set
335
- if @api_client.config.client_side_validation && budget_id.nil?
336
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling CategoriesApi.update_month_category"
561
+ # verify the required parameter 'plan_id' is set
562
+ if @api_client.config.client_side_validation && plan_id.nil?
563
+ fail ArgumentError, "Missing the required parameter 'plan_id' when calling CategoriesApi.update_month_category"
337
564
  end
338
565
  # verify the required parameter 'month' is set
339
566
  if @api_client.config.client_side_validation && month.nil?
@@ -348,7 +575,7 @@ module YNAB
348
575
  fail ArgumentError, "Missing the required parameter 'data' when calling CategoriesApi.update_month_category"
349
576
  end
350
577
  # resource path
351
- local_var_path = '/budgets/{budget_id}/months/{month}/categories/{category_id}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'month' + '}', CGI.escape(month.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
578
+ local_var_path = '/budgets/{plan_id}/months/{month}/categories/{category_id}'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s)).sub('{' + 'month' + '}', CGI.escape(month.to_s)).sub('{' + 'category_id' + '}', CGI.escape(category_id.to_s))
352
579
 
353
580
  # query parameters
354
581
  query_params = opts[:query_params] || {}
@@ -20,36 +20,36 @@ module YNAB
20
20
  @api_client = api_client
21
21
  end
22
22
  # Bulk create transactions
23
- # Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{budget_id}/transactions' to create multiple transactions.
24
- # @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).
23
+ # Creates multiple transactions. Although this endpoint is still supported, it is recommended to use 'POST /budgets/{plan_id}/transactions' to create multiple transactions.
24
+ # @param plan_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).
25
25
  # @param transactions [BulkTransactions] The list of transactions to create
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @return [BulkResponse]
28
- def bulk_create_transactions(budget_id, transactions, opts = {})
29
- data, _status_code, _headers = bulk_create_transactions_with_http_info(budget_id, transactions, opts)
28
+ def bulk_create_transactions(plan_id, transactions, opts = {})
29
+ data, _status_code, _headers = bulk_create_transactions_with_http_info(plan_id, transactions, opts)
30
30
  data
31
31
  end
32
32
 
33
33
  # Bulk create transactions
34
- # Creates multiple transactions. Although this endpoint is still supported, it is recommended to use &#39;POST /budgets/{budget_id}/transactions&#39; to create multiple transactions.
35
- # @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).
34
+ # Creates multiple transactions. Although this endpoint is still supported, it is recommended to use &#39;POST /budgets/{plan_id}/transactions&#39; to create multiple transactions.
35
+ # @param plan_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).
36
36
  # @param transactions [BulkTransactions] The list of transactions to create
37
37
  # @param [Hash] opts the optional parameters
38
38
  # @return [Array<(BulkResponse, Integer, Hash)>] BulkResponse data, response status code and response headers
39
- def bulk_create_transactions_with_http_info(budget_id, transactions, opts = {})
39
+ def bulk_create_transactions_with_http_info(plan_id, transactions, opts = {})
40
40
  if @api_client.config.debugging
41
41
  @api_client.config.logger.debug 'Calling API: DeprecatedApi.bulk_create_transactions ...'
42
42
  end
43
- # verify the required parameter 'budget_id' is set
44
- if @api_client.config.client_side_validation && budget_id.nil?
45
- fail ArgumentError, "Missing the required parameter 'budget_id' when calling DeprecatedApi.bulk_create_transactions"
43
+ # verify the required parameter 'plan_id' is set
44
+ if @api_client.config.client_side_validation && plan_id.nil?
45
+ fail ArgumentError, "Missing the required parameter 'plan_id' when calling DeprecatedApi.bulk_create_transactions"
46
46
  end
47
47
  # verify the required parameter 'transactions' is set
48
48
  if @api_client.config.client_side_validation && transactions.nil?
49
49
  fail ArgumentError, "Missing the required parameter 'transactions' when calling DeprecatedApi.bulk_create_transactions"
50
50
  end
51
51
  # resource path
52
- local_var_path = '/budgets/{budget_id}/transactions/bulk'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
52
+ local_var_path = '/budgets/{plan_id}/transactions/bulk'.sub('{' + 'plan_id' + '}', CGI.escape(plan_id.to_s))
53
53
 
54
54
  # query parameters
55
55
  query_params = opts[:query_params] || {}