Class: PipeLineDealer::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/pipe_line_dealer/client.rb,
lib/pipe_line_dealer/client/connection.rb

Defined Under Namespace

Classes: Connection

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key, options = {}) ⇒ Client

Returns a new instance of Client.



7
8
9
# File 'lib/pipe_line_dealer/client.rb', line 7

def initialize(api_key, options = {})
  @connection = Connection.new(api_key, options)
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



5
6
7
# File 'lib/pipe_line_dealer/client.rb', line 5

def connection
  @connection
end

Instance Method Details

#companiesObject



11
12
13
# File 'lib/pipe_line_dealer/client.rb', line 11

def companies
  Collection.new(self, klass: Company)
end

#custom_company_fieldsObject



15
16
17
# File 'lib/pipe_line_dealer/client.rb', line 15

def custom_company_fields
  CustomField::Collection.new(self, klass: Company::CustomField)
end

#custom_person_fieldsObject



23
24
25
# File 'lib/pipe_line_dealer/client.rb', line 23

def custom_person_fields
  CustomField::Collection.new(self, klass: Person::CustomField)
end

#peopleObject



19
20
21
# File 'lib/pipe_line_dealer/client.rb', line 19

def people
  Collection.new(self, klass: Person)
end