pipedrive_jetrockets 0.0.48 → 0.0.49
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/deal.rb +18 -2
- data/lib/pipedrive_jetrockets.rb +5 -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: 20704d30a12ff66fb6bdaf215ddf5d786f7baaa4e5a2c170a6291afbdfc0b5c5
|
4
|
+
data.tar.gz: ed8f15f5e55a3836744c013a6cc4df3d14b2ac86d2bcb4310208dc1bba6dc5c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84e7fcdc4ebb45571551f958257275e1398a9b477ecaeb10f2d857f6a507afa26aa3b808d85d01452421fb48a203ae9963f79d8e7d40c2660c8effd6083006d6
|
7
|
+
data.tar.gz: 755d2ae4f32e649b4548d2ecf000abe20779722df455c42873112e4838844813d5ea16bb157ae658113d8ca22786cae2646ad158f0c568966b46ac8f236c0cfe
|
@@ -7,8 +7,24 @@ module PipedriveJetrockets
|
|
7
7
|
attr_accessor :add_time, :id, :organisation, :title, :value, :currency, :status, :stage_id, :person
|
8
8
|
def initialize(hash)
|
9
9
|
super
|
10
|
-
|
11
|
-
|
10
|
+
org_id = hash['org_id']
|
11
|
+
person_id = hash['person_id']
|
12
|
+
|
13
|
+
if org_id
|
14
|
+
if org_id.kind_of? Integer
|
15
|
+
@organisation = Pipedrive.organisations.find(org_id)
|
16
|
+
else
|
17
|
+
@organisation = Organisation.new(org_id)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
if person_id
|
22
|
+
if person_id.kind_of? Integer
|
23
|
+
@person = Pipedrive.persons.find(person_id)
|
24
|
+
else
|
25
|
+
@person = Person.new(person_id)
|
26
|
+
end
|
27
|
+
end
|
12
28
|
end
|
13
29
|
|
14
30
|
def stage
|
data/lib/pipedrive_jetrockets.rb
CHANGED
@@ -9,7 +9,11 @@ class Pipedrive
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def self.notes
|
12
|
-
@@
|
12
|
+
@@notes_service ||= PipedriveJetrockets::Service.new('note')
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.organisations
|
16
|
+
@@organisations_service ||= PipedriveJetrockets::Service.new('organisation')
|
13
17
|
end
|
14
18
|
|
15
19
|
def self.persons
|