Class: TripletexRubyClient::TimesheetentryApi

Inherits:
Object
  • Object
show all
Defined in:
lib/tripletex_ruby_client/api/timesheetentry_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TimesheetentryApi

Returns a new instance of TimesheetentryApi.



19
20
21
# File 'lib/tripletex_ruby_client/api/timesheetentry_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_ruby_client/api/timesheetentry_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete(id, opts = {}) ⇒ nil

Delete timesheet entry by ID.

Parameters:

  • id

    Element ID

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

    the optional parameters

Options Hash (opts):

  • :version (Integer)

    Number of current version

Returns:

  • (nil)


28
29
30
31
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 28

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

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

Delete timesheet entry by ID.

Parameters:

  • id

    Element ID

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

    the optional parameters

Options Hash (opts):

  • :version (Integer)

    Number of current version

Returns:

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

    nil, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 39

def delete_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TimesheetentryApi.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 TimesheetentryApi.delete"
  end
  # resource path
  local_var_path = '/timesheet/entry/{id}'.sub('{' + 'id' + '}', id.to_s)

  # query parameters
  query_params = {}
  query_params[:'version'] = opts[:'version'] if !opts[:'version'].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: TimesheetentryApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Find timesheet entry by ID.

Parameters:

  • id

    Element ID

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

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



80
81
82
83
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 80

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

#get_recent_activities(project_id, opts = {}) ⇒ ListResponseActivity

Find recently used timesheet activities.

Parameters:

  • project_id

    ID of project to find activities for

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

    the optional parameters

Options Hash (opts):

  • :employee_id (Integer)

    ID of employee to find activities for. Defaults to ID of token owner.

  • :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:



137
138
139
140
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 137

def get_recent_activities(project_id, opts = {})
  data, _status_code, _headers = get_recent_activities_with_http_info(project_id, opts)
  data
end

#get_recent_activities_with_http_info(project_id, opts = {}) ⇒ Array<(ListResponseActivity, Fixnum, Hash)>

Find recently used timesheet activities.

Parameters:

  • project_id

    ID of project to find activities for

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

    the optional parameters

Options Hash (opts):

  • :employee_id (Integer)

    ID of employee to find activities for. Defaults to ID of token owner.

  • :from (Integer)

    From index

  • :count (Integer)

    Number of elements to return

  • :sorting (String)

    Sorting pattern

  • :fields (String)

    Fields filter pattern

Returns:

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

    ListResponseActivity data, response status code and response headers



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
190
191
192
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 152

