Skip to content

Latest commit

 

History

History
124 lines (84 loc) · 2.94 KB

EventApi.md

File metadata and controls

124 lines (84 loc) · 2.94 KB

TripletexRubyClient::EventApi

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

Method HTTP request Description
example GET /event/{eventType} [BETA] Get example webhook payload
get GET /event [BETA] Get all (WebHook) event keys.

example

ResponseWrapperEventInfoDTO example(event_type, opts)

[BETA] Get example webhook payload

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

event_type = 'event_type_example' # String | Event type, from /event endpoint

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

begin
  #[BETA] Get example webhook payload
  result = api_instance.example(event_type, opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling EventApi->example: #{e}"
end

Parameters

Name Type Description Notes
event_type String Event type, from /event endpoint
fields String Fields filter pattern [optional]

Return type

ResponseWrapperEventInfoDTO

Authorization

tokenAuthScheme

HTTP request headers

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

get

ResponseWrapperMapStringEventInfoDescription get(opts)

[BETA] Get all (WebHook) event keys.

Example

# load the gem
require 'tripletex_ruby_client'

api_instance = TripletexRubyClient::EventApi.new

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

begin
  #[BETA] Get all (WebHook) event keys.
  result = api_instance.get(opts)
  p result
rescue TripletexRubyClient::ApiError => e
  puts "Exception when calling EventApi->get: #{e}"
end

Parameters

Name Type Description Notes
fields String Fields filter pattern [optional]

Return type

ResponseWrapperMapStringEventInfoDescription

Authorization

No authorization required

HTTP request headers

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