ruby-upwork-oauth2 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.docgen +1 -0
- data/.gitignore +22 -0
- data/.travis.yml +19 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +176 -0
- data/README.md +80 -0
- data/Rakefile +12 -0
- data/example/example.rb +65 -0
- data/lib/upwork/api.rb +29 -0
- data/lib/upwork/api/client.rb +184 -0
- data/lib/upwork/api/config.rb +41 -0
- data/lib/upwork/api/logger.rb +35 -0
- data/lib/upwork/api/routers/activities/engagement.rb +63 -0
- data/lib/upwork/api/routers/activities/team.rb +117 -0
- data/lib/upwork/api/routers/auth.rb +38 -0
- data/lib/upwork/api/routers/freelancers/profile.rb +52 -0
- data/lib/upwork/api/routers/freelancers/search.rb +43 -0
- data/lib/upwork/api/routers/hr/clients/applications.rb +55 -0
- data/lib/upwork/api/routers/hr/clients/offers.rb +64 -0
- data/lib/upwork/api/routers/hr/contracts.rb +64 -0
- data/lib/upwork/api/routers/hr/engagements.rb +52 -0
- data/lib/upwork/api/routers/hr/freelancers/applications.rb +54 -0
- data/lib/upwork/api/routers/hr/freelancers/offers.rb +64 -0
- data/lib/upwork/api/routers/hr/interviews.rb +44 -0
- data/lib/upwork/api/routers/hr/jobs.rb +79 -0
- data/lib/upwork/api/routers/hr/milestones.rb +100 -0
- data/lib/upwork/api/routers/hr/roles.rb +49 -0
- data/lib/upwork/api/routers/hr/submissions.rb +63 -0
- data/lib/upwork/api/routers/jobs/profile.rb +43 -0
- data/lib/upwork/api/routers/jobs/search.rb +43 -0
- data/lib/upwork/api/routers/messages.rb +129 -0
- data/lib/upwork/api/routers/metadata.rb +65 -0
- data/lib/upwork/api/routers/organization/companies.rb +67 -0
- data/lib/upwork/api/routers/organization/teams.rb +49 -0
- data/lib/upwork/api/routers/organization/users.rb +49 -0
- data/lib/upwork/api/routers/payments.rb +42 -0
- data/lib/upwork/api/routers/reports/finance/accounts.rb +56 -0
- data/lib/upwork/api/routers/reports/finance/billings.rb +86 -0
- data/lib/upwork/api/routers/reports/finance/earnings.rb +86 -0
- data/lib/upwork/api/routers/reports/time.rb +114 -0
- data/lib/upwork/api/routers/snapshot.rb +62 -0
- data/lib/upwork/api/routers/workdays.rb +54 -0
- data/lib/upwork/api/routers/workdiary.rb +42 -0
- data/lib/upwork/api/version.rb +18 -0
- data/ruby-upwork-oauth2.gemspec +27 -0
- data/test/helper.rb +22 -0
- data/test/test_activities_engagement.rb +26 -0
- data/test/test_activities_team.rb +46 -0
- data/test/test_auth.rb +16 -0
- data/test/test_client.rb +48 -0
- data/test/test_config.rb +27 -0
- data/test/test_freelancers_profile.rb +22 -0
- data/test/test_freelancers_search.rb +16 -0
- data/test/test_hr_clients_applications.rb +21 -0
- data/test/test_hr_clients_offers.rb +26 -0
- data/test/test_hr_contracts.rb +26 -0
- data/test/test_hr_engagements.rb +21 -0
- data/test/test_hr_freelancers_applications.rb +21 -0
- data/test/test_hr_freelancers_offers.rb +26 -0
- data/test/test_hr_interviews.rb +16 -0
- data/test/test_hr_jobs.rb +36 -0
- data/test/test_hr_milestones.rb +46 -0
- data/test/test_hr_roles.rb +21 -0
- data/test/test_hr_submissions.rb +26 -0
- data/test/test_jobs_profile.rb +16 -0
- data/test/test_jobs_search.rb +16 -0
- data/test/test_logger.rb +15 -0
- data/test/test_messages.rb +56 -0
- data/test/test_metadata.rb +36 -0
- data/test/test_organization_companies.rb +31 -0
- data/test/test_organization_teams.rb +21 -0
- data/test/test_organization_users.rb +21 -0
- data/test/test_payments.rb +16 -0
- data/test/test_reports_finance_accounts.rb +21 -0
- data/test/test_reports_finance_billings.rb +36 -0
- data/test/test_reports_finance_earnings.rb +36 -0
- data/test/test_reports_time.rb +41 -0
- data/test/test_snapshot.rb +26 -0
- data/test/test_workdays.rb +21 -0
- data/test/test_workdiary.rb +16 -0
- metadata +230 -0
@@ -0,0 +1,64 @@
|
|
1
|
+
# Licensed under the Upwork's API Terms of Use;
|
2
|
+
# you may not use this file except in compliance with the Terms.
|
3
|
+
#
|
4
|
+
# Unless required by applicable law or agreed to in writing, software
|
5
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
6
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
7
|
+
# See the License for the specific language governing permissions and
|
8
|
+
# limitations under the License.
|
9
|
+
#
|
10
|
+
# Author:: Maksym Novozhylov (mnovozhilov@upwork.com)
|
11
|
+
# Copyright:: Copyright 2014(c) Upwork.com
|
12
|
+
# License:: See LICENSE.txt and TOS - https://developers.upwork.com/api-tos.html
|
13
|
+
|
14
|
+
module Upwork
|
15
|
+
module Api
|
16
|
+
module Routers
|
17
|
+
module Hr
|
18
|
+
module Clients
|
19
|
+
# Client Job Offers API
|
20
|
+
class Offers
|
21
|
+
ENTRY_POINT = 'api'
|
22
|
+
|
23
|
+
# Init
|
24
|
+
#
|
25
|
+
# Arguments:
|
26
|
+
# client: (Client)
|
27
|
+
def initialize(client)
|
28
|
+
@client = client
|
29
|
+
@client.epoint = ENTRY_POINT
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get list of offers
|
33
|
+
#
|
34
|
+
# Arguments:
|
35
|
+
# params: (Hash)
|
36
|
+
def get_list(params)
|
37
|
+
$LOG.i "running " + __method__.to_s
|
38
|
+
@client.get '/offers/v1/clients/offers', params
|
39
|
+
end
|
40
|
+
|
41
|
+
# Get specific offer
|
42
|
+
#
|
43
|
+
# Arguments:
|
44
|
+
# reference: (String)
|
45
|
+
# params: (Hash)
|
46
|
+
def get_specific(reference, params)
|
47
|
+
$LOG.i "running " + __method__.to_s
|
48
|
+
@client.get '/offers/v1/clients/offers/' + reference, params
|
49
|
+
end
|
50
|
+
|
51
|
+
# Make an Offer
|
52
|
+
#
|
53
|
+
# Arguments:
|
54
|
+
# params: (Hash)
|
55
|
+
def make_offer(params)
|
56
|
+
$LOG.i "running " + __method__.to_s
|
57
|
+
@client.post '/offers/v1/clients/offers', params
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Licensed under the Upwork's API Terms of Use;
|
2
|
+
# you may not use this file except in compliance with the Terms.
|
3
|
+
#
|
4
|
+
# Unless required by applicable law or agreed to in writing, software
|
5
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
6
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
7
|
+
# See the License for the specific language governing permissions and
|
8
|
+
# limitations under the License.
|
9
|
+
#
|
10
|
+
# Author:: Maksym Novozhylov (mnovozhilov@upwork.com)
|
11
|
+
# Copyright:: Copyright 2014(c) Upwork.com
|
12
|
+
# License:: See LICENSE.txt and TOS - https://developers.upwork.com/api-tos.html
|
13
|
+
|
14
|
+
module Upwork
|
15
|
+
module Api
|
16
|
+
module Routers
|
17
|
+
module Hr
|
18
|
+
# Contracts API
|
19
|
+
class Contracts
|
20
|
+
ENTRY_POINT = 'api'
|
21
|
+
|
22
|
+
# Init
|
23
|
+
#
|
24
|
+
# Arguments:
|
25
|
+
# client: (Client)
|
26
|
+
def initialize(client)
|
27
|
+
@client = client
|
28
|
+
@client.epoint = ENTRY_POINT
|
29
|
+
end
|
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
|
+
|
51
|
+
# End Contract
|
52
|
+
#
|
53
|
+
# Arguments:
|
54
|
+
# reference: (String)
|
55
|
+
# params: (Hash)
|
56
|
+
def end_contract(reference, params)
|
57
|
+
$LOG.i "running " + __method__.to_s
|
58
|
+
@client.delete '/hr/v2/contracts/' + reference, params
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Licensed under the Upwork's API Terms of Use;
|
2
|
+
# you may not use this file except in compliance with the Terms.
|
3
|
+
#
|
4
|
+
# Unless required by applicable law or agreed to in writing, software
|
5
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
6
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
7
|
+
# See the License for the specific language governing permissions and
|
8
|
+
# limitations under the License.
|
9
|
+
#
|
10
|
+
# Author:: Maksym Novozhylov (mnovozhilov@upwork.com)
|
11
|
+
# Copyright:: Copyright 2014(c) Upwork.com
|
12
|
+
# License:: See LICENSE.txt and TOS - https://developers.upwork.com/api-tos.html
|
13
|
+
|
14
|
+
module Upwork
|
15
|
+
module Api
|
16
|
+
module Routers
|
17
|
+
module Hr
|
18
|
+
# Engagements API
|
19
|
+
class Engagements
|
20
|
+
ENTRY_POINT = 'api'
|
21
|
+
|
22
|
+
# Init
|
23
|
+
#
|
24
|
+
# Arguments:
|
25
|
+
# client: (Client)
|
26
|
+
def initialize(client)
|
27
|
+
@client = client
|
28
|
+
@client.epoint = ENTRY_POINT
|
29
|
+
end
|
30
|
+
|
31
|
+
# Get list of engagements
|
32
|
+
#
|
33
|
+
# Arguments:
|
34
|
+
# params: (Hash)
|
35
|
+
def get_list(params)
|
36
|
+
$LOG.i "running " + __method__.to_s
|
37
|
+
@client.get '/hr/v2/engagements', params
|
38
|
+
end
|
39
|
+
|
40
|
+
# Get specific engagement
|
41
|
+
#
|
42
|
+
# Arguments:
|
43
|
+
# reference: (String)
|
44
|
+
def get_specific(reference)
|
45
|
+
$LOG.i "running " + __method__.to_s
|
46
|
+
@client.get '/hr/v2/engagements/' + reference
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# Licensed under the Upwork's API Terms of Use;
|
2
|
+
# you may not use this file except in compliance with the Terms.
|
3
|
+
#
|
4
|
+
# Unless required by applicable law or agreed to in writing, software
|
5
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
6
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
7
|
+
# See the License for the specific language governing permissions and
|
8
|
+
# limitations under the License.
|
9
|
+
#
|
10
|
+
# Author:: Maksym Novozhylov (mnovozhilov@upwork.com)
|
11
|
+
# Copyright:: Copyright 2014(c) Upwork.com
|
12
|
+
# License:: See LICENSE.txt and TOS - https://developers.upwork.com/api-tos.html
|
13
|
+
|
14
|
+
module Upwork
|
15
|
+
module Api
|
16
|
+
module Routers
|
17
|
+
module Hr
|
18
|
+
module Freelancers
|
19
|
+
# Freelancer Job Applications API
|
20
|
+
class Applications
|
21
|
+
ENTRY_POINT = 'api'
|
22
|
+
|
23
|
+
# Init
|
24
|
+
#
|
25
|
+
# Arguments:
|
26
|
+
# client: (Client)
|
27
|
+
def initialize(client)
|
28
|
+
@client = client
|
29
|
+
@client.epoint = ENTRY_POINT
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get list of applications
|
33
|
+
#
|
34
|
+
# Arguments:
|
35
|
+
# params: (Hash)
|
36
|
+
def get_list(params = {})
|
37
|
+
$LOG.i "running " + __method__.to_s
|
38
|
+
@client.get '/hr/v4/contractors/applications', params
|
39
|
+
end
|
40
|
+
|
41
|
+
# Get specific application
|
42
|
+
#
|
43
|
+
# Arguments:
|
44
|
+
# reference: (String)
|
45
|
+
def get_specific(reference)
|
46
|
+
$LOG.i "running " + __method__.to_s
|
47
|
+
@client.get '/hr/v4/contractors/applications' + reference
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Licensed under the Upwork's API Terms of Use;
|
2
|
+
# you may not use this file except in compliance with the Terms.
|
3
|
+
#
|
4
|
+
# Unless required by applicable law or agreed to in writing, software
|
5
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
6
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
7
|
+
# See the License for the specific language governing permissions and
|
8
|
+
# limitations under the License.
|
9
|
+
#
|
10
|
+
# Author:: Maksym Novozhylov (mnovozhilov@upwork.com)
|
11
|
+
# Copyright:: Copyright 2014(c) Upwork.com
|
12
|
+
# License:: See LICENSE.txt and TOS - https://developers.upwork.com/api-tos.html
|
13
|
+
|
14
|
+
module Upwork
|
15
|
+
module Api
|
16
|
+
module Routers
|
17
|
+
module Hr
|
18
|
+
module Freelancers
|
19
|
+
# Freelancers Job Offers API
|
20
|
+
class Offers
|
21
|
+
ENTRY_POINT = 'api'
|
22
|
+
|
23
|
+
# Init
|
24
|
+
#
|
25
|
+
# Arguments:
|
26
|
+
# client: (Client)
|
27
|
+
def initialize(client)
|
28
|
+
@client = client
|
29
|
+
@client.epoint = ENTRY_POINT
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get list of offers
|
33
|
+
#
|
34
|
+
# Arguments:
|
35
|
+
# params: (Hash)
|
36
|
+
def get_list(params = {})
|
37
|
+
$LOG.i "running " + __method__.to_s
|
38
|
+
@client.get '/offers/v1/contractors/offers', params
|
39
|
+
end
|
40
|
+
|
41
|
+
# Get specific offer
|
42
|
+
#
|
43
|
+
# Arguments:
|
44
|
+
# reference: (String)
|
45
|
+
def get_specific(reference)
|
46
|
+
$LOG.i "running " + __method__.to_s
|
47
|
+
@client.get '/offers/v1/clients/offers/' + reference
|
48
|
+
end
|
49
|
+
|
50
|
+
# Apply specific action
|
51
|
+
#
|
52
|
+
# Arguments:
|
53
|
+
# reference: (String)
|
54
|
+
# params: (Hash)
|
55
|
+
def actions(reference, params)
|
56
|
+
$LOG.i "running " + __method__.to_s
|
57
|
+
@client.post '/offers/v1/clients/actions/' + reference, params
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Licensed under the Upwork's API Terms of Use;
|
2
|
+
# you may not use this file except in compliance with the Terms.
|
3
|
+
#
|
4
|
+
# Unless required by applicable law or agreed to in writing, software
|
5
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
6
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
7
|
+
# See the License for the specific language governing permissions and
|
8
|
+
# limitations under the License.
|
9
|
+
#
|
10
|
+
# Author:: Maksym Novozhylov (mnovozhilov@upwork.com)
|
11
|
+
# Copyright:: Copyright 2014(c) Upwork.com
|
12
|
+
# License:: See LICENSE.txt and TOS - https://developers.upwork.com/api-tos.html
|
13
|
+
|
14
|
+
module Upwork
|
15
|
+
module Api
|
16
|
+
module Routers
|
17
|
+
module Hr
|
18
|
+
# Interviews workflow
|
19
|
+
class Interviews
|
20
|
+
ENTRY_POINT = 'api'
|
21
|
+
|
22
|
+
# Init
|
23
|
+
#
|
24
|
+
# Arguments:
|
25
|
+
# client: (Client)
|
26
|
+
def initialize(client)
|
27
|
+
@client = client
|
28
|
+
@client.epoint = ENTRY_POINT
|
29
|
+
end
|
30
|
+
|
31
|
+
# Invite to Interview
|
32
|
+
#
|
33
|
+
# Arguments:
|
34
|
+
# job_key: (String)
|
35
|
+
# params: (Hash)
|
36
|
+
def invite(job_key, params)
|
37
|
+
$LOG.i "running " + __method__.to_s
|
38
|
+
@client.post '/hr/v1/jobs/' + job_key + '/candidates', params
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,79 @@
|
|
1
|
+
# Licensed under the Upwork's API Terms of Use;
|
2
|
+
# you may not use this file except in compliance with the Terms.
|
3
|
+
#
|
4
|
+
# Unless required by applicable law or agreed to in writing, software
|
5
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
6
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
7
|
+
# See the License for the specific language governing permissions and
|
8
|
+
# limitations under the License.
|
9
|
+
#
|
10
|
+
# Author:: Maksym Novozhylov (mnovozhilov@upwork.com)
|
11
|
+
# Copyright:: Copyright 2014(c) Upwork.com
|
12
|
+
# License:: See LICENSE.txt and TOS - https://developers.upwork.com/api-tos.html
|
13
|
+
|
14
|
+
module Upwork
|
15
|
+
module Api
|
16
|
+
module Routers
|
17
|
+
module Hr
|
18
|
+
# Jobs API
|
19
|
+
class Jobs
|
20
|
+
ENTRY_POINT = 'api'
|
21
|
+
|
22
|
+
# Init
|
23
|
+
#
|
24
|
+
# Arguments:
|
25
|
+
# client: (Client)
|
26
|
+
def initialize(client)
|
27
|
+
@client = client
|
28
|
+
@client.epoint = ENTRY_POINT
|
29
|
+
end
|
30
|
+
|
31
|
+
# Get list of jobs
|
32
|
+
#
|
33
|
+
# Arguments:
|
34
|
+
# params: (Hash)
|
35
|
+
def get_list(params)
|
36
|
+
$LOG.i "running " + __method__.to_s
|
37
|
+
@client.get '/hr/v2/jobs', params
|
38
|
+
end
|
39
|
+
|
40
|
+
# Get specific job by key
|
41
|
+
#
|
42
|
+
# Arguments:
|
43
|
+
# key: (String)
|
44
|
+
def get_specific(key)
|
45
|
+
$LOG.i "running " + __method__.to_s
|
46
|
+
@client.get '/hr/v2/jobs/' + key
|
47
|
+
end
|
48
|
+
|
49
|
+
# Post a new job
|
50
|
+
#
|
51
|
+
# Arguments:
|
52
|
+
# params: (Hash)
|
53
|
+
def post_job(params)
|
54
|
+
$LOG.i "running " + __method__.to_s
|
55
|
+
@client.post '/hr/v2/jobs', params
|
56
|
+
end
|
57
|
+
|
58
|
+
# Edit existent job
|
59
|
+
#
|
60
|
+
# Arguments:
|
61
|
+
# params: (Hash)
|
62
|
+
def edit_job(key, params)
|
63
|
+
$LOG.i "running " + __method__.to_s
|
64
|
+
@client.put '/hr/v2/jobs/' + key, params
|
65
|
+
end
|
66
|
+
|
67
|
+
# Delete existent job
|
68
|
+
#
|
69
|
+
# Arguments:
|
70
|
+
# params: (Hash)
|
71
|
+
def delete_job(key, params)
|
72
|
+
$LOG.i "running " + __method__.to_s
|
73
|
+
@client.delete '/hr/v2/jobs/' + key, params
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# Licensed under the Upwork's API Terms of Use;
|
2
|
+
# you may not use this file except in compliance with the Terms.
|
3
|
+
#
|
4
|
+
# Unless required by applicable law or agreed to in writing, software
|
5
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
6
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
7
|
+
# See the License for the specific language governing permissions and
|
8
|
+
# limitations under the License.
|
9
|
+
#
|
10
|
+
# Author:: Maksym Novozhylov (mnovozhilov@upwork.com)
|
11
|
+
# Copyright:: Copyright 2014(c) Upwork.com
|
12
|
+
# License:: See LICENSE.txt and TOS - https://developers.upwork.com/api-tos.html
|
13
|
+
|
14
|
+
module Upwork
|
15
|
+
module Api
|
16
|
+
module Routers
|
17
|
+
module Hr
|
18
|
+
# Milestones workflow
|
19
|
+
class Milestones
|
20
|
+
ENTRY_POINT = 'api'
|
21
|
+
|
22
|
+
# Init
|
23
|
+
#
|
24
|
+
# Arguments:
|
25
|
+
# client: (Client)
|
26
|
+
def initialize(client)
|
27
|
+
@client = client
|
28
|
+
@client.epoint = ENTRY_POINT
|
29
|
+
end
|
30
|
+
|
31
|
+
# Get active Milestone for specific Contract
|
32
|
+
#
|
33
|
+
# Arguments:
|
34
|
+
# contract_id: (String)
|
35
|
+
def get_active_milestone(contract_id)
|
36
|
+
$LOG.i "running " + __method__.to_s
|
37
|
+
@client.get '/hr/v3/fp/milestones/statuses/active/contracts/' + contract_id
|
38
|
+
end
|
39
|
+
|
40
|
+
# Get active Milestone for specific Contract
|
41
|
+
#
|
42
|
+
# Arguments:
|
43
|
+
# milestone_id: (String)
|
44
|
+
def get_submissions(milestone_id)
|
45
|
+
$LOG.i "running " + __method__.to_s
|
46
|
+
@client.get '/hr/v3/fp/milestones/' + milestone_id + '/submissions'
|
47
|
+
end
|
48
|
+
|
49
|
+
# Create a new Milestone
|
50
|
+
#
|
51
|
+
# Arguments:
|
52
|
+
# params: (Hash)
|
53
|
+
def create(params)
|
54
|
+
$LOG.i "running " + __method__.to_s
|
55
|
+
@client.post '/hr/v3/fp/milestones', params
|
56
|
+
end
|
57
|
+
|
58
|
+
# Edit an existing Milestone
|
59
|
+
#
|
60
|
+
# Arguments:
|
61
|
+
# milestone_id: (String)
|
62
|
+
# params: (Hash)
|
63
|
+
def edit(milestone_id, params)
|
64
|
+
$LOG.i "running " + __method__.to_s
|
65
|
+
@client.put '/hr/v3/fp/milestones/' + milestone_id, params
|
66
|
+
end
|
67
|
+
|
68
|
+
# Activate an existing Milestone
|
69
|
+
#
|
70
|
+
# Arguments:
|
71
|
+
# milestone_id: (String)
|
72
|
+
# params: (Hash)
|
73
|
+
def activate(milestone_id, params)
|
74
|
+
$LOG.i "running " + __method__.to_s
|
75
|
+
@client.put '/hr/v3/fp/milestones/' + milestone_id + '/activate', params
|
76
|
+
end
|
77
|
+
|
78
|
+
# Approve an existing Milestone
|
79
|
+
#
|
80
|
+
# Arguments:
|
81
|
+
# milestone_id: (String)
|
82
|
+
# params: (Hash)
|
83
|
+
def approve(milestone_id, params)
|
84
|
+
$LOG.i "running " + __method__.to_s
|
85
|
+
@client.put '/hr/v3/fp/milestones/' + milestone_id + '/approve', params
|
86
|
+
end
|
87
|
+
|
88
|
+
# Delete an existing Milestone
|
89
|
+
#
|
90
|
+
# Arguments:
|
91
|
+
# milestone_id: (String)
|
92
|
+
def delete(milestone_id)
|
93
|
+
$LOG.i "running " + __method__.to_s
|
94
|
+
@client.delete '/hr/v3/fp/milestones/' + milestone_id
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|