All URIs are relative to https://tripletex.no/v2
Method | HTTP request | Description |
---|---|---|
delete | DELETE /timesheet/entry/{id} | Delete timesheet entry by ID. |
get | GET /timesheet/entry/{id} | Find timesheet entry by ID. |
get_recent_activities | GET /timesheet/entry/>recentActivities | Find recently used timesheet activities. |
get_recent_projects | GET /timesheet/entry/>recentProjects | Find projects with recent activities (timesheet entry registered). |
get_total_hours | GET /timesheet/entry/>totalHours | Find total hours registered on an employee in a specific period. |
post | POST /timesheet/entry | Add new timesheet entry. Only one entry per employee/date/activity/project combination is supported. |
post_list | POST /timesheet/entry/list | Add new timesheet entry. Multiple objects for several users can be sent in the same request. |
put | PUT /timesheet/entry/{id} | Update timesheet entry by ID. Note: Timesheet entry object fields which are present but not set, or set to 0, will be nulled. |
put_list | PUT /timesheet/entry/list | Update timesheet entry. Multiple objects for different users can be sent in the same request. |
search | GET /timesheet/entry | Find timesheet entry corresponding with sent data. |
delete(id, opts)
Delete timesheet entry by ID.
# load the gem
require 'tripletex_ruby_client'
# setup authorization
# # Setup authorization - as autogenerated by swagger-codegen
# TripletexRubyClient.configure do |config|
# # Configure HTTP basic authorization: tokenAuthScheme
# config.username = 'YOUR USERNAME'
# config.password = 'YOUR PASSWORD'
# end
# Setup authorization
#
TripletexRubyClient.configure do |config|
# Configure HTTP basic authorization: tokenAuthScheme
config.consumer_token = ENV["TT_CONSUMER_TOKEN"]
config.employee_token = ENV["TT_EMPLOYEE_TOKEN"]
config.host = Rails.env.production? ? 'https://tripletex.no' : 'https://api.tripletex.io'
config.token_expiration_time = Rails.env.production? ? 1.month : 1.day
end
api_instance = TripletexRubyClient::TimesheetentryApi.new
id = 56 # Integer | Element ID
opts = {
version: 56 # Integer | Number of current version
}
begin
#Delete timesheet entry by ID.
api_instance.delete(id, opts)
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TimesheetentryApi->delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Element ID | |
version | Integer | Number of current version | [optional] |
nil (empty response body)
- Content-Type: Not defined
- Accept: Not defined
ResponseWrapperTimesheetEntry get(id, opts)
Find timesheet entry by ID.
# load the gem
require 'tripletex_ruby_client'
# setup authorization
# # Setup authorization - as autogenerated by swagger-codegen
# TripletexRubyClient.configure do |config|
# # Configure HTTP basic authorization: tokenAuthScheme
# config.username = 'YOUR USERNAME'
# config.password = 'YOUR PASSWORD'
# end
# Setup authorization
#
TripletexRubyClient.configure do |config|
# Configure HTTP basic authorization: tokenAuthScheme
config.consumer_token = ENV["TT_CONSUMER_TOKEN"]
config.employee_token = ENV["TT_EMPLOYEE_TOKEN"]
config.host = Rails.env.production? ? 'https://tripletex.no' : 'https://api.tripletex.io'
config.token_expiration_time = Rails.env.production? ? 1.month : 1.day
end
api_instance = TripletexRubyClient::TimesheetentryApi.new
id = 56 # Integer | Element ID
opts = {
fields: 'fields_example' # String | Fields filter pattern
}
begin
#Find timesheet entry by ID.
result = api_instance.get(id, opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TimesheetentryApi->get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Element ID | |
fields | String | Fields filter pattern | [optional] |
- Content-Type: Not defined
- Accept: Not defined
ListResponseActivity get_recent_activities(project_id, opts)
Find recently used timesheet activities.
# load the gem
require 'tripletex_ruby_client'
# setup authorization
# # Setup authorization - as autogenerated by swagger-codegen
# TripletexRubyClient.configure do |config|
# # Configure HTTP basic authorization: tokenAuthScheme
# config.username = 'YOUR USERNAME'
# config.password = 'YOUR PASSWORD'
# end
# Setup authorization
#
TripletexRubyClient.configure do |config|
# Configure HTTP basic authorization: tokenAuthScheme
config.consumer_token = ENV["TT_CONSUMER_TOKEN"]
config.employee_token = ENV["TT_EMPLOYEE_TOKEN"]
config.host = Rails.env.production? ? 'https://tripletex.no' : 'https://api.tripletex.io'
config.token_expiration_time = Rails.env.production? ? 1.month : 1.day
end
api_instance = TripletexRubyClient::TimesheetentryApi.new
project_id = 56 # Integer | ID of project to find activities for
opts = {
employee_id: 56, # Integer | ID of employee to find activities for. Defaults to ID of token owner.
from: 0, # Integer | From index
count: 1000, # Integer | Number of elements to return
sorting: 'sorting_example', # String | Sorting pattern
fields: 'fields_example' # String | Fields filter pattern
}
begin
#Find recently used timesheet activities.
result = api_instance.get_recent_activities(project_id, opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TimesheetentryApi->get_recent_activities: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
project_id | Integer | ID of project to find activities for | |
employee_id | Integer | ID of employee to find activities for. Defaults to ID of token owner. | [optional] |
from | Integer | From index | [optional] [default to 0] |
count | Integer | Number of elements to return | [optional] [default to 1000] |
sorting | String | Sorting pattern | [optional] |
fields | String | Fields filter pattern | [optional] |
- Content-Type: Not defined
- Accept: Not defined
ListResponseProject get_recent_projects(opts)
Find projects with recent activities (timesheet entry registered).
# load the gem
require 'tripletex_ruby_client'
# setup authorization
# # Setup authorization - as autogenerated by swagger-codegen
# TripletexRubyClient.configure do |config|
# # Configure HTTP basic authorization: tokenAuthScheme
# config.username = 'YOUR USERNAME'
# config.password = 'YOUR PASSWORD'
# end
# Setup authorization
#
TripletexRubyClient.configure do |config|
# Configure HTTP basic authorization: tokenAuthScheme
config.consumer_token = ENV["TT_CONSUMER_TOKEN"]
config.employee_token = ENV["TT_EMPLOYEE_TOKEN"]
config.host = Rails.env.production? ? 'https://tripletex.no' : 'https://api.tripletex.io'
config.token_expiration_time = Rails.env.production? ? 1.month : 1.day
end
api_instance = TripletexRubyClient::TimesheetentryApi.new
opts = {
employee_id: 56, # Integer | ID of employee with recent project hours Defaults to ID of token owner.
from: 0, # Integer | From index
count: 1000, # Integer | Number of elements to return
sorting: 'sorting_example', # String | Sorting pattern
fields: 'fields_example' # String | Fields filter pattern
}
begin
#Find projects with recent activities (timesheet entry registered).
result = api_instance.get_recent_projects(opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TimesheetentryApi->get_recent_projects: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
employee_id | Integer | ID of employee with recent project hours Defaults to ID of token owner. | [optional] |
from | Integer | From index | [optional] [default to 0] |
count | Integer | Number of elements to return | [optional] [default to 1000] |
sorting | String | Sorting pattern | [optional] |
fields | String | Fields filter pattern | [optional] |
- Content-Type: Not defined
- Accept: Not defined
ResponseWrapperBigDecimal get_total_hours(opts)
Find total hours registered on an employee in a specific period.
# load the gem
require 'tripletex_ruby_client'
# setup authorization
# # Setup authorization - as autogenerated by swagger-codegen
# TripletexRubyClient.configure do |config|
# # Configure HTTP basic authorization: tokenAuthScheme
# config.username = 'YOUR USERNAME'
# config.password = 'YOUR PASSWORD'
# end
# Setup authorization
#
TripletexRubyClient.configure do |config|
# Configure HTTP basic authorization: tokenAuthScheme
config.consumer_token = ENV["TT_CONSUMER_TOKEN"]
config.employee_token = ENV["TT_EMPLOYEE_TOKEN"]
config.host = Rails.env.production? ? 'https://tripletex.no' : 'https://api.tripletex.io'
config.token_expiration_time = Rails.env.production? ? 1.month : 1.day
end
api_instance = TripletexRubyClient::TimesheetentryApi.new
opts = {
employee_id: 56, # Integer | ID of employee to find hours for. Defaults to ID of token owner.
start_date: 'start_date_example', # String | Format is yyyy-MM-dd (from and incl.). Defaults to today.
end_date: 'end_date_example', # String | Format is yyyy-MM-dd (to and excl.). Defaults to tomorrow.
fields: 'fields_example' # String | Fields filter pattern
}
begin
#Find total hours registered on an employee in a specific period.
result = api_instance.get_total_hours(opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TimesheetentryApi->get_total_hours: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
employee_id | Integer | ID of employee to find hours for. Defaults to ID of token owner. | [optional] |
start_date | String | Format is yyyy-MM-dd (from and incl.). Defaults to today. | [optional] |
end_date | String | Format is yyyy-MM-dd (to and excl.). Defaults to tomorrow. | [optional] |
fields | String | Fields filter pattern | [optional] |
- Content-Type: Not defined
- Accept: Not defined
ResponseWrapperTimesheetEntry post(opts)
Add new timesheet entry. Only one entry per employee/date/activity/project combination is supported.
# load the gem
require 'tripletex_ruby_client'
# setup authorization
# # Setup authorization - as autogenerated by swagger-codegen
# TripletexRubyClient.configure do |config|
# # Configure HTTP basic authorization: tokenAuthScheme
# config.username = 'YOUR USERNAME'
# config.password = 'YOUR PASSWORD'
# end
# Setup authorization
#
TripletexRubyClient.configure do |config|
# Configure HTTP basic authorization: tokenAuthScheme
config.consumer_token = ENV["TT_CONSUMER_TOKEN"]
config.employee_token = ENV["TT_EMPLOYEE_TOKEN"]
config.host = Rails.env.production? ? 'https://tripletex.no' : 'https://api.tripletex.io'
config.token_expiration_time = Rails.env.production? ? 1.month : 1.day
end
api_instance = TripletexRubyClient::TimesheetentryApi.new
opts = {
body: TripletexRubyClient::TimesheetEntry.new # TimesheetEntry | JSON representing the new object to be created. Should not have ID and version set.
}
begin
#Add new timesheet entry. Only one entry per employee/date/activity/project combination is supported.
result = api_instance.post(opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TimesheetentryApi->post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | TimesheetEntry | JSON representing the new object to be created. Should not have ID and version set. | [optional] |
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
ListResponseTimesheetEntry post_list(opts)
Add new timesheet entry. Multiple objects for several users can be sent in the same request.
# load the gem
require 'tripletex_ruby_client'
# setup authorization
# # Setup authorization - as autogenerated by swagger-codegen
# TripletexRubyClient.configure do |config|
# # Configure HTTP basic authorization: tokenAuthScheme
# config.username = 'YOUR USERNAME'
# config.password = 'YOUR PASSWORD'
# end
# Setup authorization
#
TripletexRubyClient.configure do |config|
# Configure HTTP basic authorization: tokenAuthScheme
config.consumer_token = ENV["TT_CONSUMER_TOKEN"]
config.employee_token = ENV["TT_EMPLOYEE_TOKEN"]
config.host = Rails.env.production? ? 'https://tripletex.no' : 'https://api.tripletex.io'
config.token_expiration_time = Rails.env.production? ? 1.month : 1.day
end
api_instance = TripletexRubyClient::TimesheetentryApi.new
opts = {
body: [TripletexRubyClient::TimesheetEntry.new] # Array<TimesheetEntry> | List of timesheet entry objects
}
begin
#Add new timesheet entry. Multiple objects for several users can be sent in the same request.
result = api_instance.post_list(opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TimesheetentryApi->post_list: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | Array<TimesheetEntry> | List of timesheet entry objects | [optional] |
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
ResponseWrapperTimesheetEntry put(id, opts)
Update timesheet entry by ID. Note: Timesheet entry object fields which are present but not set, or set to 0, will be nulled.
# load the gem
require 'tripletex_ruby_client'
# setup authorization
# # Setup authorization - as autogenerated by swagger-codegen
# TripletexRubyClient.configure do |config|
# # Configure HTTP basic authorization: tokenAuthScheme
# config.username = 'YOUR USERNAME'
# config.password = 'YOUR PASSWORD'
# end
# Setup authorization
#
TripletexRubyClient.configure do |config|
# Configure HTTP basic authorization: tokenAuthScheme
config.consumer_token = ENV["TT_CONSUMER_TOKEN"]
config.employee_token = ENV["TT_EMPLOYEE_TOKEN"]
config.host = Rails.env.production? ? 'https://tripletex.no' : 'https://api.tripletex.io'
config.token_expiration_time = Rails.env.production? ? 1.month : 1.day
end
api_instance = TripletexRubyClient::TimesheetentryApi.new
id = 56 # Integer | Element ID
opts = {
body: TripletexRubyClient::TimesheetEntry.new # TimesheetEntry | Partial object describing what should be updated
}
begin
#Update timesheet entry by ID. Note: Timesheet entry object fields which are present but not set, or set to 0, will be nulled.
result = api_instance.put(id, opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TimesheetentryApi->put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Element ID | |
body | TimesheetEntry | Partial object describing what should be updated | [optional] |
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
ListResponseTimesheetEntry put_list(opts)
Update timesheet entry. Multiple objects for different users can be sent in the same request.
# load the gem
require 'tripletex_ruby_client'
# setup authorization
# # Setup authorization - as autogenerated by swagger-codegen
# TripletexRubyClient.configure do |config|
# # Configure HTTP basic authorization: tokenAuthScheme
# config.username = 'YOUR USERNAME'
# config.password = 'YOUR PASSWORD'
# end
# Setup authorization
#
TripletexRubyClient.configure do |config|
# Configure HTTP basic authorization: tokenAuthScheme
config.consumer_token = ENV["TT_CONSUMER_TOKEN"]
config.employee_token = ENV["TT_EMPLOYEE_TOKEN"]
config.host = Rails.env.production? ? 'https://tripletex.no' : 'https://api.tripletex.io'
config.token_expiration_time = Rails.env.production? ? 1.month : 1.day
end
api_instance = TripletexRubyClient::TimesheetentryApi.new
opts = {
body: [TripletexRubyClient::TimesheetEntry.new] # Array<TimesheetEntry> | List of timesheet entry objects to update
}
begin
#Update timesheet entry. Multiple objects for different users can be sent in the same request.
result = api_instance.put_list(opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TimesheetentryApi->put_list: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | Array<TimesheetEntry> | List of timesheet entry objects to update | [optional] |
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
TimesheetEntrySearchResponse search(date_from, date_to, opts)
Find timesheet entry corresponding with sent data.
# load the gem
require 'tripletex_ruby_client'
# setup authorization
# # Setup authorization - as autogenerated by swagger-codegen
# TripletexRubyClient.configure do |config|
# # Configure HTTP basic authorization: tokenAuthScheme
# config.username = 'YOUR USERNAME'
# config.password = 'YOUR PASSWORD'
# end
# Setup authorization
#
TripletexRubyClient.configure do |config|
# Configure HTTP basic authorization: tokenAuthScheme
config.consumer_token = ENV["TT_CONSUMER_TOKEN"]
config.employee_token = ENV["TT_EMPLOYEE_TOKEN"]
config.host = Rails.env.production? ? 'https://tripletex.no' : 'https://api.tripletex.io'
config.token_expiration_time = Rails.env.production? ? 1.month : 1.day
end
api_instance = TripletexRubyClient::TimesheetentryApi.new
date_from = 'date_from_example' # String | From and including
date_to = 'date_to_example' # String | To and excluding
opts = {
id: 'id_example', # String | List of IDs
employee_id: 'employee_id_example', # String | List of IDs
project_id: 'project_id_example', # String | List of IDs
activity_id: 'activity_id_example', # String | List of IDs
comment: 'comment_example', # String | Containing
from: 0, # Integer | From index
count: 1000, # Integer | Number of elements to return
sorting: 'sorting_example', # String | Sorting pattern
fields: 'fields_example' # String | Fields filter pattern
}
begin
#Find timesheet entry corresponding with sent data.
result = api_instance.search(date_from, date_to, opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TimesheetentryApi->search: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
date_from | String | From and including | |
date_to | String | To and excluding | |
id | String | List of IDs | [optional] |
employee_id | String | List of IDs | [optional] |
project_id | String | List of IDs | [optional] |
activity_id | String | List of IDs | [optional] |
comment | String | Containing | [optional] |
from | Integer | From index | [optional] [default to 0] |
count | Integer | Number of elements to return | [optional] [default to 1000] |
sorting | String | Sorting pattern | [optional] |
fields | String | Fields filter pattern | [optional] |
- Content-Type: Not defined
- Accept: Not defined