Class: TripletexRubyClient::TokensessionApi
- Inherits:
-
Object
- Object
- TripletexRubyClient::TokensessionApi
- Defined in:
- lib/tripletex_ruby_client/api/tokensession_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create(consumer_token, employee_token, expiration_date, opts = {}) ⇒ ResponseWrapperSessionToken
Create session token.
-
#create_with_http_info(consumer_token, employee_token, expiration_date, opts = {}) ⇒ Array<(ResponseWrapperSessionToken, Fixnum, Hash)>
Create session token.
-
#delete(token, opts = {}) ⇒ nil
Delete session token.
-
#delete_with_http_info(token, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete session token.
-
#initialize(api_client = ApiClient.default) ⇒ TokensessionApi
constructor
A new instance of TokensessionApi.
-
#who_am_i(opts = {}) ⇒ ResponseWrapperLoggedInUserInfoDTO
Find information about the current user.
-
#who_am_i_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperLoggedInUserInfoDTO, Fixnum, Hash)>
Find information about the current user.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TokensessionApi
Returns a new instance of TokensessionApi.
19 20 21 |
# File 'lib/tripletex_ruby_client/api/tokensession_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/tripletex_ruby_client/api/tokensession_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create(consumer_token, employee_token, expiration_date, opts = {}) ⇒ ResponseWrapperSessionToken
Create session token.
29 30 31 32 |
# File 'lib/tripletex_ruby_client/api/tokensession_api.rb', line 29 def create(consumer_token, employee_token, expiration_date, opts = {}) data, _status_code, _headers = create_with_http_info(consumer_token, employee_token, expiration_date, opts) data end |
#create_with_http_info(consumer_token, employee_token, expiration_date, opts = {}) ⇒ Array<(ResponseWrapperSessionToken, Fixnum, Hash)>
Create session token.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/tripletex_ruby_client/api/tokensession_api.rb', line 41 def create_with_http_info(consumer_token, employee_token, expiration_date, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TokensessionApi.create ...' end # verify the required parameter 'consumer_token' is set if @api_client.config.client_side_validation && consumer_token.nil? fail ArgumentError, "Missing the required parameter 'consumer_token' when calling TokensessionApi.create" end # verify the required parameter 'employee_token' is set if @api_client.config.client_side_validation && employee_token.nil? fail ArgumentError, "Missing the required parameter 'employee_token' when calling TokensessionApi.create" end # verify the required parameter 'expiration_date' is set if @api_client.config.client_side_validation && expiration_date.nil? fail ArgumentError, "Missing the required parameter 'expiration_date' when calling TokensessionApi.create" end # resource path local_var_path = '/token/session/:create' # query parameters query_params = {} query_params[:'consumerToken'] = consumer_token query_params[:'employeeToken'] = employee_token query_params[:'expirationDate'] = expiration_date # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseWrapperSessionToken') if @api_client.config.debugging @api_client.config.logger.debug "API called: TokensessionApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete(token, opts = {}) ⇒ nil
Delete session token.
92 93 94 95 |
# File 'lib/tripletex_ruby_client/api/tokensession_api.rb', line 92 def delete(token, opts = {}) delete_with_http_info(token, opts) nil end |
#delete_with_http_info(token, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Delete session token.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/tripletex_ruby_client/api/tokensession_api.rb', line 102 def delete_with_http_info(token, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TokensessionApi.delete ...' end # verify the required parameter 'token' is set if @api_client.config.client_side_validation && token.nil? fail ArgumentError, "Missing the required parameter 'token' when calling TokensessionApi.delete" end # resource path local_var_path = '/token/session/{token}'.sub('{' + 'token' + '}', token.to_s) # query parameters query_params = {} # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: TokensessionApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#who_am_i(opts = {}) ⇒ ResponseWrapperLoggedInUserInfoDTO
Find information about the current user.
141 142 143 144 |
# File 'lib/tripletex_ruby_client/api/tokensession_api.rb', line 141 def who_am_i(opts = {}) data, _status_code, _headers = who_am_i_with_http_info(opts) data end |
#who_am_i_with_http_info(opts = {}) ⇒ Array<(ResponseWrapperLoggedInUserInfoDTO, Fixnum, Hash)>
Find information about the current user.
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/tripletex_ruby_client/api/tokensession_api.rb', line 151 def who_am_i_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TokensessionApi.who_am_i ...' end # resource path local_var_path = '/token/session/>whoAmI' # query parameters query_params = {} query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['tokenAuthScheme'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ResponseWrapperLoggedInUserInfoDTO') if @api_client.config.debugging @api_client.config.logger.debug "API called: TokensessionApi#who_am_i\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |