pipedrive_jetrockets 0.0.49 → 0.0.50
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/app/controllers/pipedrive_jetrockets/events_controller.rb +2 -2
- data/config/routes.rb +1 -1
- data/lib/pipedrive_jetrockets/deal.rb +5 -4
- data/lib/pipedrive_jetrockets/note.rb +1 -1
- data/lib/pipedrive_jetrockets/organization.rb +7 -0
- data/lib/pipedrive_jetrockets/person.rb +2 -1
- data/lib/pipedrive_jetrockets/pipeline.rb +1 -1
- data/lib/pipedrive_jetrockets/service.rb +1 -1
- data/lib/pipedrive_jetrockets/stage.rb +1 -1
- data/lib/pipedrive_jetrockets.rb +2 -2
- metadata +2 -2
- data/lib/pipedrive_jetrockets/organisation.rb +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f10e3d8bf0ad1d5c97ae88468bb6a44ca39c670f26b446e8b1fad03476c9e34d
|
4
|
+
data.tar.gz: 5edae2b1690f91ad83a54ba36196b7b08bfc1d2b83d8d8a0bca7268ae3535967
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 531b44e218bfceb25690ddefb028f3768644672bc2bb479c9e48b2efe2d5b148799ff595335929bb96db4a458c163dd8ac80c0d6376baadf06afdcb3e0b1a5d7
|
7
|
+
data.tar.gz: 8c7f323a583888cdbce5e14abedd595af525ba90d6f532382281ad1764fd2d5a26bed61c2e42db307a29c36ebecc7f3d33074d1498491fd70b2f4007f1c86097
|
@@ -13,8 +13,8 @@ module PipedriveJetrockets
|
|
13
13
|
ActiveSupport::Notifications.instrument "person_updated", {person: PipedriveJetrockets::Person.new(params[:current])}
|
14
14
|
end
|
15
15
|
|
16
|
-
def
|
17
|
-
ActiveSupport::Notifications.instrument "
|
16
|
+
def organization_updated
|
17
|
+
ActiveSupport::Notifications.instrument "organization_updated", {organization: PipedriveJetrockets::Organization.new(params[:current])}
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
data/config/routes.rb
CHANGED
@@ -3,6 +3,6 @@ Rails.application.routes.draw do
|
|
3
3
|
post '/deal_updated' => 'pipedrive_jetrockets/events#deal_updated'
|
4
4
|
post '/deal_added' => 'pipedrive_jetrockets/events#deal_added'
|
5
5
|
post '/person_updated' => 'pipedrive_jetrockets/events#person_updated'
|
6
|
-
post '/
|
6
|
+
post '/organization_updated' => 'pipedrive_jetrockets/events#organization_updated'
|
7
7
|
end
|
8
8
|
end
|
@@ -1,10 +1,11 @@
|
|
1
1
|
require 'pipedrive_jetrockets/entity'
|
2
|
-
require 'pipedrive_jetrockets/
|
2
|
+
require 'pipedrive_jetrockets/organization'
|
3
3
|
require 'pipedrive_jetrockets/person'
|
4
4
|
|
5
5
|
module PipedriveJetrockets
|
6
6
|
class Deal < Entity
|
7
|
-
attr_accessor :
|
7
|
+
attr_accessor :id, :organization, :title, :value, :currency, :status,
|
8
|
+
:stage_id, :person, :add_time, :update_time
|
8
9
|
def initialize(hash)
|
9
10
|
super
|
10
11
|
org_id = hash['org_id']
|
@@ -12,9 +13,9 @@ module PipedriveJetrockets
|
|
12
13
|
|
13
14
|
if org_id
|
14
15
|
if org_id.kind_of? Integer
|
15
|
-
@
|
16
|
+
@organization = Pipedrive.organizations.find(org_id)
|
16
17
|
else
|
17
|
-
@
|
18
|
+
@organization = Organization.new(org_id)
|
18
19
|
end
|
19
20
|
end
|
20
21
|
|
@@ -2,7 +2,8 @@ require 'pipedrive_jetrockets/entity'
|
|
2
2
|
|
3
3
|
module PipedriveJetrockets
|
4
4
|
class Person < Entity
|
5
|
-
attr_accessor :id, :name, :email, :phone, :open_deals_count, :closed_deals_count
|
5
|
+
attr_accessor :id, :name, :email, :phone, :open_deals_count, :closed_deals_count,
|
6
|
+
:add_time, :update_time
|
6
7
|
def initialize(hash)
|
7
8
|
super
|
8
9
|
@email = hash['email'].first['value'] if hash['email']
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'http'
|
2
2
|
require 'pipedrive_jetrockets/deal'
|
3
3
|
require 'pipedrive_jetrockets/note'
|
4
|
-
require 'pipedrive_jetrockets/
|
4
|
+
require 'pipedrive_jetrockets/organization'
|
5
5
|
require 'pipedrive_jetrockets/person'
|
6
6
|
require 'pipedrive_jetrockets/pipeline'
|
7
7
|
require 'pipedrive_jetrockets/stage'
|
data/lib/pipedrive_jetrockets.rb
CHANGED
@@ -12,8 +12,8 @@ class Pipedrive
|
|
12
12
|
@@notes_service ||= PipedriveJetrockets::Service.new('note')
|
13
13
|
end
|
14
14
|
|
15
|
-
def self.
|
16
|
-
@@
|
15
|
+
def self.organizations
|
16
|
+
@@organizations_service ||= PipedriveJetrockets::Service.new('organization')
|
17
17
|
end
|
18
18
|
|
19
19
|
def self.persons
|
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.
|
4
|
+
version: 0.0.50
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Agafonov Maksim
|
@@ -37,7 +37,7 @@ files:
|
|
37
37
|
- lib/pipedrive_jetrockets/engine.rb
|
38
38
|
- lib/pipedrive_jetrockets/entity.rb
|
39
39
|
- lib/pipedrive_jetrockets/note.rb
|
40
|
-
- lib/pipedrive_jetrockets/
|
40
|
+
- lib/pipedrive_jetrockets/organization.rb
|
41
41
|
- lib/pipedrive_jetrockets/person.rb
|
42
42
|
- lib/pipedrive_jetrockets/pipeline.rb
|
43
43
|
- lib/pipedrive_jetrockets/service.rb
|