Skip to content

Latest commit

 

History

History
135 lines (94 loc) · 3.27 KB

ProductunitApi.md

File metadata and controls

135 lines (94 loc) · 3.27 KB

TripletexApi::ProductunitApi

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

Method HTTP request Description
get GET /product/unit/{id} Get product unit by ID.
search GET /product/unit Find product units corresponding with sent data.

get

ResponseWrapperProductUnit get(id, opts)

Get product unit by ID.

Example

# load the gem
require 'tripletex_api'
# setup authorization
TripletexApi.configure do |config|
  # Configure HTTP basic authorization: tokenAuthScheme
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = TripletexApi::ProductunitApi.new

id = 56 # Integer | Element ID

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

begin
  #Get product unit by ID.
  result = api_instance.get(id, opts)
  p result
rescue TripletexApi::ApiError => e
  puts "Exception when calling ProductunitApi->get: #{e}"
end

Parameters

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

Return type

ResponseWrapperProductUnit

Authorization

tokenAuthScheme

HTTP request headers

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

search

ListResponseProductUnit search(opts)

Find product units corresponding with sent data.

Example

# load the gem
require 'tripletex_api'
# setup authorization
TripletexApi.configure do |config|
  # Configure HTTP basic authorization: tokenAuthScheme
  config.username = 'YOUR USERNAME'
  config.password = 'YOUR PASSWORD'
end

api_instance = TripletexApi::ProductunitApi.new

opts = { 
  id: "id_example", # String | List of IDs
  name: "name_example", # String | Names
  name_short: "name_short_example", # String | Short names
  common_code: "common_code_example", # String | Common codes
  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 product units corresponding with sent data.
  result = api_instance.search(opts)
  p result
rescue TripletexApi::ApiError => e
  puts "Exception when calling ProductunitApi->search: #{e}"
end

Parameters

Name Type Description Notes
id String List of IDs [optional]
name String Names [optional]
name_short String Short names [optional]
common_code String Common codes [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]

Return type

ListResponseProductUnit

Authorization

tokenAuthScheme

HTTP request headers

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