Class: Lumberg::Cpanel::Contact
- Defined in:
- lib/lumberg/cpanel/contact.rb
Overview
Public: Allows users to specify contact information and preferences
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Whm::Base
Class Method Summary collapse
Instance Method Summary collapse
-
#show ⇒ Object
Public: Show your contact information and email notfication settings.
-
#update(options = {}) ⇒ Object
Public: Updates the user’s contact info and settings for email notifications.
Methods inherited from Base
Methods inherited from Whm::Base
Constructor Details
This class inherits a constructor from Lumberg::Cpanel::Base
Class Method Details
.api_module ⇒ Object
5 |
# File 'lib/lumberg/cpanel/contact.rb', line 5 def self.api_module; "CustInfo"; end |
Instance Method Details
#show ⇒ Object
Public: Show your contact information and email notfication settings
Returns Hash API response
10 11 12 |
# File 'lib/lumberg/cpanel/contact.rb', line 10 def show perform_request({ api_function: 'displaycontactinfo' }) end |
#update(options = {}) ⇒ Object
Public: Updates the user’s contact info and settings for email notifications
options - Hash options for API call params (default: {})
:email - String email account to send notifications to
:second_email - String secondary email account to send notifications
to (default: String)
:email_quota - Boolean value. Set to true to be notified when you are
when one of your email accounts approaches or is over
quota (default: Boolean)
:disk_quota - Boolean value. Set to true to be notified when you are
when you are reaching your disk quota (default: Boolean)
:bandwidth - Boolean value. Set to true to be notified when you are
reaching your bandwidth usage limit (default: Boolean)
Returns Hash API response
30 31 32 33 34 35 |
# File 'lib/lumberg/cpanel/contact.rb', line 30 def update( = {}) [:notify_disk_limit] = .delete(:disk_quota) [:notify_bandwidth_limit] = .delete(:bandwidth) [:notify_email_quota_limit] = .delete(:email_quota) perform_request({ api_function: 'savecontactinfo' }.merge()) end |