ynab 1.31.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (260) hide show
  1. checksums.yaml +4 -4
  2. data/DEVELOPMENT.md +11 -0
  3. data/Gemfile +8 -0
  4. data/Gemfile.lock +42 -0
  5. data/README.md +3 -3
  6. data/Rakefile +58 -0
  7. data/config.json +9 -0
  8. data/docs/Account.md +25 -0
  9. data/docs/AccountResponse.md +8 -0
  10. data/docs/AccountResponseData.md +8 -0
  11. data/docs/AccountType.md +7 -0
  12. data/docs/AccountWrapper.md +8 -0
  13. data/docs/AccountsApi.md +70 -0
  14. data/docs/AccountsResponse.md +8 -0
  15. data/docs/AccountsResponseData.md +9 -0
  16. data/docs/AccountsWrapper.md +9 -0
  17. data/docs/BudgetDetail.md +24 -0
  18. data/docs/BudgetDetailAllOf.md +17 -0
  19. data/docs/BudgetDetailResponse.md +8 -0
  20. data/docs/BudgetDetailResponseData.md +9 -0
  21. data/docs/BudgetDetailWrapper.md +9 -0
  22. data/docs/BudgetSettings.md +9 -0
  23. data/docs/BudgetSettingsResponse.md +8 -0
  24. data/docs/BudgetSettingsResponseData.md +8 -0
  25. data/docs/BudgetSettingsWrapper.md +8 -0
  26. data/docs/BudgetSummary.md +15 -0
  27. data/docs/BudgetSummaryResponse.md +8 -0
  28. data/docs/BudgetSummaryResponseData.md +9 -0
  29. data/docs/BudgetSummaryWrapper.md +9 -0
  30. data/docs/BudgetsApi.md +68 -0
  31. data/docs/BulkIdWrapper.md +8 -0
  32. data/docs/BulkIds.md +9 -0
  33. data/docs/BulkResponse.md +8 -0
  34. data/docs/BulkResponseData.md +8 -0
  35. data/docs/BulkResponseDataBulk.md +9 -0
  36. data/docs/BulkTransactionCreateResponse.md +8 -0
  37. data/docs/BulkTransactionIds.md +8 -0
  38. data/docs/BulkTransactions.md +8 -0
  39. data/docs/CategoriesApi.md +94 -0
  40. data/docs/CategoriesResponse.md +8 -0
  41. data/docs/CategoriesResponseData.md +9 -0
  42. data/docs/Category.md +30 -0
  43. data/docs/CategoryGroup.md +11 -0
  44. data/docs/CategoryGroupWithCategories.md +12 -0
  45. data/docs/CategoryGroupWithCategoriesAllOf.md +8 -0
  46. data/docs/CategoryGroupsWrapper.md +9 -0
  47. data/docs/CategoryResponse.md +8 -0
  48. data/docs/CategoryResponseData.md +8 -0
  49. data/docs/CategoryWrapper.md +9 -0
  50. data/docs/CurrencyFormat.md +15 -0
  51. data/docs/DateFormat.md +8 -0
  52. data/docs/DeprecatedApi.md +28 -0
  53. data/docs/ErrorDetail.md +10 -0
  54. data/docs/ErrorResponse.md +8 -0
  55. data/docs/HybridTransaction.md +30 -0
  56. data/docs/HybridTransactionAllOf.md +12 -0
  57. data/docs/HybridTransactionsResponse.md +8 -0
  58. data/docs/HybridTransactionsResponseData.md +9 -0
  59. data/docs/HybridTransactionsWrapper.md +8 -0
  60. data/docs/LoanAccountPeriodicValue.md +7 -0
  61. data/docs/MonthDetail.md +16 -0
  62. data/docs/MonthDetailAllOf.md +8 -0
  63. data/docs/MonthDetailResponse.md +8 -0
  64. data/docs/MonthDetailResponseData.md +8 -0
  65. data/docs/MonthDetailWrapper.md +8 -0
  66. data/docs/MonthSummariesResponse.md +8 -0
  67. data/docs/MonthSummariesResponseData.md +9 -0
  68. data/docs/MonthSummariesWrapper.md +9 -0
  69. data/docs/MonthSummary.md +15 -0
  70. data/docs/MonthsApi.md +49 -0
  71. data/docs/PatchMonthCategoryWrapper.md +8 -0
  72. data/docs/PatchTransactionsWrapper.md +8 -0
  73. data/docs/Payee.md +11 -0
  74. data/docs/PayeeLocation.md +12 -0
  75. data/docs/PayeeLocationResponse.md +8 -0
  76. data/docs/PayeeLocationResponseData.md +8 -0
  77. data/docs/PayeeLocationWrapper.md +8 -0
  78. data/docs/PayeeLocationsApi.md +69 -0
  79. data/docs/PayeeLocationsResponse.md +8 -0
  80. data/docs/PayeeLocationsResponseData.md +8 -0
  81. data/docs/PayeeLocationsWrapper.md +8 -0
  82. data/docs/PayeeResponse.md +8 -0
  83. data/docs/PayeeResponseData.md +8 -0
  84. data/docs/PayeeWrapper.md +8 -0
  85. data/docs/PayeesApi.md +49 -0
  86. data/docs/PayeesResponse.md +8 -0
  87. data/docs/PayeesResponseData.md +9 -0
  88. data/docs/PayeesWrapper.md +9 -0
  89. data/docs/PostAccountWrapper.md +8 -0
  90. data/docs/PostTransactionsWrapper.md +9 -0
  91. data/docs/PutTransactionWrapper.md +8 -0
  92. data/docs/SaveAccount.md +10 -0
  93. data/docs/SaveAccountWrapper.md +8 -0
  94. data/docs/SaveCategoryResponse.md +8 -0
  95. data/docs/SaveCategoryResponseData.md +9 -0
  96. data/docs/SaveMonthCategory.md +8 -0
  97. data/docs/SaveMonthCategoryWrapper.md +8 -0
  98. data/docs/SaveSubTransaction.md +12 -0
  99. data/docs/SaveTransaction.md +19 -0
  100. data/docs/SaveTransactionWithId.md +20 -0
  101. data/docs/SaveTransactionWithIdAllOf.md +8 -0
  102. data/docs/SaveTransactionWithOptionalFields.md +19 -0
  103. data/docs/SaveTransactionWrapper.md +8 -0
  104. data/docs/SaveTransactionsResponse.md +8 -0
  105. data/docs/SaveTransactionsResponseData.md +12 -0
  106. data/docs/SaveTransactionsWrapper.md +9 -0
  107. data/docs/ScheduledSubTransaction.md +15 -0
  108. data/docs/ScheduledTransactionDetail.md +23 -0
  109. data/docs/ScheduledTransactionDetailAllOf.md +11 -0
  110. data/docs/ScheduledTransactionResponse.md +8 -0
  111. data/docs/ScheduledTransactionResponseData.md +8 -0
  112. data/docs/ScheduledTransactionSummary.md +19 -0
  113. data/docs/ScheduledTransactionWrapper.md +8 -0
  114. data/docs/ScheduledTransactionsApi.md +49 -0
  115. data/docs/ScheduledTransactionsResponse.md +8 -0
  116. data/docs/ScheduledTransactionsResponseData.md +9 -0
  117. data/docs/ScheduledTransactionsWrapper.md +8 -0
  118. data/docs/SubTransaction.md +18 -0
  119. data/docs/TransactionDetail.md +29 -0
  120. data/docs/TransactionDetailAllOf.md +11 -0
  121. data/docs/TransactionResponse.md +8 -0
  122. data/docs/TransactionResponseData.md +8 -0
  123. data/docs/TransactionSummary.md +25 -0
  124. data/docs/TransactionWrapper.md +8 -0
  125. data/docs/TransactionsApi.md +228 -0
  126. data/docs/TransactionsImportResponse.md +8 -0
  127. data/docs/TransactionsImportResponseData.md +8 -0
  128. data/docs/TransactionsResponse.md +8 -0
  129. data/docs/TransactionsResponseData.md +9 -0
  130. data/docs/TransactionsWrapper.md +9 -0
  131. data/docs/UpdateTransaction.md +20 -0
  132. data/docs/UpdateTransactionsWrapper.md +8 -0
  133. data/docs/User.md +8 -0
  134. data/docs/UserApi.md +25 -0
  135. data/docs/UserResponse.md +8 -0
  136. data/docs/UserResponseData.md +8 -0
  137. data/docs/UserWrapper.md +8 -0
  138. data/examples/budget-list.rb +21 -0
  139. data/examples/budget-month.rb +33 -0
  140. data/examples/category-balance.rb +23 -0
  141. data/examples/create-multiple-transactions.rb +42 -0
  142. data/examples/create-transaction.rb +30 -0
  143. data/examples/update-category-budgeted.rb +25 -0
  144. data/examples/update-multiple-transactions.rb +20 -0
  145. data/lib/ynab/api/accounts_api.rb +78 -41
  146. data/lib/ynab/api/budgets_api.rb +68 -36
  147. data/lib/ynab/api/categories_api.rb +108 -60
  148. data/lib/ynab/api/deprecated_api.rb +32 -17
  149. data/lib/ynab/api/months_api.rb +49 -28
  150. data/lib/ynab/api/payee_locations_api.rb +73 -41
  151. data/lib/ynab/api/payees_api.rb +49 -28
  152. data/lib/ynab/api/scheduled_transactions_api.rb +49 -28
  153. data/lib/ynab/api/transactions_api.rb +268 -140
  154. data/lib/ynab/api/user_api.rb +22 -12
  155. data/lib/ynab/api_client.rb +97 -95
  156. data/lib/ynab/configuration.rb +101 -14
  157. data/lib/ynab/models/account.rb +117 -55
  158. data/lib/ynab/models/account_response.rb +53 -18
  159. data/lib/ynab/models/account_response_data.rb +53 -18
  160. data/lib/ynab/models/account_type.rb +30 -20
  161. data/lib/ynab/models/accounts_response.rb +53 -18
  162. data/lib/ynab/models/accounts_response_data.rb +54 -19
  163. data/lib/ynab/models/budget_detail.rb +80 -35
  164. data/lib/ynab/models/budget_detail_all_of.rb +320 -0
  165. data/lib/ynab/models/budget_detail_response.rb +53 -18
  166. data/lib/ynab/models/budget_detail_response_data.rb +54 -19
  167. data/lib/ynab/models/budget_settings.rb +56 -29
  168. data/lib/ynab/models/budget_settings_response.rb +53 -18
  169. data/lib/ynab/models/budget_settings_response_data.rb +53 -18
  170. data/lib/ynab/models/budget_summary.rb +63 -26
  171. data/lib/ynab/models/budget_summary_response.rb +53 -18
  172. data/lib/ynab/models/budget_summary_response_data.rb +54 -20
  173. data/lib/ynab/models/bulk_response.rb +53 -18
  174. data/lib/ynab/models/bulk_response_data.rb +53 -18
  175. data/lib/ynab/models/bulk_response_data_bulk.rb +54 -19
  176. data/lib/ynab/models/bulk_transactions.rb +53 -18
  177. data/lib/ynab/models/categories_response.rb +53 -18
  178. data/lib/ynab/models/categories_response_data.rb +54 -19
  179. data/lib/ynab/models/category.rb +110 -48
  180. data/lib/ynab/models/category_group.rb +58 -23
  181. data/lib/ynab/models/category_group_with_categories.rb +67 -24
  182. data/lib/ynab/models/{save_month_category_wrapper.rb → category_group_with_categories_all_of.rb} +67 -29
  183. data/lib/ynab/models/category_response.rb +53 -18
  184. data/lib/ynab/models/category_response_data.rb +53 -18
  185. data/lib/ynab/models/currency_format.rb +62 -27
  186. data/lib/ynab/models/date_format.rb +53 -18
  187. data/lib/ynab/models/error_detail.rb +55 -20
  188. data/lib/ynab/models/error_response.rb +53 -18
  189. data/lib/ynab/models/hybrid_transaction.rb +118 -46
  190. data/lib/ynab/models/hybrid_transaction_all_of.rb +304 -0
  191. data/lib/ynab/models/hybrid_transactions_response.rb +53 -18
  192. data/lib/ynab/models/hybrid_transactions_response_data.rb +54 -19
  193. data/lib/ynab/models/month_detail.rb +72 -27
  194. data/lib/ynab/models/{update_transactions_wrapper.rb → month_detail_all_of.rb} +66 -30
  195. data/lib/ynab/models/month_detail_response.rb +53 -18
  196. data/lib/ynab/models/month_detail_response_data.rb +53 -18
  197. data/lib/ynab/models/month_summaries_response.rb +53 -18
  198. data/lib/ynab/models/month_summaries_response_data.rb +54 -19
  199. data/lib/ynab/models/month_summary.rb +63 -26
  200. data/lib/ynab/models/patch_month_category_wrapper.rb +53 -18
  201. data/lib/ynab/models/patch_transactions_wrapper.rb +53 -18
  202. data/lib/ynab/models/payee.rb +58 -22
  203. data/lib/ynab/models/payee_location.rb +58 -23
  204. data/lib/ynab/models/payee_location_response.rb +53 -18
  205. data/lib/ynab/models/payee_location_response_data.rb +53 -18
  206. data/lib/ynab/models/payee_locations_response.rb +53 -18
  207. data/lib/ynab/models/payee_locations_response_data.rb +53 -18
  208. data/lib/ynab/models/payee_response.rb +53 -18
  209. data/lib/ynab/models/payee_response_data.rb +53 -18
  210. data/lib/ynab/models/payees_response.rb +53 -18
  211. data/lib/ynab/models/payees_response_data.rb +54 -19
  212. data/lib/ynab/models/post_account_wrapper.rb +53 -18
  213. data/lib/ynab/models/post_transactions_wrapper.rb +54 -19
  214. data/lib/ynab/models/put_transaction_wrapper.rb +53 -18
  215. data/lib/ynab/models/save_account.rb +77 -20
  216. data/lib/ynab/models/save_category_response.rb +53 -18
  217. data/lib/ynab/models/save_category_response_data.rb +54 -19
  218. data/lib/ynab/models/save_month_category.rb +53 -18
  219. data/lib/ynab/models/save_sub_transaction.rb +61 -22
  220. data/lib/ynab/models/save_transaction.rb +88 -33
  221. data/lib/ynab/models/save_transaction_with_id.rb +102 -46
  222. data/lib/ynab/models/{save_transactions_wrapper.rb → save_transaction_with_id_all_of.rb} +60 -36
  223. data/lib/ynab/models/save_transaction_with_optional_fields.rb +81 -33
  224. data/lib/ynab/models/save_transactions_response.rb +53 -18
  225. data/lib/ynab/models/save_transactions_response_data.rb +57 -23
  226. data/lib/ynab/models/scheduled_sub_transaction.rb +66 -27
  227. data/lib/ynab/models/scheduled_transaction_detail.rb +94 -36
  228. data/lib/ynab/models/scheduled_transaction_detail_all_of.rb +262 -0
  229. data/lib/ynab/models/scheduled_transaction_response.rb +53 -18
  230. data/lib/ynab/models/scheduled_transaction_response_data.rb +53 -18
  231. data/lib/ynab/models/scheduled_transaction_summary.rb +80 -32
  232. data/lib/ynab/models/scheduled_transactions_response.rb +53 -18
  233. data/lib/ynab/models/scheduled_transactions_response_data.rb +54 -19
  234. data/lib/ynab/models/sub_transaction.rb +71 -29
  235. data/lib/ynab/models/transaction_detail.rb +112 -44
  236. data/lib/ynab/models/{save_transaction_wrapper.rb → transaction_detail_all_of.rb} +102 -29
  237. data/lib/ynab/models/transaction_response.rb +53 -18
  238. data/lib/ynab/models/transaction_response_data.rb +53 -18
  239. data/lib/ynab/models/transaction_summary.rb +98 -40
  240. data/lib/ynab/models/transactions_import_response.rb +53 -18
  241. data/lib/ynab/models/transactions_import_response_data.rb +53 -18
  242. data/lib/ynab/models/transactions_response.rb +53 -18
  243. data/lib/ynab/models/transactions_response_data.rb +54 -19
  244. data/lib/ynab/models/user.rb +53 -18
  245. data/lib/ynab/models/user_response.rb +53 -18
  246. data/lib/ynab/models/user_response_data.rb +53 -18
  247. data/lib/ynab/version.rb +1 -1
  248. data/lib/ynab.rb +19 -14
  249. data/open_api_spec.yaml +3012 -0
  250. data/templates/api_client.mustache +274 -0
  251. data/templates/api_client_typhoeus_partial.mustache +156 -0
  252. data/templates/api_doc.mustache +44 -0
  253. data/templates/gem.mustache +84 -0
  254. data/templates/partial_model_generic_doc.mustache +9 -0
  255. data/ynab.gemspec +38 -0
  256. metadata +192 -85
  257. data/lib/ynab/models/loan_account_periodic_value.rb +0 -175
  258. data/lib/ynab/models/save_account_wrapper.rb +0 -189
  259. data/lib/ynab/models/update_transaction.rb +0 -407
  260. data/spec/models/transaction_detail_spec.rb +0 -11
