Class: SimpleClient::ClientContext

Inherits:
Object
  • Object
show all
Defined in:
lib/simple/client_context.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#clientObject (readonly)

Returns the value of attribute client.



3
4
5
# File 'lib/simple/client_context.rb', line 3

def client
  @client
end

#configObject (readonly)

Returns the value of attribute config.



3
4
5
# File 'lib/simple/client_context.rb', line 3

def config
  @config
end

#credentialsObject (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