Class: MOCO::Company

Inherits:
BaseEntity show all
Defined in:
lib/moco/entities/company.rb

Overview

Represents a MOCO company (customer) Provides methods for company-specific associations

Instance Attribute Summary

Attributes inherited from BaseEntity

#attributes, #client

Instance Method Summary collapse

Methods inherited from BaseEntity

#==, #association, #destroy, #eql?, #has_many, #hash, #id, #initialize, #inspect, #reload, #save, #to_h, #to_json, #update

Constructor Details

This class inherits a constructor from MOCO::BaseEntity

Instance Method Details

#contactsObject



20
21
22
# File 'lib/moco/entities/company.rb', line 20

def contacts
  has_many(:contacts)
end

#dealsObject



16
17
18
# File 'lib/moco/entities/company.rb', line 16

def deals
  has_many(:deals)
end

#invoicesObject



12
13
14
# File 'lib/moco/entities/company.rb', line 12

def invoices
  has_many(:invoices)
end

#projectsObject

Associations



8
9
10
# File 'lib/moco/entities/company.rb', line 8

def projects
  has_many(:projects)
end

#to_sObject



24
25
26
# File 'lib/moco/entities/company.rb', line 24

def to_s
  name
end