@@ -3,14 +3,14 @@
3
3
 
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
- OpenAPI spec version: 1.0.0
6
+ The version of the OpenAPI document: 1.0.0
7
7
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.14
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
10
 
11
11
  =end
12
12
 
13
- require 'uri'
13
+ require 'cgi'
14
14
 
15
15
  module YNAB
16
16
  class CategoriesApi
@@ -21,7 +21,7 @@ module YNAB
21
21
  end
22
22
  # List categories
23
23
  # Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
24
- # @param budget_id 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).
24
+ # @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).
25
25
  # @param [Hash] opts the optional parameters
26
26
  # @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
27
27
  # @return [CategoriesResponse]
@@ -32,10 +32,10 @@ module YNAB
32
32
 
33
33
  # List categories
34
34
  # Returns all categories grouped by category group. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
35
- # @param budget_id 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).
35
+ # @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).
36
36
  # @param [Hash] opts the optional parameters
37
37
  # @option opts [Integer] :last_knowledge_of_server The starting server knowledge. If provided, only entities that have changed since `last_knowledge_of_server` will be included.
38
- # @return [Array<(CategoriesResponse, Fixnum, Hash)>] CategoriesResponse data, response status code and response headers
38
+ # @return [Array<(CategoriesResponse, Integer, Hash)>] CategoriesResponse data, response status code and response headers
39
39
  def get_categories_with_http_info(budget_id, opts = {})
40
40
  if @api_client.config.debugging
41
41
  @api_client.config.logger.debug 'Calling API: CategoriesApi.get_categories ...'
@@ -45,39 +45,50 @@ module YNAB
45
45
  fail ArgumentError, "Missing the required parameter 'budget_id' when calling CategoriesApi.get_categories"
46
46
  end
47
47
  # resource path
48
- local_var_path = '/budgets/{budget_id}/categories'.sub('{' + 'budget_id' + '}', budget_id.to_s)
48
+ local_var_path = '/budgets/{budget_id}/categories'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
49
49
 
50
50
  # query parameters
51
- query_params = {}
51
+ query_params = opts[:query_params] || {}
52
52
  query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
53
53
 
54
54
  # header parameters
55
- header_params = {}
55
+ header_params = opts[:header_params] || {}
56
56
  # HTTP header 'Accept' (if needed)
57
57
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
58
 
59
59
  # form parameters
60
- form_params = {}
60
+ form_params = opts[:form_params] || {}
61
61
 
62
62
  # http body (model)
63
- post_body = nil
64
- auth_names = ['bearer']
65
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
63
+ post_body = opts[:debug_body]
64
+
65
+ # return_type
66
+ return_type = opts[:debug_return_type] || 'CategoriesResponse'
67
+
68
+ # auth_names
69
+ auth_names = opts[:debug_auth_names] || ['bearer']
70
+
71
+ new_options = opts.merge(
72
+ :operation => :"CategoriesApi.get_categories",
66
73
  :header_params => header_params,
67
74
  :query_params => query_params,
68
75
  :form_params => form_params,
69
76
  :body => post_body,
70
77
  :auth_names => auth_names,
71
- :return_type => 'CategoriesResponse')
78
+ :return_type => return_type
79
+ )
80
+
81
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
72
82
  if @api_client.config.debugging
73
83
  @api_client.config.logger.debug "API called: CategoriesApi#get_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
74
84
  end
75
85
  return data, status_code, headers
76
86
  end
87
+
77
88
  # Single category
78
89
  # Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
79
- # @param budget_id 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).
80
- # @param category_id The id of the category
90
+ # @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).
91
+ # @param category_id [String] The id of the category
81
92
  # @param [Hash] opts the optional parameters
82
93
  # @return [CategoryResponse]
83
94
  def get_category_by_id(budget_id, category_id, opts = {})
@@ -87,10 +98,10 @@ module YNAB
87
98
 
88
99
  # Single category
89
100
  # Returns a single category. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
90
- # @param budget_id 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).
91
- # @param category_id The id of the category
101
+ # @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).
102
+ # @param category_id [String] The id of the category
92
103
  # @param [Hash] opts the optional parameters
93
- # @return [Array<(CategoryResponse, Fixnum, Hash)>] CategoryResponse data, response status code and response headers
104
+ # @return [Array<(CategoryResponse, Integer, Hash)>] CategoryResponse data, response status code and response headers
94
105
  def get_category_by_id_with_http_info(budget_id, category_id, opts = {})
95
106
  if @api_client.config.debugging
96
107
  @api_client.config.logger.debug 'Calling API: CategoriesApi.get_category_by_id ...'
