File Coverage

lib/eBay/API/XML/DataType/ValType.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::ValType;
4              
5 1     1   1684 use strict;
  1         2  
  1         31  
6 1     1   7 use warnings;
  1         2  
  1         71  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. ValType.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::ValType
21              
22             =head1 DESCRIPTION
23              
24              
25              
26             =head1 SYNOPSIS
27              
28             =cut
29              
30              
31             =head1 INHERITANCE
32              
33             eBay::API::XML::DataType::ValType inherits from the L class
34              
35             =cut
36              
37 1     1   38 use eBay::API::XML::BaseDataType;
  0            
  0            
38             our @ISA = ("eBay::API::XML::BaseDataType");
39              
40              
41              
42             my @gaProperties = ( [ 'SuggestedValueLiteral', 'xs:string', '1', '', '' ]
43             , [ 'ValueID', 'xs:int', '', '', '' ]
44             , [ 'ValueLiteral', 'xs:string', '', '', '' ]
45             );
46             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
47              
48             my @gaAttributes = (
49             );
50             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
51              
52             =head1 Subroutines:
53              
54             =cut
55              
56             sub new {
57             my $classname = shift;
58             my %args = @_;
59             my $self = $classname->SUPER::new(%args);
60             return $self;
61             }
62              
63             sub isScalar {
64             return 0;
65             }
66              
67              
68              
69             =head2 setSuggestedValueLiteral()
70              
71             (out) Reserved for future use. Suggested alternative text for
72             ValueLiteral. Multiple SuggestedValueLiteral elements can be
73             returned in a Value node. Not applicable to Half.com.
74              
75             # Argument: reference to an array
76             of 'xs:string'
77              
78             =cut
79              
80             sub setSuggestedValueLiteral {
81             my $self = shift;
82             $self->{'SuggestedValueLiteral'} =
83             $self->convertArray_To_RefToArrayIfNeeded(@_);
84             }
85              
86             =head2 getSuggestedValueLiteral()
87              
88             # Returns: reference to an array
89             of 'xs:string'
90              
91             =cut
92              
93             sub getSuggestedValueLiteral {
94             my $self = shift;
95             return $self->_getDataTypeArray('SuggestedValueLiteral');
96             }
97              
98              
99             =head2 setValueID()
100              
101             Constant value that identifies the attribute or characteristic
102             in a language-independent way. Unique within the
103             characteristic set.
104            
105             In item-listing requests, if the ID is defined as -3
106             or -6 (Other) in GetAttributesCS or GetProductSellingPages,
107             use ValueLiteral to specify the string value that the
108             user entered. Otherwise, use ValueID to specify the ID
109             that is pre-defined in GetAttributesCS or GetProductSellingPages.
110             In item-listing requests and product searches,
111             the possible ID values are:
112             -3 = User entered an arbitrary value (not an "Other" field)
113             -6 = User entered a value in an "Other" field
114             -100 = Value not specified (null)
115             #### (integer) = Identifier for a pre-defined value
116             that the user selected (e.g., -14 or 1001)
117             For eBay.com, required if ValueList is specified.
118             Not applicable to Half.com.
119              
120             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=AttrModelAttribute
121             Title: Attribute Elements
122              
123             Calls: AddItem
124             AddLiveAuctionItem
125             GetItemRecommendations
126             GetProductSearchResults
127             RelistItem
128             ReviseItem
129             ReviseLiveAuctionItem
130             VerifyAddItem
131             RequiredInput: Conditionally
132             Context: AttributeSetArray
133              
134             Calls: GetSearchResults
135             RequiredInput: Conditionally
136              
137             # Argument: 'xs:int'
138              
139             =cut
140              
141             sub setValueID {
142             my $self = shift;
143             $self->{'ValueID'} = shift
144             }
145              
146             =head2 getValueID()
147              
148             Calls: GetCategoryListings
149             GetItemRecommendations
150             GetProducts
151             Returned: Conditionally
152              
153             Calls: GetSearchResults
154             Returned: Conditionally
155             Details: DetailLevel: none, ItemReturnAttributes, ItemReturnCategories, ReturnAll
156             GranularityLevel: Coarse
157              
158              
159             Calls: GetItem
160             Returned: Conditionally
161             Details: DetailLevel: ItemReturnAttributes, ReturnAll
162              
163             Calls: GetProductFamilyMembers
164             GetProductSearchResults
165             Returned: Always
166              
167             # Returns: 'xs:int'
168              
169             =cut
170              
171             sub getValueID {
172             my $self = shift;
173             return $self->{'ValueID'};
174             }
175              
176              
177             =head2 setValueLiteral()
178              
179             The descriptive name of an attribute or characteristic value
180             (e.g., "New" might be a literal value for a Condition
181             attribute). In item-listing requests, if you send ValueID with
182             an id of -3 or -6, you must use ValueLiteral to enter the value the user
183             specified. Otherwise, eBay treats the request as if no value
184             was sent at all. For eBay.com listings,
185             use AttributeSetArray.AttributeSet.Attribute.Value.ValueLiteral.
186             The max length allowed varies per attribute.
187            
188             For GetSearchResults requests (in SearchRequest), only use ValueLiteral
189             for attributes that support free-text values.
190             That is, if eBay defines a value name and
191             a unique value ID for an attribute in GetProductFinder,
192             do not pass the name in ValueLiteral (because it won't work).
193             Instead, specify the unique value ID in ValueID.
194            
195             For Half.com, use AttributeArray.Attribute.Value.ValueLiteral
196             in listing requests.
197             That is, the parent elements and usage for Half.com differs
198             from eBay's standard Item Specifics format (and there is no
199             relationship to GetAttributesCS). For Half.com,
200             AttributeArray.Attribute.Value.ValueLiteral is required when
201             you use AddItem. See the eBay Web Services Guide for valid
202             values. For the Half.com Notes attribute, the max
203             length is 500 characters. You can revise
204             AttributeArray.Attribute.Value.ValueLiteral for Half.com
205             listings.
206              
207             MaxLength: see description
208              
209             Calls: AddItem
210             AddLiveAuctionItem
211             GetItemRecommendations
212             GetProductSearchResults
213             GetSearchResults
214             RelistItem
215             ReviseItem
216             ReviseLiveAuctionItem
217             VerifyAddItem
218             RequiredInput: Conditionally
219              
220             # Argument: 'xs:string'
221              
222             =cut
223              
224             sub setValueLiteral {
225             my $self = shift;
226             $self->{'ValueLiteral'} = shift
227             }
228              
229             =head2 getValueLiteral()
230              
231             Calls: GetSearchResults
232             Returned: Conditionally
233             Details: DetailLevel: none, ItemReturnAttributes, ItemReturnCategories, ReturnAll
234             GranularityLevel: Coarse
235              
236              
237             Calls: GetCategoryListings
238             GetItemRecommendations
239             GetProducts
240             Returned: Conditionally
241              
242             Calls: GetItem
243             Returned: Conditionally
244             Details: DetailLevel: ItemReturnAttributes, ReturnAll
245              
246             Calls: GetOrders
247             Returned: Always
248             Details: DetailLevel: none
249              
250             Calls: GetProductFamilyMembers
251             GetProductSearchResults
252             Returned: Always
253              
254             # Returns: 'xs:string'
255              
256             =cut
257              
258             sub getValueLiteral {
259             my $self = shift;
260             return $self->{'ValueLiteral'};
261             }
262              
263              
264              
265              
266              
267             ## Attribute and Property lists
268             sub getPropertiesList {
269             my $self = shift;
270             return \@gaProperties;
271             }
272              
273             sub getAttributesList {
274             my $self = shift;
275             return \@gaAttributes;
276             }
277              
278              
279              
280             1;