Class: PipedriveOrbit::Client
- Inherits:
-
Object
- Object
- PipedriveOrbit::Client
- Defined in:
- lib/pipedrive_orbit/client.rb
Instance Attribute Summary collapse
-
#orbit_api_key ⇒ Object
Returns the value of attribute orbit_api_key.
-
#orbit_workspace ⇒ Object
Returns the value of attribute orbit_workspace.
-
#pipedrive_api_key ⇒ Object
Returns the value of attribute pipedrive_api_key.
-
#pipedrive_url ⇒ Object
Returns the value of attribute pipedrive_url.
Instance Method Summary collapse
- #activities ⇒ Object
-
#initialize(params = {}) ⇒ Client
constructor
A new instance of Client.
- #notes ⇒ Object
- #people_notes ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Client
Returns a new instance of Client.
35 36 37 38 39 40 |
# File 'lib/pipedrive_orbit/client.rb', line 35 def initialize(params = {}) @orbit_api_key = params.fetch(:orbit_api_key, ENV["ORBIT_API_KEY"]) @orbit_workspace = params.fetch(:orbit_workspace, ENV["ORBIT_WORKSPACE_ID"]) @pipedrive_api_key = params.fetch(:pipedrive_api_key, ENV["PIPEDRIVE_API_KEY"]) @pipedrive_url = params.fetch(:pipedrive_url, ENV["PIPEDRIVE_URL"]) end |
Instance Attribute Details
#orbit_api_key ⇒ Object
Returns the value of attribute orbit_api_key.
33 34 35 |
# File 'lib/pipedrive_orbit/client.rb', line 33 def orbit_api_key @orbit_api_key end |
#orbit_workspace ⇒ Object
Returns the value of attribute orbit_workspace.
33 34 35 |
# File 'lib/pipedrive_orbit/client.rb', line 33 def orbit_workspace @orbit_workspace end |
#pipedrive_api_key ⇒ Object
Returns the value of attribute pipedrive_api_key.
33 34 35 |
# File 'lib/pipedrive_orbit/client.rb', line 33 def pipedrive_api_key @pipedrive_api_key end |
#pipedrive_url ⇒ Object
Returns the value of attribute pipedrive_url.
33 34 35 |
# File 'lib/pipedrive_orbit/client.rb', line 33 def pipedrive_url @pipedrive_url end |
Instance Method Details
#activities ⇒ Object
51 52 53 54 55 56 57 58 |
# File 'lib/pipedrive_orbit/client.rb', line 51 def activities PipedriveOrbit::Pipedrive.new( pipedrive_api_key: @pipedrive_api_key, pipedrive_url: @pipedrive_url, orbit_api_key: @orbit_api_key, orbit_workspace: @orbit_workspace ).process_activities end |
#notes ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'lib/pipedrive_orbit/client.rb', line 42 def notes PipedriveOrbit::Pipedrive.new( pipedrive_api_key: @pipedrive_api_key, pipedrive_url: @pipedrive_url, orbit_api_key: @orbit_api_key, orbit_workspace: @orbit_workspace ).process_notes end |
#people_notes ⇒ Object
60 61 62 63 64 65 66 67 |
# File 'lib/pipedrive_orbit/client.rb', line 60 def people_notes PipedriveOrbit::Pipedrive.new( pipedrive_api_key: @pipedrive_api_key, pipedrive_url: @pipedrive_url, orbit_api_key: @orbit_api_key, orbit_workspace: @orbit_workspace ).process_people_notes end |