Skip to content

Latest commit

 

History

History
532 lines (388 loc) · 14.4 KB

ProductgroupApi.md

File metadata and controls

532 lines (388 loc) · 14.4 KB

TripletexRubyClient::ProductgroupApi

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

Method HTTP request Description
delete DELETE /product/group/{id} [BETA] Delete product group.
delete_by_ids DELETE /product/group/list [BETA] Delete multiple product groups.
get GET /product/group/{id} [BETA] Find product group by ID.
post POST /product/group [BETA] Create new product group.
post_list POST /product/group/list [BETA] Add multiple products groups.
put PUT /product/group/{id} [BETA] Update product group.
put_list PUT /product/group/list [BETA] Update a list of product groups.
search GET /product/group [BETA] Find product group with sent data

delete

delete(id)

[BETA] Delete product group.

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

id = 56 # Integer | Element ID


begin
  #[BETA] Delete product group.
  api_instance.delete(id)
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling ProductgroupApi->delete: #{e}"
end

Parameters

Name Type Description Notes
id Integer Element ID

Return type

nil (empty response body)

Authorization

tokenAuthScheme

HTTP request headers

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

delete_by_ids

delete_by_ids(ids)

[BETA] Delete multiple product groups.

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

ids = 'ids_example' # String | ID of the elements


begin
  #[BETA] Delete multiple product groups.
  api_instance.delete_by_ids(ids)
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling ProductgroupApi->delete_by_ids: #{e}"
end

Parameters

Name Type Description Notes
ids String ID of the elements

Return type

nil (empty response body)

Authorization

tokenAuthScheme

HTTP request headers

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

get

ResponseWrapperProductGroup get(id, opts)

[BETA] Find product group by ID.

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

id = 56 # Integer | Element ID

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

begin
  #[BETA] Find product group by ID.
  result = api_instance.get(id, opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling ProductgroupApi->get: #{e}"
end

Parameters

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

Return type

ResponseWrapperProductGroup

Authorization

tokenAuthScheme

HTTP request headers

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

post

ResponseWrapperProductGroup post(opts)

[BETA] Create new product group.

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

opts = { 
  body: TripletexRubyClient::ProductGroup.new # ProductGroup | JSON representing the new object to be created. Should not have ID and version set.
}

begin
  #[BETA] Create new product group.
  result = api_instance.post(opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling ProductgroupApi->post: #{e}"
end

Parameters

Name Type Description Notes
body ProductGroup JSON representing the new object to be created. Should not have ID and version set. [optional]

Return type

ResponseWrapperProductGroup

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: Not defined

post_list

ListResponseProductGroup post_list(opts)

[BETA] Add multiple products groups.

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

opts = { 
  body: [TripletexRubyClient::ProductGroup.new] # Array<ProductGroup> | JSON representing a list of new object to be created. Should not have ID and version set.
}

begin
  #[BETA] Add multiple products groups.
  result = api_instance.post_list(opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling ProductgroupApi->post_list: #{e}"
end

Parameters

Name Type Description Notes
body Array<ProductGroup> JSON representing a list of new object to be created. Should not have ID and version set. [optional]

Return type

ListResponseProductGroup

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: Not defined

put

ResponseWrapperProductGroup put(id, opts)

[BETA] Update product group.

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

id = 56 # Integer | Element ID

opts = { 
  body: TripletexRubyClient::ProductGroup.new # ProductGroup | Partial object describing what should be updated
}

begin
  #[BETA] Update product group.
  result = api_instance.put(id, opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling ProductgroupApi->put: #{e}"
end

Parameters

Name Type Description Notes
id Integer Element ID
body ProductGroup Partial object describing what should be updated [optional]

Return type

ResponseWrapperProductGroup

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: Not defined

put_list

ListResponseProductGroup put_list(opts)

[BETA] Update a list of product groups.

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

opts = { 
  body: [TripletexRubyClient::ProductGroup.new] # Array<ProductGroup> | JSON representing updates to object. Should have ID and version set.
}

begin
  #[BETA] Update a list of product groups.
  result = api_instance.put_list(opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling ProductgroupApi->put_list: #{e}"
end

Parameters

Name Type Description Notes
body Array<ProductGroup> JSON representing updates to object. Should have ID and version set. [optional]

Return type

ListResponseProductGroup

Authorization

tokenAuthScheme

HTTP request headers

  • Content-Type: application/json; charset=utf-8
  • Accept: Not defined

search

ListResponseProductGroup search(opts)

[BETA] Find product group with sent data

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

opts = { 
  id: 'id_example', # String | List of IDs
  name: 'name_example', # String | Containing
  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
  #[BETA] Find product group with sent data
  result = api_instance.search(opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling ProductgroupApi->search: #{e}"
end

Parameters

Name Type Description Notes
id String List of IDs [optional]
name String Containing [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

ListResponseProductGroup

Authorization

tokenAuthScheme

HTTP request headers

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