pipedrive_jetrockets 0.0.55 → 0.0.56
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pipedrive_jetrockets/person.rb +10 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67850907e5a56321bb9b2940ca76d6adad7b5fb5a0e565f681c1819aa8a6d144
|
4
|
+
data.tar.gz: 4c40f18993ada54bc6d6295a96413b89aee292facd13178f9e6232e59f46f5d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9a5ea7e4e0dd1bbc597f2080fec31b4f87e82e79c594ce4f6ca2725d0ce2724639866253ee0528482e15682000cd054aa93fde008bf77bfd7f984eb8ba7c9b6
|
7
|
+
data.tar.gz: f62855fb63e7a70ac1a7e91f6941a0bebddb6f07e2fe2c402498d3e275db66091cc9750ab884f8a37e79a21ab21942c713d2f1d54950bfc1bb9aa47d2093bcf0
|
@@ -1,12 +1,21 @@
|
|
1
1
|
module PipedriveJetrockets
|
2
2
|
class Person < Entity
|
3
|
-
attr_accessor :id, :name, :email, :phone, :open_deals_count, :closed_deals_count,
|
3
|
+
attr_accessor :id, :name, :email, :organization, :phone, :open_deals_count, :closed_deals_count,
|
4
4
|
:add_time, :update_time
|
5
5
|
def initialize(hash)
|
6
6
|
super
|
7
7
|
@email = hash['email'].first['value'] if hash['email']
|
8
8
|
@phone = hash['phone'].first['value'] if hash['phone']
|
9
9
|
|
10
|
+
org_id = hash['org_id']
|
11
|
+
if org_id
|
12
|
+
if org_id.kind_of? Integer
|
13
|
+
@organization = Pipedrive.organizations.find(org_id)
|
14
|
+
else
|
15
|
+
@organization = Organization.new(org_id)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
10
19
|
@id = hash['value'] if hash['value'].present?
|
11
20
|
end
|
12
21
|
end
|