All URIs are relative to https://tripletex.no/v2
Method | HTTP request | Description |
---|---|---|
create | PUT /token/session/:create | Create session token. |
delete | DELETE /token/session/{token} | Delete session token. |
who_am_i | GET /token/session/>whoAmI | Find information about the current user. |
ResponseWrapperSessionToken create(consumer_token, employee_token, expiration_date)
Create session token.
# load the gem
require 'tripletex_ruby_client'
api_instance = TripletexRubyClient::TokensessionApi.new
consumer_token = 'consumer_token_example' # String | Token of the API consumer
employee_token = 'employee_token_example' # String | The employees token
expiration_date = 'expiration_date_example' # String | Expiration date for the combined token
begin
#Create session token.
result = api_instance.create(consumer_token, employee_token, expiration_date)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TokensessionApi->create: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
consumer_token | String | Token of the API consumer | |
employee_token | String | The employees token | |
expiration_date | String | Expiration date for the combined token |
No authorization required
- Content-Type: Not defined
- Accept: Not defined
delete(token)
Delete session token.
# 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::TokensessionApi.new
token = 'token_example' # String | The login token string to delete
begin
#Delete session token.
api_instance.delete(token)
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TokensessionApi->delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
token | String | The login token string to delete |
nil (empty response body)
- Content-Type: Not defined
- Accept: Not defined
ResponseWrapperLoggedInUserInfoDTO who_am_i(opts)
Find information about the current user.
# 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::TokensessionApi.new
opts = {
fields: 'fields_example' # String | Fields filter pattern
}
begin
#Find information about the current user.
result = api_instance.who_am_i(opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling TokensessionApi->who_am_i: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
fields | String | Fields filter pattern | [optional] |
ResponseWrapperLoggedInUserInfoDTO
- Content-Type: Not defined
- Accept: Not defined