Class: PleskLib::Actions::CreateCustomer

Inherits:
CreateAccount show all
Defined in:
lib/plesk_lib/actions/create_customer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from CreateAccount

#analyse, #build_gen_info

Methods inherited from Base

#execute_on

Constructor Details

#initialize(customer) ⇒ CreateCustomer

Returns a new instance of CreateCustomer.



4
5
6
# File 'lib/plesk_lib/actions/create_customer.rb', line 4

def initialize(customer)
  @customer = customer
end

Instance Attribute Details

#customerObject (readonly)

Returns the value of attribute customer.



2
3
4
# File 'lib/plesk_lib/actions/create_customer.rb', line 2

def customer
  @customer
end

#plesk_idObject (readonly)

Returns the value of attribute plesk_id.



2
3
4
# File 'lib/plesk_lib/actions/create_customer.rb', line 2

def plesk_id
  @plesk_id
end

Instance Method Details

#build_xmlObject

Creates Object & Packet



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/plesk_lib/actions/create_customer.rb', line 9

def build_xml
  xml = Builder::XmlMarkup.new
  xml.instruct!
  xml.packet(:version => '1.6.3.5') {
    xml.customer {
      xml.add{
        build_gen_info(xml, @customer)
      }
    }
  }
  return xml.target!
end