Class: Yardi::RequestSection::Authentication
- Inherits:
-
Object
- Object
- Yardi::RequestSection::Authentication
- Defined in:
- lib/yardi/request_section/authentication.rb
Overview
Generate the auth section of a Yardi request
Instance Attribute Summary collapse
-
#credential ⇒ Object
readonly
Returns the value of attribute credential.
Instance Method Summary collapse
- #generate(xml_builder) ⇒ Object
-
#initialize(credential) ⇒ Authentication
constructor
A new instance of Authentication.
Constructor Details
#initialize(credential) ⇒ Authentication
Returns a new instance of Authentication.
9 10 11 |
# File 'lib/yardi/request_section/authentication.rb', line 9 def initialize(credential) @credential = credential end |
Instance Attribute Details
#credential ⇒ Object (readonly)
Returns the value of attribute credential.
7 8 9 |
# File 'lib/yardi/request_section/authentication.rb', line 7 def credential @credential end |
Instance Method Details
#generate(xml_builder) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/yardi/request_section/authentication.rb', line 13 def generate(xml_builder) xml_builder['itf'].UserName credential.username xml_builder['itf'].Password credential.password xml_builder['itf'].ServerName credential.server xml_builder['itf'].Database credential.database xml_builder['itf'].Platform Yardi.config.platform xml_builder['itf'].InterfaceEntity Yardi.config.entity xml_builder['itf'].InterfaceLicense Yardi.config.license_key end |