pipedrive_api 0.1.8 → 0.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: af25ea6bb4d3e1e7283b0f22f91c357906a135c8
4
- data.tar.gz: ae897d412dc07533b362c5dfae21c5e9d1fec38c
3
+ metadata.gz: d1a18bc69efd9f7d043f0e9bd040d4bc2084cf97
4
+ data.tar.gz: 0d7d5eb633ef95744883c7d013178c309404024a
5
5
  SHA512:
6
- metadata.gz: a58f90fe650f7f7b2211c2eeffae26ef963ee0c480ff8e8a816d77d9345d01af52e53f49f4efabc7f24176bdefddcc054b1232a5b0601d26a6b1f9be166d52a2
7
- data.tar.gz: 796c7bdb43e66de05c3a5f1c1f4c87efd078aa96c762ada9a83597fd132db970cca93cefbf536a34000ac6aa2db98b3238ff99d51e68ce75ff5a195c0f4cc42c
6
+ metadata.gz: fcc38cb56cf01ec3ee7f110296f2d0cf3190527efb0833b89a784987070e3b0f2c8fbee2e291021930a3d7bbee41f2198f4235f84110848d7808a4e8eb18d113
7
+ data.tar.gz: 91b30b27d24a1d0429bd4d74cc4c8debcbc2a16c8352ef3ccad3d87e12c39a0062bf95be73d42371f222d5fc75c55f80b2154b5e32623261e715e2dae4669a74
data/lib/pipedrive_api.rb CHANGED
@@ -2,7 +2,7 @@ require 'pipedrive_api/version'
2
2
  require 'pipedrive_api/base'
3
3
  require 'pipedrive_api/person'
4
4
  require 'pipedrive_api/deal'
5
- require 'pipedrive_api/organisation'
5
+ require 'pipedrive_api/organization'
6
6
  require 'pipedrive_api/product'
7
7
  require 'pipedrive_api/pipeline'
8
8
  require 'pipedrive_api/person_field'
@@ -41,6 +41,11 @@ module PipedriveAPI
41
41
  response = put "#{resource_path}/#{id}", body: params.to_json
42
42
  handle response
43
43
  end
44
+
45
+ def remove(id)
46
+ response = delete "#{resource_path}/#{id}"
47
+ handle response
48
+ end
44
49
 
45
50
  def resource_path
46
51
  # The resource path should match the camelCased class name with the
@@ -54,7 +59,7 @@ module PipedriveAPI
54
59
  case response.code
55
60
  when 200..299
56
61
  response['data']
57
- when 404
62
+ when 403..404
58
63
  raise HTTParty::Error, response.parsed_response['error']
59
64
  when 500..600
60
65
  raise HTTParty::Error, response.parsed_response['error']
@@ -2,10 +2,10 @@ module PipedriveAPI
2
2
  class Deal < Base
3
3
 
4
4
  class << self
5
-
6
-
7
-
5
+ def duplicate(id)
6
+ response = post "#{resource_path}/#{id}/duplicate"
7
+ handle response
8
+ end
8
9
  end
9
-
10
10
  end
11
11
  end
@@ -1,5 +1,5 @@
1
1
  module PipedriveAPI
2
- class Organisation < Base
2
+ class Organization < Base
3
3
 
4
4
  class << self
5
5
 
@@ -1,3 +1,3 @@
1
1
  module PipedriveApi
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipedrive_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - gareth
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-12 00:00:00.000000000 Z
11
+ date: 2017-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -101,7 +101,7 @@ files:
101
101
  - lib/pipedrive_api/base.rb
102
102
  - lib/pipedrive_api/deal.rb
103
103
  - lib/pipedrive_api/note.rb
104
- - lib/pipedrive_api/organisation.rb
104
+ - lib/pipedrive_api/organization.rb
105
105
  - lib/pipedrive_api/person.rb
106
106
  - lib/pipedrive_api/person_field.rb
107
107
  - lib/pipedrive_api/pipeline.rb
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  requirements: []
131
131
  rubyforge_project:
132
- rubygems_version: 2.6.8
132
+ rubygems_version: 2.6.11
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: A wrapper for the Pipedrive API.