Class: FireflyIIIClient::RuleGroupsApi
- Inherits:
-
Object
- Object
- FireflyIIIClient::RuleGroupsApi
- Defined in:
- lib/firefly_iii_client/api/rule_groups_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_rule_group(id, opts = {}) ⇒ nil
Delete a rule group.
-
#delete_rule_group_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a rule group.
-
#fire_rule_group(id, opts = {}) ⇒ nil
Fire the rule group on your transactions.
-
#fire_rule_group_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Fire the rule group on your transactions.
-
#get_rule_group(id, opts = {}) ⇒ RuleGroupSingle
Get a single rule group.
-
#get_rule_group_with_http_info(id, opts = {}) ⇒ Array<(RuleGroupSingle, Integer, Hash)>
Get a single rule group.
-
#initialize(api_client = ApiClient.default) ⇒ RuleGroupsApi
constructor
A new instance of RuleGroupsApi.
-
#list_rule_by_group(id, opts = {}) ⇒ RuleArray
List rules in this rule group.
-
#list_rule_by_group_with_http_info(id, opts = {}) ⇒ Array<(RuleArray, Integer, Hash)>
List rules in this rule group.
-
#list_rule_group(opts = {}) ⇒ RuleGroupArray
List all rule groups.
-
#list_rule_group_with_http_info(opts = {}) ⇒ Array<(RuleGroupArray, Integer, Hash)>
List all rule groups.
-
#store_rule_group(rule_group, opts = {}) ⇒ RuleGroupSingle
Store a new rule group.
-
#store_rule_group_with_http_info(rule_group, opts = {}) ⇒ Array<(RuleGroupSingle, Integer, Hash)>
Store a new rule group.
-
#test_rule_group(id, opts = {}) ⇒ TransactionArray
Test which transactions would be hit by the rule group.
-
#test_rule_group_with_http_info(id, opts = {}) ⇒ Array<(TransactionArray, Integer, Hash)>
Test which transactions would be hit by the rule group.
-
#update_rule_group(id, rule_group, opts = {}) ⇒ RuleGroupSingle
Update existing rule group.
-
#update_rule_group_with_http_info(id, rule_group, opts = {}) ⇒ Array<(RuleGroupSingle, Integer, Hash)>
Update existing rule group.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RuleGroupsApi
Returns a new instance of RuleGroupsApi.
19 20 21 |
# File 'lib/firefly_iii_client/api/rule_groups_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/rule_groups_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_rule_group(id, opts = {}) ⇒ nil
Delete a rule group. Delete a rule group.
27 28 29 30 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 27 def delete_rule_group(id, opts = {}) delete_rule_group_with_http_info(id, opts) nil end |
#delete_rule_group_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a rule group. Delete a rule group.
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 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 37 def delete_rule_group_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RuleGroupsApi.delete_rule_group ...' 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 RuleGroupsApi.delete_rule_group" end # resource path local_var_path = '/api/v1/rule_groups/{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 => :"RuleGroupsApi.delete_rule_group", :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: RuleGroupsApi#delete_rule_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#fire_rule_group(id, opts = {}) ⇒ nil
Fire the rule group on your transactions. Fire the rule group on your transactions. Changes will be made by the rules in the rule group! Limit the result if you want to.
91 92 93 94 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 91 def fire_rule_group(id, opts = {}) fire_rule_group_with_http_info(id, opts) nil end |
#fire_rule_group_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Fire the rule group on your transactions. Fire the rule group on your transactions. Changes will be made by the rules in the rule group! Limit the result if you want to.
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 151 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 104 def fire_rule_group_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RuleGroupsApi.fire_rule_group ...' 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 RuleGroupsApi.fire_rule_group" end # resource path local_var_path = '/api/v1/rule_groups/{id}/trigger'.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? query_params[:'accounts'] = opts[:'accounts'] if !opts[:'accounts'].nil? # 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 => :"RuleGroupsApi.fire_rule_group", :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: RuleGroupsApi#fire_rule_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_rule_group(id, opts = {}) ⇒ RuleGroupSingle
Get a single rule group. Get a single rule group. This does not include the rules. For that, see below.
158 159 160 161 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 158 def get_rule_group(id, opts = {}) data, _status_code, _headers = get_rule_group_with_http_info(id, opts) data end |
#get_rule_group_with_http_info(id, opts = {}) ⇒ Array<(RuleGroupSingle, Integer, Hash)>
Get a single rule group. Get a single rule group. This does not include the rules. For that, see below.
168 169 170 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 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 168 def get_rule_group_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RuleGroupsApi.get_rule_group ...' 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 RuleGroupsApi.get_rule_group" end # resource path local_var_path = '/api/v1/rule_groups/{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] || 'RuleGroupSingle' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"RuleGroupsApi.get_rule_group", :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: RuleGroupsApi#get_rule_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_rule_by_group(id, opts = {}) ⇒ RuleArray
List rules in this rule group. List rules in this rule group.
222 223 224 225 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 222 def list_rule_by_group(id, opts = {}) data, _status_code, _headers = list_rule_by_group_with_http_info(id, opts) data end |
#list_rule_by_group_with_http_info(id, opts = {}) ⇒ Array<(RuleArray, Integer, Hash)>
List rules in this rule group. List rules in this rule group.
233 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 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 233 def list_rule_by_group_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RuleGroupsApi.list_rule_by_group ...' 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 RuleGroupsApi.list_rule_by_group" end # resource path local_var_path = '/api/v1/rule_groups/{id}/rules'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].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] || 'RuleArray' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"RuleGroupsApi.list_rule_by_group", :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: RuleGroupsApi#list_rule_by_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_rule_group(opts = {}) ⇒ RuleGroupArray
List all rule groups. List all rule groups.
287 288 289 290 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 287 def list_rule_group(opts = {}) data, _status_code, _headers = list_rule_group_with_http_info(opts) data end |
#list_rule_group_with_http_info(opts = {}) ⇒ Array<(RuleGroupArray, Integer, Hash)>
List all rule groups. List all rule groups.
297 298 299 300 301 302 303 304 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 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 297 def list_rule_group_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RuleGroupsApi.list_rule_group ...' end # resource path local_var_path = '/api/v1/rule_groups' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].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] || 'RuleGroupArray' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"RuleGroupsApi.list_rule_group", :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: RuleGroupsApi#list_rule_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#store_rule_group(rule_group, opts = {}) ⇒ RuleGroupSingle
Store a new rule group. Creates a new rule group. The data required can be submitted as a JSON body or as a list of parameters.
347 348 349 350 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 347 def store_rule_group(rule_group, opts = {}) data, _status_code, _headers = store_rule_group_with_http_info(rule_group, opts) data end |
#store_rule_group_with_http_info(rule_group, opts = {}) ⇒ Array<(RuleGroupSingle, Integer, Hash)>
Store a new rule group. Creates a new rule group. The data required can be submitted as a JSON body or as a list of parameters.
357 358 359 360 361 362 363 364 365 366 367 368 369 370 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 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 357 def store_rule_group_with_http_info(rule_group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RuleGroupsApi.store_rule_group ...' end # verify the required parameter 'rule_group' is set if @api_client.config.client_side_validation && rule_group.nil? fail ArgumentError, "Missing the required parameter 'rule_group' when calling RuleGroupsApi.store_rule_group" end # resource path local_var_path = '/api/v1/rule_groups' # 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(rule_group) # return_type return_type = opts[:debug_return_type] || 'RuleGroupSingle' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"RuleGroupsApi.store_rule_group", :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: RuleGroupsApi#store_rule_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#test_rule_group(id, opts = {}) ⇒ TransactionArray
Test which transactions would be hit by the rule group. No changes will be made. Test which transactions would be hit by the rule group. No changes will be made. Limit the result if you want to.
418 419 420 421 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 418 def test_rule_group(id, opts = {}) data, _status_code, _headers = test_rule_group_with_http_info(id, opts) data end |
#test_rule_group_with_http_info(id, opts = {}) ⇒ Array<(TransactionArray, Integer, Hash)>
Test which transactions would be hit by the rule group. No changes will be made. Test which transactions would be hit by the rule group. No changes will be made. Limit the result if you want to.
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 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 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 434 def test_rule_group_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RuleGroupsApi.test_rule_group ...' 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 RuleGroupsApi.test_rule_group" end # resource path local_var_path = '/api/v1/rule_groups/{id}/test'.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[:'start'] = opts[:'start'] if !opts[:'start'].nil? query_params[:'end'] = opts[:'_end'] if !opts[:'_end'].nil? query_params[:'search_limit'] = opts[:'search_limit'] if !opts[:'search_limit'].nil? query_params[:'triggered_limit'] = opts[:'triggered_limit'] if !opts[:'triggered_limit'].nil? query_params[:'accounts'] = opts[:'accounts'] if !opts[:'accounts'].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 => :"RuleGroupsApi.test_rule_group", :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: RuleGroupsApi#test_rule_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_rule_group(id, rule_group, opts = {}) ⇒ RuleGroupSingle
Update existing rule group. Update existing rule group.
494 495 496 497 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 494 def update_rule_group(id, rule_group, opts = {}) data, _status_code, _headers = update_rule_group_with_http_info(id, rule_group, opts) data end |
#update_rule_group_with_http_info(id, rule_group, opts = {}) ⇒ Array<(RuleGroupSingle, Integer, Hash)>
Update existing rule group. Update existing rule group.
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 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 |
# File 'lib/firefly_iii_client/api/rule_groups_api.rb', line 505 def update_rule_group_with_http_info(id, rule_group, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RuleGroupsApi.update_rule_group ...' 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 RuleGroupsApi.update_rule_group" end # verify the required parameter 'rule_group' is set if @api_client.config.client_side_validation && rule_group.nil? fail ArgumentError, "Missing the required parameter 'rule_group' when calling RuleGroupsApi.update_rule_group" end # resource path local_var_path = '/api/v1/rule_groups/{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(rule_group) # return_type return_type = opts[:debug_return_type] || 'RuleGroupSingle' # auth_names auth_names = opts[:debug_auth_names] || ['firefly_iii_auth'] = opts.merge( :operation => :"RuleGroupsApi.update_rule_group", :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: RuleGroupsApi#update_rule_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |