Class: Rubill::Customer

Inherits:
Base
  • Object
show all
Defined in:
lib/rubill/customer.rb

Instance Attribute Summary

Attributes inherited from Base

#remote_record

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, active, all, create, delete, #delete, find, #id, #initialize, #save, update, where

Constructor Details

This class inherits a constructor from Rubill::Base

Class Method Details

.find_by_name(name) ⇒ Object



3
4
5
# File 'lib/rubill/customer.rb', line 3

def self.find_by_name(name)
  where([Query::Filter.new("name", "=", name)]).first
end

.remote_class_nameObject



11
12
13
# File 'lib/rubill/customer.rb', line 11

def self.remote_class_name
  "Customer"
end

Instance Method Details

#contactsObject



7
8
9
# File 'lib/rubill/customer.rb', line 7

def contacts
  CustomerContact.active_by_customer(id)
end