Class: LedgerSync::Customer
- Defined in:
- lib/ledger_sync/resources/customer.rb
Constant Summary
Constants inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
#==, #assign_attribute, #assign_attributes, #changed?, #changes, #dup, inherited, #klass_from_resource_type, resource_module_str, resource_type, serialize_attribute?, #to_h
Methods included from ResourceAttribute::Reference::Many::Mixin
Methods included from ResourceAttribute::Reference::One::Mixin
Methods included from ResourceAttribute::Mixin
#assign_attribute, #assign_attributes, included, #initialize, #resource_attributes, #save, #serialize_attributes
Methods included from Validatable
#valid?, #validate, #validate_or_fail
Instance Method Details
#first_name ⇒ Object
13 14 15 16 17 |
# File 'lib/ledger_sync/resources/customer.rb', line 13 def first_name return '' if name.blank? name.split(' ').first end |
#last_name ⇒ Object
19 20 21 22 23 |
# File 'lib/ledger_sync/resources/customer.rb', line 19 def last_name return '' if name.blank? name.split(' ')[1..-1].join(' ') end |