@@ -104,39 +115,50 @@ module YNAB
104
115
  fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoriesApi.get_category_by_id"
105
116
  end
106
117
  # resource path
107
- local_var_path = '/budgets/{budget_id}/categories/{category_id}'.sub('{' + 'budget_id' + '}', budget_id.to_s).sub('{' + 'category_id' + '}', category_id.to_s)
118
+ 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))
108
119
 
109
120
  # query parameters
110
- query_params = {}
121
+ query_params = opts[:query_params] || {}
111
122
 
112
123
  # header parameters
113
- header_params = {}
124
+ header_params = opts[:header_params] || {}
114
125
  # HTTP header 'Accept' (if needed)
115
126
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
116
127
 
117
128
  # form parameters
118
- form_params = {}
129
+ form_params = opts[:form_params] || {}
119
130
 
120
131
  # http body (model)
121
- post_body = nil
122
- auth_names = ['bearer']
123
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
132
+ post_body = opts[:debug_body]
133
+
134
+ # return_type
135
+ return_type = opts[:debug_return_type] || 'CategoryResponse'
136
+
137
+ # auth_names
138
+ auth_names = opts[:debug_auth_names] || ['bearer']
139
+
140
+ new_options = opts.merge(
141
+ :operation => :"CategoriesApi.get_category_by_id",
124
142
  :header_params => header_params,
125
143
  :query_params => query_params,
126
144
  :form_params => form_params,
127
145
  :body => post_body,
128
146
  :auth_names => auth_names,
129
- :return_type => 'CategoryResponse')
147
+ :return_type => return_type
148
+ )
149
+
150
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
130
151
  if @api_client.config.debugging
131
152
  @api_client.config.logger.debug "API called: CategoriesApi#get_category_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
132
153
  end
133
154
  return data, status_code, headers
134
155
  end
156
+
135
157
  # Single category for a specific budget month
136
158
  # Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
137
- # @param budget_id 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).
138
- # @param month 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))
139
- # @param category_id The id of the category
159
+ # @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).
160
+ # @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))
161
+ # @param category_id [String] The id of the category
140
162
  # @param [Hash] opts the optional parameters
141
163
  # @return [CategoryResponse]
142
164
  def get_month_category_by_id(budget_id, month, category_id, opts = {})
@@ -146,11 +168,11 @@ module YNAB
146
168
 
147
169
  # Single category for a specific budget month
148
170
  # Returns a single category for a specific budget month. Amounts (budgeted, activity, balance, etc.) are specific to the current budget month (UTC).
149
- # @param budget_id 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).
150
- # @param month 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))
151
- # @param category_id The id of the category
171
+ # @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).
172
+ # @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))
173
+ # @param category_id [String] The id of the category
152
174
  # @param [Hash] opts the optional parameters
153
- # @return [Array<(CategoryResponse, Fixnum, Hash)>] CategoryResponse data, response status code and response headers
175
+ # @return [Array<(CategoryResponse, Integer, Hash)>] CategoryResponse data, response status code and response headers
154
176
  def get_month_category_by_id_with_http_info(budget_id, month, category_id, opts = {})
155
177
  if @api_client.config.debugging
156
178
  @api_client.config.logger.debug 'Calling API: CategoriesApi.get_month_category_by_id ...'
@@ -168,40 +190,51 @@ module YNAB
168
190
  fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoriesApi.get_month_category_by_id"
169
191
  end
170
192
  # resource path
