File Coverage

lib/eBay/API/XML/DataType/ResponseAttributeSetType.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::ResponseAttributeSetType;
4              
5 1     1   1259 use strict;
  1         3  
  1         30  
6 1     1   6 use warnings;
  1         3  
  1         33  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. ResponseAttributeSetType.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::ResponseAttributeSetType
21              
22             =head1 DESCRIPTION
23              
24             A single set of one or more product families and related information
25             returned in the results of a product search. Supports Pre-filled Item Information
26             functionality. See the Developer's Guide for more information about
27             working with this data.
28              
29              
30              
31             =head1 SYNOPSIS
32              
33             =cut
34              
35              
36             =head1 INHERITANCE
37              
38             eBay::API::XML::DataType::ResponseAttributeSetType inherits from the L class
39              
40             =cut
41              
42 1     1   42 use eBay::API::XML::BaseDataType;
  0            
  0            
43             our @ISA = ("eBay::API::XML::BaseDataType");
44              
45             use eBay::API::XML::DataType::ProductFamilyType;
46             use eBay::API::XML::DataType::ProductFinderConstraintType;
47              
48              
49             my @gaProperties = ( [ 'ApproximatePages', 'xs:int', '', '', '' ]
50             , [ 'AttributeSetID', 'xs:int', '', '', '' ]
51             , [ 'HasMore', 'xs:boolean', '', '', '' ]
52             , [ 'ProductFamilies', 'ns:ProductFamilyType', '1'
53             ,'eBay::API::XML::DataType::ProductFamilyType', '1' ]
54             , [ 'ProductFinderConstraints', 'ns:ProductFinderConstraintType', '1'
55             ,'eBay::API::XML::DataType::ProductFinderConstraintType', '1' ]
56             , [ 'TooManyMatchesFound', 'xs:boolean', '', '', '' ]
57             , [ 'TotalProducts', 'xs:int', '', '', '' ]
58             );
59             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
60              
61             my @gaAttributes = (
62             );
63             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
64              
65             =head1 Subroutines:
66              
67             =cut
68              
69             sub new {
70             my $classname = shift;
71             my %args = @_;
72             my $self = $classname->SUPER::new(%args);
73             return $self;
74             }
75              
76             sub isScalar {
77             return 0;
78             }
79              
80              
81              
82             =head2 setApproximatePages()
83              
84             As calculating the potentially large number of pages can affect this call's
85             performance, and since the actual number of products returned per page can
86             vary in each response, we cannot provide a precise total page count.
87             Therefore, this is an estimated page count based on TotalProducts and other
88             factors, such as the number of records eBay's search engine has examined so
89             far in the product database. Once PageNumber approaches or exceeds this
90             page count, we examine more records in the database and we may recalculate
91             this value. If you estimate the number of pages yourself by using
92             TotalProducts, EntriesPerPage, and MaxChildrenPerFamily (which is also an
93             approximate value), your result will not necessarily match
94             ApproximatePages.
95              
96             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=AttrPagination
97             Title: Step4:Specify Pagination Properties
98              
99             # Argument: 'xs:int'
100              
101             =cut
102              
103             sub setApproximatePages {
104             my $self = shift;
105             $self->{'ApproximatePages'} = shift
106             }
107              
108             =head2 getApproximatePages()
109              
110             Calls: GetProductFamilyMembers
111             GetProductSearchResults
112             Returned: Always
113             Max:
114             Min: 1
115              
116             # Returns: 'xs:int'
117              
118             =cut
119              
120             sub getApproximatePages {
121             my $self = shift;
122             return $self->{'ApproximatePages'};
123             }
124              
125              
126             =head2 setAttributeSetID()
127              
128             Numeric value that identifies the attribute set in a language-independent way.
129             Unique across all eBay sites. Corresponds to a characteristic set associated
130             with the current set of search results.
131             Always returned when AttributeSet is returned.
132              
133             # Argument: 'xs:int'
134              
135             =cut
136              
137             sub setAttributeSetID {
138             my $self = shift;
139             $self->{'AttributeSetID'} = shift
140             }
141              
142             =head2 getAttributeSetID()
143              
144             Calls: GetProductFamilyMembers
145             GetProductSearchResults
146             Returned: Always
147              
148             # Returns: 'xs:int'
149              
150             =cut
151              
152             sub getAttributeSetID {
153             my $self = shift;
154             return $self->{'AttributeSetID'};
155             }
156              
157              
158             =head2 setHasMore()
159              
160             If true, the query results contain additional pages (higher than the current
161             page number). You can retrieve more results by incrementing the PageNumber
162             value that was passed in the request.
163              
164             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=AttrGPSRHasMore
165             Title: Step6:Retrieve More Pages (If Necessary)
166              
167             # Argument: 'xs:boolean'
168              
169             =cut
170              
171             sub setHasMore {
172             my $self = shift;
173             $self->{'HasMore'} = shift
174             }
175              
176             =head2 isHasMore()
177              
178             Calls: GetProductFamilyMembers
179             GetProductSearchResults
180             Returned: Always
181              
182             # Returns: 'xs:boolean'
183              
184             =cut
185              
186             sub isHasMore {
187             my $self = shift;
188             return $self->{'HasMore'};
189             }
190              
191              
192             =head2 setProductFamilies()
193              
194             ProductFamilies represents one product family. Multiple ProductFamilies
195             properties can be returned. A product family identifies a group of related
196             products. For example, the movie "My Favorite Movie: The Sequel" might be
197             released on DVD, but there might be several editions of the DVD (e.g., in
198             different languages) with different ISBN numbers. All variations are part of
199             the same product family ("My Favorite Movie: The Sequel" in the DVD format).
200             See "Limit the Quantity of Products Returned Per Family" in the eBay Web
201             Services Guide. Always returned when AttributeSet is returned.
202              
203             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=MaxChildrenPerFamily
204             Title: Step2:Limit the Quantity of Products Returned Per Family
205              
206             # Argument: reference to an array
207             of 'ns:ProductFamilyType'
208              
209             =cut
210              
211             sub setProductFamilies {
212             my $self = shift;
213             $self->{'ProductFamilies'} =
214             $self->convertArray_To_RefToArrayIfNeeded(@_);
215             }
216              
217             =head2 getProductFamilies()
218              
219             Calls: GetProductFamilyMembers
220             GetProductSearchResults
221             Returned: Always
222              
223             # Returns: reference to an array
224             of 'ns:ProductFamilyType'
225              
226             =cut
227              
228             sub getProductFamilies {
229             my $self = shift;
230             return $self->_getDataTypeArray('ProductFamilies');
231             }
232              
233              
234             =head2 setProductFinderConstraints()
235              
236             A list of attributes (constraints) that were specified in the search request.
237             This information is useful when multiple queries were specified in a
238             GetProductSearchResults request. Use this information to map each query to
239             each result in the response object. Applicable when the search request was
240             constructed based on a product finder.
241              
242             # Argument: reference to an array
243             of 'ns:ProductFinderConstraintType'
244              
245             =cut
246              
247             sub setProductFinderConstraints {
248             my $self = shift;
249             $self->{'ProductFinderConstraints'} =
250             $self->convertArray_To_RefToArrayIfNeeded(@_);
251             }
252              
253             =head2 getProductFinderConstraints()
254              
255             Calls: GetProductSearchResults
256             Returned: Conditionally
257              
258             # Returns: reference to an array
259             of 'ns:ProductFinderConstraintType'
260              
261             =cut
262              
263             sub getProductFinderConstraints {
264             my $self = shift;
265             return $self->_getDataTypeArray('ProductFinderConstraints');
266             }
267              
268              
269             =head2 setTooManyMatchesFound()
270              
271             If too many search results match the query, the TooManyMatchesFound tag is
272             returned with a value of true, and a warning is returned. If this occurs, it
273             may be a good idea to ask the user to specify more details to narrow the
274             search (e.g., specify "My Favorite Movie" instead of "My").
275             Always returns false for GetProductFamilyMembers.
276              
277             # Argument: 'xs:boolean'
278              
279             =cut
280              
281             sub setTooManyMatchesFound {
282             my $self = shift;
283             $self->{'TooManyMatchesFound'} = shift
284             }
285              
286             =head2 isTooManyMatchesFound()
287              
288             Calls: GetProductFamilyMembers
289             GetProductSearchResults
290             Returned: Always
291              
292             # Returns: 'xs:boolean'
293              
294             =cut
295              
296             sub isTooManyMatchesFound {
297             my $self = shift;
298             return $self->{'TooManyMatchesFound'};
299             }
300              
301              
302             =head2 setTotalProducts()
303              
304             The total quantity of products that match the query (within
305             the characteristic set). This can exceed the actual number of products
306             returned in the current virtual page. Always returned when AttributeSet is
307             returned.
308              
309             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=AttrGPSRHasMore
310             Title: Step6:Retrieve More Pages (If Necessary)
311              
312             # Argument: 'xs:int'
313              
314             =cut
315              
316             sub setTotalProducts {
317             my $self = shift;
318             $self->{'TotalProducts'} = shift
319             }
320              
321             =head2 getTotalProducts()
322              
323             Calls: GetProductFamilyMembers
324             GetProductSearchResults
325             Returned: Always
326              
327             # Returns: 'xs:int'
328              
329             =cut
330              
331             sub getTotalProducts {
332             my $self = shift;
333             return $self->{'TotalProducts'};
334             }
335              
336              
337              
338              
339              
340             ## Attribute and Property lists
341             sub getPropertiesList {
342             my $self = shift;
343             return \@gaProperties;
344             }
345              
346             sub getAttributesList {
347             my $self = shift;
348             return \@gaAttributes;
349             }
350              
351              
352              
353             1;