Class: IntacctRuby::Functions::CreateCustomer
- Inherits:
-
CustomerBaseFunction
- Object
- BaseFunction
- CustomerBaseFunction
- IntacctRuby::Functions::CreateCustomer
- Defined in:
- lib/intacct_ruby/functions/create_customer.rb
Overview
function that creates customer instance
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ CreateCustomer
constructor
A new instance of CreateCustomer.
- #to_xml ⇒ Object
Methods included from ContactsHelper
#contact_params, #contactname, #full_name
Constructor Details
#initialize(attrs = {}) ⇒ CreateCustomer
Returns a new instance of CreateCustomer.
8 9 10 |
# File 'lib/intacct_ruby/functions/create_customer.rb', line 8 def initialize(attrs = {}) super "create_customer_#{attrs[:customerid]}", attrs end |
Instance Method Details
#to_xml ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/intacct_ruby/functions/create_customer.rb', line 12 def to_xml super do |xml| xml.create_customer do xml.customerid @attrs[:customerid] xml << customer_params end end end |