Class: PermitApiClient
- Inherits:
-
Object
- Object
- PermitApiClient
- Defined in:
- lib/api/api.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
Returns the value of attribute client.
-
#config ⇒ Object
Returns the value of attribute config.
-
#elements ⇒ Object
Returns the value of attribute elements.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#resources ⇒ Object
Returns the value of attribute resources.
-
#roles ⇒ Object
Returns the value of attribute roles.
-
#tenants ⇒ Object
Returns the value of attribute tenants.
-
#users ⇒ Object
Returns the value of attribute users.
Instance Method Summary collapse
-
#initialize(config, logger) ⇒ PermitApiClient
constructor
A new instance of PermitApiClient.
Constructor Details
#initialize(config, logger) ⇒ PermitApiClient
Returns a new instance of PermitApiClient.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/api/api.rb', line 11 def initialize(config, logger) OpenapiClient.configure do |openapi_config| openapi_config.scheme = Utils.get_schema_from_url(config.api_url) openapi_config.host = Utils.get_host_from_url(config.api_url) openapi_config.access_token = config.token openapi_config.server_operation_index = {} openapi_config.server_index = nil end @config = config @logger = logger @users = UsersApi.new(OpenapiClient::UsersApi.new, config, logger) @tenants = TenantsApi.new(OpenapiClient::TenantsApi.new, config, logger) @resources = ResourcesApi.new(OpenapiClient::ResourcesApi.new, config, logger) # @roles = RolesApi.new(OpenapiClient::RolesApi.new, config, logger) @elements = ElementsApi.new(OpenapiClient::AuthenticationApi.new, config, logger) end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
9 10 11 |
# File 'lib/api/api.rb', line 9 def client @client end |
#config ⇒ Object
Returns the value of attribute config.
9 10 11 |
# File 'lib/api/api.rb', line 9 def config @config end |
#elements ⇒ Object
Returns the value of attribute elements.
9 10 11 |
# File 'lib/api/api.rb', line 9 def elements @elements end |
#logger ⇒ Object
Returns the value of attribute logger.
9 10 11 |
# File 'lib/api/api.rb', line 9 def logger @logger end |
#resources ⇒ Object
Returns the value of attribute resources.
9 10 11 |
# File 'lib/api/api.rb', line 9 def resources @resources end |
#roles ⇒ Object
Returns the value of attribute roles.
9 10 11 |
# File 'lib/api/api.rb', line 9 def roles @roles end |
#tenants ⇒ Object
Returns the value of attribute tenants.
9 10 11 |
# File 'lib/api/api.rb', line 9 def tenants @tenants end |
#users ⇒ Object
Returns the value of attribute users.
9 10 11 |
# File 'lib/api/api.rb', line 9 def users @users end |