PipedrivePUT 1.1.9 → 1.1.10
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/README.md +25 -6
- data/lib/PipedrivePUT/organization.rb +12 -9
- data/lib/PipedrivePUT/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 287a43d08873a0d3c2b0033f8591015b3a7c688c
|
4
|
+
data.tar.gz: 83b4286554434695a75faf7710277e5b6d9afa59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0619ad182ad39d0d3b441793739447adbddc764561129d190862a1013a2bc0e1b3bec8bd18ba8ca4fdfcbcabcac1143b87f8af9d0d6d758e283cb83523b44af
|
7
|
+
data.tar.gz: 5766b013f4403a649eab621b600c4cb367259dbcea347ae2f0d32e4a6f023765047780bf886939ab84fcb78da51703f972e42337ae813719055ddd04cc6741dd
|
data/README.md
CHANGED
@@ -42,6 +42,29 @@ Add an organization
|
|
42
42
|
PipedrivePUT::Organizations.addOrganization(< Name of new Organization >)
|
43
43
|
```
|
44
44
|
|
45
|
+
You can also add various other parameters based on values in Pipedrive or custom keys when creating a organization!
|
46
|
+
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
PipedrivePUT::Organizations.addOrganization(< Name of new Organization >, < :optionArgument => "value" > )
|
50
|
+
```
|
51
|
+
|
52
|
+
NOTE: the options must be in hash format
|
53
|
+
|
54
|
+
Example:
|
55
|
+
|
56
|
+
```ruby
|
57
|
+
PipedrivePUT::Organizations.addOrganization("Jacob Programming Test", :address => "South Jasmine Street")
|
58
|
+
```
|
59
|
+
|
60
|
+
You can aso add ANY custom key from Pipedrive to this to input values into those fields
|
61
|
+
|
62
|
+
Example:
|
63
|
+
|
64
|
+
```ruby
|
65
|
+
PipedrivePUT::Organizations.addOrganization("Jacob Programming Test", :'3df8474115f948137b3f98a0ff651d0edbbd2f54' => "JMD")
|
66
|
+
```
|
67
|
+
|
45
68
|
Find Organization by term
|
46
69
|
|
47
70
|
```ruby
|
@@ -131,13 +154,9 @@ This is my first attempt at a ruby gem so I appoligize if things are unorthodox.
|
|
131
154
|
## To do List
|
132
155
|
|
133
156
|
|
134
|
-
1. Add support for additional arguments
|
135
|
-
|
136
|
-
2. Get All Deals
|
137
|
-
|
138
|
-
3. Add a deal
|
157
|
+
1. Add support for additional arguments when creating a deal
|
139
158
|
|
140
|
-
|
159
|
+
2. Many other Pipedrive API Calls
|
141
160
|
|
142
161
|
|
143
162
|
## Contributing
|
@@ -3,7 +3,7 @@ module PipedrivePUT
|
|
3
3
|
|
4
4
|
include PipedrivePUT
|
5
5
|
|
6
|
-
|
6
|
+
require 'rest-client'
|
7
7
|
def self.key
|
8
8
|
puts @@key
|
9
9
|
end
|
@@ -43,18 +43,21 @@ include PipedrivePUT
|
|
43
43
|
|
44
44
|
|
45
45
|
#Add an organization
|
46
|
-
|
47
|
-
|
48
|
-
args.each_with_index{ |arg, i| puts "#{i+1}. #{arg}" }
|
46
|
+
def self.addOrganization(companyName, options = {})
|
47
|
+
#args.each_with_index{ |arg, i| puts "#{i+1}. #{arg}" }
|
49
48
|
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
uri = URI.parse('https://api.pipedrive.com/v1/organizations?api_token=' + @@key.to_s)
|
50
|
+
|
51
|
+
if (!options.nil?)
|
53
52
|
|
54
|
-
|
53
|
+
options.merge!(:name => companyName)
|
54
|
+
|
55
|
+
puts options
|
56
|
+
|
57
|
+
response = Net::HTTP.post_form(uri, options)
|
58
|
+
end
|
55
59
|
|
56
60
|
|
57
|
-
RestClient.post @base.to_s, { "name" => name }.to_json, :content_type => :json, :accept => :json
|
58
61
|
|
59
62
|
end
|
60
63
|
|
data/lib/PipedrivePUT/version.rb
CHANGED
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.
|
4
|
+
version: 1.1.10
|
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-
|
11
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|