Class: IntacctRuby::Functions::CreateItem
- Inherits:
-
ItemBaseFunction
- Object
- BaseFunction
- ItemBaseFunction
- IntacctRuby::Functions::CreateItem
- Defined in:
- lib/intacct_ruby/functions/create_item.rb
Overview
creates an item instance in Intacct
Constant Summary
Constants inherited from ItemBaseFunction
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ CreateItem
constructor
A new instance of CreateItem.
- #to_xml ⇒ Object
Methods inherited from ItemBaseFunction
Constructor Details
#initialize(attrs = {}) ⇒ CreateItem
Returns a new instance of CreateItem.
7 8 9 |
# File 'lib/intacct_ruby/functions/create_item.rb', line 7 def initialize(attrs = {}) super "create_item_#{attrs[:itemid]}", attrs end |
Instance Method Details
#to_xml ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/intacct_ruby/functions/create_item.rb', line 11 def to_xml super do |xml| xml.create_item do xml.itemid @attrs[:itemid] xml << item_params end end end |