Class: Lumberg::Cpanel::Park

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

Instance Attribute Summary

Attributes inherited from Base

#api_username

Attributes inherited from Whm::Base

#server

Instance Method Summary collapse

Methods inherited from Base

api_module, #initialize, #perform_request

Methods inherited from Whm::Base

#initialize, #setup_server

Constructor Details

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

Instance Method Details

#add(options = {}) ⇒ Object

Public: Add a parked domain.

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

:domain    - String domain to park.
:topdomain - String domain to park on top of (optional, default:
             account primary domain).

Returns Hash API response.



12
13
14
15
16
# File 'lib/lumberg/cpanel/park.rb', line 12

def add(options = {})
  perform_request({
    api_function: "park"
  }.merge(options))
end

#list(options = {}) ⇒ Object

Public: Get a list of parked domains.

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

:regex - String regular expression to filter search results
         (optional).

Returns Hash API response.



37
38
39
40
41
# File 'lib/lumberg/cpanel/park.rb', line 37

def list(options = {})
  perform_request({
    api_function: "listparkeddomains"
  }.merge(options))
end

#list_addon_domains(options = {}) ⇒ Object

Public: Get a list addon domains.

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

:regex - String regular expresion to filter search results
         (optional).

Returns Hash API response.



50
51
52
53
54
# File 'lib/lumberg/cpanel/park.rb', line 50

def list_addon_domains(options = {})
  perform_request({
    api_function: "listaddondomains"
  }.merge(options))
end

#remove(options = {}) ⇒ Object

Public: Remove a parked domain.

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

:domain - String parked domain to remove.

Returns Hash API response.



24
25
26
27
28
# File 'lib/lumberg/cpanel/park.rb', line 24

def remove(options = {})
  perform_request({
    api_function: "unpark"
  }.merge(options))
end