Class: ERPC::CloudClient

Inherits:
Object
  • Object
show all
Defined in:
lib/erpc_sdk/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, http_adapter: nil) ⇒ CloudClient

Returns a new instance of CloudClient.



108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/erpc_sdk/client.rb', line 108

def initialize(config, http_adapter: nil)
  transport = RestTransport.new(
    credential: config.access_token,
    endpoint: config.endpoint,
    headers: config.headers,
    timeout: config.timeout,
    adapter: http_adapter || NetHttpAdapter.new
  )
  @catalog = CloudCatalogClient.new(transport)
  @credit = CloudCreditClient.new(transport)
  @resources = CloudResourcesClient.new(transport)
  @usage = UsageClient.new(transport)
end

Instance Attribute Details

#catalogObject (readonly)

Returns the value of attribute catalog.



106
107
108
# File 'lib/erpc_sdk/client.rb', line 106

def catalog
  @catalog
end

#creditObject (readonly)

Returns the value of attribute credit.



106
107
108
# File 'lib/erpc_sdk/client.rb', line 106

def credit
  @credit
end

#resourcesObject (readonly)

Returns the value of attribute resources.



106
107
108
# File 'lib/erpc_sdk/client.rb', line 106

def resources
  @resources
end

#usageObject (readonly)

Returns the value of attribute usage.



106
107
108
# File 'lib/erpc_sdk/client.rb', line 106

def usage
  @usage
end

Instance Method Details

#closeObject



122
123
124
# File 'lib/erpc_sdk/client.rb', line 122

def close
  nil
end