Class: TogaiClient::InvoicesApi
- Inherits:
-
Object
- Object
- TogaiClient::InvoicesApi
- Defined in:
- lib/togai_client/api/invoices_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_custom_invoice(opts = {}) ⇒ Invoice
Create a custom invoice for an account Create a custom invoice for an account.
-
#create_custom_invoice_with_http_info(opts = {}) ⇒ Array<(Invoice, Integer, Hash)>
Create a custom invoice for an account Create a custom invoice for an account.
-
#create_invoice_bill_run(opts = {}) ⇒ BaseSuccessResponse
Create a bill run job request Create a bill run job request.
-
#create_invoice_bill_run_with_http_info(opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Create a bill run job request Create a bill run job request.
-
#delete_custom_invoice(invoice_id, opts = {}) ⇒ BaseSuccessResponse
Delete a custom invoice in DRAFT state Delete a custom invoice in DRAFT state.
-
#delete_custom_invoice_with_http_info(invoice_id, opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Delete a custom invoice in DRAFT state Delete a custom invoice in DRAFT state.
-
#get_invoice(invoice_id, opts = {}) ⇒ Invoice
Get an invoice Get invoice.
-
#get_invoice_with_http_info(invoice_id, opts = {}) ⇒ Array<(Invoice, Integer, Hash)>
Get an invoice Get invoice.
-
#initialize(api_client = ApiClient.default) ⇒ InvoicesApi
constructor
A new instance of InvoicesApi.
-
#list_invoices(opts = {}) ⇒ ListInvoicesResponse
List invoices List invoices.
-
#list_invoices_for_bill_run(opts = {}) ⇒ ListInvoicesResponse
List invoices eligible for bill run List invoices eligible for bill run.
-
#list_invoices_for_bill_run_with_http_info(opts = {}) ⇒ Array<(ListInvoicesResponse, Integer, Hash)>
List invoices eligible for bill run List invoices eligible for bill run.
-
#list_invoices_with_http_info(opts = {}) ⇒ Array<(ListInvoicesResponse, Integer, Hash)>
List invoices List invoices.
-
#list_pricing_rule_logs(invoice_id, opts = {}) ⇒ PricingRulesLogsPaginatedResponse
List pricing rule logs List pricing rule logs.
-
#list_pricing_rule_logs_with_http_info(invoice_id, opts = {}) ⇒ Array<(PricingRulesLogsPaginatedResponse, Integer, Hash)>
List pricing rule logs List pricing rule logs.
-
#manage_miscellaneous_charges_in_account(account_id, opts = {}) ⇒ MiscellaneousChargesResponse
Add or update miscellaneous charges in upcoming Invoice for a account Add or update miscellaneous charges in upcoming Invoice for a account.
-
#manage_miscellaneous_charges_in_account_with_http_info(account_id, opts = {}) ⇒ Array<(MiscellaneousChargesResponse, Integer, Hash)>
Add or update miscellaneous charges in upcoming Invoice for a account Add or update miscellaneous charges in upcoming Invoice for a account.
-
#manage_miscellaneous_charges_in_invoice(invoice_id, opts = {}) ⇒ MiscellaneousChargesResponse
Add or update miscellaneous charges in Invoice Add or update miscellaneous charges in Invoice.
-
#manage_miscellaneous_charges_in_invoice_with_http_info(invoice_id, opts = {}) ⇒ Array<(MiscellaneousChargesResponse, Integer, Hash)>
Add or update miscellaneous charges in Invoice Add or update miscellaneous charges in Invoice.
-
#update_invoice(invoice_id, opts = {}) ⇒ Invoice
Update an invoice Update an invoice[Only CUSTOM invoices in DRAFT state support updating of all fields].
-
#update_invoice_with_http_info(invoice_id, opts = {}) ⇒ Array<(Invoice, Integer, Hash)>
Update an invoice Update an invoice[Only CUSTOM invoices in DRAFT state support updating of all fields].
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ InvoicesApi
Returns a new instance of InvoicesApi.
19 20 21 |
# File 'lib/togai_client/api/invoices_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/togai_client/api/invoices_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_custom_invoice(opts = {}) ⇒ Invoice
Create a custom invoice for an account Create a custom invoice for an account.
27 28 29 30 |
# File 'lib/togai_client/api/invoices_api.rb', line 27 def create_custom_invoice(opts = {}) data, _status_code, _headers = create_custom_invoice_with_http_info(opts) data end |
#create_custom_invoice_with_http_info(opts = {}) ⇒ Array<(Invoice, Integer, Hash)>
Create a custom invoice for an account Create a custom invoice for an account.
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 |
# File 'lib/togai_client/api/invoices_api.rb', line 37 def create_custom_invoice_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoicesApi.create_custom_invoice ...' end # resource path local_var_path = '/invoices' # 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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_custom_invoice_request']) # return_type return_type = opts[:debug_return_type] || 'Invoice' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InvoicesApi.create_custom_invoice", :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: InvoicesApi#create_custom_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_invoice_bill_run(opts = {}) ⇒ BaseSuccessResponse
Create a bill run job request Create a bill run job request
91 92 93 94 |
# File 'lib/togai_client/api/invoices_api.rb', line 91 def create_invoice_bill_run(opts = {}) data, _status_code, _headers = create_invoice_bill_run_with_http_info(opts) data end |
#create_invoice_bill_run_with_http_info(opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Create a bill run job request Create a bill run job request
101 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 |
# File 'lib/togai_client/api/invoices_api.rb', line 101 def create_invoice_bill_run_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoicesApi.create_invoice_bill_run ...' end # resource path local_var_path = '/invoices/bill_runs' # query parameters query_params = opts[:query_params] || {} query_params[:'require_confirmation'] = opts[:'require_confirmation'] if !opts[:'require_confirmation'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BaseSuccessResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InvoicesApi.create_invoice_bill_run", :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: InvoicesApi#create_invoice_bill_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_custom_invoice(invoice_id, opts = {}) ⇒ BaseSuccessResponse
Delete a custom invoice in DRAFT state Delete a custom invoice in DRAFT state.
151 152 153 154 |
# File 'lib/togai_client/api/invoices_api.rb', line 151 def delete_custom_invoice(invoice_id, opts = {}) data, _status_code, _headers = delete_custom_invoice_with_http_info(invoice_id, opts) data end |
#delete_custom_invoice_with_http_info(invoice_id, opts = {}) ⇒ Array<(BaseSuccessResponse, Integer, Hash)>
Delete a custom invoice in DRAFT state Delete a custom invoice in DRAFT state.
161 162 163 164 165 166 167 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 |
# File 'lib/togai_client/api/invoices_api.rb', line 161 def delete_custom_invoice_with_http_info(invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoicesApi.delete_custom_invoice ...' end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.delete_custom_invoice" end # resource path local_var_path = '/invoices/{invoice_id}'.sub('{' + 'invoice_id' + '}', CGI.escape(invoice_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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BaseSuccessResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InvoicesApi.delete_custom_invoice", :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: InvoicesApi#delete_custom_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_invoice(invoice_id, opts = {}) ⇒ Invoice
Get an invoice Get invoice
214 215 216 217 |
# File 'lib/togai_client/api/invoices_api.rb', line 214 def get_invoice(invoice_id, opts = {}) data, _status_code, _headers = get_invoice_with_http_info(invoice_id, opts) data end |
#get_invoice_with_http_info(invoice_id, opts = {}) ⇒ Array<(Invoice, Integer, Hash)>
Get an invoice Get invoice
224 225 226 227 228 229 230 231 232 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 |
# File 'lib/togai_client/api/invoices_api.rb', line 224 def get_invoice_with_http_info(invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoicesApi.get_invoice ...' end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.get_invoice" end # resource path local_var_path = '/invoices/{invoice_id}'.sub('{' + 'invoice_id' + '}', CGI.escape(invoice_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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Invoice' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InvoicesApi.get_invoice", :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: InvoicesApi#get_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_invoices(opts = {}) ⇒ ListInvoicesResponse
List invoices List invoices
283 284 285 286 |
# File 'lib/togai_client/api/invoices_api.rb', line 283 def list_invoices(opts = {}) data, _status_code, _headers = list_invoices_with_http_info(opts) data end |
#list_invoices_for_bill_run(opts = {}) ⇒ ListInvoicesResponse
List invoices eligible for bill run List invoices eligible for bill run
361 362 363 364 |
# File 'lib/togai_client/api/invoices_api.rb', line 361 def list_invoices_for_bill_run(opts = {}) data, _status_code, _headers = list_invoices_for_bill_run_with_http_info(opts) data end |
#list_invoices_for_bill_run_with_http_info(opts = {}) ⇒ Array<(ListInvoicesResponse, Integer, Hash)>
List invoices eligible for bill run List invoices eligible for bill run
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 424 425 426 |
# File 'lib/togai_client/api/invoices_api.rb', line 377 def list_invoices_for_bill_run_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoicesApi.list_invoices_for_bill_run ...' end # resource path local_var_path = '/invoices/bill_runs' # query parameters query_params = opts[:query_params] || {} query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'owner_id'] = opts[:'owner_id'] if !opts[:'owner_id'].nil? query_params[:'customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListInvoicesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InvoicesApi.list_invoices_for_bill_run", :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: InvoicesApi#list_invoices_for_bill_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_invoices_with_http_info(opts = {}) ⇒ Array<(ListInvoicesResponse, Integer, Hash)>
List invoices List invoices
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 341 342 343 344 345 346 347 348 |
# File 'lib/togai_client/api/invoices_api.rb', line 299 def list_invoices_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoicesApi.list_invoices ...' end # resource path local_var_path = '/invoices' # query parameters query_params = opts[:query_params] || {} query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'owner_id'] = opts[:'owner_id'] if !opts[:'owner_id'].nil? query_params[:'customer_id'] = opts[:'customer_id'] if !opts[:'customer_id'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'start_time'] = opts[:'start_time'] if !opts[:'start_time'].nil? query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ListInvoicesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InvoicesApi.list_invoices", :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: InvoicesApi#list_invoices\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_pricing_rule_logs(invoice_id, opts = {}) ⇒ PricingRulesLogsPaginatedResponse
List pricing rule logs List pricing rule logs
433 434 435 436 |
# File 'lib/togai_client/api/invoices_api.rb', line 433 def list_pricing_rule_logs(invoice_id, opts = {}) data, _status_code, _headers = list_pricing_rule_logs_with_http_info(invoice_id, opts) data end |
#list_pricing_rule_logs_with_http_info(invoice_id, opts = {}) ⇒ Array<(PricingRulesLogsPaginatedResponse, Integer, Hash)>
List pricing rule logs List pricing rule logs
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 487 488 489 |
# File 'lib/togai_client/api/invoices_api.rb', line 443 def list_pricing_rule_logs_with_http_info(invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoicesApi.list_pricing_rule_logs ...' end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.list_pricing_rule_logs" end # resource path local_var_path = '/invoice/{invoice_id}/pricing_rules_logs'.sub('{' + 'invoice_id' + '}', CGI.escape(invoice_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']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PricingRulesLogsPaginatedResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InvoicesApi.list_pricing_rule_logs", :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: InvoicesApi#list_pricing_rule_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#manage_miscellaneous_charges_in_account(account_id, opts = {}) ⇒ MiscellaneousChargesResponse
Add or update miscellaneous charges in upcoming Invoice for a account Add or update miscellaneous charges in upcoming Invoice for a account
497 498 499 500 |
# File 'lib/togai_client/api/invoices_api.rb', line 497 def manage_miscellaneous_charges_in_account(account_id, opts = {}) data, _status_code, _headers = manage_miscellaneous_charges_in_account_with_http_info(account_id, opts) data end |
#manage_miscellaneous_charges_in_account_with_http_info(account_id, opts = {}) ⇒ Array<(MiscellaneousChargesResponse, Integer, Hash)>
Add or update miscellaneous charges in upcoming Invoice for a account Add or update miscellaneous charges in upcoming Invoice for a account
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 558 559 560 561 562 563 |
# File 'lib/togai_client/api/invoices_api.rb', line 508 def manage_miscellaneous_charges_in_account_with_http_info(account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoicesApi.manage_miscellaneous_charges_in_account ...' end # verify the required parameter 'account_id' is set if @api_client.config.client_side_validation && account_id.nil? fail ArgumentError, "Missing the required parameter 'account_id' when calling InvoicesApi.manage_miscellaneous_charges_in_account" end if @api_client.config.client_side_validation && account_id.to_s.length > 50 fail ArgumentError, 'invalid value for "account_id" when calling InvoicesApi.manage_miscellaneous_charges_in_account, the character length must be smaller than or equal to 50.' end # resource path local_var_path = '/accounts/{account_id}/miscellaneous_charges'.sub('{' + 'account_id' + '}', CGI.escape(account_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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'manage_miscellaneous_charges_request']) # return_type return_type = opts[:debug_return_type] || 'MiscellaneousChargesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InvoicesApi.manage_miscellaneous_charges_in_account", :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: InvoicesApi#manage_miscellaneous_charges_in_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#manage_miscellaneous_charges_in_invoice(invoice_id, opts = {}) ⇒ MiscellaneousChargesResponse
Add or update miscellaneous charges in Invoice Add or update miscellaneous charges in Invoice
571 572 573 574 |
# File 'lib/togai_client/api/invoices_api.rb', line 571 def manage_miscellaneous_charges_in_invoice(invoice_id, opts = {}) data, _status_code, _headers = manage_miscellaneous_charges_in_invoice_with_http_info(invoice_id, opts) data end |
#manage_miscellaneous_charges_in_invoice_with_http_info(invoice_id, opts = {}) ⇒ Array<(MiscellaneousChargesResponse, Integer, Hash)>
Add or update miscellaneous charges in Invoice Add or update miscellaneous charges in Invoice
582 583 584 585 586 587 588 589 590 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 |
# File 'lib/togai_client/api/invoices_api.rb', line 582 def manage_miscellaneous_charges_in_invoice_with_http_info(invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoicesApi.manage_miscellaneous_charges_in_invoice ...' end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.manage_miscellaneous_charges_in_invoice" end # resource path local_var_path = '/invoices/{invoice_id}/miscellaneous_charges'.sub('{' + 'invoice_id' + '}', CGI.escape(invoice_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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'manage_miscellaneous_charges_request']) # return_type return_type = opts[:debug_return_type] || 'MiscellaneousChargesResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InvoicesApi.manage_miscellaneous_charges_in_invoice", :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: InvoicesApi#manage_miscellaneous_charges_in_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_invoice(invoice_id, opts = {}) ⇒ Invoice
Update an invoice Update an invoice[Only CUSTOM invoices in DRAFT state support updating of all fields]. Updating status can be done for all invoice.
641 642 643 644 |
# File 'lib/togai_client/api/invoices_api.rb', line 641 def update_invoice(invoice_id, opts = {}) data, _status_code, _headers = update_invoice_with_http_info(invoice_id, opts) data end |
#update_invoice_with_http_info(invoice_id, opts = {}) ⇒ Array<(Invoice, Integer, Hash)>
Update an invoice Update an invoice[Only CUSTOM invoices in DRAFT state support updating of all fields]. Updating status can be done for all invoice.
652 653 654 655 656 657 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 |
# File 'lib/togai_client/api/invoices_api.rb', line 652 def update_invoice_with_http_info(invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoicesApi.update_invoice ...' end # verify the required parameter 'invoice_id' is set if @api_client.config.client_side_validation && invoice_id.nil? fail ArgumentError, "Missing the required parameter 'invoice_id' when calling InvoicesApi.update_invoice" end # resource path local_var_path = '/invoices/{invoice_id}'.sub('{' + 'invoice_id' + '}', CGI.escape(invoice_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']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'update_invoice_request']) # return_type return_type = opts[:debug_return_type] || 'Invoice' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"InvoicesApi.update_invoice", :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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoicesApi#update_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |