pipedrive_jetrockets 0.0.39 → 0.0.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pipedrive_jetrockets.rb +20 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b8919f1678a43eba744bd482ec84964bde61b391e703345db029a7966afc30e
4
- data.tar.gz: 87ab78c5f34bfa916996fe642d0fa2005c7e56837b281066d7fac97ebf87f7bc
3
+ metadata.gz: 1563f29d3dbadd903065165be3dc0198a1fc2181d6ab1f7c1a3dbb22005f37e4
4
+ data.tar.gz: cb07cd32ad485c582cbaab1e24112401d8f342f475ddb05d08f690e4a26139e0
5
5
  SHA512:
6
- metadata.gz: 7fa02c2d39002763d3f1192f6934cbd2ced32ac2f69b3a3a98f76f5f6895b8defa5e0210fc024dd961c5054b9544676daa511b98898d35a265f5be9521a6148d
7
- data.tar.gz: a1c6545e8334c622589be660ae63dd37c485da34cf5872f08f6fd8d16a071f2b990511f8b7d83d9444c4e1af7bf6ac5a9e98321f12a381584b5a2ece53c6f4d8
6
+ metadata.gz: cb7e97b3967c4cfac159de4d1faf15bad7750654b90c7708195d696172d17410a97c0644153529d1f464fe6ce9fd9a5f6f21937b3823ec2a6c4fe90dc3390538
7
+ data.tar.gz: df522a4a679684981901366a1a5baf7348e3ad4cf0439e8a58f7072b66c75685b259d27c2aa0c8f261f7f19569c02aecf7351cfb70e67c31ea030155bc9b497a
@@ -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, :pipeline_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
- "#{pipeline_name}:#{name}"
84
+ "#{pipeline.name}:#{name}"
68
85
  end
69
86
  end
70
87
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipedrive_jetrockets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.39
4
+ version: 0.0.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Agafonov Maksim