closeio 2.0.3 → 2.0.4

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: 592416b15d405a161cffeed0a8bf74efb992ff38
4
- data.tar.gz: ce60995acd92c6449e14fade498abfa40bc00d31
3
+ metadata.gz: ecd6ae9fe078e1e938f89b0dbe76d4643ff1f902
4
+ data.tar.gz: 946004e1a0b318d6bacd593c3bfe4ed8bc0f3b42
5
5
  SHA512:
6
- metadata.gz: f59c8326503849d9f487df506fb6637718d6146f3307fec50c2b5cb72faf614ec058834d8d45e36f4ef336802eb7ad7bc3017d69be5941238aa6777a87b5ffe3
7
- data.tar.gz: 42d1329e7a75b0ea78da6690582477a3a5cb9dd1a7cae60845f1ed7ae3d17532df624f20e99af83a678209621ef626dfea14ed3859bfb0d8311ceeac013cc790
6
+ metadata.gz: 627375631fc35ed3a3255ccbc280cc4ed545cb5a952d8d0bfbd51a8ff20573129d6fc091084b08f9289fcf570a0ea33918f9490f8edd5a2b56515e54ab55fc4e
7
+ data.tar.gz: 45a07472b1c1d0fe0abdfde320feaa051b8a048fb5ee0b9f6d21ce34d7ae0f81823a4789304b49edff7094991505c84d6aa5d884209aac256fc855cae6a60c33
@@ -7,7 +7,7 @@ module Closeio
7
7
  end
8
8
 
9
9
  def find_contact(id)
10
- get(individual_contact_path(id))
10
+ get(contact_path(id))
11
11
  end
12
12
 
13
13
  def create_contact
@@ -15,21 +15,17 @@ module Closeio
15
15
  end
16
16
 
17
17
  def update_contact
18
- put(individual_contact_path(id))
18
+ put(contact_path(id))
19
19
  end
20
20
 
21
21
  def delete_contact(id)
22
- delete(individual_contact_path(id))
22
+ delete(contact_path(id))
23
23
  end
24
24
 
25
25
  private
26
26
 
27
- def contact_path
28
- "contact/"
29
- end
30
-
31
- def individual_contact_path(id)
32
- "#{contact_path}#{id}/"
27
+ def contact_path(id)
28
+ id ? "contact/#{id}/" : "contact/"
33
29
  end
34
30
 
35
31
  end
@@ -7,7 +7,7 @@ module Closeio
7
7
  end
8
8
 
9
9
  def find_lead(id)
10
- get(individual_lead_path(id))
10
+ get(lead_path(id))
11
11
  end
12
12
 
13
13
  def create_lead(options = {})
@@ -15,24 +15,17 @@ module Closeio
15
15
  end
16
16
 
17
17
  def update_lead(id, options = {})
18
- put(individual_lead_path(id, options))
18
+ put(lead_path(id), options)
19
19
  end
20
20
 
21
21
  def delete_lead(id)
22
- delete(individual_lead_path(id))
23
- end
24
-
25
- def lead_contacts
22
+ delete(lead_path(id))
26
23
  end
27
24
 
28
25
  private
29
26
 
30
- def lead_path
31
- "lead/"
32
- end
33
-
34
- def individual_lead_path(id)
35
- "#{lead_path}#{id}/"
27
+ def lead_path(id=nil)
28
+ id ? "lead/#{id}/" : "lead/"
36
29
  end
37
30
 
38
31
  end
@@ -11,17 +11,17 @@ module Closeio
11
11
  end
12
12
 
13
13
  def update_lead_status(id, options={})
14
- put("#{lead_status_path}#{id}/", options)
14
+ put(lead_status_path(id), options)
15
15
  end
16
16
 
17
17
  def delete_lead_status(id)
18
- delete("#{lead_status_path}#{id}/")
18
+ delete(lead_status_path(id))
19
19
  end
20
20
 
21
21
  private
22
22
 
23
- def lead_status_path
24
- "/status/lead/"
23
+ def lead_status_path(id)
24
+ id ? "status/lead/#{id}/" : "status/lead/"
25
25
  end
