Class: TripletexApi::TimesheetentryApi
- Inherits:
-
Object
- Object
- TripletexApi::TimesheetentryApi
- Defined in:
- lib/tripletex_api/api/timesheetentry_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete(id, opts = {}) ⇒ nil
Delete timesheet entry by ID.
-
#delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete timesheet entry by ID.
-
#get(id, opts = {}) ⇒ ResponseWrapperTimesheetEntry
Find timesheet entry by ID.
-
#get_recent_activities(project_id, opts = {}) ⇒ ListResponseActivity
Find recently used timesheet activities.
-
#get_recent_activities_with_http_info(project_id, opts = {}) ⇒ Array<(ListResponseActivity, Fixnum, Hash)>
Find recently used timesheet activities.
-
#get_recent_projects(opts = {}) ⇒ ListResponseProject
Find projects with recent activities (timesheet entry registered).
-
#get_recent_projects_with_http_info(opts = {}) ⇒ Array<(ListResponseProject, Fixnum, Hash)>
Find projects with recent activities (timesheet entry registered).
-
#get_total_hours(opts = {}) ⇒ ResponseWrapperDouble
Find total hours registered on an employee in a specific period.
-
#get_total_hours_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperDouble, Fixnum, Hash)>
Find total hours registered on an employee in a specific period.
-
#get_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperTimesheetEntry, Fixnum, Hash)>
Find timesheet entry by ID.
-
#initialize(api_client = ApiClient.default) ⇒ TimesheetentryApi
constructor
A new instance of TimesheetentryApi.
-
#post(opts = {}) ⇒ ResponseWrapperTimesheetEntry
Add new timesheet entry.
-
#post_list(opts = {}) ⇒ ListResponseTimesheetEntry
Add new timesheet entry.
-
#post_list_with_http_info(opts = {}) ⇒ Array<(ListResponseTimesheetEntry, Fixnum, Hash)>
Add new timesheet entry.
-
#post_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperTimesheetEntry, Fixnum, Hash)>
Add new timesheet entry.
-
#put(id, opts = {}) ⇒ ResponseWrapperTimesheetEntry
Update timesheet entry by ID.
-
#put_list(opts = {}) ⇒ ListResponseTimesheetEntry
Update timesheet entry.
-
#put_list_with_http_info(opts = {}) ⇒ Array<(ListResponseTimesheetEntry, Fixnum, Hash)>
Update timesheet entry.
-
#put_with_http_info(id, opts = {}) ⇒ Array<(ResponseWrapperTimesheetEntry, Fixnum, Hash)>
Update timesheet entry by ID.
-
#search(date_from, date_to, opts = {}) ⇒ TimesheetEntrySearchResponse
Find timesheet entry corresponding with sent data.
-
#search_with_http_info(date_from, date_to, opts = {}) ⇒ Array<(TimesheetEntrySearchResponse, Fixnum, Hash)>
Find timesheet entry corresponding with sent data.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TimesheetentryApi
Returns a new instance of TimesheetentryApi.
19 20 21 |
# File 'lib/tripletex_api/api/timesheetentry_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_api/api/timesheetentry_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete(id, opts = {}) ⇒ nil
Delete timesheet entry by ID.
29 30 31 32 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 29 def delete(id, opts = {}) delete_with_http_info(id, opts) return nil end |
#delete_with_http_info(id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete timesheet entry by ID.
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 74 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 40 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.
82 83 84 85 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 82 def get(id, opts = {}) data, _status_code, _headers = get_with_http_info(id, opts) return data end |
#get_recent_activities(project_id, opts = {}) ⇒ ListResponseActivity
Find recently used timesheet activities.
140 141 142 143 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 140 def get_recent_activities(project_id, opts = {}) data, _status_code, _headers = get_recent_activities_with_http_info(project_id, opts) return data end |
#get_recent_activities_with_http_info(project_id, opts = {}) ⇒ Array<(ListResponseActivity, Fixnum, Hash)>
Find recently used timesheet activities.
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 193 194 195 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 155 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).
206 207 208 209 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 206 def get_recent_projects(opts = {}) data, _status_code, _headers = get_recent_projects_with_http_info(opts) return data end |
#get_recent_projects_with_http_info(opts = {}) ⇒ Array<(ListResponseProject, Fixnum, Hash)>
Find projects with recent activities (timesheet entry registered).
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 252 253 254 255 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 220 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 = {}) ⇒ ResponseWrapperDouble
Find total hours registered on an employee in a specific period.
265 266 267 268 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 265 def get_total_hours(opts = {}) data, _status_code, _headers = get_total_hours_with_http_info(opts) return data end |
#get_total_hours_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperDouble, Fixnum, Hash)>
Find total hours registered on an employee in a specific period.
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 308 309 310 311 312 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 278 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 => 'ResponseWrapperDouble') 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.
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 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 93 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.
319 320 321 322 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 319 def post(opts = {}) data, _status_code, _headers = post_with_http_info(opts) return data end |
#post_list(opts = {}) ⇒ ListResponseTimesheetEntry
Add new timesheet entry. Multiple objects for several users can be sent in the same request.
368 369 370 371 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 368 def post_list(opts = {}) data, _status_code, _headers = post_list_with_http_info(opts) return 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.
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 378 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.
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 361 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 329 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.
418 419 420 421 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 418 def put(id, opts = {}) data, _status_code, _headers = put_with_http_info(id, opts) return data end |
#put_list(opts = {}) ⇒ ListResponseTimesheetEntry
Update timesheet entry. Multiple objects for different users can be sent in the same request.
472 473 474 475 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 472 def put_list(opts = {}) data, _status_code, _headers = put_list_with_http_info(opts) return 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.
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 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 482 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.
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 458 459 460 461 462 463 464 465 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 429 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.
531 532 533 534 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 531 def search(date_from, date_to, opts = {}) data, _status_code, _headers = search_with_http_info(date_from, date_to, opts) return data end |
#search_with_http_info(date_from, date_to, opts = {}) ⇒ Array<(TimesheetEntrySearchResponse, Fixnum, Hash)>
Find timesheet entry corresponding with sent data.
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 591 592 593 594 595 596 597 598 599 600 |
# File 'lib/tripletex_api/api/timesheetentry_api.rb', line 551 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 |