pipedrive_jetrockets 0.0.39 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pipedrive_jetrockets.rb +20 -3
- 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: 1563f29d3dbadd903065165be3dc0198a1fc2181d6ab1f7c1a3dbb22005f37e4
|
4
|
+
data.tar.gz: cb07cd32ad485c582cbaab1e24112401d8f342f475ddb05d08f690e4a26139e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb7e97b3967c4cfac159de4d1faf15bad7750654b90c7708195d696172d17410a97c0644153529d1f464fe6ce9fd9a5f6f21937b3823ec2a6c4fe90dc3390538
|
7
|
+
data.tar.gz: df522a4a679684981901366a1a5baf7348e3ad4cf0439e8a58f7072b66c75685b259d27c2aa0c8f261f7f19569c02aecf7351cfb70e67c31ea030155bc9b497a
|
data/lib/pipedrive_jetrockets.rb
CHANGED
@@ -15,6 +15,10 @@ class Pipedrive
|
|
15
15
|
@@persons_service ||= Pipedrive::Service.new('person')
|
16
16
|
end
|
17
17
|
|
18
|
+
def self.pipelines
|
19
|
+
@@pipelines_service ||= Pipedrive::Service.new('pipeline')
|
20
|
+
end
|
21
|
+
|
18
22
|
def self.stages
|
19
23
|
@@stages_service ||= Pipedrive::Service.new('stage')
|
20
24
|
end
|
@@ -44,12 +48,16 @@ class Pipedrive
|
|
44
48
|
end
|
45
49
|
end
|
46
50
|
|
51
|
+
class Pipeline < Pipedrive::Entity
|
52
|
+
attr_accessor :id, :name
|
53
|
+
end
|
54
|
+
|
47
55
|
class User < Pipedrive::Entity
|
48
56
|
attr_accessor :id, :name, :email, :phone
|
49
57
|
end
|
50
58
|
|
51
59
|
class Deal < Pipedrive::Entity
|
52
|
-
attr_accessor :id, :organisation, :title, :value, :currency, :status, :stage_id, :person
|
60
|
+
attr_accessor :add_time, :id, :organisation, :title, :value, :currency, :status, :stage_id, :person
|
53
61
|
def initialize(hash)
|
54
62
|
super
|
55
63
|
@organisation = Pipedrive::Organisation.new(hash['org_id']) if hash['org_id']
|
@@ -59,12 +67,21 @@ class Pipedrive
|
|
59
67
|
def stage
|
60
68
|
Pipedrive.stages.find(self.stage_id)
|
61
69
|
end
|
70
|
+
|
71
|
+
def display_stage_name
|
72
|
+
self.stage.display_name
|
73
|
+
end
|
62
74
|
end
|
63
75
|
|
64
76
|
class Stage < Pipedrive::Entity
|
65
|
-
attr_accessor :id, :name, :
|
77
|
+
attr_accessor :id, :name, :pipeline_id
|
78
|
+
|
79
|
+
def pipeline
|
80
|
+
Pipedrive.pipelines.find(self.pipeline_id)
|
81
|
+
end
|
82
|
+
|
66
83
|
def display_name
|
67
|
-
"#{
|
84
|
+
"#{pipeline.name}:#{name}"
|
68
85
|
end
|
69
86
|
end
|
70
87
|
|