26
26
 
27
27
  end
@@ -7,7 +7,7 @@ module Closeio
7
7
  end
8
8
 
9
9
  def find_opportunity(id)
10
- get(individual_opportunity_path(id))
10
+ get(opportunity_path(id))
11
11
  end
12
12
 
13
13
  def create_opportunity(options={})
@@ -15,21 +15,17 @@ module Closeio
15
15
  end
16
16
 
17
17
  def update_opportunity(id, options={})
18
- put(individual_opportunity_path(id), options)
18
+ put(opportunity_path(id), options)
19
19
  end
20
20
 
21
21
  def delete_opportunity(id)
22
- delete(individual_opportunity_path(id))
22
+ delete(opportunity_path(id))
23
23
  end
24
24
 
25
25
  private
26
26
 
27
- def opportunity_path
28
- "opportunity/"
29
- end
30
-
31
- def individual_opportunity_path(id)
32
- "#{opportunity_path}#{id}/"
27
+ def opportunity_path(id)
28
+ id ? "opportunity/#{id}/" : "opportunity/"
33
29
  end
34
30
 
35
31
  end
@@ -11,17 +11,17 @@ module Closeio
11
11
  end
12
12
 
13
13
  def update_opportunity_status(id, options={})
14
- put("#{opportunity_status_path}#{id}/", options)
14
+ put(opportunity_status_path(id), options)
15
15
  end
16
16
 
17
17
  def delete_opportunity_status(id)
18
- delete("#{opportunity_status_path}#{id}/")
18
+ delete(opportunity_status_path(id))
19
19
  end
20
20
 
21
21
  private
22
22
 
23
- def opportunity_status_path
24
- "/status/opportunity/"
23
+ def opportunity_status_path(id)
24
+ id ? "status/opportunity/#{id}/" : "status/opportunity/"
25
25
  end
26
26
 
27
27
  end
@@ -7,7 +7,7 @@ module Closeio
7
7
  end
8
8
 
9
9
  def find_smart_view(id)
10
- get("#{smart_view_path}#{id}/")
10
+ get(smart_view_path(id))
11
11
  end
12
12
 
13
13
  def create_smart_view(options={})
@@ -15,17 +15,17 @@ module Closeio
15
15
  end
16
16
 
17
17
  def update_smart_view(id, options={})
18
- put("#{smart_view_path}#{id}/", options)
18
+ put(smart_view_path(id), options)
19
19
  end
20
20
 
21
21
  def delete_smart_view(id)
22
- delete("#{smart_view_path}#{id}/")
22
+ delete(smart_view_path(id))
23
23
  end
24
24
 
25
25
  private
26
26
 
27
- def smart_view_path
28
- "saved_search/"
27
+ def smart_view_path(id)
28
+ id ? "saved_search/#{id}/" : "saved_search/"
29
29
  end
30
30
 
31
31
  end
@@ -7,7 +7,7 @@ module Closeio
7
7
  end
8
8
 
9
9
  def find_task(id)
10
- get(individual_task_path(id))
10
+ get(task_path(id))
11
11
  end
12
12
 
13
13
  def create_task(options={})
@@ -15,21 +15,17 @@ module Closeio
15
15
  end
16
16
 
17
17
  def update_task(id, options={})
18
- put(individual_task_path(id), options)
18
+ put(task_path(id), options)
19
19
  end
20
20
 
21
21
  def delete_task(id)
22
- delete(individual_task_path(id))
22
+ delete(task_path(id))
23
23
  end
24
24
 
25
25
  private
26
26
 
27
- def task_path
28
- "task/"
29
- end
30
-
31
- def individual_task_path(id)
32
- "#{task_path}#{id}/"
27
+ def task_path(id)
28
+ id ? "task/#{id}/" : "task/"
33
29
  end
34
30
 
35
31
  end
@@ -1,3 +1,3 @@
1
1
  module Closeio
2
- VERSION = "2.0.3"
2
+ VERSION = "2.0.4"
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: 2.0.3
4
+ version: 2.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Brooks