Class: IntacctRuby::Functions::UpdateItem

Inherits:
ItemBaseFunction show all
Defined in:
lib/intacct_ruby/functions/update_item.rb

Overview

updates item instance in Intacct

Constant Summary

Constants inherited from ItemBaseFunction

ItemBaseFunction::ALL_PARAMS

Instance Method Summary collapse

Methods inherited from ItemBaseFunction

#item_params

Constructor Details

#initialize(attrs = {}) ⇒ UpdateItem

Returns a new instance of UpdateItem.



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

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

Instance Method Details

#to_xmlObject



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

def to_xml
  super do |xml|
    xml.update_item itemid: @attrs[:itemid] do
      xml << item_params
    end
  end
end