File Coverage

lib/eBay/API/XML/DataType/ProductSearchResultType.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::ProductSearchResultType;
4              
5 1     1   1259 use strict;
  1         3  
  1         34  
6 1     1   5 use warnings;
  1         2  
  1         33  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. ProductSearchResultType.pm
12             # Generated by: ......... genEBayApiDataTypes.pl
13             # Last Generated: ....... 08/24/2008 16:44
14             # API Release Number: ... 579
15             #
16             ##########################################################################
17              
18             =head1 NAME
19              
20             eBay::API::XML::DataType::ProductSearchResultType
21              
22             =head1 DESCRIPTION
23              
24             Container for the results of a product query.
25             Supports Pre-filled Product Information functionality.
26             See the Developer's Guide for more information about working with this data.
27              
28              
29              
30             =head1 SYNOPSIS
31              
32             =cut
33              
34              
35             =head1 INHERITANCE
36              
37             eBay::API::XML::DataType::ProductSearchResultType inherits from the L class
38              
39             =cut
40              
41 1     1   43 use eBay::API::XML::BaseDataType;
  0            
  0            
42             our @ISA = ("eBay::API::XML::BaseDataType");
43              
44             use eBay::API::XML::DataType::ResponseAttributeSetType;
45              
46              
47             my @gaProperties = ( [ 'AttributeSet', 'ns:ResponseAttributeSetType', '1'
48             ,'eBay::API::XML::DataType::ResponseAttributeSetType', '1' ]
49             , [ 'DisplayStockPhotos', 'xs:boolean', '', '', '' ]
50             , [ 'ID', 'xs:string', '', '', '' ]
51             , [ 'NumProducts', 'xs:string', '', '', '' ]
52             );
53             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
54              
55             my @gaAttributes = (
56             );
57             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
58              
59             =head1 Subroutines:
60              
61             =cut
62              
63             sub new {
64             my $classname = shift;
65             my %args = @_;
66             my $self = $classname->SUPER::new(%args);
67             return $self;
68             }
69              
70             sub isScalar {
71             return 0;
72             }
73              
74              
75              
76             =head2 setAttributeSet()
77              
78             A result containing a set of one or more product families.
79             For GetProductSearchResults, if QueryKeywords and multiple characteristic set IDs were
80             specified in the request, multiple AttributeSet objects can be returned.
81             Each AttributeSet corresponds to a characteristic set ID specified
82             in the request. See the eBay Web Services guide for more information
83             about working with this data.
84             For GetProductSearchResults, only returned with request version 387 and higher.
85             For GetProductFamilyMembers, only returned with request version 415 and higher.
86              
87             # Argument: reference to an array
88             of 'ns:ResponseAttributeSetType'
89              
90             =cut
91              
92             sub setAttributeSet {
93             my $self = shift;
94             $self->{'AttributeSet'} =
95             $self->convertArray_To_RefToArrayIfNeeded(@_);
96             }
97              
98             =head2 getAttributeSet()
99              
100             Calls: GetProductFamilyMembers
101             GetProductSearchResults
102             Returned: Always
103              
104             # Returns: reference to an array
105             of 'ns:ResponseAttributeSetType'
106              
107             =cut
108              
109             sub getAttributeSet {
110             my $self = shift;
111             return $self->_getDataTypeArray('AttributeSet');
112             }
113              
114              
115             =head2 setDisplayStockPhotos()
116              
117             If true, your application should attempt to display stock photos that
118             are returned. If false, your application should not attempt to display any
119             stock photos that are returned. This recommendation is useful for catalog data
120             related to products like coins, where stock photos are not applicable. An
121             application with a graphical user interface can use this flag to determine
122             when to hide stock photo widgets for a set of search results.
123              
124             # Argument: 'xs:boolean'
125              
126             =cut
127              
128             sub setDisplayStockPhotos {
129             my $self = shift;
130             $self->{'DisplayStockPhotos'} = shift
131             }
132              
133             =head2 isDisplayStockPhotos()
134              
135             Calls: GetProductFamilyMembers
136             GetProductSearchResults
137             Returned: Always
138              
139             # Returns: 'xs:boolean'
140              
141             =cut
142              
143             sub isDisplayStockPhotos {
144             my $self = shift;
145             return $self->{'DisplayStockPhotos'};
146             }
147              
148              
149             =head2 setID()
150              
151             Key you specified in ProductSearchID in the search request to
152             distinguish between query results. Primarily useful when conducting
153             multiple searches in the same call. If no ProductSearchID value was
154             specified in the request, returns the array index of the search result
155             (beginning with 0). Not applicable to GetProductFamilyMembers.
156              
157             # Argument: 'xs:string'
158              
159             =cut
160              
161             sub setID {
162             my $self = shift;
163             $self->{'ID'} = shift
164             }
165              
166             =head2 getID()
167              
168             Calls: GetProductSearchResults
169             Returned: Always
170              
171             # Returns: 'xs:string'
172              
173             =cut
174              
175             sub getID {
176             my $self = shift;
177             return $self->{'ID'};
178             }
179              
180              
181             =head2 setNumProducts()
182              
183             Total quantity of products that match the search request
184             (across all characteristic sets). This value can exceed the actual
185             quantity of products returned in the current virtual page.
186             Not applicable to GetProductFamilyMembers.
187              
188             # Argument: 'xs:string'
189              
190             =cut
191              
192             sub setNumProducts {
193             my $self = shift;
194             $self->{'NumProducts'} = shift
195             }
196              
197             =head2 getNumProducts()
198              
199             Calls: GetProductSearchResults
200             Returned: Always
201              
202             # Returns: 'xs:string'
203              
204             =cut
205              
206             sub getNumProducts {
207             my $self = shift;
208             return $self->{'NumProducts'};
209             }
210              
211              
212              
213              
214              
215             ## Attribute and Property lists
216             sub getPropertiesList {
217             my $self = shift;
218             return \@gaProperties;
219             }
220              
221             sub getAttributesList {
222             my $self = shift;
223             return \@gaAttributes;
224             }
225              
226              
227              
228             1;