All URIs are relative to https://tripletex.no/v2
Method | HTTP request | Description |
---|---|---|
import_project_statement | POST /project/import | Upload project import file. |
ListResponseProject import_project_statement(file_format, file, opts)
Upload project import file.
# 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
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] |
- Content-Type: multipart/form-data
- Accept: Not defined