Class: TripletexRubyClient::InvoiceApi
- Inherits:
-
Object
- Object
- TripletexRubyClient::InvoiceApi
- Defined in:
- lib/tripletex_ruby_client/api/invoice_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_credit_note(id, date, opts = {}) ⇒ ResponseWrapperInvoice
Creates a new Invoice representing a credit memo that nullifies the given invoice.
-
#create_credit_note_with_http_info(id, date, opts = {}) ⇒ Array<(ResponseWrapperInvoice, Fixnum, Hash)>
Creates a new Invoice representing a credit memo that nullifies the given invoice.
-
#create_reminder(id, type, date, dispatch_type, opts = {}) ⇒ nil
Create invoice reminder and sends it by the given dispatch type.
-
#create_reminder_with_http_info(id, type, date, dispatch_type, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create invoice reminder and sends it by the given dispatch type.
-
#download_pdf(invoice_id, opts = {}) ⇒ String
Get invoice document by invoice ID.
-
#download_pdf_with_http_info(invoice_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get invoice document by invoice ID.
-
#get(id, opts = {}) ⇒ ResponseWrapperInvoice
Get invoice by ID.
-
#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperInvoice, Fixnum, Hash)>
Get invoice by ID.
-
#initialize(api_client = ApiClient.default) ⇒ InvoiceApi
constructor
A new instance of InvoiceApi.
-
#payment(id, payment_date, payment_type_id, paid_amount, opts = {}) ⇒ ResponseWrapperInvoice
Update invoice.
-
#payment_with_http_info(id, payment_date, payment_type_id, paid_amount, opts = {}) ⇒ Array<(ResponseWrapperInvoice, Fixnum, Hash)>
Update invoice.
-
#post(opts = {}) ⇒ ResponseWrapperInvoice
Create invoice.
-
#post_list(opts = {}) ⇒ ListResponseInvoice
- BETA
-
Create multiple invoices.
-
#post_list_with_http_info(opts = {}) ⇒ Array<(ListResponseInvoice, Fixnum, Hash)>
- BETA
-
Create multiple invoices.
-
#post_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperInvoice, Fixnum, Hash)>
Create invoice.
-
#search(invoice_date_from, invoice_date_to, opts = {}) ⇒ ListResponseInvoice
Find invoices corresponding with sent data.
-
#search_with_http_info(invoice_date_from, invoice_date_to, opts = {}) ⇒ Array<(ListResponseInvoice, Fixnum, Hash)>
Find invoices corresponding with sent data.
-
#send(id, send_type, opts = {}) ⇒ nil
Send invoice by ID and sendType.
-
#send_with_http_info(id, send_type, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Send invoice by ID and sendType.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ InvoiceApi
Returns a new instance of InvoiceApi.
19 20 21 |
# File 'lib/tripletex_ruby_client/api/invoice_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/tripletex_ruby_client/api/invoice_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_credit_note(id, date, opts = {}) ⇒ ResponseWrapperInvoice
Creates a new Invoice representing a credit memo that nullifies the given invoice. Updates this invoice and any pre-existing inverse invoice.
31 32 33 34 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 31 def create_credit_note(id, date, opts = {}) data, _status_code, _headers = create_credit_note_with_http_info(id, date, opts) data end |
#create_credit_note_with_http_info(id, date, opts = {}) ⇒ Array<(ResponseWrapperInvoice, Fixnum, Hash)>
Creates a new Invoice representing a credit memo that nullifies the given invoice. Updates this invoice and any pre-existing inverse invoice.
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 86 87 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 45 def create_credit_note_with_http_info(id, date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoiceApi.create_credit_note ...' 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 InvoiceApi.create_credit_note" end # verify the required parameter 'date' is set if @api_client.config.client_side_validation && date.nil? fail ArgumentError, "Missing the required parameter 'date' when calling InvoiceApi.create_credit_note" end # resource path local_var_path = '/invoice/{id}/:createCreditNote'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'date'] = date query_params[:'comment'] = opts[:'comment'] if !opts[:'comment'].nil? query_params[:'creditNoteEmail'] = opts[:'credit_note_email'] if !opts[:'credit_note_email'].nil? query_params[:'sendToCustomer'] = opts[:'send_to_customer'] if !opts[:'send_to_customer'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseWrapperInvoice') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoiceApi#create_credit_note\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_reminder(id, type, date, dispatch_type, opts = {}) ⇒ nil
Create invoice reminder and sends it by the given dispatch type. Supports the reminder types SOFT_REMINDER, REMINDER and NOTICE_OF_DEBT_COLLECTION. DispatchType NETS_PRINT must have type NOTICE_OF_DEBT_COLLECTION. SMS and NETS_PRINT must be activated prior to usage in the API.
99 100 101 102 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 99 def create_reminder(id, type, date, dispatch_type, opts = {}) create_reminder_with_http_info(id, type, date, dispatch_type, opts) nil end |
#create_reminder_with_http_info(id, type, date, dispatch_type, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Create invoice reminder and sends it by the given dispatch type. Supports the reminder types SOFT_REMINDER, REMINDER and NOTICE_OF_DEBT_COLLECTION. DispatchType NETS_PRINT must have type NOTICE_OF_DEBT_COLLECTION. SMS and NETS_PRINT must be activated prior to usage in the API.
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 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 115 def create_reminder_with_http_info(id, type, date, dispatch_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoiceApi.create_reminder ...' 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 InvoiceApi.create_reminder" end # verify the required parameter 'type' is set if @api_client.config.client_side_validation && type.nil? fail ArgumentError, "Missing the required parameter 'type' when calling InvoiceApi.create_reminder" end # verify enum value if @api_client.config.client_side_validation && !['SOFT_REMINDER', 'REMINDER', 'NOTICE_OF_DEBT_COLLECTION', 'DEBT_COLLECTION'].include?(type) fail ArgumentError, "invalid value for 'type', must be one of SOFT_REMINDER, REMINDER, NOTICE_OF_DEBT_COLLECTION, DEBT_COLLECTION" end # verify the required parameter 'date' is set if @api_client.config.client_side_validation && date.nil? fail ArgumentError, "Missing the required parameter 'date' when calling InvoiceApi.create_reminder" end # verify the required parameter 'dispatch_type' is set if @api_client.config.client_side_validation && dispatch_type.nil? fail ArgumentError, "Missing the required parameter 'dispatch_type' when calling InvoiceApi.create_reminder" end # verify enum value if @api_client.config.client_side_validation && !['NETS_PRINT', 'EMAIL', 'SMS'].include?(dispatch_type) fail ArgumentError, "invalid value for 'dispatch_type', must be one of NETS_PRINT, EMAIL, SMS" end # resource path local_var_path = '/invoice/{id}/:createReminder'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'type'] = type query_params[:'date'] = date query_params[:'dispatchType'] = dispatch_type query_params[:'includeCharge'] = opts[:'include_charge'] if !opts[:'include_charge'].nil? query_params[:'includeInterest'] = opts[:'include_interest'] if !opts[:'include_interest'].nil? query_params[:'smsNumber'] = opts[:'sms_number'] if !opts[:'sms_number'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoiceApi#create_reminder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#download_pdf(invoice_id, opts = {}) ⇒ String
Get invoice document by invoice ID.
181 182 183 184 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 181 def download_pdf(invoice_id, opts = {}) data, _status_code, _headers = download_pdf_with_http_info(invoice_id, opts) data end |
#download_pdf_with_http_info(invoice_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get invoice document by invoice ID.
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 220 221 222 223 224 225 226 227 228 229 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 192 def download_pdf_with_http_info(invoice_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoiceApi.download_pdf ...' 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 InvoiceApi.download_pdf" end # resource path local_var_path = '/invoice/{invoiceId}/pdf'.sub('{' + 'invoiceId' + '}', invoice_id.to_s) # query parameters query_params = {} query_params[:'download'] = opts[:'download'] if !opts[:'download'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoiceApi#download_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get(id, opts = {}) ⇒ ResponseWrapperInvoice
Get invoice by ID.
236 237 238 239 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 236 def get(id, opts = {}) data, _status_code, _headers = get_with_http_info(id, opts) data end |
#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperInvoice, Fixnum, Hash)>
Get invoice by ID.
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 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 247 def get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoiceApi.get ...' 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 InvoiceApi.get" end # resource path local_var_path = '/invoice/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseWrapperInvoice') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoiceApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#payment(id, payment_date, payment_type_id, paid_amount, opts = {}) ⇒ ResponseWrapperInvoice
Update invoice. The invoice is updated with payment information. The amount is in the invoice’s currency.
292 293 294 295 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 292 def payment(id, payment_date, payment_type_id, paid_amount, opts = {}) data, _status_code, _headers = payment_with_http_info(id, payment_date, payment_type_id, paid_amount, opts) data end |
#payment_with_http_info(id, payment_date, payment_type_id, paid_amount, opts = {}) ⇒ Array<(ResponseWrapperInvoice, Fixnum, Hash)>
Update invoice. The invoice is updated with payment information. The amount is in the invoice’s currency.
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 351 352 353 354 355 356 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 306 def payment_with_http_info(id, payment_date, payment_type_id, paid_amount, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoiceApi.payment ...' 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 InvoiceApi.payment" end # verify the required parameter 'payment_date' is set if @api_client.config.client_side_validation && payment_date.nil? fail ArgumentError, "Missing the required parameter 'payment_date' when calling InvoiceApi.payment" end # verify the required parameter 'payment_type_id' is set if @api_client.config.client_side_validation && payment_type_id.nil? fail ArgumentError, "Missing the required parameter 'payment_type_id' when calling InvoiceApi.payment" end # verify the required parameter 'paid_amount' is set if @api_client.config.client_side_validation && paid_amount.nil? fail ArgumentError, "Missing the required parameter 'paid_amount' when calling InvoiceApi.payment" end # resource path local_var_path = '/invoice/{id}/:payment'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'paymentDate'] = payment_date query_params[:'paymentTypeId'] = payment_type_id query_params[:'paidAmount'] = paid_amount query_params[:'paidAmountCurrency'] = opts[:'paid_amount_currency'] if !opts[:'paid_amount_currency'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseWrapperInvoice') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoiceApi#payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post(opts = {}) ⇒ ResponseWrapperInvoice
Create invoice. Related Order and OrderLines can be created first, or included as new objects inside the Invoice.
365 366 367 368 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 365 def post(opts = {}) data, _status_code, _headers = post_with_http_info(opts) data end |
#post_list(opts = {}) ⇒ ListResponseInvoice
- BETA
-
Create multiple invoices. Max 100 at a time.
421 422 423 424 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 421 def post_list(opts = {}) data, _status_code, _headers = post_list_with_http_info(opts) data end |
#post_list_with_http_info(opts = {}) ⇒ Array<(ListResponseInvoice, Fixnum, Hash)>
- BETA
-
Create multiple invoices. Max 100 at a time.
433 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 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 433 def post_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoiceApi.post_list ...' end # resource path local_var_path = '/invoice/list' # query parameters query_params = {} query_params[:'sendToCustomer'] = opts[:'send_to_customer'] if !opts[:'send_to_customer'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ListResponseInvoice') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoiceApi#post_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperInvoice, Fixnum, Hash)>
Create invoice. Related Order and OrderLines can be created first, or included as new objects inside the Invoice.
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 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 378 def post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoiceApi.post ...' end # resource path local_var_path = '/invoice' # query parameters query_params = {} query_params[:'sendToCustomer'] = opts[:'send_to_customer'] if !opts[:'send_to_customer'].nil? query_params[:'paymentTypeId'] = opts[:'payment_type_id'] if !opts[:'payment_type_id'].nil? query_params[:'paidAmount'] = opts[:'paid_amount'] if !opts[:'paid_amount'].nil? # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=utf-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseWrapperInvoice') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoiceApi#post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search(invoice_date_from, invoice_date_to, opts = {}) ⇒ ListResponseInvoice
Find invoices corresponding with sent data. Includes charged outgoing invoices only.
483 484 485 486 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 483 def search(invoice_date_from, invoice_date_to, opts = {}) data, _status_code, _headers = search_with_http_info(invoice_date_from, invoice_date_to, opts) data end |
#search_with_http_info(invoice_date_from, invoice_date_to, opts = {}) ⇒ Array<(ListResponseInvoice, Fixnum, Hash)>
Find invoices corresponding with sent data. Includes charged outgoing invoices only.
503 504 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 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 503 def search_with_http_info(invoice_date_from, invoice_date_to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoiceApi.search ...' end # verify the required parameter 'invoice_date_from' is set if @api_client.config.client_side_validation && invoice_date_from.nil? fail ArgumentError, "Missing the required parameter 'invoice_date_from' when calling InvoiceApi.search" end # verify the required parameter 'invoice_date_to' is set if @api_client.config.client_side_validation && invoice_date_to.nil? fail ArgumentError, "Missing the required parameter 'invoice_date_to' when calling InvoiceApi.search" end # resource path local_var_path = '/invoice' # query parameters query_params = {} query_params[:'invoiceDateFrom'] = invoice_date_from query_params[:'invoiceDateTo'] = invoice_date_to query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil? query_params[:'invoiceNumber'] = opts[:'invoice_number'] if !opts[:'invoice_number'].nil? query_params[:'kid'] = opts[:'kid'] if !opts[:'kid'].nil? query_params[:'voucherId'] = opts[:'voucher_id'] if !opts[:'voucher_id'].nil? query_params[:'customerId'] = opts[:'customer_id'] if !opts[:'customer_id'].nil? query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'sorting'] = opts[:'sorting'] if !opts[:'sorting'].nil? query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ListResponseInvoice') if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoiceApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send(id, send_type, opts = {}) ⇒ nil
Send invoice by ID and sendType. Optionally override email recipient.
560 561 562 563 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 560 def send(id, send_type, opts = {}) send_with_http_info(id, send_type, opts) nil end |
#send_with_http_info(id, send_type, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Send invoice by ID and sendType. Optionally override email recipient.
572 573 574 575 576 577 578 579 580 581 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 |
# File 'lib/tripletex_ruby_client/api/invoice_api.rb', line 572 def send_with_http_info(id, send_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: InvoiceApi.send ...' 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 InvoiceApi.send" end # verify the required parameter 'send_type' is set if @api_client.config.client_side_validation && send_type.nil? fail ArgumentError, "Missing the required parameter 'send_type' when calling InvoiceApi.send" end # verify enum value if @api_client.config.client_side_validation && !['EMAIL', 'EHF', 'AVTALEGIRO', 'EFAKTURA', 'VIPPS', 'PAPER', 'MANUAL'].include?(send_type) fail ArgumentError, "invalid value for 'send_type', must be one of EMAIL, EHF, AVTALEGIRO, EFAKTURA, VIPPS, PAPER, MANUAL" end # resource path local_var_path = '/invoice/{id}/:send'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'sendType'] = send_type query_params[:'overrideEmailAddress'] = opts[:'override_email_address'] if !opts[:'override_email_address'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: InvoiceApi#send\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |