Class: IntacctRuby::Functions::UpdateLocation

Inherits:
LocationBaseFunction show all
Defined in:
lib/intacct_ruby/functions/update_location.rb

Overview

used to update location instances in Intacct

Instance Method Summary collapse

Methods included from DateHelper

#date_params, #start_date_params

Constructor Details

#initialize(attrs = {}) ⇒ UpdateLocation

Returns a new instance of UpdateLocation.



7
8
9
# File 'lib/intacct_ruby/functions/update_location.rb', line 7

def initialize(attrs = {})
  super("update_location_#{attrs[:locationid]} (#{timestamp})", attrs)
end

Instance Method Details

#to_xmlObject



11
12
13
14
15
16
17
# File 'lib/intacct_ruby/functions/update_location.rb', line 11

def to_xml
  super do |xml|
    xml.update_location locationid: @attrs[:locationid] do
      xml << location_params
    end
  end
end