PipeDrive Ruby Wrapper

ruby wrapper of pipe drive api

Install

Gem
gem install pipe_drive_ruby_wrapper
Gemfile
gem 'pipe_drive_ruby_wrapper'

Configure

You must call below instruction before you start to use this gem

PipeDrive.setup do |config|
  config.api_token = [Your API Token obtain from pipedrive website]
end

Usage

You should require first

require 'pipe_drive_ruby_wrapper'

use person resource as example

  • list all resource
PipeDrive::Person.list
  • find by id
PipeDrive::Person.find_by_id(1)
  • find by other field (only return one resource)

    • strict (only the same can be found)
    PipeDrive::Person.find_by(:name, {name: 'Test'}, PipeDrive::STRICT)
    
    • not strict (can be found if similar)
    PipeDrive::Person.find_by(:name, {name: 'Test'})
    
  • search for specific field (return array of resources, can be found if similar)

PipeDrive::Person.search(:name, {name: 'Test'})
  • update resource
PipeDrive::Person.update(1, {name: 'new name'})
  • delete resource
PipeDrive::Person.delete(1)