PipedrivePUT 1.1.14 → 1.1.15

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
  SHA1:
3
- metadata.gz: a879794d5358edde4dde3e4c42e90fb0f48fe1c9
4
- data.tar.gz: 21e6068a1780203ab7406b90e764ff428a78addd
3
+ metadata.gz: 3362cc318718bb21685dbcdaf07d26e548c8a875
4
+ data.tar.gz: c6e151f2d8441f5905c146cd0a52b154dcc4d213
5
5
  SHA512:
6
- metadata.gz: d486e3d9eef7f028e6600d433ee8b81af7d354dcabfe4c75958c8d84074986bd51f54e9a53c8b87f65051abce773c60faaf43b528b080b9bbee767b74e34c0c5
7
- data.tar.gz: 0e1c6c9fe3197441792121bf1e06d6384db2d440c6b9cb1d36ed2d33cc79272b4e652e3e14a58db71e23894964eecd9d3961c7dd73241cba432eba6163843bfe
6
+ metadata.gz: 2c29414d1c0cfec621dc9ba30eca48bf864f68c8a084a627ffe4f586f772f1bb4bd3a0031991c8138848083c37fbe493e1036aca22388588bfa59c7d961da94c
7
+ data.tar.gz: c43ffcb3364cf13d30fbf1282e591256e2e92e099c867c7ccdbfaca59bdb99bdd975fe90ebcfef8bb664699a9d88b0e6a99622520b0e7f03e503ef8b137462c6
data/README.md CHANGED
@@ -142,13 +142,13 @@ Add a person to Pipedrive
142
142
 
143
143
  ```ruby
144
144
  PipedrivePUT::Persons.addPerson(< Name of Person >, < additional params >)
145
- ```s
145
+ ```
146
146
 
147
147
  Example:
148
148
 
149
149
  ```ruby
150
150
  PipedrivePUT::Persons.addPerson("Programming Test Person", {:org_id => 15367, :phone => [{:value=>'555-555-3340',:label=>'work'},{:value=>'555-111-1111',:label=>'home'}]})
151
- ```s
151
+ ```
152
152
 
153
153
  NOTE: The option arguments do not be put in as strings. As of right now that is not working in irb console. I will attempt to see if that plays a factor in rails its self.
154
154
 
@@ -172,6 +172,14 @@ Get all Recent changes from Pipedrive based on a specific time
172
172
  PipedrivePUT::Recents.getRecent(< Time.now >)
173
173
  ```
174
174
 
175
+ ## Organization Fields
176
+
177
+ Get all fields that are able to be used in an organization
178
+ ```ruby
179
+ PipedrivePUT::OrganizationFields.getAllOrganizationFields()
180
+ ```
181
+
182
+
175
183
  NOTE: This searches for everything in Pipedrive (deal, organization, user, state, product, etc.)
176
184
 
177
185
  I hope to add additional support to break this down at a later time.
@@ -6,6 +6,7 @@ require 'PipedrivePUT/deal'
6
6
  require 'PipedrivePUT/persons'
7
7
  require 'PipedrivePUT/pipelines'
8
8
  require 'PipedrivePUT/recents'
9
+ require 'PipedrivePUT/organization_field'
9
10
 
10
11
  require 'json'
11
12
  require 'open-uri'
@@ -0,0 +1,40 @@
1
+ module PipedrivePUT
2
+ class OrganizationFields
3
+
4
+ include PipedrivePUT
5
+
6
+ def self.getAllOrganizationFields()
7
+
8
+ @start = 0
9
+
10
+ table = Array.new
11
+ @more_items = true
12
+ tablesize = 0
13
+ while @more_items == true do
14
+ count = 0
15
+ #puts @more_items
16
+ @base = 'https://api.pipedrive.com/v1/organizationFields?start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
17
+ #puts @base
18
+ @content = open(@base.to_s).read
19
+ @parsed = JSON.parse(@content)
20
+
21
+ while count < @parsed["data"].size
22
+ #table.push(@parsed["data"][count])
23
+ table[tablesize] = @parsed["data"][count]
24
+ count = count +1
25
+ tablesize = tablesize + 1
26
+ end
27
+
28
+ @pagination = @parsed['additional_data']['pagination']
29
+ @more_items = @pagination['more_items_in_collection']
30
+ #puts @more_items
31
+ @start = @pagination['next_start']
32
+ #puts @start
33
+ end
34
+
35
+ return table
36
+ end
37
+
38
+
39
+ end
40
+ end
@@ -1,3 +1,3 @@
1
1
  module PipedrivePUT
2
- VERSION = "1.1.14"
2
+ VERSION = "1.1.15"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: PipedrivePUT
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.14
4
+ version: 1.1.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - JakePens71
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-10 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -122,6 +122,7 @@ files:
122
122
  - lib/PipedrivePUT.rb
123
123
  - lib/PipedrivePUT/deal.rb
124
124
  - lib/PipedrivePUT/organization.rb
125
+ - lib/PipedrivePUT/organization_field.rb
125
126
  - lib/PipedrivePUT/persons.rb
126
127
  - lib/PipedrivePUT/pipelines.rb
127
128
  - lib/PipedrivePUT/recents.rb
@@ -148,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
149
  version: '0'
149
150
  requirements: []
150
151
  rubyforge_project:
151
- rubygems_version: 2.4.6
152
+ rubygems_version: 2.4.5
152
153
  signing_key:
153
154
  specification_version: 4
154
155
  summary: Pipedrive gem to retrieve data from Pipedrive.com