Class: PipeDrive::Deal
- Inherits:
-
ResourceBase
- Object
- OpenStruct
- Base
- ResourceBase
- PipeDrive::Deal
- Defined in:
- lib/pipe_drive/deal.rb
Constant Summary collapse
- ALLOW_FOR_SEARCH_TERMS =
%i[title]
- ALLOW_FOR_ADDITION_SEARCH_OPTS =
%i[org_id person_id]
Instance Method Summary collapse
Methods inherited from ResourceBase
field_class, field_keys, field_names, find_by, #initialize, list, pagination_list, resource_class, resource_name, search
Methods inherited from Base
bulk_delete, create, delete, #delete, find_by_id, #initialize, #parameterize, parameterize, requester, #requester, search_and_setup_by, #update, update
Constructor Details
This class inherits a constructor from PipeDrive::ResourceBase
Instance Method Details
#organization ⇒ Object
6 7 8 9 |
# File 'lib/pipe_drive/deal.rb', line 6 def organization pipedrive_org_id = org_id.is_a?(Hash) ? org_id[:value] : org_id Organization.find_by_id(pipedrive_org_id) end |
#person ⇒ Object
11 12 13 14 |
# File 'lib/pipe_drive/deal.rb', line 11 def person pipedrive_person_id = person_id.is_a?(Hash) ? person_id[:value] : person_id Person.find_by_id(pipedrive_person_id) end |