File Coverage

lib/Net/Upwork/API/Routers/Payments.pm
Criterion Covered Total %
statement 12 18 66.6
branch n/a
condition n/a
subroutine 4 6 66.6
pod 2 2 100.0
total 18 26 69.2


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::Payments;
15              
16 2     2   71127 use strict;
  2         12  
  2         61  
17 2     2   17 use warnings;
  2         4  
  2         50  
18 2     2   426 use parent "Net::Upwork::API";
  2         289  
  2         10  
19              
20 2     2   122 use constant ENTRY_POINT => Net::Upwork::API::Client::ENTRY_POINT_API;
  2         3  
  2         324  
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 submit_bonus
50              
51             Submit bonus
52              
53             B
54              
55             $team_reference
56              
57             Team reference
58              
59             $params
60              
61             Hash of parameters
62              
63             B
64              
65             JSON response as a string
66              
67             =cut
68              
69             sub submit_bonus {
70 0     0 1   my $self = shift;
71 0           my $team_reference = shift;
72 0           my %params = @_;
73              
74 0           return $self->client()->post("/hr/v2/teams/" . $team_reference . "/adjustments", %params);
75             }
76              
77             =back
78              
79             =head1 AUTHOR
80              
81             Maksym Novozhylov C<< >>
82              
83             =head1 COPYRIGHT
84              
85             Copyright E Upwork Global Corp., 2015
86              
87             =cut
88              
89             1;