closeio 0.0.8 → 0.0.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: ca630ea407558ff6d9e3d30c63e04b1643caa378
4
- data.tar.gz: 9bbcfbb3641984c59e73324c3684ef9e2b22cb78
3
+ metadata.gz: 758897dc082f2648105d62177fc18391ed4a2885
4
+ data.tar.gz: 539492a529bb76b32e4dc695a11b47ff2f0cd039
5
5
  SHA512:
6
- metadata.gz: e5501daccc586955e73f507d722cb7e4270837b9b2cb5d1b1431a596d194d3b24ac6c9185f8dc47705ac5b9d2bc47625152404d9247c5f07f8872fbf99989937
7
- data.tar.gz: 4cbdcf63e038b0d3a2882a43bd4d24d04d89ae1b84baad05dbc005ae4470c21d03d9753b16ad783a81cd55e05e49b5db83e823e44c1dc7b69420097b26b93d5a
6
+ metadata.gz: 371399711039ffa948d3bb10e57b828507390c2e530fdfc4c3652becf56fe1d84319f0a0e327e300833412c5d1d8b7e1648962c2f4ad68c6f31e834a1827574b
7
+ data.tar.gz: 3e66fce5b5aa995850ac0a6355291847caf987cbee94f31ced9bc9c0009d912be12eae03b588e62ffe62570c4556eda1bd150a4a834eecb0051caf71fd0808fa
data/lib/closeio.rb CHANGED
@@ -7,10 +7,13 @@ require 'closeio/contact'
7
7
  require 'closeio/email_activity'
8
8
  require 'closeio/email_template'
9
9
  require 'closeio/lead'
10
+ require 'closeio/lead_status'
10
11
  require 'closeio/note_activity'
11
12
  require 'closeio/organization'
13
+ require 'closeio/opportunity'
14
+ require 'closeio/opportunity_status'
12
15
  require 'closeio/paginated_list'
13
16
  require 'closeio/report'
14
17
  require 'closeio/saved_search'
15
18
  require 'closeio/task'
16
- require 'closeio/version'
19
+ require 'closeio/version'
data/lib/closeio/base.rb CHANGED
@@ -5,7 +5,7 @@ module Closeio
5
5
  base_uri 'https://app.close.io/api/v1'
6
6
  basic_auth ENV['CLOSEIO_API_KEY'], ''
7
7
  headers 'Content-Type' => 'application/json'
8
- #debug_output $stdout
8
+ debug_output $stdout
9
9
  format :json
10
10
 
11
11
  extend Forwardable
@@ -22,8 +22,7 @@ module Closeio
22
22
  end
23
23
 
24
24
  def save
25
- res = put("#{resource_path}#{self.id}", body: opts.to_json)
26
- res.ok? ? res : bad_response(res)
25
+ put "#{resource_path}#{self.id}/", body: self.to_h.to_json
27
26
  end
28
27
 
29
28
  class << self
@@ -0,0 +1,7 @@
1
+ module Closeio
2
+ class LeadStatus < Base
3
+ def self.resource_path
4
+ return "/status/lead/"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,4 @@
1
+ module Closeio
2
+ class Opportunity < Base
3
+ end
4
+ end
@@ -0,0 +1,7 @@
1
+ module Closeio
2
+ class OpportunityStatus < Base
3
+ def self.resource_path
4
+ return "/status/opportunity/"
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module Closeio
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: closeio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Brooks
@@ -103,7 +103,10 @@ files:
103
103
  - lib/closeio/email_activity.rb
104
104
  - lib/closeio/email_template.rb
105
105
  - lib/closeio/lead.rb
106
+ - lib/closeio/lead_status.rb
106
107
  - lib/closeio/note_activity.rb
108
+ - lib/closeio/opportunity.rb
109
+ - lib/closeio/opportunity_status.rb
107
110
  - lib/closeio/organization.rb
108
111
  - lib/closeio/paginated_list.rb
109
112
  - lib/closeio/report.rb