pipedrive_jetrockets 0.0.56 → 0.0.57
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 583df65d47a9f1c956cb65575f163331e673952d9bc2b2b500bda29350a98487
|
4
|
+
data.tar.gz: d4033ef8c9a8a6d03dbeff552a13cad3646b7332fc8455ebf51bb84ffe0fa462
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0da87b81c1c44dbb22cd9f674d3c49e04501b7ad14534133e304abaad563943b20947e0a0962262d26aa28c5d00033afe32deff6a280a08d491aad358593b288
|
7
|
+
data.tar.gz: e29db41c25403501bb16cae53ea746ae075e3643152bf1c914fcb5624f5882fa2739596e5e477917202b1bc23f3df6be7dad4472a4bc51b5ff209cb8c706d1ab
|
@@ -1,10 +1,19 @@
|
|
1
1
|
module PipedriveJetrockets
|
2
2
|
class Organization < Entity
|
3
|
-
attr_accessor :id, :name, :owner_id, :address, :cc_email, :add_time, :update_time
|
3
|
+
attr_accessor :id, :name, :owner_id, :address, :cc_email, :add_time, :update_time,
|
4
|
+
:closed_deals_count
|
4
5
|
|
5
6
|
def initialize(hash)
|
6
|
-
|
7
|
+
@@key_name_hash ||= Pipedrive.organization_fields.key_name_hash
|
8
|
+
super(hash.except(*@@key_name_hash.keys))
|
7
9
|
@id = hash['value'] if hash['value'].present?
|
10
|
+
|
11
|
+
@@key_name_hash.each do |key, name|
|
12
|
+
name = name.underscore.gsub(' ','_')
|
13
|
+
name = name.gsub('%','percent').gsub(/[^a-zA-Z0-9_]/,'')
|
14
|
+
instance_variable_set("@#{name}", hash[key])
|
15
|
+
Organization.class_eval {attr_accessor name}
|
16
|
+
end
|
8
17
|
end
|
9
18
|
end
|
10
19
|
end
|
@@ -3,6 +3,7 @@ require 'pipedrive_jetrockets/deal'
|
|
3
3
|
require 'pipedrive_jetrockets/deal_field'
|
4
4
|
require 'pipedrive_jetrockets/note'
|
5
5
|
require 'pipedrive_jetrockets/organization'
|
6
|
+
require 'pipedrive_jetrockets/organization_field'
|
6
7
|
require 'pipedrive_jetrockets/person'
|
7
8
|
require 'pipedrive_jetrockets/pipeline'
|
8
9
|
require 'pipedrive_jetrockets/stage'
|
data/lib/pipedrive_jetrockets.rb
CHANGED
@@ -23,6 +23,10 @@ class Pipedrive
|
|
23
23
|
@@organizations_service ||= PipedriveJetrockets::Service.new('organization')
|
24
24
|
end
|
25
25
|
|
26
|
+
def self.organization_fields
|
27
|
+
@@deal_fields_service ||= PipedriveJetrockets::FieldService.new('organizationField')
|
28
|
+
end
|
29
|
+
|
26
30
|
def self.persons
|
27
31
|
@@persons_service ||= PipedriveJetrockets::PersonService.new('person')
|
28
32
|
end
|
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.57
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Agafonov Maksim
|
@@ -41,6 +41,7 @@ files:
|
|
41
41
|
- lib/pipedrive_jetrockets/field_service.rb
|
42
42
|
- lib/pipedrive_jetrockets/note.rb
|
43
43
|
- lib/pipedrive_jetrockets/organization.rb
|
44
|
+
- lib/pipedrive_jetrockets/organization_field.rb
|
44
45
|
- lib/pipedrive_jetrockets/person.rb
|
45
46
|
- lib/pipedrive_jetrockets/person_service.rb
|
46
47
|
- lib/pipedrive_jetrockets/pipeline.rb
|