File Coverage

lib/eBay/API/XML/DataType/SearchAttributesType.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::SearchAttributesType;
4              
5 1     1   1078 use strict;
  1         1  
  1         28  
6 1     1   6 use warnings;
  1         2  
  1         29  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. SearchAttributesType.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::SearchAttributesType
21              
22             =head1 DESCRIPTION
23              
24             A product or item aspect or feature that can be used as a criterion in a search
25             for catalog content or for listed items.
26             For example, "Format" might be a criterion for searching the catalogs for
27             Pre-filled Item Information related to hardcover books.
28              
29              
30              
31             =head1 SYNOPSIS
32              
33             =cut
34              
35              
36             =head1 INHERITANCE
37              
38             eBay::API::XML::DataType::SearchAttributesType inherits from the L class
39              
40             =cut
41              
42 1     1   36 use eBay::API::XML::BaseDataType;
  0            
  0            
43             our @ISA = ("eBay::API::XML::BaseDataType");
44              
45             use eBay::API::XML::DataType::ValType;
46             use eBay::API::XML::DataType::Enum::DateSpecifierCodeType;
47             use eBay::API::XML::DataType::Enum::RangeCodeType;
48              
49              
50             my @gaProperties = ( [ 'AttributeID', 'xs:int', '', '', '' ]
51             , [ 'DateSpecifier', 'ns:DateSpecifierCodeType', ''
52             ,'eBay::API::XML::DataType::Enum::DateSpecifierCodeType', '' ]
53             , [ 'RangeSpecifier', 'ns:RangeCodeType', ''
54             ,'eBay::API::XML::DataType::Enum::RangeCodeType', '' ]
55             , [ 'ValueList', 'ns:ValType', '1'
56             ,'eBay::API::XML::DataType::ValType', '1' ]
57             );
58             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
59              
60             my @gaAttributes = (
61             );
62             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
63              
64             =head1 Subroutines:
65              
66             =cut
67              
68             sub new {
69             my $classname = shift;
70             my %args = @_;
71             my $self = $classname->SUPER::new(%args);
72             return $self;
73             }
74              
75             sub isScalar {
76             return 0;
77             }
78              
79              
80              
81             =head2 setAttributeID()
82              
83             Unique identifier for the attribute within the characteristic set.
84             Required if SearchAttributes is specified.
85              
86             Calls: GetSearchResults
87             RequiredInput: Conditionally
88              
89             Calls: GetProductSearchResults
90             RequiredInput: Yes
91              
92             # Argument: 'xs:int'
93              
94             =cut
95              
96             sub setAttributeID {
97             my $self = shift;
98             $self->{'AttributeID'} = shift
99             }
100              
101             =head2 getAttributeID()
102              
103             # Returns: 'xs:int'
104              
105             =cut
106              
107             sub getAttributeID {
108             my $self = shift;
109             return $self->{'AttributeID'};
110             }
111              
112              
113             =head2 setDateSpecifier()
114              
115             Specifies the date sub-component that the attribute represents.
116             This only applies to date attributes.
117             Required when searching by date attributes.
118             Allows for separate text fields or drop-down lists to be rendered for
119             each sub-component. For example, the day, month, and year can be
120             rendered as separate drop-down lists.
121              
122             Default:
123             Calls: GetSearchResults
124             GetProductSearchResults
125             RequiredInput: Conditionally
126              
127             # Argument: 'ns:DateSpecifierCodeType'
128              
129             =cut
130              
131             sub setDateSpecifier {
132             my $self = shift;
133             $self->{'DateSpecifier'} = shift
134             }
135              
136             =head2 getDateSpecifier()
137              
138             # Returns: 'ns:DateSpecifierCodeType'
139              
140             =cut
141              
142             sub getDateSpecifier {
143             my $self = shift;
144             return $self->{'DateSpecifier'};
145             }
146              
147              
148             =head2 setRangeSpecifier()
149              
150             Indicates that the attribute represents the high or low end in a range,
151             such as a date range or a price range.
152             Required when searching on ranges.
153              
154             Default:
155             Calls: GetSearchResults
156             GetProductSearchResults
157             RequiredInput: Conditionally
158              
159             # Argument: 'ns:RangeCodeType'
160              
161             =cut
162              
163             sub setRangeSpecifier {
164             my $self = shift;
165             $self->{'RangeSpecifier'} = shift
166             }
167              
168             =head2 getRangeSpecifier()
169              
170             # Returns: 'ns:RangeCodeType'
171              
172             =cut
173              
174             sub getRangeSpecifier {
175             my $self = shift;
176             return $self->{'RangeSpecifier'};
177             }
178              
179              
180             =head2 setValueList()
181              
182             Container for the list of one or more valid values that the
183             user has selected for
184             the searchable attribute. If multiple values are specified,
185             the search engine
186             applies "OR" logic to the query (i.e., at least one of the
187             specified values must match).
188             Required if SearchAttributes is specified.
189              
190             Calls: GetSearchResults
191             GetProductSearchResults
192             RequiredInput: Conditionally
193              
194             # Argument: reference to an array
195             of 'ns:ValType'
196              
197             =cut
198              
199             sub setValueList {
200             my $self = shift;
201             $self->{'ValueList'} =
202             $self->convertArray_To_RefToArrayIfNeeded(@_);
203             }
204              
205             =head2 getValueList()
206              
207             # Returns: reference to an array
208             of 'ns:ValType'
209              
210             =cut
211              
212             sub getValueList {
213             my $self = shift;
214             return $self->_getDataTypeArray('ValueList');
215             }
216              
217              
218              
219              
220              
221             ## Attribute and Property lists
222             sub getPropertiesList {
223             my $self = shift;
224             return \@gaProperties;
225             }
226              
227             sub getAttributesList {
228             my $self = shift;
229             return \@gaAttributes;
230             }
231              
232              
233              
234             1;