line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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 2015(c) Upwork.com |
12
|
|
|
|
|
|
|
# License:: See LICENSE.txt and TOS - https://developers.upwork.com/api-tos.html |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
package Net::Upwork::API::Routers::Hr::Submissions; |
15
|
|
|
|
|
|
|
|
16
|
2
|
|
|
2
|
|
73547
|
use strict; |
|
2
|
|
|
|
|
18
|
|
|
2
|
|
|
|
|
56
|
|
17
|
2
|
|
|
2
|
|
10
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
67
|
|
18
|
2
|
|
|
2
|
|
513
|
use parent "Net::Upwork::API"; |
|
2
|
|
|
|
|
324
|
|
|
2
|
|
|
|
|
11
|
|
19
|
|
|
|
|
|
|
|
20
|
2
|
|
|
2
|
|
130
|
use constant ENTRY_POINT => Net::Upwork::API::Client::ENTRY_POINT_API; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
511
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=pod |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 NAME |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Auth |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 FUNCTIONS |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=over 4 |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=item new($api) |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Create a new object for accessing Auth API |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
B |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
$api |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
API object |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=cut |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub new { |
45
|
0
|
|
|
0
|
1
|
|
my ($class, $api) = @_; |
46
|
0
|
|
|
|
|
|
return Net::Upwork::API::init_router($class, $api, ENTRY_POINT); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item request_approval |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Freelancer submits work for the client to approve |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
B |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
$params |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Hash of parameters |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
B |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
JSON response as a string |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=cut |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
sub request_approval { |
66
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
67
|
0
|
|
|
|
|
|
my %params = @_; |
68
|
|
|
|
|
|
|
|
69
|
0
|
|
|
|
|
|
return $self->client()->post("/hr/v3/fp/submissions", %params); |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=item approve |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Approve an existing Submission |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
B |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
$submission_id |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Submission ID |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
$params |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
Hash of parameters |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
B |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
JSON response as a string |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=cut |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub approve { |
93
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
94
|
0
|
|
|
|
|
|
my $submission_id = shift; |
95
|
0
|
|
|
|
|
|
my %params = @_; |
96
|
|
|
|
|
|
|
|
97
|
0
|
|
|
|
|
|
return $self->client()->put("/hr/v3/fp/submissions/" . $submission_id . "/approve", %params); |
98
|
|
|
|
|
|
|
} |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
=item reject |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
Reject an existing Submission |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
B |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
$submission_id |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Submission ID |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
$params |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Hash of parameters |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
B |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
JSON response as a string |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=cut |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
sub reject { |
121
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
122
|
0
|
|
|
|
|
|
my $submission_id = shift; |
123
|
0
|
|
|
|
|
|
my %params = @_; |
124
|
|
|
|
|
|
|
|
125
|
0
|
|
|
|
|
|
return $self->client()->put("/hr/v3/fp/submissions/" . $submission_id . "/reject", %params); |
126
|
|
|
|
|
|
|
} |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
=back |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
=head1 AUTHOR |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
Maksym Novozhylov C<< >> |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
=head1 COPYRIGHT |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
Copyright E Upwork Global Corp., 2015 |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=cut |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
1; |