odesk-api 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -31,10 +31,7 @@ module Odesk
|
|
31
31
|
# List activities for specific engagement
|
32
32
|
#
|
33
33
|
# Arguments:
|
34
|
-
# company: (String)
|
35
|
-
# team: (String)
|
36
34
|
# engagement_ref: (String)
|
37
|
-
# params: (Hash)
|
38
35
|
def get_specific(engagement_ref)
|
39
36
|
@client.get '/tasks/v2/tasks/contracts/' + engagement_ref
|
40
37
|
end
|
@@ -28,6 +28,26 @@ module Odesk
|
|
28
28
|
@client.epoint = ENTRY_POINT
|
29
29
|
end
|
30
30
|
|
31
|
+
# Suspend Contract
|
32
|
+
#
|
33
|
+
# Arguments:
|
34
|
+
# reference: (String)
|
35
|
+
# params: (Hash)
|
36
|
+
def suspend_contract(reference, params)
|
37
|
+
$LOG.i "running " + __method__.to_s
|
38
|
+
@client.put '/hr/v2/contracts/' + reference + '/suspend', params
|
39
|
+
end
|
40
|
+
|
41
|
+
# Restart Contract
|
42
|
+
#
|
43
|
+
# Arguments:
|
44
|
+
# reference: (String)
|
45
|
+
# params: (Hash)
|
46
|
+
def restart_contract(reference, params)
|
47
|
+
$LOG.i "running " + __method__.to_s
|
48
|
+
@client.put '/hr/v2/contracts/' + reference + '/restart', params
|
49
|
+
end
|
50
|
+
|
31
51
|
# End Contract
|
32
52
|
#
|
33
53
|
# Arguments:
|
@@ -41,4 +61,4 @@ module Odesk
|
|
41
61
|
end
|
42
62
|
end
|
43
63
|
end
|
44
|
-
end
|
64
|
+
end
|
data/lib/odesk/api/version.rb
CHANGED
data/test/test_hr_contracts.rb
CHANGED
@@ -9,8 +9,18 @@ require 'mocha/test_unit'
|
|
9
9
|
class HrContractsTest < Test::Unit::TestCase
|
10
10
|
include TestHelper
|
11
11
|
|
12
|
+
def test_suspend_contract
|
13
|
+
api = Odesk::Api::Routers::Hr::Contracts.new(get_client_mock)
|
14
|
+
assert api.suspend_contract('12', {})
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_restart_contract
|
18
|
+
api = Odesk::Api::Routers::Hr::Contracts.new(get_client_mock)
|
19
|
+
assert api.restart_contract('12', {})
|
20
|
+
end
|
21
|
+
|
12
22
|
def test_end_contract
|
13
23
|
api = Odesk::Api::Routers::Hr::Contracts.new(get_client_mock)
|
14
24
|
assert api.end_contract('12', {})
|
15
25
|
end
|
16
|
-
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: odesk-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-09-
|
12
|
+
date: 2014-09-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth
|