line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
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::Resource::Vendors; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
27
|
|
18
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
20
|
|
19
|
|
|
|
|
|
|
|
20
|
1
|
|
|
1
|
|
5
|
use base qw( Net::MyCommerce::API::Resource ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
139
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 NAME |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
Net::MyCommerce::API::Resource::Vendors |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 VERSION |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
version 1.0.1 |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=cut |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
our $VERSION = '1.0.1'; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 SCHEMA |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
http://help.mycommerce.com/index.php/mycommerce-apis/vendor-resource/17-schemas-vendor |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 METHODS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head2 new ($args) |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Subclass Net::MyCommerce::API::Resource |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub new { |
47
|
0
|
|
|
0
|
1
|
|
my ($pkg, %args) = @_; |
48
|
0
|
|
|
|
|
|
return $pkg->SUPER::new( %args, scope=>'vendor' ); |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 get_vendor |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Get vendor contact information |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Example: |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
http://help.mycommerce.com/index.php/mycommerce-apis/vendor-resource/33-example-get-vendor |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub get_vendor { |
62
|
0
|
|
|
0
|
1
|
|
my ($self, %opts) = @_; |
63
|
0
|
|
|
|
|
|
return $self->request( path => [ '/vendors', $opts{vendor_id} ] ); |
64
|
|
|
|
|
|
|
} |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
1; |