Module: IntacctRuby::DateHelper

Included in:
Functions::CreateARAdjustment, Functions::EmployeeBaseFunction, Functions::LocationBaseFunction
Defined in:
lib/intacct_ruby/helpers/date_helper.rb

Overview

methods to help generate date XML for calls

Instance Method Summary collapse

Instance Method Details

#date_params(block_name, attrs = {}) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/intacct_ruby/helpers/date_helper.rb', line 6

def date_params(block_name, attrs = {})
  xml = Builder::XmlMarkup.new

  xml.tag!(block_name) do
    xml.year  attrs[:year]
    xml.month attrs[:month]
    xml.day   attrs[:day]
  end
end

#start_date_paramsObject

Note: @attrs MUST be defined in the invoking context for this bad boy to work



18
19
20
# File 'lib/intacct_ruby/helpers/date_helper.rb', line 18

def start_date_params
  date_params :startdate, @attrs[:startdate]
end