Skip to content

Latest commit

 

History

History
79 lines (52 loc) · 1.99 KB

AccountTokenApi.md

File metadata and controls

79 lines (52 loc) · 1.99 KB

MergeHRISClient::AccountTokenApi

All URIs are relative to https://api.merge.dev/api/hris/v1

Method HTTP request Description
account_token_retrieve GET /account-token/{public_token}

account_token_retrieve

account_token_retrieve(public_token)

Returns the account token for the end user with the provided public token.

Examples

require 'time'
require 'merge_hris_client'
# setup authorization
MergeHRISClient.configure do |config|
  # Configure API key authorization: tokenAuth
  config.api_key['tokenAuth'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  # config.api_key_prefix['tokenAuth'] = 'Bearer'
end

api_instance = MergeHRISClient::AccountTokenApi.new
public_token = 'public_token_example' # String | 

begin
  
  result = api_instance.account_token_retrieve(public_token)
  p result
rescue MergeHRISClient::ApiError => e
  puts "Error when calling AccountTokenApi->account_token_retrieve: #{e}"
end

Using the account_token_retrieve_with_http_info variant

This returns an Array which contains the response data, status code and headers.

<Array(, Integer, Hash)> account_token_retrieve_with_http_info(public_token)

begin
  
  data, status_code, headers = api_instance.account_token_retrieve_with_http_info(public_token)
  p status_code # => 2xx
  p headers # => { ... }
  p data # => <AccountToken>
rescue MergeHRISClient::ApiError => e
  puts "Error when calling AccountTokenApi->account_token_retrieve_with_http_info: #{e}"
end

Parameters

Name Type Description Notes
public_token String

Return type

AccountToken

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json