Skip to content

Latest commit

 

History

History
82 lines (59 loc) · 2.35 KB

ProjectimportApi.md

File metadata and controls

82 lines (59 loc) · 2.35 KB

TripletexRubyClient::ProjectimportApi

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

Method HTTP request Description
import_project_statement POST /project/import Upload project import file.

import_project_statement

ListResponseProject import_project_statement(file_format, file, opts)

Upload project import file.

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::ProjectimportApi.new

file_format = 'file_format_example' # String | File format

file = File.new('/path/to/file.txt') # File | The project import file

opts = { 
  encoding: 'encoding_example', # String | Encoding
  delimiter: 'delimiter_example', # String | Delimiter
  ignore_first_row: true # BOOLEAN | Ignore first row
}

begin
  #Upload project import file.
  result = api_instance.import_project_statement(file_format, file, opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling ProjectimportApi->import_project_statement: #{e}"
end

Parameters

Name Type Description Notes
file_format String File format
file File The project import file
encoding String Encoding [optional]
delimiter String Delimiter [optional]
ignore_first_row BOOLEAN Ignore first row [optional]

Return type

ListResponseProject

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: Not defined