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

Returns a new instance of Create.



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

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

Instance Method Details

#to_xmlObject



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

def to_xml
  builder = Builder::XmlMarkup.new

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