All URIs are relative to https://tripletex.no/v2
Method | HTTP request | Description |
---|---|---|
download_content | GET /document/{id}/content | [BETA] Get content of document given by ID. |
get | GET /document/{id} | [BETA] Get document by ID. |
String download_content(id)
[BETA] Get content of document given 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::DocumentApi.new
id = 56 # Integer | ID of document to download content from.
begin
#[BETA] Get content of document given by ID.
result = api_instance.download_content(id)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling DocumentApi->download_content: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | ID of document to download content from. |
String
- Content-Type: Not defined
- Accept: application/octet-stream
ResponseWrapperDocument get(id, opts)
[BETA] Get document 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::DocumentApi.new
id = 56 # Integer | Element ID
opts = {
fields: 'fields_example' # String | Fields filter pattern
}
begin
#[BETA] Get document by ID.
result = api_instance.get(id, opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling DocumentApi->get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Element ID | |
fields | String | Fields filter pattern | [optional] |
- Content-Type: Not defined
- Accept: Not defined