Class: TripletexRubyClient::TravelExpenseApi
- Inherits:
-
Object
- Object
- TripletexRubyClient::TravelExpenseApi
- Defined in:
- lib/tripletex_ruby_client/api/travel_expense_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#approve(opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Approve travel expenses.
-
#approve_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Approve travel expenses.
-
#copy(id, opts = {}) ⇒ ResponseWrapperTravelExpense
- BETA
-
Copy travel expense.
-
#copy_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>
- BETA
-
Copy travel expense.
-
#create_vouchers(date, opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Create vouchers.
-
#create_vouchers_with_http_info(date, opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Create vouchers.
-
#delete(id, opts = {}) ⇒ nil
- BETA
-
Delete travel expense.
-
#delete_attachment(travel_expense_id, opts = {}) ⇒ nil
- BETA
-
Delete attachment.
-
#delete_attachment_with_http_info(travel_expense_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- BETA
-
Delete attachment.
-
#delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- BETA
-
Delete travel expense.
-
#deliver(opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Deliver travel expenses.
-
#deliver_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Deliver travel expenses.
-
#download_attachment(travel_expense_id, opts = {}) ⇒ String
Get attachment by travel expense ID.
-
#download_attachment_with_http_info(travel_expense_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get attachment by travel expense ID.
-
#get(id, opts = {}) ⇒ ResponseWrapperTravelExpense
- BETA
-
Get travel expense by ID.
-
#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>
- BETA
-
Get travel expense by ID.
-
#initialize(api_client = ApiClient.default) ⇒ TravelExpenseApi
constructor
A new instance of TravelExpenseApi.
-
#post(opts = {}) ⇒ ResponseWrapperTravelExpense
- BETA
-
Create travel expense.
-
#post_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>
- BETA
-
Create travel expense.
-
#put(id, opts = {}) ⇒ ResponseWrapperTravelExpense
- BETA
-
Update travel expense.
-
#put_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>
- BETA
-
Update travel expense.
-
#search(opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Find travel expenses corresponding with sent data.
-
#search_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Find travel expenses corresponding with sent data.
-
#unapprove(opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Unapprove travel expenses.
-
#unapprove_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Unapprove travel expenses.
-
#undeliver(opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Undeliver travel expenses.
-
#undeliver_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Undeliver travel expenses.
-
#upload_attachment(travel_expense_id, file, opts = {}) ⇒ nil
Upload attachment to travel expense.
-
#upload_attachment_with_http_info(travel_expense_id, file, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Upload attachment to travel expense.
-
#upload_attachments(travel_expense_id, body, opts = {}) ⇒ nil
Upload multiple attachments to travel expense.
-
#upload_attachments_with_http_info(travel_expense_id, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Upload multiple attachments to travel expense.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TravelExpenseApi
Returns a new instance of TravelExpenseApi.
19 20 21 |
# File 'lib/tripletex_ruby_client/api/travel_expense_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/travel_expense_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#approve(opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Approve travel expenses.
27 28 29 30 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 27 def approve(opts = {}) data, _status_code, _headers = approve_with_http_info(opts) data end |
#approve_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Approve travel expenses.
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 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 37 def approve_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.approve ...' end # resource path local_var_path = '/travelExpense/:approve' # query parameters query_params = {} query_params[:'id'] = opts[:'id'] if !opts[:'id'].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 => 'ListResponseTravelExpense') if @api_client.config.debugging @api_client.config.logger.debug "API called: TravelExpenseApi#approve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#copy(id, opts = {}) ⇒ ResponseWrapperTravelExpense
- BETA
-
Copy travel expense.
74 75 76 77 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 74 def copy(id, opts = {}) data, _status_code, _headers = copy_with_http_info(id, opts) data end |
#copy_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>
- BETA
-
Copy travel expense.
84 85 86 87 88 89 90 91 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 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 84 def copy_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.copy ...' 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 TravelExpenseApi.copy" end # resource path local_var_path = '/travelExpense/:copy' # query parameters query_params = {} query_params[:'id'] = id # 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 = 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 => 'ResponseWrapperTravelExpense') if @api_client.config.debugging @api_client.config.logger.debug "API called: TravelExpenseApi#copy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_vouchers(date, opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Create vouchers
128 129 130 131 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 128 def create_vouchers(date, opts = {}) data, _status_code, _headers = create_vouchers_with_http_info(date, opts) data end |
#create_vouchers_with_http_info(date, opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Create vouchers
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 175 176 177 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 139 def create_vouchers_with_http_info(date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.create_vouchers ...' 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 TravelExpenseApi.create_vouchers" end # resource path local_var_path = '/travelExpense/:createVouchers' # query parameters query_params = {} query_params[:'date'] = date query_params[:'id'] = opts[:'id'] if !opts[:'id'].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 = 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 => 'ListResponseTravelExpense') if @api_client.config.debugging @api_client.config.logger.debug "API called: TravelExpenseApi#create_vouchers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete(id, opts = {}) ⇒ nil
- BETA
-
Delete travel expense.
183 184 185 186 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 183 def delete(id, opts = {}) delete_with_http_info(id, opts) nil end |
#delete_attachment(travel_expense_id, opts = {}) ⇒ nil
- BETA
-
Delete attachment.
235 236 237 238 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 235 def (travel_expense_id, opts = {}) (travel_expense_id, opts) nil end |
#delete_attachment_with_http_info(travel_expense_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
- BETA
-
Delete attachment.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 248 def (travel_expense_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.delete_attachment ...' end # verify the required parameter 'travel_expense_id' is set if @api_client.config.client_side_validation && travel_expense_id.nil? fail ArgumentError, "Missing the required parameter 'travel_expense_id' when calling TravelExpenseApi.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 TravelExpenseApi.delete_attachment, must be greater than or equal to 0.' end # resource path local_var_path = '/travelExpense/{travelExpenseId}/attachment'.sub('{' + 'travelExpenseId' + '}', travel_expense_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: TravelExpenseApi#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 travel expense.
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 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 193 def delete_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.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 TravelExpenseApi.delete" end # resource path local_var_path = '/travelExpense/{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: TravelExpenseApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#deliver(opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Deliver travel expenses.
294 295 296 297 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 294 def deliver(opts = {}) data, _status_code, _headers = deliver_with_http_info(opts) data end |
#deliver_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Deliver travel expenses.
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 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 304 def deliver_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.deliver ...' end # resource path local_var_path = '/travelExpense/:deliver' # query parameters query_params = {} query_params[:'id'] = opts[:'id'] if !opts[:'id'].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 => 'ListResponseTravelExpense') if @api_client.config.debugging @api_client.config.logger.debug "API called: TravelExpenseApi#deliver\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#download_attachment(travel_expense_id, opts = {}) ⇒ String
Get attachment by travel expense ID.
341 342 343 344 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 341 def (travel_expense_id, opts = {}) data, _status_code, _headers = (travel_expense_id, opts) data end |
#download_attachment_with_http_info(travel_expense_id, opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Get attachment by travel expense ID.
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 351 def (travel_expense_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.download_attachment ...' end # verify the required parameter 'travel_expense_id' is set if @api_client.config.client_side_validation && travel_expense_id.nil? fail ArgumentError, "Missing the required parameter 'travel_expense_id' when calling TravelExpenseApi.download_attachment" end # resource path local_var_path = '/travelExpense/{travelExpenseId}/attachment'.sub('{' + 'travelExpenseId' + '}', travel_expense_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 = {} # 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: TravelExpenseApi#download_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get(id, opts = {}) ⇒ ResponseWrapperTravelExpense
- BETA
-
Get travel expense by ID.
394 395 396 397 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 394 def get(id, opts = {}) data, _status_code, _headers = get_with_http_info(id, opts) data end |
#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>
- BETA
-
Get travel expense by ID.
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 405 def get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.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 TravelExpenseApi.get" end # resource path local_var_path = '/travelExpense/{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 => 'ResponseWrapperTravelExpense') if @api_client.config.debugging @api_client.config.logger.debug "API called: TravelExpenseApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post(opts = {}) ⇒ ResponseWrapperTravelExpense
- BETA
-
Create travel expense.
446 447 448 449 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 446 def post(opts = {}) data, _status_code, _headers = post_with_http_info(opts) data end |
#post_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>
- BETA
-
Create travel expense.
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 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 456 def post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.post ...' end # resource path local_var_path = '/travelExpense' # query parameters query_params = {} # 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 => 'ResponseWrapperTravelExpense') if @api_client.config.debugging @api_client.config.logger.debug "API called: TravelExpenseApi#post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put(id, opts = {}) ⇒ ResponseWrapperTravelExpense
- BETA
-
Update travel expense.
495 496 497 498 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 495 def put(id, opts = {}) data, _status_code, _headers = put_with_http_info(id, opts) data end |
#put_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>
- BETA
-
Update travel expense.
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 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 506 def put_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.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 TravelExpenseApi.put" end # resource path local_var_path = '/travelExpense/{id}'.sub('{' + 'id' + '}', 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(['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 => 'ResponseWrapperTravelExpense') if @api_client.config.debugging @api_client.config.logger.debug "API called: TravelExpenseApi#put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search(opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Find travel expenses corresponding with sent data.
558 559 560 561 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 558 def search(opts = {}) data, _status_code, _headers = search_with_http_info(opts) data end |
#search_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Find travel expenses corresponding with sent data.
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 616 617 618 619 620 621 622 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 578 def search_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.search ...' end if @api_client.config.client_side_validation && opts[:'state'] && !['ALL', 'OPEN', 'APPROVED', 'SALARY_PAID', 'DELIVERED'].include?(opts[:'state']) fail ArgumentError, 'invalid value for "state", must be one of ALL, OPEN, APPROVED, SALARY_PAID, DELIVERED' end # resource path local_var_path = '/travelExpense' # query parameters query_params = {} query_params[:'employeeId'] = opts[:'employee_id'] if !opts[:'employee_id'].nil? query_params[:'departmentId'] = opts[:'department_id'] if !opts[:'department_id'].nil? query_params[:'projectId'] = opts[:'project_id'] if !opts[:'project_id'].nil? query_params[:'projectManagerId'] = opts[:'project_manager_id'] if !opts[:'project_manager_id'].nil? query_params[:'departureDateFrom'] = opts[:'departure_date_from'] if !opts[:'departure_date_from'].nil? query_params[:'returnDateTo'] = opts[:'return_date_to'] if !opts[:'return_date_to'].nil? query_params[:'state'] = opts[:'state'] if !opts[:'state'].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 => 'ListResponseTravelExpense') if @api_client.config.debugging @api_client.config.logger.debug "API called: TravelExpenseApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#unapprove(opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Unapprove travel expenses.
628 629 630 631 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 628 def unapprove(opts = {}) data, _status_code, _headers = unapprove_with_http_info(opts) data end |
#unapprove_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Unapprove travel expenses.
638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 638 def unapprove_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.unapprove ...' end # resource path local_var_path = '/travelExpense/:unapprove' # query parameters query_params = {} query_params[:'id'] = opts[:'id'] if !opts[:'id'].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 => 'ListResponseTravelExpense') if @api_client.config.debugging @api_client.config.logger.debug "API called: TravelExpenseApi#unapprove\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#undeliver(opts = {}) ⇒ ListResponseTravelExpense
- BETA
-
Undeliver travel expenses.
675 676 677 678 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 675 def undeliver(opts = {}) data, _status_code, _headers = undeliver_with_http_info(opts) data end |
#undeliver_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>
- BETA
-
Undeliver travel expenses.
685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 685 def undeliver_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.undeliver ...' end # resource path local_var_path = '/travelExpense/:undeliver' # query parameters query_params = {} query_params[:'id'] = opts[:'id'] if !opts[:'id'].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 => 'ListResponseTravelExpense') if @api_client.config.debugging @api_client.config.logger.debug "API called: TravelExpenseApi#undeliver\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_attachment(travel_expense_id, file, opts = {}) ⇒ nil
Upload attachment to travel expense.
724 725 726 727 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 724 def (travel_expense_id, file, opts = {}) (travel_expense_id, file, opts) nil end |
#upload_attachment_with_http_info(travel_expense_id, file, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Upload attachment to travel expense.
736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 736 def (travel_expense_id, file, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.upload_attachment ...' end # verify the required parameter 'travel_expense_id' is set if @api_client.config.client_side_validation && travel_expense_id.nil? fail ArgumentError, "Missing the required parameter 'travel_expense_id' when calling TravelExpenseApi.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 TravelExpenseApi.upload_attachment" end # resource path local_var_path = '/travelExpense/{travelExpenseId}/attachment'.sub('{' + 'travelExpenseId' + '}', travel_expense_id.to_s) # query parameters query_params = {} query_params[:'createNewCost'] = opts[:'create_new_cost'] if !opts[:'create_new_cost'].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 # 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: TravelExpenseApi#upload_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#upload_attachments(travel_expense_id, body, opts = {}) ⇒ nil
Upload multiple attachments to travel expense.
785 786 787 788 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 785 def (travel_expense_id, body, opts = {}) (travel_expense_id, body, opts) nil end |
#upload_attachments_with_http_info(travel_expense_id, body, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Upload multiple attachments to travel expense.
797 798 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 |
# File 'lib/tripletex_ruby_client/api/travel_expense_api.rb', line 797 def (travel_expense_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TravelExpenseApi.upload_attachments ...' end # verify the required parameter 'travel_expense_id' is set if @api_client.config.client_side_validation && travel_expense_id.nil? fail ArgumentError, "Missing the required parameter 'travel_expense_id' when calling TravelExpenseApi.upload_attachments" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling TravelExpenseApi.upload_attachments" end # resource path local_var_path = '/travelExpense/{travelExpenseId}/attachment/list'.sub('{' + 'travelExpenseId' + '}', travel_expense_id.to_s) # query parameters query_params = {} query_params[:'createNewCost'] = opts[:'create_new_cost'] if !opts[:'create_new_cost'].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 = {} # http body (model) post_body = @api_client.object_to_http_body(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) if @api_client.config.debugging @api_client.config.logger.debug "API called: TravelExpenseApi#upload_attachments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |