Class: TripletexRubyClient::LedgervoucherApi
- Inherits:
-
Object
- Object
- TripletexRubyClient::LedgervoucherApi
- Defined in:
- lib/tripletex_ruby_client/api/ledgervoucher_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete(id, opts = {}) ⇒ nil
- BETA
-
Delete voucher by ID.
-
#delete_attachment(voucher_id, opts = {}) ⇒ nil
- BETA
-
Delete attachment.
-
#delete_attachment_with_http_info(voucher_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- BETA
-
Delete attachment.
-
#delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- BETA
-
Delete voucher by ID.
-
#download_pdf(voucher_id, opts = {}) ⇒ String
Get PDF representation of voucher by ID.
-
#download_pdf_with_http_info(voucher_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get PDF representation of voucher by ID.
-
#external_voucher_number(opts = {}) ⇒ ListResponseVoucher
- BETA
-
Find vouchers based on the external voucher number.
-
#external_voucher_number_with_http_info(opts = {}) ⇒ Array<(ListResponseVoucher, Fixnum, Hash)>
- BETA
-
Find vouchers based on the external voucher number.
-
#get(id, opts = {}) ⇒ ResponseWrapperVoucher
Get voucher by ID.
-
#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
Get voucher by ID.
-
#import_document(file, opts = {}) ⇒ ListResponseVoucher
- BETA
-
Upload a document to create one or more vouchers.
-
#import_document_with_http_info(file, opts = {}) ⇒ Array<(ListResponseVoucher, Fixnum, Hash)>
- BETA
-
Upload a document to create one or more vouchers.
-
#import_gbat10(generate_vat_postings, file, opts = {}) ⇒ nil
Import GBAT10.
-
#import_gbat10_with_http_info(generate_vat_postings, file, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Import GBAT10.
-
#initialize(api_client = ApiClient.default) ⇒ LedgervoucherApi
constructor
A new instance of LedgervoucherApi.
-
#non_posted(include_non_approved, opts = {}) ⇒ ListResponseVoucher
- BETA
-
Find non-posted vouchers.
-
#non_posted_with_http_info(include_non_approved, opts = {}) ⇒ Array<(ListResponseVoucher, Fixnum, Hash)>
- BETA
-
Find non-posted vouchers.
-
#options(id, opts = {}) ⇒ ResponseWrapperVoucherOptions
- BETA
-
Returns a data structure containing meta information about operations that are available for this voucher.
-
#options_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperVoucherOptions, Fixnum, Hash)>
- BETA
-
Returns a data structure containing meta information about operations that are available for this voucher.
-
#post(opts = {}) ⇒ ResponseWrapperVoucher
Add new voucher.
-
#post_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
Add new voucher.
-
#put(id, opts = {}) ⇒ ResponseWrapperVoucher
- BETA
-
Update voucher.
-
#put_list(opts = {}) ⇒ ListResponseVoucher
- BETA
-
Update multiple vouchers.
-
#put_list_with_http_info(opts = {}) ⇒ Array<(ListResponseVoucher, Fixnum, Hash)>
- BETA
-
Update multiple vouchers.
-
#put_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
- BETA
-
Update voucher.
-
#reverse(id, date, opts = {}) ⇒ ResponseWrapperVoucher
Reverses the voucher, and returns the reversed voucher.
-
#reverse_with_http_info(id, date, opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
Reverses the voucher, and returns the reversed voucher.
-
#search(date_from, date_to, opts = {}) ⇒ VoucherSearchResponse
Find vouchers corresponding with sent data.
-
#search_with_http_info(date_from, date_to, opts = {}) ⇒ Array<(VoucherSearchResponse, Fixnum, Hash)>
Find vouchers corresponding with sent data.
-
#send_to_inbox(id, opts = {}) ⇒ ResponseWrapperVoucher
- BETA
-
Send voucher to inbox.
-
#send_to_inbox_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
- BETA
-
Send voucher to inbox.
-
#send_to_ledger(id, opts = {}) ⇒ ResponseWrapperVoucher
- BETA
-
Send voucher to ledger.
-
#send_to_ledger_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
- BETA
-
Send voucher to ledger.
-
#upload_attachment(voucher_id, file, opts = {}) ⇒ nil
Upload attachment to voucher.
-
#upload_attachment_with_http_info(voucher_id, file, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Upload attachment to voucher.
-
#upload_pdf(voucher_id, file_name, file, opts = {}) ⇒ nil
- DEPRECATED
-
Use POST ledger/voucher/voucherId/attachment instead.
-
#upload_pdf_with_http_info(voucher_id, file_name, file, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- DEPRECATED
-
Use POST ledger/voucher/voucherId/attachment instead.
-
#voucher_reception(opts = {}) ⇒ ListResponseVoucher
Find vouchers in voucher reception.
-
#voucher_reception_with_http_info(opts = {}) ⇒ Array<(ListResponseVoucher, Fixnum, Hash)>
Find vouchers in voucher reception.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ LedgervoucherApi
Returns a new instance of LedgervoucherApi.
19 20 21 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_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/ledgervoucher_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete(id, opts = {}) ⇒ nil
- BETA
-
Delete voucher by ID.
27 28 29 30 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 27 def delete(id, opts = {}) delete_with_http_info(id, opts) nil end |
#delete_attachment(voucher_id, opts = {}) ⇒ nil
- BETA
-
Delete attachment.
79 80 81 82 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 79 def (voucher_id, opts = {}) (voucher_id, opts) nil end |
#delete_attachment_with_http_info(voucher_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- BETA
-
Delete attachment.
92 93 94 95 96 97 98 99 100 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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 92 def (voucher_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.delete_attachment ...' end # verify the required parameter 'voucher_id' is set if @api_client.config.client_side_validation && voucher_id.nil? fail ArgumentError, "Missing the required parameter 'voucher_id' when calling LedgervoucherApi.delete_attachment" end if @api_client.config.client_side_validation && !opts[:'version'].nil? && opts[:'version'] < 0 fail ArgumentError, 'invalid value for "opts[:"version"]" when calling LedgervoucherApi.delete_attachment, must be greater than or equal to 0.' end # resource path local_var_path = '/ledger/voucher/{voucherId}/attachment'.sub('{' + 'voucherId' + '}', voucher_id.to_s) # query parameters query_params = {} query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil? query_params[:'sendToInbox'] = opts[:'send_to_inbox'] if !opts[:'send_to_inbox'].nil? query_params[:'split'] = opts[:'split'] if !opts[:'split'].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(:DELETE, 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: LedgervoucherApi#delete_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- BETA
-
Delete voucher by ID.
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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 37 def delete_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.delete ...' 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 LedgervoucherApi.delete" end # resource path local_var_path = '/ledger/voucher/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # 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(:DELETE, 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: LedgervoucherApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#download_pdf(voucher_id, opts = {}) ⇒ String
Get PDF representation of voucher by ID.
139 140 141 142 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 139 def download_pdf(voucher_id, opts = {}) data, _status_code, _headers = download_pdf_with_http_info(voucher_id, opts) data end |
#download_pdf_with_http_info(voucher_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get PDF representation of voucher by ID.
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 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 150 def download_pdf_with_http_info(voucher_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.download_pdf ...' end # verify the required parameter 'voucher_id' is set if @api_client.config.client_side_validation && voucher_id.nil? fail ArgumentError, "Missing the required parameter 'voucher_id' when calling LedgervoucherApi.download_pdf" end # resource path local_var_path = '/ledger/voucher/{voucherId}/pdf'.sub('{' + 'voucherId' + '}', voucher_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # form parameters form_params = {} # return_type return_type = opts[:'return_type'] || 'String' # 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 => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#download_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#external_voucher_number(opts = {}) ⇒ ListResponseVoucher
- BETA
-
Find vouchers based on the external voucher number.
199 200 201 202 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 199 def external_voucher_number(opts = {}) data, _status_code, _headers = external_voucher_number_with_http_info(opts) data end |
#external_voucher_number_with_http_info(opts = {}) ⇒ Array<(ListResponseVoucher, Fixnum, Hash)>
- BETA
-
Find vouchers based on the external voucher number.
213 214 215 216 217 218 219 220 221 222 223 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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 213 def external_voucher_number_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.external_voucher_number ...' end # resource path local_var_path = '/ledger/voucher/>externalVoucherNumber' # query parameters query_params = {} query_params[:'externalVoucherNumber'] = opts[:'external_voucher_number'] if !opts[:'external_voucher_number'].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 => 'ListResponseVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#external_voucher_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get(id, opts = {}) ⇒ ResponseWrapperVoucher
Get voucher by ID.
255 256 257 258 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 255 def get(id, opts = {}) data, _status_code, _headers = get_with_http_info(id, opts) data end |
#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
Get voucher by ID.
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 266 def get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.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 LedgervoucherApi.get" end # resource path local_var_path = '/ledger/voucher/{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 => 'ResponseWrapperVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#import_document(file, opts = {}) ⇒ ListResponseVoucher
- BETA
-
Upload a document to create one or more vouchers. Valid document formats are PDF, PNG, JPEG, TIFF and EHF. Send as multipart form.
309 310 311 312 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 309 def import_document(file, opts = {}) data, _status_code, _headers = import_document_with_http_info(file, opts) data end |
#import_document_with_http_info(file, opts = {}) ⇒ Array<(ListResponseVoucher, Fixnum, Hash)>
- BETA
-
Upload a document to create one or more vouchers. Valid document formats are PDF, PNG, JPEG, TIFF and EHF. Send as multipart form.
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 357 358 359 360 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 321 def import_document_with_http_info(file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.import_document ...' end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling LedgervoucherApi.import_document" end # resource path local_var_path = '/ledger/voucher/importDocument' # query parameters query_params = {} query_params[:'split'] = opts[:'split'] if !opts[:'split'].nil? # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file form_params['description'] = opts[:'description'] if !opts[:'description'].nil? # http body (model) post_body = nil 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 => 'ListResponseVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#import_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#import_gbat10(generate_vat_postings, file, opts = {}) ⇒ nil
Import GBAT10. Send as multipart form.
368 369 370 371 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 368 def import_gbat10(generate_vat_postings, file, opts = {}) import_gbat10_with_http_info(generate_vat_postings, file, opts) nil end |
#import_gbat10_with_http_info(generate_vat_postings, file, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Import GBAT10. Send as multipart form.
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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 380 def import_gbat10_with_http_info(generate_vat_postings, file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.import_gbat10 ...' end # verify the required parameter 'generate_vat_postings' is set if @api_client.config.client_side_validation && generate_vat_postings.nil? fail ArgumentError, "Missing the required parameter 'generate_vat_postings' when calling LedgervoucherApi.import_gbat10" end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling LedgervoucherApi.import_gbat10" end # resource path local_var_path = '/ledger/voucher/importGbat10' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['generateVatPostings'] = generate_vat_postings form_params['file'] = file form_params['encoding'] = opts[:'encoding'] if !opts[:'encoding'].nil? # http body (model) post_body = nil 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#import_gbat10\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#non_posted(include_non_approved, opts = {}) ⇒ ListResponseVoucher
- BETA
-
Find non-posted vouchers.
435 436 437 438 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 435 def non_posted(include_non_approved, opts = {}) data, _status_code, _headers = non_posted_with_http_info(include_non_approved, opts) data end |
#non_posted_with_http_info(include_non_approved, opts = {}) ⇒ Array<(ListResponseVoucher, Fixnum, Hash)>
- BETA
-
Find non-posted vouchers.
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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 452 def non_posted_with_http_info(include_non_approved, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.non_posted ...' end # verify the required parameter 'include_non_approved' is set if @api_client.config.client_side_validation && include_non_approved.nil? fail ArgumentError, "Missing the required parameter 'include_non_approved' when calling LedgervoucherApi.non_posted" end # resource path local_var_path = '/ledger/voucher/>nonPosted' # query parameters query_params = {} query_params[:'includeNonApproved'] = include_non_approved query_params[:'dateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil? query_params[:'dateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil? query_params[:'changedSince'] = opts[:'changed_since'] if !opts[:'changed_since'].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 => 'ListResponseVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#non_posted\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#options(id, opts = {}) ⇒ ResponseWrapperVoucherOptions
- BETA
-
Returns a data structure containing meta information about operations that are available for this voucher. Currently only implemented for DELETE: It is possible to check if the voucher is deletable.
501 502 503 504 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 501 def (id, opts = {}) data, _status_code, _headers = (id, opts) data end |
#options_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperVoucherOptions, Fixnum, Hash)>
- BETA
-
Returns a data structure containing meta information about operations that are available for this voucher. Currently only implemented for DELETE: It is possible to check if the voucher is deletable.
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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 512 def (id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.options ...' 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 LedgervoucherApi.options" end # resource path local_var_path = '/ledger/voucher/{id}/options'.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 => 'ResponseWrapperVoucherOptions') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post(opts = {}) ⇒ ResponseWrapperVoucher
Add new voucher. IMPORTANT: Also creates postings. Only the gross amounts will be used
554 555 556 557 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 554 def post(opts = {}) data, _status_code, _headers = post_with_http_info(opts) data end |
#post_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
Add new voucher. IMPORTANT: Also creates postings. Only the gross amounts will be used
565 566 567 568 569 570 571 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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 565 def post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.post ...' end # resource path local_var_path = '/ledger/voucher' # query parameters query_params = {} query_params[:'sendToLedger'] = opts[:'send_to_ledger'] if !opts[:'send_to_ledger'].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 => 'ResponseWrapperVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put(id, opts = {}) ⇒ ResponseWrapperVoucher
- BETA
-
Update voucher. Postings with guiRow==0 will be deleted and regenerated.
606 607 608 609 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 606 def put(id, opts = {}) data, _status_code, _headers = put_with_http_info(id, opts) data end |
#put_list(opts = {}) ⇒ ListResponseVoucher
- BETA
-
Update multiple vouchers. Postings with guiRow==0 will be deleted and regenerated.
662 663 664 665 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 662 def put_list(opts = {}) data, _status_code, _headers = put_list_with_http_info(opts) data end |
#put_list_with_http_info(opts = {}) ⇒ Array<(ListResponseVoucher, Fixnum, Hash)>
- BETA
-
Update multiple vouchers. Postings with guiRow==0 will be deleted and regenerated.
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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 673 def put_list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.put_list ...' end # resource path local_var_path = '/ledger/voucher/list' # query parameters query_params = {} query_params[:'sendToLedger'] = opts[:'send_to_ledger'] if !opts[:'send_to_ledger'].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(: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 => 'ListResponseVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#put_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
- BETA
-
Update voucher. Postings with guiRow==0 will be deleted and regenerated.
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 618 def put_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.put ...' 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 LedgervoucherApi.put" end # resource path local_var_path = '/ledger/voucher/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'sendToLedger'] = opts[:'send_to_ledger'] if !opts[:'send_to_ledger'].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(: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 => 'ResponseWrapperVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#reverse(id, date, opts = {}) ⇒ ResponseWrapperVoucher
Reverses the voucher, and returns the reversed voucher. Supports reversing most voucher types, except salary transactions.
713 714 715 716 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 713 def reverse(id, date, opts = {}) data, _status_code, _headers = reverse_with_http_info(id, date, opts) data end |
#reverse_with_http_info(id, date, opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
Reverses the voucher, and returns the reversed voucher. Supports reversing most voucher types, except salary transactions.
724 725 726 727 728 729 730 731 732 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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 724 def reverse_with_http_info(id, date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.reverse ...' 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 LedgervoucherApi.reverse" 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 LedgervoucherApi.reverse" end # resource path local_var_path = '/ledger/voucher/{id}/:reverse'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'date'] = date # 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 => 'ResponseWrapperVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#reverse\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search(date_from, date_to, opts = {}) ⇒ VoucherSearchResponse
Find vouchers corresponding with sent data.
779 780 781 782 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 779 def search(date_from, date_to, opts = {}) data, _status_code, _headers = search_with_http_info(date_from, date_to, opts) data end |
#search_with_http_info(date_from, date_to, opts = {}) ⇒ Array<(VoucherSearchResponse, Fixnum, Hash)>
Find vouchers corresponding with sent data.
799 800 801 802 803 804 805 806 807 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 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 799 def search_with_http_info(date_from, date_to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.search ...' end # verify the required parameter 'date_from' is set if @api_client.config.client_side_validation && date_from.nil? fail ArgumentError, "Missing the required parameter 'date_from' when calling LedgervoucherApi.search" end # verify the required parameter 'date_to' is set if @api_client.config.client_side_validation && date_to.nil? fail ArgumentError, "Missing the required parameter 'date_to' when calling LedgervoucherApi.search" end # resource path local_var_path = '/ledger/voucher' # query parameters query_params = {} query_params[:'dateFrom'] = date_from query_params[:'dateTo'] = date_to query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil? query_params[:'number'] = opts[:'number'] if !opts[:'number'].nil? query_params[:'numberFrom'] = opts[:'number_from'] if !opts[:'number_from'].nil? query_params[:'numberTo'] = opts[:'number_to'] if !opts[:'number_to'].nil? query_params[:'typeId'] = opts[:'type_id'] if !opts[:'type_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 => 'VoucherSearchResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_to_inbox(id, opts = {}) ⇒ ResponseWrapperVoucher
- BETA
-
Send voucher to inbox.
856 857 858 859 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 856 def send_to_inbox(id, opts = {}) data, _status_code, _headers = send_to_inbox_with_http_info(id, opts) data end |
#send_to_inbox_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
- BETA
-
Send voucher to inbox.
868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 868 def send_to_inbox_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.send_to_inbox ...' 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 LedgervoucherApi.send_to_inbox" end if @api_client.config.client_side_validation && !opts[:'version'].nil? && opts[:'version'] < 0 fail ArgumentError, 'invalid value for "opts[:"version"]" when calling LedgervoucherApi.send_to_inbox, must be greater than or equal to 0.' end # resource path local_var_path = '/ledger/voucher/{id}/:sendToInbox'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil? query_params[:'comment'] = opts[:'comment'] if !opts[:'comment'].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 => 'ResponseWrapperVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#send_to_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#send_to_ledger(id, opts = {}) ⇒ ResponseWrapperVoucher
- BETA
-
Send voucher to ledger.
916 917 918 919 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 916 def send_to_ledger(id, opts = {}) data, _status_code, _headers = send_to_ledger_with_http_info(id, opts) data end |
#send_to_ledger_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperVoucher, Fixnum, Hash)>
- BETA
-
Send voucher to ledger.
928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 928 def send_to_ledger_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.send_to_ledger ...' 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 LedgervoucherApi.send_to_ledger" end if @api_client.config.client_side_validation && !opts[:'version'].nil? && opts[:'version'] < 0 fail ArgumentError, 'invalid value for "opts[:"version"]" when calling LedgervoucherApi.send_to_ledger, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'number'].nil? && opts[:'number'] < 0 fail ArgumentError, 'invalid value for "opts[:"number"]" when calling LedgervoucherApi.send_to_ledger, must be greater than or equal to 0.' end # resource path local_var_path = '/ledger/voucher/{id}/:sendToLedger'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'version'] = opts[:'version'] if !opts[:'version'].nil? query_params[:'number'] = opts[:'number'] if !opts[:'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, :return_type => 'ResponseWrapperVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#send_to_ledger\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_attachment(voucher_id, file, opts = {}) ⇒ nil
Upload attachment to voucher. If the voucher already has an attachment the content will be appended to the existing attachment as new PDF page(s). Valid document formats are PDF, PNG, JPEG and TIFF. Non PDF formats will be converted to PDF. Send as multipart form.
979 980 981 982 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 979 def (voucher_id, file, opts = {}) (voucher_id, file, opts) nil end |
#upload_attachment_with_http_info(voucher_id, file, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Upload attachment to voucher. If the voucher already has an attachment the content will be appended to the existing attachment as new PDF page(s). Valid document formats are PDF, PNG, JPEG and TIFF. Non PDF formats will be converted to PDF. Send as multipart form.
990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 990 def (voucher_id, file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.upload_attachment ...' end # verify the required parameter 'voucher_id' is set if @api_client.config.client_side_validation && voucher_id.nil? fail ArgumentError, "Missing the required parameter 'voucher_id' when calling LedgervoucherApi.upload_attachment" end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling LedgervoucherApi.upload_attachment" end # resource path local_var_path = '/ledger/voucher/{voucherId}/attachment'.sub('{' + 'voucherId' + '}', voucher_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file # http body (model) post_body = nil 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#upload_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_pdf(voucher_id, file_name, file, opts = {}) ⇒ nil
- DEPRECATED
-
Use POST ledger/voucher/voucherId/attachment instead.
1038 1039 1040 1041 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 1038 def upload_pdf(voucher_id, file_name, file, opts = {}) upload_pdf_with_http_info(voucher_id, file_name, file, opts) nil end |
#upload_pdf_with_http_info(voucher_id, file_name, file, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- DEPRECATED
-
Use POST ledger/voucher/voucherId/attachment instead.
1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 1050 def upload_pdf_with_http_info(voucher_id, file_name, file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.upload_pdf ...' end # verify the required parameter 'voucher_id' is set if @api_client.config.client_side_validation && voucher_id.nil? fail ArgumentError, "Missing the required parameter 'voucher_id' when calling LedgervoucherApi.upload_pdf" end # verify the required parameter 'file_name' is set if @api_client.config.client_side_validation && file_name.nil? fail ArgumentError, "Missing the required parameter 'file_name' when calling LedgervoucherApi.upload_pdf" end # verify the required parameter 'file' is set if @api_client.config.client_side_validation && file.nil? fail ArgumentError, "Missing the required parameter 'file' when calling LedgervoucherApi.upload_pdf" end # resource path local_var_path = '/ledger/voucher/{voucherId}/pdf/{fileName}'.sub('{' + 'voucherId' + '}', voucher_id.to_s).sub('{' + 'fileName' + '}', file_name.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = file # http body (model) post_body = nil 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#upload_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#voucher_reception(opts = {}) ⇒ ListResponseVoucher
Find vouchers in voucher reception.
1106 1107 1108 1109 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 1106 def voucher_reception(opts = {}) data, _status_code, _headers = voucher_reception_with_http_info(opts) data end |
#voucher_reception_with_http_info(opts = {}) ⇒ Array<(ListResponseVoucher, Fixnum, Hash)>
Find vouchers in voucher reception.
1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 |
# File 'lib/tripletex_ruby_client/api/ledgervoucher_api.rb', line 1122 def voucher_reception_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LedgervoucherApi.voucher_reception ...' end # resource path local_var_path = '/ledger/voucher/>voucherReception' # query parameters query_params = {} query_params[:'dateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil? query_params[:'dateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil? query_params[:'searchText'] = opts[:'search_text'] if !opts[:'search_text'].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 => 'ListResponseVoucher') if @api_client.config.debugging @api_client.config.logger.debug "API called: LedgervoucherApi#voucher_reception\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |