Class: Whmcs::Module

Inherits:
Base
  • Object
show all
Defined in:
lib/whmcs/module.rb

Overview

WHMCS::Module is the class for working with hosting account modules

Class Method Summary collapse

Methods inherited from Base

parse_response, send_request

Class Method Details

.module_create(params = {}) ⇒ Object

Run the module create command

Parameters:

  • :accountid - the unique id number of the account in the tblhosting table

See:

wiki.whmcs.com/API:Module_Create



14
15
16
17
# File 'lib/whmcs/module.rb', line 14

def self.module_create(params = {})
  params.merge!(:action => 'modulecreate')
  send_request(params)
end

.module_suspend(params = {}) ⇒ Object

Run the module suspend command

Parameters:

  • :accountid - the unique id number of the account in the tblhosting table

  • :suspendreason - an explanation of why the suspension has been made shown to clients & staff

See:

wiki.whmcs.com/API:Module_Suspend



29
30
31
32
# File 'lib/whmcs/module.rb', line 29

def self.module_suspend(params = {})
  params.merge!(:action => 'modulesuspend')
  send_request(params)
end

.module_terminate(params = {}) ⇒ Object

Run the module terminate command

Parameters:

  • :accountid - the unique id number of the account in the tblhosting table

See:

wiki.whmcs.com/API:Module_Terminate



57
58
59
60
# File 'lib/whmcs/module.rb', line 57

def self.module_terminate(params = {})
  params.merge!(:action => 'moduleterminate')
  send_request(params)
end

.module_unsuspend(params = {}) ⇒ Object

Run the module unsuspend command

Parameters:

  • :accountid - the unique id number of the account in the tblhosting table

See:

wiki.whmcs.com/API:Module_Unsuspend



43
44
45
46
# File 'lib/whmcs/module.rb', line 43

def self.module_unsuspend(params = {})
  params.merge!(:action => 'moduleunsuspend')
  send_request(params)
end