Class: Kloxo::API::Client::AddDomain

Inherits:
Request
  • Object
show all
Defined in:
lib/kloxo/api/client/add_domain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ AddDomain

Returns a new instance of AddDomain.



7
8
9
10
11
# File 'lib/kloxo/api/client/add_domain.rb', line 7

def initialize params = {}
  self.parent_name = params[:parent_name]
  self.domain = params[:domain]
  self.dns_template = params[:dns_template]
end

Instance Attribute Details

#dns_templateObject

Returns the value of attribute dns_template.



5
6
7
# File 'lib/kloxo/api/client/add_domain.rb', line 5

def dns_template
  @dns_template
end

#domainObject

Returns the value of attribute domain.



5
6
7
# File 'lib/kloxo/api/client/add_domain.rb', line 5

def domain
  @domain
end

#parent_nameObject

Returns the value of attribute parent_name.



5
6
7
# File 'lib/kloxo/api/client/add_domain.rb', line 5

def parent_name
  @parent_name
end

Instance Method Details

#paramObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/kloxo/api/client/add_domain.rb', line 13

def param
  {
    "action" => "add",
    "parent-class" => "client",
    "parent-name" => self.parent_name,
    "class" => "domain",
    "name" => self.domain,
    "v-docroot" => self.domain,
    "v-dnstemplate_name" => self.dns_template,
    "priv_s_ssl_flag_aaa_checked" => "on",
    "v-priv_s_awstats_flag_aaa_checked" => "on",
    "v-priv_s_cgi_flag_aaa_checked" => "on",
    "v-priv_s_php_flag_aaa_checked"=>"on"
  }.to_param
end