Class: PleskLib::Actions::ChangeCustomerPassword

Inherits:
Base
  • Object
show all
Defined in:
lib/plesk_lib/actions/change_customer_password.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#execute_on

Constructor Details

#initialize(customer, new_password) ⇒ ChangeCustomerPassword

Returns a new instance of ChangeCustomerPassword.



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

def initialize(customer, new_password)
  @customer = customer
  @new_password = new_password
end

Instance Attribute Details

#customerObject (readonly)

Returns the value of attribute customer.



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

def customer
  @customer
end

#new_passwordObject (readonly)

Returns the value of attribute new_password.



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

def new_password
  @new_password
end

Instance Method Details

#build_xmlObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/plesk_lib/actions/change_customer_password.rb', line 9

def build_xml
  xml = Builder::XmlMarkup.new
  xml.instruct!
  xml.packet(:version => '1.6.3.5') {
    xml.customer {
      xml.set{
        xml.filter{
          xml.(@customer.)
        }
        xml.values{
          xml.gen_info{
            xml.passwd(@new_password)
          }
        }
      }
    }
  }
end