Skip to content

Latest commit

 

History

History
270 lines (196 loc) · 7.77 KB

EmployeeemploymentleaveOfAbsenceApi.md

File metadata and controls

270 lines (196 loc) · 7.77 KB

TripletexRubyClient::EmployeeemploymentleaveOfAbsenceApi

All URIs are relative to https://tripletex.no/v2

Method HTTP request Description
get GET /employee/employment/leaveOfAbsence/{id} [BETA] Find leave of absence by ID.
post POST /employee/employment/leaveOfAbsence [BETA] Create leave of absence.
post_list POST /employee/employment/leaveOfAbsence/list [BETA] Create multiple leave of absences.
put PUT /employee/employment/leaveOfAbsence/{id} [BETA] Update leave of absence.

get

ResponseWrapperLeaveOfAbsence get(id, opts)

[BETA] Find leave of absence by ID.

Example

# 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::EmployeeemploymentleaveOfAbsenceApi.new

id = 56 # Integer | Element ID

opts = { 
  fields: 'fields_example' # String | Fields filter pattern
}

begin
  #[BETA] Find leave of absence by ID.
  result = api_instance.get(id, opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling EmployeeemploymentleaveOfAbsenceApi->get: #{e}"
end

Parameters

Name Type Description Notes
id Integer Element ID
fields String Fields filter pattern [optional]

Return type

ResponseWrapperLeaveOfAbsence

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

post

ResponseWrapperLeaveOfAbsence post(opts)

[BETA] Create leave of absence.

Example

# 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::EmployeeemploymentleaveOfAbsenceApi.new

opts = { 
  body: TripletexRubyClient::LeaveOfAbsence.new # LeaveOfAbsence | JSON representing the new object to be created. Should not have ID and version set.
}

begin
  #[BETA] Create leave of absence.
  result = api_instance.post(opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling EmployeeemploymentleaveOfAbsenceApi->post: #{e}"
end

Parameters

Name Type Description Notes
body LeaveOfAbsence JSON representing the new object to be created. Should not have ID and version set. [optional]

Return type

ResponseWrapperLeaveOfAbsence

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: Not defined

post_list

ListResponseLeaveOfAbsence post_list(opts)

[BETA] Create multiple leave of absences.

Example

# 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::EmployeeemploymentleaveOfAbsenceApi.new

opts = { 
  body: [TripletexRubyClient::LeaveOfAbsence.new] # Array<LeaveOfAbsence> | JSON representing a list of new object to be created. Should not have ID and version set.
}

begin
  #[BETA] Create multiple leave of absences.
  result = api_instance.post_list(opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling EmployeeemploymentleaveOfAbsenceApi->post_list: #{e}"
end

Parameters

Name Type Description Notes
body Array<LeaveOfAbsence> JSON representing a list of new object to be created. Should not have ID and version set. [optional]

Return type

ListResponseLeaveOfAbsence

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: Not defined

put

ResponseWrapperLeaveOfAbsence put(id, opts)

[BETA] Update leave of absence.

Example

# 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::EmployeeemploymentleaveOfAbsenceApi.new

id = 56 # Integer | Element ID

opts = { 
  body: TripletexRubyClient::LeaveOfAbsence.new # LeaveOfAbsence | Partial object describing what should be updated
}

begin
  #[BETA] Update leave of absence. 
  result = api_instance.put(id, opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling EmployeeemploymentleaveOfAbsenceApi->put: #{e}"
end

Parameters

Name Type Description Notes
id Integer Element ID
body LeaveOfAbsence Partial object describing what should be updated [optional]

Return type

ResponseWrapperLeaveOfAbsence

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: Not defined