Class: Intacct::Functions::Create

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

Instance Method Summary collapse

Constructor Details

#initialize(record_type, &block) ⇒ Create



4
5
6
7
# File 'lib/intacct/functions/create.rb', line 4

def initialize(record_type, &block)
  @record_type = record_type
  @block = block
end

Instance Method Details

#to_xmlObject



9
10
11
12
13
14
15
16
17
# File 'lib/intacct/functions/create.rb', line 9

def to_xml
  builder = Builder::XmlMarkup.new

  builder.create do
    builder.tag!(@record_type) do
      @block.call(builder)
    end
  end
end