def get_recent_activities_with_http_info(project_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TimesheetentryApi.get_recent_activities ...'
  end
  # verify the required parameter 'project_id' is set
  if @api_client.config.client_side_validation && project_id.nil?
    fail ArgumentError, "Missing the required parameter 'project_id' when calling TimesheetentryApi.get_recent_activities"
  end
  # resource path
  local_var_path = '/timesheet/entry/>recentActivities'

  # query parameters
  query_params = {}
  query_params[:'projectId'] = project_id
  query_params[:'employeeId'] = opts[:'employee_id'] if !opts[:'employee_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 => 'ListResponseActivity')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TimesheetentryApi#get_recent_activities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_recent_projects(opts = {}) ⇒ ListResponseProject

Find projects with recent activities (timesheet entry registered).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :employee_id (Integer)

    ID of employee with recent project hours Defaults to ID of token owner.

  • :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:



202
203
204
205
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 202

def get_recent_projects(opts = {})
  data, _status_code, _headers = get_recent_projects_with_http_info(opts)
  data
end

#get_recent_projects_with_http_info(opts = {}) ⇒ Array<(ListResponseProject, Fixnum, Hash)>

Find projects with recent activities (timesheet entry registered).

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :employee_id (Integer)

    ID of employee with recent project hours Defaults to ID of token owner.

  • :from (Integer)

    From index

  • :count (Integer)

    Number of elements to return

  • :sorting (String)

    Sorting pattern

  • :fields (String)

    Fields filter pattern

Returns:

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

    ListResponseProject data, response status code and response headers



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
249
250
251
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 216

def get_recent_projects_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TimesheetentryApi.get_recent_projects ...'
  end
  # resource path
  local_var_path = '/timesheet/entry/>recentProjects'

  # query parameters
  query_params = {}
  query_params[:'employeeId'] = opts[:'employee_id'] if !opts[:'employee_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 => 'ListResponseProject')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TimesheetentryApi#get_recent_projects\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_total_hours(opts = {}) ⇒ ResponseWrapperBigDecimal

Find total hours registered on an employee in a specific period.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :employee_id (Integer)

    ID of employee to find hours for. Defaults to ID of token owner.

  • :start_date (String)

    Format is yyyy-MM-dd (from and incl.). Defaults to today.

  • :end_date (String)

    Format is yyyy-MM-dd (to and excl.). Defaults to tomorrow.

  • :fields (String)

    Fields filter pattern

Returns:



260
261
262
263
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 260

def get_total_hours(opts = {})
  data, _status_code, _headers = get_total_hours_with_http_info(opts)
  data
end

#get_total_hours_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperBigDecimal, Fixnum, Hash)>

Find total hours registered on an employee in a specific period.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :employee_id (Integer)

    ID of employee to find hours for. Defaults to ID of token owner.

  • :start_date (String)

    Format is yyyy-MM-dd (from and incl.). Defaults to today.

  • :end_date (String)

    Format is yyyy-MM-dd (to and excl.). Defaults to tomorrow.

  • :fields (String)

    Fields filter pattern

Returns:

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

    ResponseWrapperBigDecimal data, response status code and response headers



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
302
303
304
305
306
307
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 273

def get_total_hours_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TimesheetentryApi.get_total_hours ...'
  end
  # resource path
  local_var_path = '/timesheet/entry/>totalHours'

  # query parameters
  query_params = {}
  query_params[:'employeeId'] = opts[:'employee_id'] if !opts[:'employee_id'].nil?
  query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
  query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].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 => 'ResponseWrapperBigDecimal')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TimesheetentryApi#get_total_hours\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Find timesheet entry by ID.

Parameters:

  • id

    Element ID

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

    the optional parameters

Options Hash (opts):

  • :fields (String)

    Fields filter pattern

Returns:



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
124
125
126
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 91

def get_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TimesheetentryApi.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 TimesheetentryApi.get"
  end
  # resource path
  local_var_path = '/timesheet/entry/{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 => 'ResponseWrapperTimesheetEntry')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TimesheetentryApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post(opts = {}) ⇒ ResponseWrapperTimesheetEntry

Add new timesheet entry. Only one entry per employee/date/activity/project combination is supported.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (TimesheetEntry)

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

Returns:



313
314
315
316
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 313

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

#post_list(opts = {}) ⇒ ListResponseTimesheetEntry

Add new timesheet entry. Multiple objects for several users can be sent in the same request.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



361
362
363
364
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 361

def post_list(opts = {})
  data, _status_code, _headers = post_list_with_http_info(opts)
  data
end

#post_list_with_http_info(opts = {}) ⇒ Array<(ListResponseTimesheetEntry, Fixnum, Hash)>

Add new timesheet entry. Multiple objects for several users can be sent in the same request.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    ListResponseTimesheetEntry data, response status code and response headers



371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 371

def post_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TimesheetentryApi.post_list ...'
  end
  # resource path
  local_var_path = '/timesheet/entry/list'

  # 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 => 'ListResponseTimesheetEntry')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TimesheetentryApi#post_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Add new timesheet entry. Only one entry per employee/date/activity/project combination is supported.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (TimesheetEntry)

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

Returns:



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
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 323

def post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TimesheetentryApi.post ...'
  end
  # resource path
  local_var_path = '/timesheet/entry'

  # 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 => 'ResponseWrapperTimesheetEntry')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TimesheetentryApi#post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put(id, opts = {}) ⇒ ResponseWrapperTimesheetEntry

Update timesheet entry by ID. Note: Timesheet entry object fields which are present but not set, or set to 0, will be nulled.

Parameters:

  • id

    Element ID

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

    the optional parameters

Options Hash (opts):

  • :body (TimesheetEntry)

    Partial object describing what should be updated

Returns:



410
411
412
413
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 410

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

#put_list(opts = {}) ⇒ ListResponseTimesheetEntry

Update timesheet entry. Multiple objects for different users can be sent in the same request.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (Array<TimesheetEntry>)

    List of timesheet entry objects to update

Returns:



463
464
465
466
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 463

def put_list(opts = {})
  data, _status_code, _headers = put_list_with_http_info(opts)
  data
end

#put_list_with_http_info(opts = {}) ⇒ Array<(ListResponseTimesheetEntry, Fixnum, Hash)>

Update timesheet entry. Multiple objects for different users can be sent in the same request.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :body (Array<TimesheetEntry>)

    List of timesheet entry objects to update

Returns:

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

    ListResponseTimesheetEntry 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
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 473

def put_list_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TimesheetentryApi.put_list ...'
  end
  # resource path
  local_var_path = '/timesheet/entry/list'

  # 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 => 'ListResponseTimesheetEntry')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TimesheetentryApi#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<(ResponseWrapperTimesheetEntry, Fixnum, Hash)>

Update timesheet entry by ID. Note: Timesheet entry object fields which are present but not set, or set to 0, will be nulled.

Parameters:

  • id

    Element ID

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

    the optional parameters

Options Hash (opts):

  • :body (TimesheetEntry)

    Partial object describing what should be updated

Returns:



421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 421

def put_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TimesheetentryApi.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 TimesheetentryApi.put"
  end
  # resource path
  local_var_path = '/timesheet/entry/{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 => 'ResponseWrapperTimesheetEntry')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TimesheetentryApi#put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search(date_from, date_to, opts = {}) ⇒ TimesheetEntrySearchResponse

Find timesheet entry corresponding with sent data.

Parameters:

  • date_from

    From and including

  • date_to

    To and excluding

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    List of IDs

  • :employee_id (String)

    List of IDs

  • :project_id (String)

    List of IDs

  • :activity_id (String)

    List of IDs

  • :comment (String)

    Containing

  • :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:



521
522
523
524
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 521

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<(TimesheetEntrySearchResponse, Fixnum, Hash)>

Find timesheet entry corresponding with sent data.

Parameters:

  • date_from

    From and including

  • date_to

    To and excluding

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

    the optional parameters

Options Hash (opts):

  • :id (String)

    List of IDs

  • :employee_id (String)

    List of IDs

  • :project_id (String)

    List of IDs

  • :activity_id (String)

    List of IDs

  • :comment (String)

    Containing

  • :from (Integer)

    From index

  • :count (Integer)

    Number of elements to return

  • :sorting (String)

    Sorting pattern

  • :fields (String)

    Fields filter pattern

Returns:



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
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
# File 'lib/tripletex_ruby_client/api/timesheetentry_api.rb', line 541

def search_with_http_info(date_from, date_to, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TimesheetentryApi.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 TimesheetentryApi.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 TimesheetentryApi.search"
  end
  # resource path
  local_var_path = '/timesheet/entry'

  # 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[:'employeeId'] = opts[:'employee_id'] if !opts[:'employee_id'].nil?
  query_params[:'projectId'] = opts[:'project_id'] if !opts[:'project_id'].nil?
  query_params[:'activityId'] = opts[:'activity_id'] if !opts[:'activity_id'].nil?
  query_params[:'comment'] = opts[:'comment'] if !opts[:'comment'].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 => 'TimesheetEntrySearchResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TimesheetentryApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end