171
- local_var_path = '/budgets/{budget_id}/months/{month}/categories/{category_id}'.sub('{' + 'budget_id' + '}', budget_id.to_s).sub('{' + 'month' + '}', month.to_s).sub('{' + 'category_id' + '}', category_id.to_s)
193
+ 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))
172
194
 
173
195
  # query parameters
174
- query_params = {}
196
+ query_params = opts[:query_params] || {}
175
197
 
176
198
  # header parameters
177
- header_params = {}
199
+ header_params = opts[:header_params] || {}
178
200
  # HTTP header 'Accept' (if needed)
179
201
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
180
202
 
181
203
  # form parameters
182
- form_params = {}
204
+ form_params = opts[:form_params] || {}
183
205
 
184
206
  # http body (model)
185
- post_body = nil
186
- auth_names = ['bearer']
187
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
207
+ post_body = opts[:debug_body]
208
+
209
+ # return_type
210
+ return_type = opts[:debug_return_type] || 'CategoryResponse'
211
+
212
+ # auth_names
213
+ auth_names = opts[:debug_auth_names] || ['bearer']
214
+
215
+ new_options = opts.merge(
216
+ :operation => :"CategoriesApi.get_month_category_by_id",
188
217
  :header_params => header_params,
189
218
  :query_params => query_params,
190
219
  :form_params => form_params,
191
220
  :body => post_body,
192
221
  :auth_names => auth_names,
193
- :return_type => 'CategoryResponse')
222
+ :return_type => return_type
223
+ )
224
+
225
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
194
226
  if @api_client.config.debugging
195
227
  @api_client.config.logger.debug "API called: CategoriesApi#get_month_category_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
228
  end
197
229
  return data, status_code, headers
198
230
  end
231
+
199
232
  # Update a category for a specific month
200
233
  # Update a category for a specific month. Only `budgeted` amount can be updated.
201
- # @param budget_id 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).
202
- # @param month 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))
203
- # @param category_id The id of the category
204
- # @param data The category to update. Only &#x60;budgeted&#x60; amount can be updated and any other fields specified will be ignored.
234
+ # @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).
235
+ # @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))
236
+ # @param category_id [String] The id of the category
237
+ # @param data [PatchMonthCategoryWrapper] The category to update. Only &#x60;budgeted&#x60; amount can be updated and any other fields specified will be ignored.
205
238
  # @param [Hash] opts the optional parameters
206
239
  # @return [SaveCategoryResponse]
207
240
  def update_month_category(budget_id, month, category_id, data, opts = {})
@@ -211,12 +244,12 @@ module YNAB
211
244
 
212
245
  # Update a category for a specific month
213
246
  # Update a category for a specific month. Only &#x60;budgeted&#x60; amount can be updated.
214
- # @param budget_id 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).
215
- # @param month 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))
216
- # @param category_id The id of the category
217
- # @param data The category to update. Only &#x60;budgeted&#x60; amount can be updated and any other fields specified will be ignored.
247
+ # @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).
248
+ # @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))
249
+ # @param category_id [String] The id of the category
250
+ # @param data [PatchMonthCategoryWrapper] The category to update. Only &#x60;budgeted&#x60; amount can be updated and any other fields specified will be ignored.
218
251
  # @param [Hash] opts the optional parameters
219
- # @return [Array<(SaveCategoryResponse, Fixnum, Hash)>] SaveCategoryResponse data, response status code and response headers
252
+ # @return [Array<(SaveCategoryResponse, Integer, Hash)>] SaveCategoryResponse data, response status code and response headers
220
253
  def update_month_category_with_http_info(budget_id, month, category_id, data, opts = {})
221
254
  if @api_client.config.debugging
222
255
  @api_client.config.logger.debug 'Calling API: CategoriesApi.update_month_category ...'
@@ -238,29 +271,44 @@ module YNAB
238
271
  fail ArgumentError, "Missing the required parameter 'data' when calling CategoriesApi.update_month_category"
239
272
  end
240
273
  # resource path
241
- local_var_path = '/budgets/{budget_id}/months/{month}/categories/{category_id}'.sub('{' + 'budget_id' + '}', budget_id.to_s).sub('{' + 'month' + '}', month.to_s).sub('{' + 'category_id' + '}', category_id.to_s)
274
+ 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))
242
275
 
243
276
  # query parameters
244
- query_params = {}
277
+ query_params = opts[:query_params] || {}
245
278
 
246
279
  # header parameters
247
- header_params = {}
280
+ header_params = opts[:header_params] || {}
248
281
  # HTTP header 'Accept' (if needed)
249
282
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
283
+ # HTTP header 'Content-Type'
284
+ content_type = @api_client.select_header_content_type(['application/json'])
285
+ if !content_type.nil?
286
+ header_params['Content-Type'] = content_type
287
+ end
250
288
 
251
289
  # form parameters
252
- form_params = {}
290
+ form_params = opts[:form_params] || {}
253
291
 
254
292
  # http body (model)
