File Coverage

lib/eBay/API/XML/Call/GetCategories/GetCategoriesRequestType.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::Call::GetCategories::GetCategoriesRequestType;
4              
5 1     1   1434 use strict;
  1         3  
  1         32  
6 1     1   4 use warnings;
  1         1  
  1         33  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. GetCategoriesRequestType.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::Call::GetCategories::GetCategoriesRequestType
21              
22             =head1 DESCRIPTION
23              
24             Retrieves the latest category hierarchy available on a given site.
25             (By default, this is the site to which you submit the request.)
26             You can retrieve all categories on the site, or you can use
27             CategoryParent to retrieve one particular category and its
28             subcategories.
29            
30             For each category, the call returns the category name, its unique ID
31             (within the site to which you sent the request), and meta-data that
32             helps you determine where the category fits in the hierarchy.
33             eBay requires sellers to specify a category ID for most new listings.
34             You can only list in leaf categories.
35            
36             The call also identifies a few eBay features that are only supported
37             in some categories. For example, some categories support
38             immediate payment (AutoPay), and some categories don't.
39             For information about additional features that vary by category,
40             use GetCategoryFeatures and/or GetCategory2CS.
41            
42             The API provides other calls that supplement GetCategories.
43             For example, consider using GetSuggestedCategories to help the seller
44             choose a category ID. In certain cases, it may be helpful to
45             use GetCategoryMappings to update locally stored item data
46             (although most applications can use the simpler
47             CategoryMappingAllowed flag in AddItem for this purpose).
48              
49              
50              
51             =head1 SYNOPSIS
52              
53             =cut
54              
55              
56             =head1 INHERITANCE
57              
58             eBay::API::XML::Call::GetCategories::GetCategoriesRequestType inherits from the L class
59              
60             =cut
61              
62 1     1   41 use eBay::API::XML::RequestDataType;
  0            
  0            
63             our @ISA = ("eBay::API::XML::RequestDataType");
64              
65              
66              
67             my @gaProperties = ( [ 'CategoryParent', 'xs:string', '1', '', '' ]
68             , [ 'CategorySiteID', 'xs:string', '', '', '' ]
69             , [ 'LevelLimit', 'xs:int', '', '', '' ]
70             , [ 'ViewAllNodes', 'xs:boolean', '', '', '' ]
71             );
72             push @gaProperties, @{eBay::API::XML::RequestDataType::getPropertiesList()};
73              
74             my @gaAttributes = (
75             );
76             push @gaAttributes, @{eBay::API::XML::RequestDataType::getAttributesList()};
77              
78             =head1 Subroutines:
79              
80             =cut
81              
82             sub new {
83             my $classname = shift;
84             my %args = @_;
85             my $self = $classname->SUPER::new(%args);
86             return $self;
87             }
88              
89             sub isScalar {
90             return 0;
91             }
92              
93              
94              
95             =head2 setCategoryParent()
96              
97             Specifies the ID of the highest-level category to return,
98             along with its subcategories.
99             If no parent category is specified, all categories are
100             returned for the specified site. (Please do not pass a value of 0; zero (0) is an invalid value for CategoryParent.)
101             To determine available category IDs, call GetCategories with
102             no filters and use a DetailLevel value of ReturnAll.
103             If you specify multiple parent categories, the hierarchy for
104             each one is returned.
105              
106             RequiredInput: No
107             Default:
108             # Argument: reference to an array
109             of 'xs:string'
110              
111             =cut
112              
113             sub setCategoryParent {
114             my $self = shift;
115             $self->{'CategoryParent'} =
116             $self->convertArray_To_RefToArrayIfNeeded(@_);
117             }
118              
119             =head2 getCategoryParent()
120              
121             # Returns: reference to an array
122             of 'xs:string'
123              
124             =cut
125              
126             sub getCategoryParent {
127             my $self = shift;
128             return $self->_getDataTypeArray('CategoryParent');
129             }
130              
131              
132             =head2 setCategorySiteID()
133              
134             Specifies the eBay site for which to retrieve the category
135             hierarchy.
136             Use the numeric site code (e.g., 77 for eBay Germany).
137             Only necessary if you want to retrieve category data
138             for a site other than the site to which you are
139             submitting the request.
140              
141             RequiredInput: No
142             Default: The site ID of the request
143             # Argument: 'xs:string'
144              
145             =cut
146              
147             sub setCategorySiteID {
148             my $self = shift;
149             $self->{'CategorySiteID'} = shift
150             }
151              
152             =head2 getCategorySiteID()
153              
154             # Returns: 'xs:string'
155              
156             =cut
157              
158             sub getCategorySiteID {
159             my $self = shift;
160             return $self->{'CategorySiteID'};
161             }
162              
163              
164             =head2 setLevelLimit()
165              
166             Specifies the maximum depth of the category hierarchy to retrieve,
167             where the top-level categories (meta-categories) are at level 1.
168             Retrieves all category nodes with a category level less than or
169             equal to this value.
170             If not specified, retrieves categories at all applicable levels.
171             As with all calls, the actual data returned will vary depending
172             on how you configure other fields in the request
173             (including DetailLevel).
174              
175             RequiredInput: No
176             Default: 0
177             # Argument: 'xs:int'
178              
179             =cut
180              
181             sub setLevelLimit {
182             my $self = shift;
183             $self->{'LevelLimit'} = shift
184             }
185              
186             =head2 getLevelLimit()
187              
188             # Returns: 'xs:int'
189              
190             =cut
191              
192             sub getLevelLimit {
193             my $self = shift;
194             return $self->{'LevelLimit'};
195             }
196              
197              
198             =head2 setViewAllNodes()
199              
200             If false or omitted, retrieves only leaf categories.
201             (You can only list in leaf categories.)
202             If true, retrieves both leaf and internal (non-leaf) categories.
203             As with all calls, the actual data returned will vary depending
204             on how you configure other fields in the request.
205              
206             RequiredInput: No
207             Default: false
208             # Argument: 'xs:boolean'
209              
210             =cut
211              
212             sub setViewAllNodes {
213             my $self = shift;
214             $self->{'ViewAllNodes'} = shift
215             }
216              
217             =head2 isViewAllNodes()
218              
219             # Returns: 'xs:boolean'
220              
221             =cut
222              
223             sub isViewAllNodes {
224             my $self = shift;
225             return $self->{'ViewAllNodes'};
226             }
227              
228              
229              
230              
231              
232             ## Attribute and Property lists
233             sub getPropertiesList {
234             my $self = shift;
235             return \@gaProperties;
236             }
237              
238             sub getAttributesList {
239             my $self = shift;
240             return \@gaAttributes;
241             }
242              
243              
244              
245             1;