PipedrivePUT 1.1.15 → 1.1.16

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: 3362cc318718bb21685dbcdaf07d26e548c8a875
4
- data.tar.gz: c6e151f2d8441f5905c146cd0a52b154dcc4d213
3
+ metadata.gz: 600c7a1f3f2c3591c105bbf01e07635eec61ef50
4
+ data.tar.gz: e7d09d60883ff6adf06d8296acb016bf37b46e4b
5
5
  SHA512:
6
- metadata.gz: 2c29414d1c0cfec621dc9ba30eca48bf864f68c8a084a627ffe4f586f772f1bb4bd3a0031991c8138848083c37fbe493e1036aca22388588bfa59c7d961da94c
7
- data.tar.gz: c43ffcb3364cf13d30fbf1282e591256e2e92e099c867c7ccdbfaca59bdb99bdd975fe90ebcfef8bb664699a9d88b0e6a99622520b0e7f03e503ef8b137462c6
6
+ metadata.gz: e1ed196dbeab441c6953dc11f36d24cdb48fadb6981f945082f21fcc3241e7be5cd7147be86d3656847fe735a513f9c77afd2643e55b210080097b2cc557d0ba
7
+ data.tar.gz: fbcb2366e6a36a81fa395d241115cb8c1fa8ef52e63bcf36d8768d3ec92397520ae3556094be24282542f6f4206d514fe089a776ff68a6e03096808fd416a924
data/README.md CHANGED
@@ -82,6 +82,14 @@ Find Persons in an Organization
82
82
  PipedrivePUT::Organizations.getPersonsOfOrganization(< id >)
83
83
  ```
84
84
 
85
+ Update an organization
86
+ ```ruby
87
+ PipedrivePUT::Organizations.updateOrganization(< id >, < optional params >)
88
+ ```
89
+ Example
90
+ ```ruby
91
+ PipedrivePUT::Organizations.updateOrganization(1, :name => "New Organization Name")
92
+ ```
85
93
 
86
94
  ## Deals
87
95
 
@@ -176,7 +184,7 @@ Get all Recent changes from Pipedrive based on a specific time
176
184
 
177
185
  Get all fields that are able to be used in an organization
178
186
  ```ruby
179
- PipedrivePUT::OrganizationFields.getAllOrganizationFields()
187
+ PipedrivePUT::OrganizationFields.getAllOrganizationFields
180
188
  ```
181
189
 
182
190
 
@@ -139,5 +139,26 @@ require 'rest-client'
139
139
  return table
140
140
  end
141
141
 
142
+ #Update an Organization
143
+ def self.updateOrganization(id, options = {})
144
+ @url = 'https://api.pipedrive.com/v1/organizations/' + id.to_s + '?api_token=' + @@key.to_s
145
+
146
+ puts @url
147
+
148
+ if (!options.nil?)
149
+
150
+ options.merge!(:id => id)
151
+ puts options
152
+
153
+ puts '----------------------'
154
+
155
+ response = HTTParty.put(@url.to_s, :body => options.to_json, :headers => {'Content-type' => 'application/json'})
156
+ puts '----------------------'
157
+ puts response
158
+
159
+ end
160
+
161
+ end
162
+
142
163
  end
143
164
  end
@@ -3,7 +3,7 @@ module PipedrivePUT
3
3
 
4
4
  include PipedrivePUT
5
5
 
6
- def self.getAllOrganizationFields()
6
+ def self.getAllOrganizationFields
7
7
 
8
8
  @start = 0
9
9
 
@@ -1,3 +1,3 @@
1
1
  module PipedrivePUT
2
- VERSION = "1.1.15"
2
+ VERSION = "1.1.16"
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.15
4
+ version: 1.1.16
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-13 00:00:00.000000000 Z
11
+ date: 2015-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler