PipedrivePUT 1.1.8 → 1.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2178019def9566ab6649aaf85ef4f5a09bf450c
4
- data.tar.gz: 9ff6538a2b4f50c47f3419807562c1d37464d79d
3
+ metadata.gz: af57984f4afd652f8779c9a6046963ce2052d90b
4
+ data.tar.gz: d7428d8e1d1fbc9308df7fddffc7695a9c2dba61
5
5
  SHA512:
6
- metadata.gz: 25388901a36076a7e8175fb1874929264bb0b8c68a6b2e582609dfc5960cd3d84a0d269ac238cacbc6be4c16289a02485740054e8a5733dc6e9a0766dd9d0245
7
- data.tar.gz: e6c3a0b6bd3f52a254e57ce5b1ae8cf7fb79a7dfab14a7c7024ec7410b619957a7c1fdc710d669736bf2c26e578284192e8fb1e6db23bd358f4991091ca1cc12
6
+ metadata.gz: f482e6d0aabbf08b7192cf9383bda44be85b6851d7d20db9a23707f7e097cee44466b2777279492bdac6bf4f258c33b86ced4f04b4efaaa87ecea1407274f9a6
7
+ data.tar.gz: 109f4ccbcf93333387dcc1af620dfecc15d385855e1f8af4def83f61d1916c1df39af55ef6165e071d9c11647a97adb54ad162baed9481563368d079ffdf8e9f
@@ -113,20 +113,25 @@ include PipedrivePUT
113
113
  @base = 'https://api.pipedrive.com/v1/organizations/' + id.to_s + '/persons?&start=' + @start.to_s + '&limit=500&api_token=' + @@key.to_s
114
114
 
115
115
  @content = open(@base.to_s).read
116
- @parsed = JSON.parse(@content)
116
+ @parsed = JSON.parse(@content)
117
+
118
+ if @parsed["data"].nil?
119
+ return "Organization does not have any Person associated with it"
120
+ else
117
121
 
118
- while count < @parsed["data"].size
119
- #table.push(@parsed["data"][count])
120
- table[tablesize] = @parsed["data"][count]
121
- count = count +1
122
- tablesize = tablesize + 1
122
+ while count < @parsed["data"].size
123
+ #table.push(@parsed["data"][count])
124
+ table[tablesize] = @parsed["data"][count]
125
+ count = count +1
126
+ tablesize = tablesize + 1
123
127
 
124
- end
125
- @pagination = @parsed['additional_data']['pagination']
126
- @more_items = @pagination['more_items_in_collection']
127
- #puts @more_items
128
- @start = @pagination['next_start']
129
- #puts @start
128
+ end
129
+ @pagination = @parsed['additional_data']['pagination']
130
+ @more_items = @pagination['more_items_in_collection']
131
+ #puts @more_items
132
+ @start = @pagination['next_start']
133
+ #puts @start
134
+ end
130
135
  end
131
136
  return table
132
137
  end
@@ -1,3 +1,3 @@
1
1
  module PipedrivePUT
2
- VERSION = "1.1.8"
2
+ VERSION = "1.1.9"
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.8
4
+ version: 1.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - JakePens71
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-09 00:00:00.000000000 Z
11
+ date: 2015-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler