Class: SecuredCloudConnection
- Inherits:
-
Object
- Object
- SecuredCloudConnection
- Defined in:
- lib/secured_cloud_api_client/sc_connection.rb
Overview
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
Instance Method Summary collapse
- #getApplicationKey ⇒ Object
- #getSharedSecret ⇒ Object
- #getUrl ⇒ Object
-
#initialize(url, applicationKey, sharedSecret) ⇒ SecuredCloudConnection
constructor
The URL must be in the format “10.239.32.201:8080/cloud-external-api-rest”.
Constructor Details
#initialize(url, applicationKey, sharedSecret) ⇒ SecuredCloudConnection
The URL must be in the format “10.239.32.201:8080/cloud-external-api-rest”
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# 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 |
Instance Method Details
#getApplicationKey ⇒ Object
34 35 36 |
# File 'lib/secured_cloud_api_client/sc_connection.rb', line 34 def getApplicationKey return @applicationKey end |
#getSharedSecret ⇒ Object
39 40 41 |
# File 'lib/secured_cloud_api_client/sc_connection.rb', line 39 def getSharedSecret return @sharedSecret end |
#getUrl ⇒ Object
29 30 31 |
# File 'lib/secured_cloud_api_client/sc_connection.rb', line 29 def getUrl return @url end |