Class: Lumberg::Cpanel::Support

Inherits:
Base show all
Defined in:
lib/lumberg/cpanel/support.rb

Instance Attribute Summary

Attributes inherited from Base

#api_username

Attributes inherited from Whm::Base

#server

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, #perform_request

Methods inherited from Whm::Base

#initialize, #setup_server

Constructor Details

This class inherits a constructor from Lumberg::Cpanel::Base

Class Method Details

.api_moduleObject


4
# File 'lib/lumberg/cpanel/support.rb', line 4

def self.api_module; "Contactus"; end

Instance Method Details

#contactableObject

Public: Check if you can open a support ticket, or if you are able to contact your hosting provider through Cpanel

Returns Hash API response


24
25
26
# File 'lib/lumberg/cpanel/support.rb', line 24

def contactable
  perform_request({ api_function: "isenabled" })
end

#open_ticket(options = {}) ⇒ Object

Public: Send a support request.

options - Hash options for API call params (default: {}):

:email   - String destination email address.
:issue   - String brief explantation of issue (body text).
:subject - String subject line.

Returns Hash API response.


14
15
16
17
18
# File 'lib/lumberg/cpanel/support.rb', line 14

def open_ticket(options = {})
  perform_request({
    api_function: "sendcontact"
  }.merge(options))
end