Class: RelentlessIdentity::AccountApi
- Inherits:
-
Object
- Object
- RelentlessIdentity::AccountApi
- Defined in:
- lib/relentless_identity/api/account_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_request_history(opts = {}) ⇒ ClientRequestHistoryPageResponse
Get paginated request history Return the authenticated user’s latest request history with pagination and optional filters.
-
#get_request_history_with_http_info(opts = {}) ⇒ Array<(ClientRequestHistoryPageResponse, Integer, Hash)>
Get paginated request history Return the authenticated user's latest request history with pagination and optional filters.
-
#get_token_status(opts = {}) ⇒ ClientTokenStatusResponse
Inspect the current bearer token Validate the current bearer token and return its active claims.
-
#get_token_status_with_http_info(opts = {}) ⇒ Array<(ClientTokenStatusResponse, Integer, Hash)>
Inspect the current bearer token Validate the current bearer token and return its active claims.
-
#get_usage(opts = {}) ⇒ ClientUsageResponse
Get current usage and limits Return the current account usage, free-tier limits, and paid capacity details for the authenticated user.
-
#get_usage_with_http_info(opts = {}) ⇒ Array<(ClientUsageResponse, Integer, Hash)>
Get current usage and limits Return the current account usage, free-tier limits, and paid capacity details for the authenticated user.
-
#initialize(api_client = ApiClient.default) ⇒ AccountApi
constructor
A new instance of AccountApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AccountApi
Returns a new instance of AccountApi.
19 20 21 |
# File 'lib/relentless_identity/api/account_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/relentless_identity/api/account_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_request_history(opts = {}) ⇒ ClientRequestHistoryPageResponse
Get paginated request history Return the authenticated user’s latest request history with pagination and optional filters.
30 31 32 33 |
# File 'lib/relentless_identity/api/account_api.rb', line 30 def get_request_history(opts = {}) data, _status_code, _headers = get_request_history_with_http_info(opts) data end |
#get_request_history_with_http_info(opts = {}) ⇒ Array<(ClientRequestHistoryPageResponse, Integer, Hash)>
Get paginated request history Return the authenticated user's latest request history with pagination and optional filters.
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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/relentless_identity/api/account_api.rb', line 43 def get_request_history_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountApi.get_request_history ...' end if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1 fail ArgumentError, 'invalid value for "opts[:"page"]" when calling AccountApi.get_request_history, must be greater than or equal to 1.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 25 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AccountApi.get_request_history, must be smaller than or equal to 25.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AccountApi.get_request_history, must be greater than or equal to 1.' end allowable_values = ["finder", "probe"] if @api_client.config.client_side_validation && opts[:'request_type'] && !allowable_values.include?(opts[:'request_type']) fail ArgumentError, "invalid value for \"request_type\", must be one of #{allowable_values}" end allowable_values = ["deliverable", "undeliverable"] if @api_client.config.client_side_validation && opts[:'state'] && !allowable_values.include?(opts[:'state']) fail ArgumentError, "invalid value for \"state\", must be one of #{allowable_values}" end # resource path local_var_path = '/client/history' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'request_type'] = opts[:'request_type'] if !opts[:'request_type'].nil? query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ClientRequestHistoryPageResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountApi.get_request_history", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountApi#get_request_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_token_status(opts = {}) ⇒ ClientTokenStatusResponse
Inspect the current bearer token Validate the current bearer token and return its active claims.
115 116 117 118 |
# File 'lib/relentless_identity/api/account_api.rb', line 115 def get_token_status(opts = {}) data, _status_code, _headers = get_token_status_with_http_info(opts) data end |
#get_token_status_with_http_info(opts = {}) ⇒ Array<(ClientTokenStatusResponse, Integer, Hash)>
Inspect the current bearer token Validate the current bearer token and return its active claims.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/relentless_identity/api/account_api.rb', line 124 def get_token_status_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountApi.get_token_status ...' end # resource path local_var_path = '/client/token' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ClientTokenStatusResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountApi.get_token_status", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountApi#get_token_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_usage(opts = {}) ⇒ ClientUsageResponse
Get current usage and limits Return the current account usage, free-tier limits, and paid capacity details for the authenticated user.
172 173 174 175 |
# File 'lib/relentless_identity/api/account_api.rb', line 172 def get_usage(opts = {}) data, _status_code, _headers = get_usage_with_http_info(opts) data end |
#get_usage_with_http_info(opts = {}) ⇒ Array<(ClientUsageResponse, Integer, Hash)>
Get current usage and limits Return the current account usage, free-tier limits, and paid capacity details for the authenticated user.
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/relentless_identity/api/account_api.rb', line 181 def get_usage_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountApi.get_usage ...' end # resource path local_var_path = '/client/usage' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ClientUsageResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"AccountApi.get_usage", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountApi#get_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |