File Coverage

lib/eBay/API/XML/DataType/ProductArrayType.pm
Criterion Covered Total %
statement 7 9 77.7
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 12 83.3


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2              
3             package eBay::API::XML::DataType::ProductArrayType;
4              
5 1     1   1085 use strict;
  1         2  
  1         28  
6 1     1   4 use warnings;
  1         2  
  1         25  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. ProductArrayType.pm
12             # Generated by: ......... genEBayApiDataTypes.pl
13             # Last Generated: ....... 07/07/2008 17:42
14             # API Release Number: ... 571
15             #
16             ##########################################################################
17              
18             =head1 NAME
19              
20             eBay::API::XML::DataType::ProductArrayType
21              
22             =head1 DESCRIPTION
23              
24             Container for a list of eBay Express products. Can contain zero, one, or multiple
25             ExpressProductType objects, each of which conveys the data for one product.
26              
27              
28              
29             =head1 SYNOPSIS
30              
31             =cut
32              
33              
34             =head1 INHERITANCE
35              
36             eBay::API::XML::DataType::ProductArrayType inherits from the L class
37              
38             =cut
39              
40 1     1   34 use eBay::API::XML::BaseDataType;
  0            
  0            
41             our @ISA = ("eBay::API::XML::BaseDataType");
42              
43             use eBay::API::XML::DataType::ExpressProductType;
44              
45              
46             my @gaProperties = ( [ 'Product', 'ns:ExpressProductType', '1'
47             ,'eBay::API::XML::DataType::ExpressProductType', '1' ]
48             );
49             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
50              
51             my @gaAttributes = (
52             );
53             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
54              
55             =head1 Subroutines:
56              
57             =cut
58              
59             sub new {
60             my $classname = shift;
61             my %args = @_;
62             my $self = $classname->SUPER::new(%args);
63             return $self;
64             }
65              
66             sub isScalar {
67             return 0;
68             }
69              
70              
71              
72             =head2 setProduct()
73              
74             Contains the data properties that define one eBay catalog product that matches the request, if any.
75             GetSearchResultsExpress only returns products when matching products are found.
76             For each product, the set of fields returned is controlled by the value of ProductDetails in the request.
77             Multiple Product nodes can be returned (up to the amount specified in EntriesPerPage).
78              
79             # Argument: reference to an array
80             of 'ns:ExpressProductType'
81              
82             =cut
83              
84             sub setProduct {
85             my $self = shift;
86             $self->{'Product'} =
87             $self->convertArray_To_RefToArrayIfNeeded(@_);
88             }
89              
90             =head2 getProduct()
91              
92             Calls: GetSearchResultsExpress
93             Returned: Conditionally
94              
95             # Returns: reference to an array
96             of 'ns:ExpressProductType'
97              
98             =cut
99              
100             sub getProduct {
101             my $self = shift;
102             return $self->_getDataTypeArray('Product');
103             }
104              
105              
106              
107              
108              
109             ## Attribute and Property lists
110             sub getPropertiesList {
111             my $self = shift;
112             return \@gaProperties;
113             }
114              
115             sub getAttributesList {
116             my $self = shift;
117             return \@gaAttributes;
118             }
119              
120              
121              
122             1;