Class: IntacctRuby::Functions::UpdateCustomer

Inherits:
CustomerBaseFunction show all
Includes:
ContactsHelper
Defined in:
lib/intacct_ruby/functions/update_customer.rb

Overview

update customer instance

Instance Method Summary collapse

Methods included from ContactsHelper

#contact_params, #contactname, #full_name

Constructor Details

#initialize(attrs = {}) ⇒ UpdateCustomer

Returns a new instance of UpdateCustomer.



9
10
11
# File 'lib/intacct_ruby/functions/update_customer.rb', line 9

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

Instance Method Details

#to_xmlObject



13
14
15
16
17
18
19
# File 'lib/intacct_ruby/functions/update_customer.rb', line 13

def to_xml
  super do |xml|
    xml.update_customer customerid: @attrs[:customerid] do
      xml << customer_params
    end
  end
end