255
- post_body = @api_client.object_to_http_body(data)
256
- auth_names = ['bearer']
257
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
293
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(data)
294
+
295
+ # return_type
296
+ return_type = opts[:debug_return_type] || 'SaveCategoryResponse'
297
+
298
+ # auth_names
299
+ auth_names = opts[:debug_auth_names] || ['bearer']
300
+
301
+ new_options = opts.merge(
302
+ :operation => :"CategoriesApi.update_month_category",
258
303
  :header_params => header_params,
259
304
  :query_params => query_params,
260
305
  :form_params => form_params,
261
306
  :body => post_body,
262
307
  :auth_names => auth_names,
263
- :return_type => 'SaveCategoryResponse')
308
+ :return_type => return_type
309
+ )
310
+
311
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
264
312
  if @api_client.config.debugging
265
313
  @api_client.config.logger.debug "API called: CategoriesApi#update_month_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
266
314
  end
@@ -3,14 +3,14 @@
3
3
 
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
- OpenAPI spec version: 1.0.0
6
+ The version of the OpenAPI document: 1.0.0
7
7
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.14
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
10
 
11
11
  =end
12
12
 
13
- require 'uri'
13
+ require 'cgi'
14
14
 
15
15
  module YNAB
16
16
  class DeprecatedApi
@@ -21,8 +21,8 @@ module YNAB
21
21
  end
22
22
  # Bulk create transactions
23
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 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
- # @param transactions The list of transactions to create
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).
25
+ # @param transactions [BulkTransactions] The list of transactions to create
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @return [BulkResponse]
28
28
  def bulk_create_transactions(budget_id, transactions, opts = {})
@@ -32,10 +32,10 @@ module YNAB
32
32
 
33
33
  # Bulk create transactions
34
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 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
- # @param transactions The list of transactions to create
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).
36
+ # @param transactions [BulkTransactions] The list of transactions to create
37
37
  # @param [Hash] opts the optional parameters
38
- # @return [Array<(BulkResponse, Fixnum, Hash)>] BulkResponse data, response status code and response headers
38
+ # @return [Array<(BulkResponse, Integer, Hash)>] BulkResponse data, response status code and response headers
39
39
  def bulk_create_transactions_with_http_info(budget_id, transactions, opts = {})
40
40
  if @api_client.config.debugging
41
41
  @api_client.config.logger.debug 'Calling API: DeprecatedApi.bulk_create_transactions ...'
@@ -49,29 +49,44 @@ module YNAB
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' + '}', budget_id.to_s)
52
+ local_var_path = '/budgets/{budget_id}/transactions/bulk'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
53
53
 
54
54
  # query parameters
55
- query_params = {}
55
+ query_params = opts[:query_params] || {}
56
56
 
57
57
  # header parameters
58
- header_params = {}
58
+ header_params = opts[:header_params] || {}
59
59
  # HTTP header 'Accept' (if needed)
60
60
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+ # HTTP header 'Content-Type'
62
+ content_type = @api_client.select_header_content_type(['application/json'])
63
+ if !content_type.nil?
64
+ header_params['Content-Type'] = content_type
65
+ end
61
66
 
62
67
  # form parameters
63
- form_params = {}
68
+ form_params = opts[:form_params] || {}
64
69
 
65
70
  # http body (model)
66
- post_body = @api_client.object_to_http_body(transactions)
67
- auth_names = ['bearer']
68
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
71
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(transactions)
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type] || 'BulkResponse'
75
+
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['bearer']
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"DeprecatedApi.bulk_create_transactions",
69
81
  :header_params => header_params,
70
82
  :query_params => query_params,
71
83
  :form_params => form_params,
72
84
  :body => post_body,
73
85
  :auth_names => auth_names,
74
- :return_type => 'BulkResponse')
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
75
90
  if @api_client.config.debugging
76
91
  @api_client.config.logger.debug "API called: DeprecatedApi#bulk_create_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
92
  end
@@ -3,14 +3,14 @@
3
3
 
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
- OpenAPI spec version: 1.0.0
6
+ The version of the OpenAPI document: 1.0.0
7
7
 
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.14
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
10
 
11
11
  =end
12
12
 
13
- require 'uri'
13
+ require 'cgi'
14
14
 
15
15
  module YNAB
16
16
  class MonthsApi
@@ -21,8 +21,8 @@ module YNAB
21
21
  end
22
22
  # Single budget month
23
23
  # Returns a single budget month
24
- # @param budget_id 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
- # @param month 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))
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).
25
+ # @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))
26
26
  # @param [Hash] opts the optional parameters
27
27
  # @return [MonthDetailResponse]
28
28
  def get_budget_month(budget_id, month, opts = {})
@@ -32,10 +32,10 @@ module YNAB
32
32
 
33
33
  # Single budget month
34
34
  # Returns a single budget month
35
- # @param budget_id 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
- # @param month 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))
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).
36
+ # @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))
37
37
  # @param [Hash] opts the optional parameters
38
- # @return [Array<(MonthDetailResponse, Fixnum, Hash)>] MonthDetailResponse data, response status code and response headers
38
+ # @return [Array<(MonthDetailResponse, Integer, Hash)>] MonthDetailResponse data, response status code and response headers
39
39
  def get_budget_month_with_http_info(budget_id, month, opts = {})
40
40
  if @api_client.config.debugging
