Class: SimpleClient::ClientContext
- Inherits:
-
Object
- Object
- SimpleClient::ClientContext
- Defined in:
- lib/simple/client_context.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(credentials, environment = "CERT") ⇒ ClientContext
constructor
A new instance of ClientContext.
Constructor Details
#initialize(credentials, environment = "CERT") ⇒ ClientContext
Returns a new instance of ClientContext.
9 10 11 12 13 |
# File 'lib/simple/client_context.rb', line 9 def initialize(credentials, environment="CERT") @config = OpenapiClient::Configuration.new(environment) @client = OpenapiClient::ApiClient.new(@config) @credentials = credentials end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
3 4 5 |
# File 'lib/simple/client_context.rb', line 3 def client @client end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/simple/client_context.rb', line 3 def config @config end |
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
3 4 5 |
# File 'lib/simple/client_context.rb', line 3 def credentials @credentials end |
Class Method Details
.create(credentials) ⇒ Object
5 6 7 |
# File 'lib/simple/client_context.rb', line 5 def self.create(credentials) return self.new(credentials) end |