Class: BtpsClient::Client
- Inherits:
-
Object
- Object
- BtpsClient::Client
- Defined in:
- lib/btps_client/client.rb
Overview
User-facing entry point. Instantiate with per-client config overrides or rely on the global BtpsClient.configure block.
Instance Method Summary collapse
-
#auth ⇒ Object
Returns the AuthService for sign-in, sign-out, and OAuth token acquisition.
-
#credentials ⇒ Object
Returns the CredentialsService.
-
#initialize(**opts) ⇒ Client
constructor
A new instance of Client.
-
#managed_accounts ⇒ Object
Returns the ManagedAccountsService.
-
#requests ⇒ Object
Returns the RequestsService.
-
#secrets_safe ⇒ Object
Returns the SecretsSafeService aggregator (folders / safes / secrets).
Constructor Details
#initialize(**opts) ⇒ Client
Returns a new instance of Client.
7 8 9 10 |
# File 'lib/btps_client/client.rb', line 7 def initialize(**opts) base = BtpsClient.configuration.to_h @config = Configuration.new(base.merge(opts)) end |
Instance Method Details
#auth ⇒ Object
Returns the AuthService for sign-in, sign-out, and OAuth token acquisition.
18 19 20 |
# File 'lib/btps_client/client.rb', line 18 def auth @auth ||= Services::AuthService.new(@config) end |
#credentials ⇒ Object
Returns the CredentialsService.
33 34 35 |
# File 'lib/btps_client/client.rb', line 33 def credentials @credentials ||= Services::CredentialsService.new(@config) end |
#managed_accounts ⇒ Object
Returns the ManagedAccountsService.
23 24 25 |
# File 'lib/btps_client/client.rb', line 23 def managed_accounts @managed_accounts ||= Services::ManagedAccountsService.new(@config) end |
#requests ⇒ Object
Returns the RequestsService.
28 29 30 |
# File 'lib/btps_client/client.rb', line 28 def requests @requests ||= Services::RequestsService.new(@config) end |
#secrets_safe ⇒ Object
Returns the SecretsSafeService aggregator (folders / safes / secrets).
13 14 15 |
# File 'lib/btps_client/client.rb', line 13 def secrets_safe @secrets_safe ||= Services::SecretsSafeService.new(@config) end |