Class: Intacct::Functions::GetApiSession

Inherits:
Object
  • Object
show all
Defined in:
lib/intacct/functions/get_api_session.rb

Instance Method Summary collapse

Constructor Details

#initialize(location_id: nil) ⇒ GetApiSession

Returns a new instance of GetApiSession.



6
7
8
# File 'lib/intacct/functions/get_api_session.rb', line 6

def initialize(location_id: nil)
  @location_id = location_id
end

Instance Method Details

#to_xmlObject



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/intacct/functions/get_api_session.rb', line 10

def to_xml
  builder = Builder::XmlMarkup.new

  if @location_id.present?
    builder.getAPISession do
      builder.locationid @location_id
    end
  else
    builder.getAPISession
  end
end