API.pm

filter: Statementstmt 68.4% 26 / 38 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 8 / 14 Podpod 100% 6 / 6 totaltotal 68.9% 40 / 58 CC 1 SCAR 3.6
CC
1
Cov
68%
new
2.0
carts
2.0
orders
2.0
CRAP 1.4
« API/Resource/Orders.pm ↑ Summary API/Resource/Vendors.pm »
1 # Copyright 2013 Digital River, Inc.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14  
15 package Net::MyCommerce::API;
16  
17 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 ▶use Net::MyCommerce::API::Resource;
Subroutine BEGIN: called CC=1 SCAR=0.0
20 2 ▶use Net::MyCommerce::API::Resource::Carts;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 2 ▶use Net::MyCommerce::API::Resource::Orders;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 2 ▶use Net::MyCommerce::API::Resource::PAR;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 ▶use Net::MyCommerce::API::Resource::Products;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶use Net::MyCommerce::API::Resource::Vendors;
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 =pod
27  
28 =head1 NAME
29  
30 Net::MyCommerce::API
31  
32 =head1 DESCRIPTION
33  
34 REST API to Digital River's MyCommerce Platform
35  
36 =head1 DOCUMENTATION
37  
38 http://help.mycommerce.com/mycommerce-apis
39  
40 =head1 VERSION
41  
42 version 1.0.4
43  
44 =cut
45  
46 2 our $VERSION = '1.0.4';
47  
48 =head1 METHODS
49  
50 =head2 new
51  
52 Entry point to various Net MyCommerce API resources
53  
54 my $api = Net::MyCommerce::API->new();
55 my $cart_resource = $api->carts( credentials => { id=> $id, secret => $secret } );
56 my ($error, $result) = $cart_resource->create_cart( $options );
57  
58 =cut
59  
60 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
61 0 my $pkg = shift;
62 0 return bless {}, $pkg;
63 }
64  
65 =head2 carts (%args)
66  
67 Return a new carts-scope API resource
68  
69 =cut
70  
71 0 ▶sub carts {
Subroutine carts: not called CC=1 SCAR=6.9
Pod documented
72 0 my ($self, %args) = @_;
73 0 return Net::MyCommerce::API::Resource::Carts->new(%args);
74 }
75  
76 =head2 orders (%args)
77  
78 Return a new orders-scope API resource
79  
80 =cut
81  
82 0 ▶sub orders {
Subroutine orders: not called CC=1 SCAR=6.9
Pod documented
83 0 my ($self, %args) = @_;
84 0 return Net::MyCommerce::API::Resource::Orders->new(%args);
85 }
86  
87 =head2 par (%args)
88  
89 Return a new payments-scope API resource
90  
91 =cut
92  
93 0 ▶sub par {
Subroutine par: not called CC=1 SCAR=6.9
Pod documented
94 0 my ($self, %args) = @_;
95 0 return Net::MyCommerce::API::Resource::PAR->new(%args);
96 }
97  
98 =head2 products (%args)
99  
100 Return a new products-scope API resource
101  
102 =cut
103  
104 0 ▶sub products {
Subroutine products: not called CC=1 SCAR=6.9
Pod documented
105 0 my ($self, %args) = @_;
106 0 return Net::MyCommerce::API::Resource::Products->new(%args);
107 }
108  
109 =head2 vendors ( %args)
110  
111 Return a new vendors-scope API resource
112  
113 =cut
114  
115 0 ▶sub vendors {
Subroutine vendors: not called CC=1 SCAR=6.9
Pod documented
116 0 my ($self, %args) = @_;
117 0 return Net::MyCommerce::API::Resource::Vendors->new(%args);
118 }
119  
120 2 1;
« API/Resource/Orders.pm ↑ Summary API/Resource/Vendors.pm »