Class: FireflyIIIClient::BudgetsApi
- Inherits:
-
Object
- Object
- FireflyIIIClient::BudgetsApi
- Defined in:
- lib/firefly_iii_client/api/budgets_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_budget(id, opts = {}) ⇒ nil
Delete a budget.
-
#delete_budget_limit(id, opts = {}) ⇒ nil
Delete a budget limit.
-
#delete_budget_limit_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a budget limit.
-
#delete_budget_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a budget.
-
#get_budget(id, opts = {}) ⇒ BudgetSingle
Get a single budget.
-
#get_budget_limit(id, opts = {}) ⇒ BudgetLimitSingle
Get single budget limit.
-
#get_budget_limit_with_http_info(id, opts = {}) ⇒ Array<(BudgetLimitSingle, Integer, Hash)>
Get single budget limit.
-
#get_budget_with_http_info(id, opts = {}) ⇒ Array<(BudgetSingle, Integer, Hash)>
Get a single budget.
-
#initialize(api_client = ApiClient.default) ⇒ BudgetsApi
constructor
A new instance of BudgetsApi.
-
#list_budget(opts = {}) ⇒ BudgetArray
List all budgets.
-
#list_budget_limit_by_budget(id, opts = {}) ⇒ BudgetLimitArray
Get all limits Get all budget limits for this budget and the money spent, and money left.
-
#list_budget_limit_by_budget_with_http_info(id, opts = {}) ⇒ Array<(BudgetLimitArray, Integer, Hash)>
Get all limits Get all budget limits for this budget and the money spent, and money left.
-
#list_budget_with_http_info(opts = {}) ⇒ Array<(BudgetArray, Integer, Hash)>
List all budgets.
-
#list_transaction_by_budget(id, opts = {}) ⇒ TransactionArray
All transactions to a budget.
-
#list_transaction_by_budget_limit(id, opts = {}) ⇒ TransactionArray
List all transactions by a budget limit ID.
-
#list_transaction_by_budget_limit_with_http_info(id, opts = {}) ⇒ Array<(TransactionArray, Integer, Hash)>
List all transactions by a budget limit ID.
-
#list_transaction_by_budget_with_http_info(id, opts = {}) ⇒ Array<(TransactionArray, Integer, Hash)>
All transactions to a budget.
-
#store_budget(budget, opts = {}) ⇒ BudgetSingle
Store a new budget Creates a new budget.
-
#store_budget_limit(id, budget_limit, opts = {}) ⇒ BudgetLimitSingle
Store new budget limit.
-
#store_budget_limit_with_http_info(id, budget_limit, opts = {}) ⇒ Array<(BudgetLimitSingle, Integer, Hash)>
Store new budget limit.
-
#store_budget_with_http_info(budget, opts = {}) ⇒ Array<(BudgetSingle, Integer, Hash)>
Store a new budget Creates a new budget.
-
#update_budget(id, budget, opts = {}) ⇒ BudgetSingle
Update existing budget.
-
#update_budget_limit(id, budget_limit, opts = {}) ⇒ BudgetLimitSingle
Update existing budget limit.
-
#update_budget_limit_with_http_info(id, budget_limit, opts = {}) ⇒ Array<(BudgetLimitSingle, Integer, Hash)>
Update existing budget limit.
-
#update_budget_with_http_info(id, budget, opts = {}) ⇒ Array<(BudgetSingle, Integer, Hash)>
Update existing budget.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ BudgetsApi
Returns a new instance of BudgetsApi.
19 20 21 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_budget(id, opts = {}) ⇒ nil
Delete a budget. Delete a budget. Transactions will not be deleted.
27 28 29 30 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 27 def delete_budget(id, opts = {}) delete_budget_with_http_info(id, opts) nil end |
#delete_budget_limit(id, opts = {}) ⇒ nil
Delete a budget limit. Delete a budget limit.
92 93 94 95 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 92 def delete_budget_limit(id, opts = {}) delete_budget_limit_with_http_info(id, opts) nil end |
#delete_budget_limit_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a budget limit. Delete a budget limit.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 102 def delete_budget_limit_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.delete_budget_limit ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BudgetsApi.delete_budget_limit" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling BudgetsApi.delete_budget_limit, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v1/budgets/limits/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.delete_budget_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#delete_budget_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_budget_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a budget. Delete a budget. Transactions will not be deleted.
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 37 def delete_budget_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.delete_budget ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BudgetsApi.delete_budget" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling BudgetsApi.delete_budget, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v1/budgets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.delete_budget", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#delete_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_budget(id, opts = {}) ⇒ BudgetSingle
Get a single budget. Get a single budget. If the start date and end date are submitted as well, the "spent" array will be updated accordingly.
159 160 161 162 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 159 def get_budget(id, opts = {}) data, _status_code, _headers = get_budget_with_http_info(id, opts) data end |
#get_budget_limit(id, opts = {}) ⇒ BudgetLimitSingle
Get single budget limit.
225 226 227 228 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 225 def get_budget_limit(id, opts = {}) data, _status_code, _headers = get_budget_limit_with_http_info(id, opts) data end |
#get_budget_limit_with_http_info(id, opts = {}) ⇒ Array<(BudgetLimitSingle, Integer, Hash)>
Get single budget limit.
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 234 def get_budget_limit_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.get_budget_limit ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BudgetsApi.get_budget_limit" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling BudgetsApi.get_budget_limit, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v1/budgets/limits/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BudgetLimitSingle' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.get_budget_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#get_budget_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_budget_with_http_info(id, opts = {}) ⇒ Array<(BudgetSingle, Integer, Hash)>
Get a single budget. Get a single budget. If the start date and end date are submitted as well, the "spent" array will be updated accordingly.
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 171 def get_budget_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.get_budget ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BudgetsApi.get_budget" end # resource path local_var_path = '/api/v1/budgets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil? query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BudgetSingle' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.get_budget", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#get_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_budget(opts = {}) ⇒ BudgetArray
List all budgets. List all the budgets the user has made. If the start date and end date are submitted as well, the "spent" array will be updated accordingly.
293 294 295 296 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 293 def list_budget(opts = {}) data, _status_code, _headers = list_budget_with_http_info(opts) data end |
#list_budget_limit_by_budget(id, opts = {}) ⇒ BudgetLimitArray
Get all limits Get all budget limits for this budget and the money spent, and money left. You can limit the list by submitting a date range as well. The "spent" array for each budget limit is NOT influenced by the start and end date of your query, but by the start and end date of the budget limit itself.
359 360 361 362 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 359 def list_budget_limit_by_budget(id, opts = {}) data, _status_code, _headers = list_budget_limit_by_budget_with_http_info(id, opts) data end |
#list_budget_limit_by_budget_with_http_info(id, opts = {}) ⇒ Array<(BudgetLimitArray, Integer, Hash)>
Get all limits Get all budget limits for this budget and the money spent, and money left. You can limit the list by submitting a date range as well. The "spent" array for each budget limit is NOT influenced by the start and end date of your query, but by the start and end date of the budget limit itself.
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 371 def list_budget_limit_by_budget_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.list_budget_limit_by_budget ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BudgetsApi.list_budget_limit_by_budget" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling BudgetsApi.list_budget_limit_by_budget, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v1/budgets/{id}/limits'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BudgetLimitArray' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.list_budget_limit_by_budget", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#list_budget_limit_by_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_budget_with_http_info(opts = {}) ⇒ Array<(BudgetArray, Integer, Hash)>
List all budgets. List all the budgets the user has made. If the start date and end date are submitted as well, the "spent" array will be updated accordingly.
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 305 def list_budget_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.list_budget ...' end # resource path local_var_path = '/api/v1/budgets' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BudgetArray' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.list_budget", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#list_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_transaction_by_budget(id, opts = {}) ⇒ TransactionArray
All transactions to a budget. Get all transactions linked to a budget, possibly limited by start and end
435 436 437 438 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 435 def list_transaction_by_budget(id, opts = {}) data, _status_code, _headers = list_transaction_by_budget_with_http_info(id, opts) data end |
#list_transaction_by_budget_limit(id, opts = {}) ⇒ TransactionArray
List all transactions by a budget limit ID. List all the transactions within one budget limit. The start and end date are dictated by the budget limit.
510 511 512 513 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 510 def list_transaction_by_budget_limit(id, opts = {}) data, _status_code, _headers = list_transaction_by_budget_limit_with_http_info(id, opts) data end |
#list_transaction_by_budget_limit_with_http_info(id, opts = {}) ⇒ Array<(TransactionArray, Integer, Hash)>
List all transactions by a budget limit ID. List all the transactions within one budget limit. The start and end date are dictated by the budget limit.
522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 522 def list_transaction_by_budget_limit_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.list_transaction_by_budget_limit ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BudgetsApi.list_transaction_by_budget_limit" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling BudgetsApi.list_transaction_by_budget_limit, must be greater than or equal to 1.' end # resource path local_var_path = '/api/v1/budgets/limits/{id}/transactions'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TransactionArray' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.list_transaction_by_budget_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#list_transaction_by_budget_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_transaction_by_budget_with_http_info(id, opts = {}) ⇒ Array<(TransactionArray, Integer, Hash)>
All transactions to a budget. Get all transactions linked to a budget, possibly limited by start and end
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 450 def list_transaction_by_budget_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.list_transaction_by_budget ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BudgetsApi.list_transaction_by_budget" end # resource path local_var_path = '/api/v1/budgets/{id}/transactions'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'TransactionArray' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.list_transaction_by_budget", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#list_transaction_by_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#store_budget(budget, opts = {}) ⇒ BudgetSingle
Store a new budget Creates a new budget. The data required can be submitted as a JSON body or as a list of parameters.
581 582 583 584 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 581 def store_budget(budget, opts = {}) data, _status_code, _headers = store_budget_with_http_info(budget, opts) data end |
#store_budget_limit(id, budget_limit, opts = {}) ⇒ BudgetLimitSingle
Store new budget limit. Store a new budget limit.
647 648 649 650 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 647 def store_budget_limit(id, budget_limit, opts = {}) data, _status_code, _headers = store_budget_limit_with_http_info(id, budget_limit, opts) data end |
#store_budget_limit_with_http_info(id, budget_limit, opts = {}) ⇒ Array<(BudgetLimitSingle, Integer, Hash)>
Store new budget limit. Store a new budget limit.
658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 658 def store_budget_limit_with_http_info(id, budget_limit, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.store_budget_limit ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BudgetsApi.store_budget_limit" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling BudgetsApi.store_budget_limit, must be greater than or equal to 1.' end # verify the required parameter 'budget_limit' is set if @api_client.config.client_side_validation && budget_limit.nil? fail ArgumentError, "Missing the required parameter 'budget_limit' when calling BudgetsApi.store_budget_limit" end # resource path local_var_path = '/api/v1/budgets/{id}/limits'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(budget_limit) # return_type return_type = opts[:debug_return_type] || 'BudgetLimitSingle' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.store_budget_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#store_budget_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#store_budget_with_http_info(budget, opts = {}) ⇒ Array<(BudgetSingle, Integer, Hash)>
Store a new budget Creates a new budget. The data required can be submitted as a JSON body or as a list of parameters.
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 591 def store_budget_with_http_info(budget, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.store_budget ...' end # verify the required parameter 'budget' is set if @api_client.config.client_side_validation && budget.nil? fail ArgumentError, "Missing the required parameter 'budget' when calling BudgetsApi.store_budget" end # resource path local_var_path = '/api/v1/budgets' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(budget) # return_type return_type = opts[:debug_return_type] || 'BudgetSingle' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.store_budget", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#store_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_budget(id, budget, opts = {}) ⇒ BudgetSingle
Update existing budget. Update existing budget. This endpoint cannot be used to set budget amount limits.
722 723 724 725 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 722 def update_budget(id, budget, opts = {}) data, _status_code, _headers = update_budget_with_http_info(id, budget, opts) data end |
#update_budget_limit(id, budget_limit, opts = {}) ⇒ BudgetLimitSingle
Update existing budget limit. Update existing budget limit.
797 798 799 800 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 797 def update_budget_limit(id, budget_limit, opts = {}) data, _status_code, _headers = update_budget_limit_with_http_info(id, budget_limit, opts) data end |
#update_budget_limit_with_http_info(id, budget_limit, opts = {}) ⇒ Array<(BudgetLimitSingle, Integer, Hash)>
Update existing budget limit. Update existing budget limit.
808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 808 def update_budget_limit_with_http_info(id, budget_limit, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.update_budget_limit ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BudgetsApi.update_budget_limit" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling BudgetsApi.update_budget_limit, must be greater than or equal to 1.' end # verify the required parameter 'budget_limit' is set if @api_client.config.client_side_validation && budget_limit.nil? fail ArgumentError, "Missing the required parameter 'budget_limit' when calling BudgetsApi.update_budget_limit" end # resource path local_var_path = '/api/v1/budgets/limits/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(budget_limit) # return_type return_type = opts[:debug_return_type] || 'BudgetLimitSingle' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.update_budget_limit", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#update_budget_limit\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_budget_with_http_info(id, budget, opts = {}) ⇒ Array<(BudgetSingle, Integer, Hash)>
Update existing budget. Update existing budget. This endpoint cannot be used to set budget amount limits.
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 |
# File 'lib/firefly_iii_client/api/budgets_api.rb', line 733 def update_budget_with_http_info(id, budget, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BudgetsApi.update_budget ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling BudgetsApi.update_budget" end if @api_client.config.client_side_validation && id < 1 fail ArgumentError, 'invalid value for "id" when calling BudgetsApi.update_budget, must be greater than or equal to 1.' end # verify the required parameter 'budget' is set if @api_client.config.client_side_validation && budget.nil? fail ArgumentError, "Missing the required parameter 'budget' when calling BudgetsApi.update_budget" end # resource path local_var_path = '/api/v1/budgets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(budget) # return_type return_type = opts[:debug_return_type] || 'BudgetSingle' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"BudgetsApi.update_budget", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BudgetsApi#update_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |