Class: WHMCS::Misc
Overview
The WHMCS::Misc class contains miscelaneous WHMCS API functions
Class Method Summary collapse
-
.decrypt_password(params = {}) ⇒ Object
Decrypt a string with the WHMCS algorithm.
-
.domain_whois(params = {}) ⇒ Object
Perform a whois lookup for a domain name.
-
.encrypt_password(params = {}) ⇒ Object
Encrypt a password with the WHMCS algorithm.
-
.get_activity_log(params = {}) ⇒ Object
Get activity log.
-
.get_admin_details ⇒ Object
Get administrator details.
-
.get_currencies ⇒ Object
Get allowed currencies.
-
.get_email_templates(params = {}) ⇒ Object
Get email templates.
-
.get_promotions(params = {}) ⇒ Object
Get promotions.
-
.get_staff_online ⇒ Object
Get staff online.
-
.get_stats ⇒ Object
Get stats.
-
.get_todo_item_statuses ⇒ Object
Get configured todo item statuses.
-
.get_todo_items(params = {}) ⇒ Object
Get todo items.
-
.update_admin_notes(params = {}) ⇒ Object
Update administrator notes.
Methods inherited from Base
Class Method Details
.decrypt_password(params = {}) ⇒ Object
Decrypt a string with the WHMCS algorithm
NOTE: This cannot be used to decrypt the clients password.
Parameters:
-
:password2
- should contain the string you want decrypting
See:
163 164 165 166 |
# File 'lib/whmcs/misc.rb', line 163 def self.decrypt_password(params = {}) params.merge!(:action => 'decryptpassword') send_request(params) end |
.domain_whois(params = {}) ⇒ Object
Perform a whois lookup for a domain name
Parameters:
-
:domain
- the domain to check
See:
14 15 16 17 |
# File 'lib/whmcs/misc.rb', line 14 def self.domain_whois(params = {}) params.merge!(:action => 'domainwhois') send_request(params) end |
.encrypt_password(params = {}) ⇒ Object
Encrypt a password with the WHMCS algorithm
Parameters:
-
:password2
- should contain the string you want encrypting
See:
147 148 149 150 |
# File 'lib/whmcs/misc.rb', line 147 def self.encrypt_password(params = {}) params.merge!(:action => 'encryptpassword') send_request(params) end |
.get_activity_log(params = {}) ⇒ Object
Get activity log
Parameters:
-
:limitstart
- Which User ID to start at (default = 0) -
:limitnum
- Limit by number (default = 25)
See:
29 30 31 32 |
# File 'lib/whmcs/misc.rb', line 29 def self.get_activity_log(params = {}) params.merge!(:action => 'getactivitylog') send_request(params) end |
.get_admin_details ⇒ Object
39 40 41 |
# File 'lib/whmcs/misc.rb', line 39 def self.get_admin_details send_request(:action => 'getadmindetails') end |
.get_currencies ⇒ Object
62 63 64 |
# File 'lib/whmcs/misc.rb', line 62 def self.get_currencies send_request(:action => 'getcurrencies') end |
.get_email_templates(params = {}) ⇒ Object
Get email templates
Parameters:
-
:type
- optional - from product,domain,support,general,invoice,affiliate -
:language
- optional - only required for additional languages
See:
92 93 94 95 |
# File 'lib/whmcs/misc.rb', line 92 def self.get_email_templates(params = {}) params.merge!(:action => 'getemailtemplates') send_request(params) end |
.get_promotions(params = {}) ⇒ Object
Get promotions
Note: WHMCS has this listed under Misc as well as invoices. It’s aliased here for consistancy with their API docs
Parameters:
-
:code
- the specific promotion code to return information for (optional)
See:
78 79 80 |
# File 'lib/whmcs/misc.rb', line 78 def self.get_promotions(params = {}) Invoice.get_promotions(params) end |
.get_staff_online ⇒ Object
125 126 127 |
# File 'lib/whmcs/misc.rb', line 125 def self.get_staff_online send_request(:action => 'getstaffonline') end |
.get_stats ⇒ Object
134 135 136 |
# File 'lib/whmcs/misc.rb', line 134 def self.get_stats send_request(:action => 'getstats') end |
.get_todo_item_statuses ⇒ Object
116 117 118 |
# File 'lib/whmcs/misc.rb', line 116 def self.get_todo_item_statuses send_request(:action => 'gettodoitemstatuses') end |
.get_todo_items(params = {}) ⇒ Object
Get todo items
Parameters:
-
:status
- optional - from New,Pending,In Progress,Completed,Postponed
See:
106 107 108 109 |
# File 'lib/whmcs/misc.rb', line 106 def self.get_todo_items(params = {}) params.merge!(:action => 'gettodoitems') send_request(params) end |
.update_admin_notes(params = {}) ⇒ Object
Update administrator notes
Parameters:
-
:notes
- notes to enter
See:
52 53 54 55 |
# File 'lib/whmcs/misc.rb', line 52 def self.update_admin_notes(params = {}) params.merge!(:action => 'updateadminnotes') send_request(params) end |