Class: IntacctRuby::Functions::CreateEmployee

Inherits:
EmployeeBaseFunction show all
Defined in:
lib/intacct_ruby/functions/create_employee.rb

Overview

Function that creates an employee instance in Intacct

Instance Method Summary collapse

Methods included from DateHelper

#date_params, #start_date_params

Methods included from ContactsHelper

#contact_params, #contactname, #full_name

Constructor Details

#initialize(attrs = {}) ⇒ CreateEmployee

Returns a new instance of CreateEmployee.



7
8
9
# File 'lib/intacct_ruby/functions/create_employee.rb', line 7

def initialize(attrs = {})
  super("create_employee_#{attrs[:employeeid]}", attrs)
end

Instance Method Details

#to_xmlObject



11
12
13
14
15
16
17
18
# File 'lib/intacct_ruby/functions/create_employee.rb', line 11

def to_xml
  super do |xml|
    xml.create_employee do
      xml.employeeid @attrs[:employeeid]
      xml << employee_params
    end
  end
end