Class: IntacctRuby::Functions::CreateStatGLTransaction

Inherits:
GLTransactionBaseFunction show all
Includes:
DateHelper
Defined in:
lib/intacct_ruby/functions/create_statgltransaction.rb

Overview

creates gltransaction instance in Intacct

Instance Method Summary collapse

Methods included from DateHelper

#date_params, #start_date_params

Constructor Details

#initialize(attrs = {}) ⇒ CreateStatGLTransaction

Returns a new instance of CreateStatGLTransaction.



10
11
12
13
# File 'lib/intacct_ruby/functions/create_statgltransaction.rb', line 10

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

Instance Method Details

#to_xmlObject



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/intacct_ruby/functions/create_statgltransaction.rb', line 15

def to_xml
  super do |xml|
    xml.create_statgltransaction do
      xml << gltransaction_header_params(@attrs)

      xml.statgltransactionentries do
        xml << gltransactionentry_params(@attrs[:statgltransactionentries])
      end
    end
  end
end