lib/lumberg/cpanel/ssl.rb in lumberg-2.0.0.pre4 vs lib/lumberg/cpanel/ssl.rb in lumberg-2.0.0.pre5

- old
+ new

@@ -13,22 +13,22 @@ # :subject - String subject line. # # Returns Hash API response. def installssl(options = {}) perform_request({ - :api_function => "installssl" + api_function: "installssl" }.merge(options)) end # Public: List CSRs associated with your cPanel account. # # options - Hash options for API call params (default: {}): # # Returns Hash API response. def listcsrs(options = {}) perform_request({ - :api_function => "listcsrs", + api_function: "listcsrs", }.merge(options)) end # Public: Print a specific Certificate Signing Request. # @@ -37,14 +37,14 @@ # :textmode - 0 for human readable, 1 for binary. # # Returns Hash API response. def showcsr(options = {}) perform_request({ - :api_function => "showcsr", - :api_version => 1, - :user => options[:user], - :response_key => "data", + api_function: "showcsr", + api_version: 1, + user: options[:user], + response_key: "data", "arg-0" => options[:domain], "arg-1" => options[:textmode] }) end @@ -55,14 +55,14 @@ # :textmode - 0 for human readable, 1 for binary. # # Returns Hash API response. def showkey(options = {}) perform_request({ - :api_function => "showkey", - :api_version => 1, - :user => options[:user], - :response_key => "data", + api_function: "showkey", + api_version: 1, + user: options[:user], + response_key: "data", "arg-0" => options[:domain], "arg-1" => options[:textmode] }) end @@ -71,14 +71,14 @@ # options - Hash options for API call params (default: {}): # # Returns Hash API response. def showcrt(options = {}) perform_request({ - :api_function => "showcrt", - :api_version => 1, - :user => options[:user], - :response_key => "data", + api_function: "showcrt", + api_version: 1, + user: options[:user], + response_key: "data", "arg-0" => options[:domain], "arg-1" => options[:textmode] }) end @@ -87,22 +87,22 @@ # options - Hash options for API call params (default: {}): # # Returns Hash API response. def listcrts(options = {}) perform_request({ - :api_function => "listcrts", + api_function: "listcrts", }.merge(options)) end # Public: List SSL keys associated with a domain. # # options - Hash options for API call params (default: {}): # # Returns Hash API response. def listkeys(options = {}) perform_request({ - :api_function => "listkeys", + api_function: "listkeys", }.merge(options)) end # Public: Fetch the cabundle that corresponds to the certificate # @@ -110,11 +110,11 @@ # :crt - Contents of the certificate file # # Returns Hash API response. def fetchcabundle(options = {}) perform_request({ - :api_function => "fetchcabundle", + api_function: "fetchcabundle", }.merge(options)) end # Public: Query for SSL related items installed via cPanel # @@ -124,11 +124,11 @@ # Acceptable values include 'key', 'crt', and 'csr'. # # Returns Hash API response. def listsslitems(options = {}) perform_request({ - :api_function => "listsslitems", + api_function: "listsslitems", }.merge(options)) end # Public: Generate a certificate signing request. # @@ -147,12 +147,12 @@ # Returns Hash API response. def gencsr(options = {}) options[:companydivision] = options.delete(:company_division) perform_request({ - :api_function => "gencsr", - :response_key => "cpanelresult", + api_function: "gencsr", + response_key: "cpanelresult", }.merge(options)) end # Public: Generate a self-signed SSL certificate for a specific domain. # @@ -170,11 +170,11 @@ # Returns Hash API response. def gencrt(options = {}) options[:companydivision] = options.delete(:company_division) perform_request({ - :api_function => "gencrt", + api_function: "gencrt", }.merge(options)) end # Public: Generate an SSL key. You must have access to the 'sslmanager'. # @@ -184,11 +184,11 @@ # Optional, may range from 1024 to 4096. # # Returns Hash API response. def genkey(options = {}) perform_request({ - :api_function => "genkey", + api_function: "genkey", }.merge(options)) end # Public: Upload an SSL certificate. # @@ -196,10 +196,10 @@ # :crt - Contents of the SSL certificate # # Returns Hash API response. def uploadcrt(options = {}) perform_request({ - :api_function => "uploadcrt", + api_function: "uploadcrt", }.merge(options)) end end end end