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
69 70 71 72 73 74 |
# File 'lib/basecrm.rb', line 69 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.
50 51 52 |
# File 'lib/basecrm.rb', line 50 def config @config end |
#http_client ⇒ Object (readonly)
Returns the value of attribute http_client.
51 52 53 |
# File 'lib/basecrm.rb', line 51 def http_client @http_client end |
Instance Method Details
#accounts ⇒ AccountsService
Access all Accounts related actions.
81 82 83 |
# File 'lib/basecrm.rb', line 81 def accounts @accounts ||= AccountsService.new(@http_client) end |
#associated_contacts ⇒ AssociatedContactsService
Access all AssociatedContacts related actions.
90 91 92 |
# File 'lib/basecrm.rb', line 90 def associated_contacts @associated_contacts ||= AssociatedContactsService.new(@http_client) end |
#contacts ⇒ ContactsService
Access all Contacts related actions.
99 100 101 |
# File 'lib/basecrm.rb', line 99 def contacts @contacts ||= ContactsService.new(@http_client) end |
#deals ⇒ DealsService
Access all Deals related actions.
108 109 110 |
# File 'lib/basecrm.rb', line 108 def deals @deals ||= DealsService.new(@http_client) end |
#leads ⇒ LeadsService
Access all Leads related actions.
117 118 119 |
# File 'lib/basecrm.rb', line 117 def leads @leads ||= LeadsService.new(@http_client) end |
#loss_reasons ⇒ LossReasonsService
Access all LossReasons related actions.
126 127 128 |
# File 'lib/basecrm.rb', line 126 def loss_reasons @loss_reasons ||= LossReasonsService.new(@http_client) end |
#notes ⇒ NotesService
Access all Notes related actions.
135 136 137 |
# File 'lib/basecrm.rb', line 135 def notes @notes ||= NotesService.new(@http_client) end |
#pipelines ⇒ PipelinesService
Access all Pipelines related actions.
144 145 146 |
# File 'lib/basecrm.rb', line 144 def pipelines @pipelines ||= PipelinesService.new(@http_client) end |
#sources ⇒ SourcesService
Access all Sources related actions.
153 154 155 |
# File 'lib/basecrm.rb', line 153 def sources @sources ||= SourcesService.new(@http_client) end |
#stages ⇒ StagesService
Access all Stages related actions.
162 163 164 |
# File 'lib/basecrm.rb', line 162 def stages @stages ||= StagesService.new(@http_client) end |
#sync ⇒ SyncService
Access Sync API related low-level actions.
197 198 199 |
# File 'lib/basecrm.rb', line 197 def sync @sync ||= SyncService.new(@http_client) end |
#tags ⇒ TagsService
Access all Tags related actions.
171 172 173 |
# File 'lib/basecrm.rb', line 171 def ||= TagsService.new(@http_client) end |
#tasks ⇒ TasksService
Access all Tasks related actions.
180 181 182 |
# File 'lib/basecrm.rb', line 180 def tasks @tasks ||= TasksService.new(@http_client) end |
#users ⇒ UsersService
Access all Users related actions.
189 190 191 |
# File 'lib/basecrm.rb', line 189 def users @users ||= UsersService.new(@http_client) end |