Class: BaseCRM::Client
- Inherits:
-
Object
- Object
- BaseCRM::Client
- Defined in:
- lib/basecrm.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#http_client ⇒ Object
readonly
Returns the value of attribute http_client.
Instance Method Summary collapse
-
#accounts ⇒ AccountsService
Access all Accounts related actions.
-
#associated_contacts ⇒ AssociatedContactsService
Access all AssociatedContacts related actions.
-
#contacts ⇒ ContactsService
Access all Contacts related actions.
-
#deals ⇒ DealsService
Access all Deals related actions.
-
#initialize(options = {}) ⇒ Client
constructor
Instantiate a new BaseCRM API V2 client.
-
#leads ⇒ LeadsService
Access all Leads related actions.
-
#loss_reasons ⇒ LossReasonsService
Access all LossReasons related actions.
-
#notes ⇒ NotesService
Access all Notes related actions.
-
#pipelines ⇒ PipelinesService
Access all Pipelines related actions.
-
#sources ⇒ SourcesService
Access all Sources related actions.
-
#stages ⇒ StagesService
Access all Stages related actions.
-
#sync ⇒ SyncService
Access Sync API related low-level actions.
-
#tags ⇒ TagsService
Access all Tags related actions.
-
#tasks ⇒ TasksService
Access all Tasks related actions.
-
#users ⇒ UsersService
Access all Users related actions.
Constructor Details
#initialize(options = {}) ⇒ Client
Instantiate a new BaseCRM API V2 client
71 72 73 74 75 76 |
# File 'lib/basecrm.rb', line 71 def initialize(={}) @config = Configuration.new() @config.validate! @http_client = HttpClient.new(@config) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
52 53 54 |
# File 'lib/basecrm.rb', line 52 def config @config end |
#http_client ⇒ Object (readonly)
Returns the value of attribute http_client.
53 54 55 |
# File 'lib/basecrm.rb', line 53 def http_client @http_client end |
Instance Method Details
#accounts ⇒ AccountsService
Access all Accounts related actions.
83 84 85 |
# File 'lib/basecrm.rb', line 83 def accounts @accounts ||= AccountsService.new(@http_client) end |
#associated_contacts ⇒ AssociatedContactsService
Access all AssociatedContacts related actions.
92 93 94 |
# File 'lib/basecrm.rb', line 92 def associated_contacts @associated_contacts ||= AssociatedContactsService.new(@http_client) end |
#contacts ⇒ ContactsService
Access all Contacts related actions.
101 102 103 |
# File 'lib/basecrm.rb', line 101 def contacts @contacts ||= ContactsService.new(@http_client) end |
#deals ⇒ DealsService
Access all Deals related actions.
110 111 112 |
# File 'lib/basecrm.rb', line 110 def deals @deals ||= DealsService.new(@http_client) end |
#leads ⇒ LeadsService
Access all Leads related actions.
119 120 121 |
# File 'lib/basecrm.rb', line 119 def leads @leads ||= LeadsService.new(@http_client) end |
#loss_reasons ⇒ LossReasonsService
Access all LossReasons related actions.
128 129 130 |
# File 'lib/basecrm.rb', line 128 def loss_reasons @loss_reasons ||= LossReasonsService.new(@http_client) end |
#notes ⇒ NotesService
Access all Notes related actions.
137 138 139 |
# File 'lib/basecrm.rb', line 137 def notes @notes ||= NotesService.new(@http_client) end |
#pipelines ⇒ PipelinesService
Access all Pipelines related actions.
146 147 148 |
# File 'lib/basecrm.rb', line 146 def pipelines @pipelines ||= PipelinesService.new(@http_client) end |
#sources ⇒ SourcesService
Access all Sources related actions.
155 156 157 |
# File 'lib/basecrm.rb', line 155 def sources @sources ||= SourcesService.new(@http_client) end |
#stages ⇒ StagesService
Access all Stages related actions.
164 165 166 |
# File 'lib/basecrm.rb', line 164 def stages @stages ||= StagesService.new(@http_client) end |
#sync ⇒ SyncService
Access Sync API related low-level actions.
199 200 201 |
# File 'lib/basecrm.rb', line 199 def sync @sync ||= SyncService.new(@http_client) end |
#tags ⇒ TagsService
Access all Tags related actions.
173 174 175 |
# File 'lib/basecrm.rb', line 173 def @tags ||= TagsService.new(@http_client) end |
#tasks ⇒ TasksService
Access all Tasks related actions.
182 183 184 |
# File 'lib/basecrm.rb', line 182 def tasks @tasks ||= TasksService.new(@http_client) end |
#users ⇒ UsersService
Access all Users related actions.
191 192 193 |
# File 'lib/basecrm.rb', line 191 def users @users ||= UsersService.new(@http_client) end |