41
41
  @api_client.config.logger.debug 'Calling API: MonthsApi.get_budget_month ...'
@@ -49,37 +49,48 @@ module YNAB
49
49
  fail ArgumentError, "Missing the required parameter 'month' when calling MonthsApi.get_budget_month"
50
50
  end
51
51
  # resource path
52
- local_var_path = '/budgets/{budget_id}/months/{month}'.sub('{' + 'budget_id' + '}', budget_id.to_s).sub('{' + 'month' + '}', month.to_s)
52
+ local_var_path = '/budgets/{budget_id}/months/{month}'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s)).sub('{' + 'month' + '}', CGI.escape(month.to_s))
53
53
 
54
54
  # query parameters
55
- query_params = {}
55
+ query_params = opts[:query_params] || {}
56
56
 
57
57
  # header parameters
58
- header_params = {}
58
+ header_params = opts[:header_params] || {}
59
59
  # HTTP header 'Accept' (if needed)
60
60
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
61
 
62
62
  # form parameters
63
- form_params = {}
63
+ form_params = opts[:form_params] || {}
64
64
 
65
65
  # http body (model)
66
- post_body = nil
67
- auth_names = ['bearer']
68
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
66
+ post_body = opts[:debug_body]
67
+
68
+ # return_type
69
+ return_type = opts[:debug_return_type] || 'MonthDetailResponse'
70
+
71
+ # auth_names
72
+ auth_names = opts[:debug_auth_names] || ['bearer']
73
+
74
+ new_options = opts.merge(
75
+ :operation => :"MonthsApi.get_budget_month",
69
76
  :header_params => header_params,
70
77
  :query_params => query_params,
71
78
  :form_params => form_params,
72
79
  :body => post_body,
73
80
  :auth_names => auth_names,
74
- :return_type => 'MonthDetailResponse')
81
+ :return_type => return_type
82
+ )
83
+
84
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
75
85
  if @api_client.config.debugging
76
86
  @api_client.config.logger.debug "API called: MonthsApi#get_budget_month\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
87
  end
78
88
  return data, status_code, headers
79
89
  end
90
+
80
91
  # List budget months
81
92
  # Returns all budget months
82
- # @param budget_id 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).
93
+ # @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).
83
94
  # @param [Hash] opts the optional parameters
84
95
  # @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.
85
96
  # @return [MonthSummariesResponse]
@@ -90,10 +101,10 @@ module YNAB
90
101
 
91
102
  # List budget months
92
103
  # Returns all budget months
93
- # @param budget_id 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).
104
+ # @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
105
  # @param [Hash] opts the optional parameters
95
106
  # @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.
96
- # @return [Array<(MonthSummariesResponse, Fixnum, Hash)>] MonthSummariesResponse data, response status code and response headers
107
+ # @return [Array<(MonthSummariesResponse, Integer, Hash)>] MonthSummariesResponse data, response status code and response headers
97
108
  def get_budget_months_with_http_info(budget_id, opts = {})
98
109
  if @api_client.config.debugging
99
110
  @api_client.config.logger.debug 'Calling API: MonthsApi.get_budget_months ...'
@@ -103,30 +114,40 @@ module YNAB
103
114
  fail ArgumentError, "Missing the required parameter 'budget_id' when calling MonthsApi.get_budget_months"
104
115
  end
105
116
  # resource path
106
- local_var_path = '/budgets/{budget_id}/months'.sub('{' + 'budget_id' + '}', budget_id.to_s)
117
+ local_var_path = '/budgets/{budget_id}/months'.sub('{' + 'budget_id' + '}', CGI.escape(budget_id.to_s))
107
118
 
108
119
  # query parameters
109
- query_params = {}
120
+ query_params = opts[:query_params] || {}
110
121
  query_params[:'last_knowledge_of_server'] = opts[:'last_knowledge_of_server'] if !opts[:'last_knowledge_of_server'].nil?
111
122
 
112
123
  # header parameters
113
- header_params = {}
124
+ header_params = opts[:header_params] || {}
114
125
  # HTTP header 'Accept' (if needed)
115
126
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
116
127
 
117
128
  # form parameters
118
- form_params = {}
129
+ form_params = opts[:form_params] || {}
119
130
 
120
131
  # http body (model)
121
- post_body = nil
122
- auth_names = ['bearer']
123
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
132
+ post_body = opts[:debug_body]
133
+
134
+ # return_type
135
+ return_type = opts[:debug_return_type] || 'MonthSummariesResponse'
136
+
137
+ # auth_names
138
+ auth_names = opts[:debug_auth_names] || ['bearer']
139
+
140
+ new_options = opts.merge(
141
+ :operation => :"MonthsApi.get_budget_months",
124
142
  :header_params => header_params,
125
143
  :query_params => query_params,
126
144
  :form_params => form_params,
127
145
  :body => post_body,
128
146
  :auth_names => auth_names,
129
- :return_type => 'MonthSummariesResponse')
147
+ :return_type => return_type
148
+ )
149
+
150
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
130
151
  if @api_client.config.debugging
131
152
  @api_client.config.logger.debug "API called: MonthsApi#get_budget_months\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
132
153
  end