Class: VWorkApp::Customer
- Defined in:
- lib/vworkapp_ruby/customer.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#to_xml(options = {}) ⇒ Object
XXX Work around for API bug that doesn’t accept a nil contact detail.
Methods inherited from Resource
bad_response, #create, #delete, find, perform, #perform, #persisted?, resource_name, #resource_name, show, #update
Methods inherited from Base
#attributes, #attributes=, #attributes_eql?, hattr_accessor, hattr_reader, hattr_writer, hattrs, #hattrs, #initialize, #read_attributes, #read_attributes=, read_hattrs, #read_hattrs, #validate_and_raise, #write_attributes, #write_attributes=, #write_hattrs, write_hattrs
Constructor Details
This class inherits a constructor from VWorkApp::Base
Instance Method Details
#==(other) ⇒ Object
5 6 7 |
# File 'lib/vworkapp_ruby/customer.rb', line 5 def ==(other) attributes_eql?(other, :id, :name, :third_party_id, :delivery_contact, :billing_contact) end |
#to_xml(options = {}) ⇒ Object
XXX Work around for API bug that doesn’t accept a nil contact detail.
10 11 12 13 14 15 |
# File 'lib/vworkapp_ruby/customer.rb', line 10 def to_xml( = {}) except = [:except] || [] except << "delivery_contact" unless delivery_contact except << "billing_contact" unless billing_contact super(:except => except) end |