Class: TripletexApi::TravelExpenseApi

Inherits:
Object
  • Object
show all
Defined in:
lib/tripletex_api/api/travel_expense_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TravelExpenseApi

Returns a new instance of TravelExpenseApi.



19
20
21
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#approve(opts = {}) ⇒ ListResponseTravelExpense

BETA

Approve travel expenses.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    ID of the elements

Returns:



28
29
30
31
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 28

def approve(opts = {})
  data, _status_code, _headers = approve_with_http_info(opts)
  return data
end

#approve_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>

BETA

Approve travel expenses.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    ID of the elements

Returns:

  • (Array<(ListResponseTravelExpense, Fixnum, Hash)>)

    ListResponseTravelExpense data, response status code and response headers



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
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 38

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.

Parameters:

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



76
77
78
79
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 76

def copy(id, opts = {})
  data, _status_code, _headers = copy_with_http_info(id, opts)
  return data
end

#copy_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>

BETA

Copy travel expense.

Parameters:

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



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
122
123
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 86

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

Parameters:

  • date

    yyyy-MM-dd. Defaults to today.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    ID of the elements

Returns:



131
132
133
134
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 131

def create_vouchers(date, opts = {})
  data, _status_code, _headers = create_vouchers_with_http_info(date, opts)
  return data
end

#create_vouchers_with_http_info(date, opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>

BETA

Create vouchers

Parameters:

  • date

    yyyy-MM-dd. Defaults to today.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    ID of the elements

Returns:

  • (Array<(ListResponseTravelExpense, Fixnum, Hash)>)

    ListResponseTravelExpense data, response status code and response headers



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
178
179
180
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 142

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.

Parameters:

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


187
188
189
190
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 187

def delete(id, opts = {})
  delete_with_http_info(id, opts)
  return nil
end

#delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

BETA

Delete travel expense.

Parameters:

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
230
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 197

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    ID of the elements

Returns:



237
238
239
240
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 237

def deliver(opts = {})
  data, _status_code, _headers = deliver_with_http_info(opts)
  return data
end

#deliver_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>

BETA

Deliver travel expenses.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    ID of the elements

Returns:

  • (Array<(ListResponseTravelExpense, Fixnum, Hash)>)

    ListResponseTravelExpense data, response status code and response headers



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
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 247

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

#get(id, opts = {}) ⇒ ResponseWrapperTravelExpense

BETA

Get travel expense by ID.

Parameters:

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



286
287
288
289
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 286

def get(id, opts = {})
  data, _status_code, _headers = get_with_http_info(id, opts)
  return data
end

#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>

BETA

Get travel expense by ID.

Parameters:

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 297

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (TravelExpense)

    JSON representing the new object to be created. Should not have ID and version set.

Returns:



339
340
341
342
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 339

def post(opts = {})
  data, _status_code, _headers = post_with_http_info(opts)
  return data
end

#post_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>

BETA

Create travel expense.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (TravelExpense)

    JSON representing the new object to be created. Should not have ID and version set.

Returns:



349
350
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
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 349

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.

Parameters:

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (TravelExpense)

    Partial object describing what should be updated

Returns:



389
390
391
392
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 389

def put(id, opts = {})
  data, _status_code, _headers = put_with_http_info(id, opts)
  return data
end

#put_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperTravelExpense, Fixnum, Hash)>

BETA

Update travel expense.

Parameters:

  • id

    Element ID

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (TravelExpense)

    Partial object describing what should be updated

Returns:



400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 400

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :employee_id (String)

    Equals

  • :department_id (String)

    Equals

  • :project_id (String)

    Equals

  • :project_manager_id (String)

    Equals

  • :departure_date_from (String)

    From and including

  • :return_date_to (String)

    To and excluding

  • :state (String)

    category (default to ALL)

  • :from (Integer)

    From index (default to 0)

  • :count (Integer)

    Number of elements to return (default to 1000)

  • :sorting (String)

    Sorting pattern

  • :fields (String)

    Fields filter pattern

Returns:



453
454
455
456
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 453

def search(opts = {})
  data, _status_code, _headers = search_with_http_info(opts)
  return data
end

#search_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>

BETA

Find travel expenses corresponding with sent data.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :employee_id (String)

    Equals

  • :department_id (String)

    Equals

  • :project_id (String)

    Equals

  • :project_manager_id (String)

    Equals

  • :departure_date_from (String)

    From and including

  • :return_date_to (String)

    To and excluding

  • :state (String)

    category

  • :from (Integer)

    From index

  • :count (Integer)

    Number of elements to return

  • :sorting (String)

    Sorting pattern

  • :fields (String)

    Fields filter pattern

Returns:

  • (Array<(ListResponseTravelExpense, Fixnum, Hash)>)

    ListResponseTravelExpense data, response status code and response headers



473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 473

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    ID of the elements

Returns:



524
525
526
527
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 524

def unapprove(opts = {})
  data, _status_code, _headers = unapprove_with_http_info(opts)
  return data
end

#unapprove_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>

BETA

Unapprove travel expenses.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    ID of the elements

Returns:

  • (Array<(ListResponseTravelExpense, Fixnum, Hash)>)

    ListResponseTravelExpense data, response status code and response headers



534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 534

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.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    ID of the elements

Returns:



572
573
574
575
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 572

def undeliver(opts = {})
  data, _status_code, _headers = undeliver_with_http_info(opts)
  return data
end

#undeliver_with_http_info(opts = {}) ⇒ Array<(ListResponseTravelExpense, Fixnum, Hash)>

BETA

Undeliver travel expenses.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :id (String)

    ID of the elements

Returns:

  • (Array<(ListResponseTravelExpense, Fixnum, Hash)>)

    ListResponseTravelExpense data, response status code and response headers



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
# File 'lib/tripletex_api/api/travel_expense_api.rb', line 582

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