Class: RealPage::RequestSection::Auth

Inherits:
Object
  • Object
show all
Defined in:
lib/real_page/request_section/auth.rb

Overview

Generate the auth section of a RealPage request

Instance Method Summary collapse

Constructor Details

#initialize(pmc_id:, site_id:) ⇒ Auth

Returns a new instance of Auth.



10
11
12
13
# File 'lib/real_page/request_section/auth.rb', line 10

def initialize(pmc_id:, site_id:)
  @pmc_id = pmc_id
  @site_id = site_id
end

Instance Method Details

#generate(xml_builder) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/real_page/request_section/auth.rb', line 15

def generate(xml_builder)
  xml_builder.auth do
    xml_builder.pmcid pmc_id
    xml_builder.siteid site_id
    xml_builder.username RealPage.config.username
    xml_builder.password RealPage.config.password
    xml_builder.licensekey RealPage.config.license_key
    xml_builder.system SYSTEM
  end
end