class SecuredCloudConnection
Class SecuredCloudConnection
stores the details of a connection to the Secured Cloud API. An object of this type is needed whenever making calls to the API.
- @author
-
Alan Vella
Public Class Methods
new(url, applicationKey, sharedSecret)
click to toggle source
The URL must be in the format “10.239.32.201:8080/cloud-external-api-rest”
# File lib/secured_cloud_api_client/sc_connection.rb, line 12 def initialize(url, applicationKey, sharedSecret) #validation raise ArgumentError, 'SecuredCloudConnection URL needs to be initialized' unless url != nil raise ArgumentError, 'SecuredCloudConnection URL needs to be a valid string' unless url.respond_to?(:to_str) raise ArgumentError, 'SecuredCloudConnection applicationKey needs to be initialized' unless applicationKey != nil raise ArgumentError, 'SecuredCloudConnection applicationKey needs to be a valid string' unless applicationKey.respond_to?(:to_str) raise ArgumentError, 'SecuredCloudConnection sharedSecret needs to be initialized' unless sharedSecret != nil raise ArgumentError, 'SecuredCloudConnection sharedSecret needs to be a valid string' unless sharedSecret.respond_to?(:to_str) @url = url @applicationKey = applicationKey @sharedSecret = sharedSecret end
Public Instance Methods
getApplicationKey()
click to toggle source
# File lib/secured_cloud_api_client/sc_connection.rb, line 34 def getApplicationKey return @applicationKey end
getUrl()
click to toggle source
# File lib/secured_cloud_api_client/sc_connection.rb, line 29 def getUrl return @url end