All URIs are relative to https://tripletex.no/v2
Method | HTTP request | Description |
---|---|---|
delete | DELETE /product/{id} | [BETA] Delete product. |
delete_image | DELETE /product/{id}/image | [BETA] Delete image. |
get | GET /product/{id} | Get product by ID. |
post | POST /product | Create new product. |
post_list | POST /product/list | [BETA] Add multiple products. |
put | PUT /product/{id} | Update product. |
put_list | PUT /product/list | [BETA] Update a list of products. |
search | GET /product | Find products corresponding with sent data. |
upload_image | POST /product/{id}/image | [BETA] Upload image to Product. Existing image on product will be replaced if exists |
delete(id)
[BETA] Delete product.
# 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::ProductApi.new
id = 56 # Integer | Element ID
begin
#[BETA] Delete product.
api_instance.delete(id)
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling ProductApi->delete: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Element ID |
nil (empty response body)
- Content-Type: Not defined
- Accept: Not defined
delete_image(id)
[BETA] Delete image.
# 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::ProductApi.new
id = 56 # Integer | ID of Product containing the image to delete.
begin
#[BETA] Delete image.
api_instance.delete_image(id)
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling ProductApi->delete_image: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | ID of Product containing the image to delete. |
nil (empty response body)
- Content-Type: Not defined
- Accept: Not defined
ResponseWrapperProduct get(id, opts)
Get product 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::ProductApi.new
id = 56 # Integer | Element ID
opts = {
fields: 'fields_example' # String | Fields filter pattern
}
begin
#Get product by ID.
result = api_instance.get(id, opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling ProductApi->get: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Element ID | |
fields | String | Fields filter pattern | [optional] |
- Content-Type: Not defined
- Accept: Not defined
ResponseWrapperProduct post(opts)
Create new product.
# 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::ProductApi.new
opts = {
body: TripletexRubyClient::Product.new # Product | JSON representing the new object to be created. Should not have ID and version set.
}
begin
#Create new product.
result = api_instance.post(opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling ProductApi->post: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | Product | JSON representing the new object to be created. Should not have ID and version set. | [optional] |
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
ListResponseProduct post_list(opts)
[BETA] Add multiple products.
# 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::ProductApi.new
opts = {
body: [TripletexRubyClient::Product.new] # Array<Product> | JSON representing a list of new object to be created. Should not have ID and version set.
}
begin
#[BETA] Add multiple products.
result = api_instance.post_list(opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling ProductApi->post_list: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | Array<Product> | JSON representing a list of new object to be created. Should not have ID and version set. | [optional] |
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
ResponseWrapperProduct put(id, opts)
Update product.
# 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::ProductApi.new
id = 56 # Integer | Element ID
opts = {
body: TripletexRubyClient::Product.new # Product | Partial object describing what should be updated
}
begin
#Update product.
result = api_instance.put(id, opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling ProductApi->put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Element ID | |
body | Product | Partial object describing what should be updated | [optional] |
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
ListResponseProduct put_list(opts)
[BETA] Update a list of products.
# 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::ProductApi.new
opts = {
body: [TripletexRubyClient::Product.new] # Array<Product> | JSON representing updates to object. Should have ID and version set.
}
begin
#[BETA] Update a list of products.
result = api_instance.put_list(opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling ProductApi->put_list: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
body | Array<Product> | JSON representing updates to object. Should have ID and version set. | [optional] |
- Content-Type: application/json; charset=utf-8
- Accept: Not defined
ListResponseProduct search(opts)
Find products corresponding with sent data.
# 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::ProductApi.new
opts = {
number: 'number_example', # String | DEPRECATED. List of product numbers (Integer only)
product_number: ['product_number_example'], # Array<String> | List of valid product numbers
name: 'name_example', # String | Containing
ean: 'ean_example', # String | Equals
is_inactive: true, # BOOLEAN | Equals
is_stock_item: true, # BOOLEAN | Equals
is_supplier_product: true, # BOOLEAN | Equals
supplier_id: 'supplier_id_example', # String | Equals
currency_id: 'currency_id_example', # String | Equals
vat_type_id: 'vat_type_id_example', # String | Equals
product_unit_id: 'product_unit_id_example', # String | Equals
department_id: 'department_id_example', # String | Equals
account_id: 'account_id_example', # String | Equals
cost_excluding_vat_currency_from: 8.14, # Float | From and including
cost_excluding_vat_currency_to: 8.14, # Float | To and excluding
price_excluding_vat_currency_from: 8.14, # Float | From and including
price_excluding_vat_currency_to: 8.14, # Float | To and excluding
price_including_vat_currency_from: 8.14, # Float | From and including
price_including_vat_currency_to: 8.14, # Float | To and excluding
from: 0, # Integer | From index
count: 1000, # Integer | Number of elements to return
sorting: 'sorting_example', # String | Sorting pattern
fields: 'fields_example' # String | Fields filter pattern
}
begin
#Find products corresponding with sent data.
result = api_instance.search(opts)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling ProductApi->search: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
number | String | DEPRECATED. List of product numbers (Integer only) | [optional] |
product_number | Array<String> | List of valid product numbers | [optional] |
name | String | Containing | [optional] |
ean | String | Equals | [optional] |
is_inactive | BOOLEAN | Equals | [optional] |
is_stock_item | BOOLEAN | Equals | [optional] |
is_supplier_product | BOOLEAN | Equals | [optional] |
supplier_id | String | Equals | [optional] |
currency_id | String | Equals | [optional] |
vat_type_id | String | Equals | [optional] |
product_unit_id | String | Equals | [optional] |
department_id | String | Equals | [optional] |
account_id | String | Equals | [optional] |
cost_excluding_vat_currency_from | Float | From and including | [optional] |
cost_excluding_vat_currency_to | Float | To and excluding | [optional] |
price_excluding_vat_currency_from | Float | From and including | [optional] |
price_excluding_vat_currency_to | Float | To and excluding | [optional] |
price_including_vat_currency_from | Float | From and including | [optional] |
price_including_vat_currency_to | Float | To and excluding | [optional] |
from | Integer | From index | [optional] [default to 0] |
count | Integer | Number of elements to return | [optional] [default to 1000] |
sorting | String | Sorting pattern | [optional] |
fields | String | Fields filter pattern | [optional] |
- Content-Type: Not defined
- Accept: Not defined
ResponseWrapperProduct upload_image(id, file)
[BETA] Upload image to Product. Existing image on product will be replaced if exists
# 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::ProductApi.new
id = 56 # Integer | Product ID to upload image to.
file = File.new('/path/to/file.txt') # File | The file
begin
#[BETA] Upload image to Product. Existing image on product will be replaced if exists
result = api_instance.upload_image(id, file)
p result
rescue TripletexRubyClient::ApiError => e
puts "Exception when calling ProductApi->upload_image: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
id | Integer | Product ID to upload image to. | |
file | File | The file |
- Content-Type: multipart/form-data
- Accept: Not defined