module PipedriveRuby
share commum methods for resources
If you need to use the PipedriveAPI developers.pipedrive.com/v1
Activities
are appointments/tasks/events on a calendar that can be associated with a Deal, a Person and an Organization. Activities
can be of different type (such as call, meeting, lunch or a custom type - see ActivityTypes
object) and can be assigned to a particular User. Note that activities can also be created without a specific date/time.
ActivityFields
represent different fields that Activity has.
ActivityTypes
represent different kinds of activities that can be stored. Each ActivityType is presented to the user with an icon and a name. Additionally, a color can be defined (not implemented in the Pipedrive app as of today). ActivityTypes
are linked to Activities
via ActivityType.key_string = Activity.type. The key_string will be generated by the API based on the given name of the ActivityType upon creation, and cannot be changed. ActivityTypes
should be presented to the user in an ordered manner, using the ActivityType.order_nr value.
Authorization objects can be fetched without an API token but using an email and password. Fetching the Authorization objects essentially allows you to authorize users based on their login credentials and retrieve the underlying API tokens associated with the given user. Note that any given user an Authorization object per each company he/she belongs to.
Supported currencies which can be used to represent the monetary value of a Deal, or a value of any monetary type custom field. The Currency.code field must be used to point to a currency. Currency.code is the ISO-4217 format currency code for non-custom currencies. You can differentiate custom and non-custom currencies using the is_custom_flag property. For custom currencies, it is intended that the formatted sums are displayed in the UI using the following format: [sum][non-breaking space character], for example: 500 users. Custom currencies cannot be added or removed via the API yet — rather the admin users of the account must configure them from the Pipedrive app
DealFields
represent the near-complete schema for a Deal in the context of the company of the authorized user. Each company can have a different schema for their Deals
, with various custom fields. In the context of using DealFiels as a schema for defining the data fields of a Deal, it must be kept in mind that some types of custom fields can have additional data fields which are not separate DealFields
per se. Such is the case with monetary, daterange and timerange fields – each of these fields will have one additional data field in addition to the one presented in the context of DealFields
. For example, if there is a monetary field with the key 'ffk9s9' stored on the account, 'ffk9s9' would hold the numeric value of the field, and 'ffk9s9_currency' would hold the ISO currency code that goes along with the numeric value. To find out which data fields are available, fetch one Deal and list its keys.
Deals
represent ongoing, lost or won sales to an Organization or to a Person. Each deal has a monetary value and must be placed in a Stage. Deals
can be owned by a User, and followed by one or many Users
. Each Deal consists of standard data fields but can also contain a number of custom fields. The custom fields can be recognized by long hashes as keys. These hashes can be mapped against DealField.key. The corresponding label for each such custom field can be obtained from DealField.name.
Organizations
are companies and other kinds of organizations you are making Deals
with. Persons
can be associated with organizations so that each organization can contain one or more Persons
.
Products
are the goods or services you are dealing with. Each product can have N different price points - first, each Product can have a price in N different currencies, and secondly, each Product can have N variations of itself, each having N prices different currencies. Note that only one price per variation per currency is supported. Products
can be instantiated to Deals
. In the context of instatiation, a custom price, quantity, duration and discount can be applied.
Manage user connections. For example, google.
Manage subscriptions of push notifications / web hooks / REST hooks about data changes. A subscription means a designated HTTP(S) endpoint which will receive a request every time a certain event happens on your Pipedrive account. E.g. when you have subscribed to receive events about all new deals ('deal.added'), this HTTP(S) will receive a request per each such event. See app.pipedrive.com/push_notifications#dialog:/push_notifications/help for detailed documentation of web hooks.
Constants
- API_URL
this is the url for API V1
- VERSION
version of gem