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.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/api/api.rb', line 10 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 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::ElementsConfigsApi.new, config, logger) end |
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
8 9 10 |
# File 'lib/api/api.rb', line 8 def client @client end |
#config ⇒ Object
Returns the value of attribute config.
8 9 10 |
# File 'lib/api/api.rb', line 8 def config @config end |
#elements ⇒ Object
Returns the value of attribute elements.
8 9 10 |
# File 'lib/api/api.rb', line 8 def elements @elements end |
#logger ⇒ Object
Returns the value of attribute logger.
8 9 10 |
# File 'lib/api/api.rb', line 8 def logger @logger end |
#resources ⇒ Object
Returns the value of attribute resources.
8 9 10 |
# File 'lib/api/api.rb', line 8 def resources @resources end |
#roles ⇒ Object
Returns the value of attribute roles.
8 9 10 |
# File 'lib/api/api.rb', line 8 def roles @roles end |
#tenants ⇒ Object
Returns the value of attribute tenants.
8 9 10 |
# File 'lib/api/api.rb', line 8 def tenants @tenants end |
#users ⇒ Object
Returns the value of attribute users.
8 9 10 |
# File 'lib/api/api.rb', line 8 def users @users end |