File Coverage

lib/eBay/API/XML/DataType/AttributeType.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::AttributeType;
4              
5 1     1   1070 use strict;
  1         2  
  1         25  
6 1     1   4 use warnings;
  1         2  
  1         25  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. AttributeType.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::AttributeType
21              
22             =head1 DESCRIPTION
23              
24             A salient aspect or feature of an item. On eBay.com, this information is used in the Item Specifics
25             section of a listing to describe an item
26             in a standard way so that buyers can find it more easily.
27              
28              
29              
30             =head1 SYNOPSIS
31              
32             =cut
33              
34              
35             =head1 INHERITANCE
36              
37             eBay::API::XML::DataType::AttributeType inherits from the L class
38              
39             =cut
40              
41 1     1   31 use eBay::API::XML::BaseDataType;
  0            
  0            
42             our @ISA = ("eBay::API::XML::BaseDataType");
43              
44             use eBay::API::XML::DataType::ValType;
45              
46              
47             my @gaProperties = ( [ 'Value', 'ns:ValType', '1'
48             ,'eBay::API::XML::DataType::ValType', '1' ]
49             );
50             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
51              
52             my @gaAttributes = ( [ 'attributeID', 'xs:int', '', '', '' ]
53             , [ 'attributeLabel', 'xs:string', '', '', '' ]
54             );
55             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
56              
57             =head1 Subroutines:
58              
59             =cut
60              
61             sub new {
62             my $classname = shift;
63             my %args = @_;
64             my $self = $classname->SUPER::new(%args);
65             return $self;
66             }
67              
68             sub isScalar {
69             return 0;
70             }
71              
72              
73              
74             =head2 setValue()
75              
76             A value the seller selected or entered for the attribute.
77             At least one value is required for each Attribute that you specify.
78             Some attributes can have multiple values.
79             See the eBay Web Services guide sections on
80             Item Specifics (Attributes) and Pre-filled Item Information (Catalogs)
81             for information about using GetAttributesCS to determine valid
82             attribute values.

83             For eBay.com listings, use AttributeSetArray.AttributeSet.Attribute.Value.
84             For Half.com, use AttributeArray.Attribute.Value. That is, the parent elements
85             and usage for Half.com differs from
86             eBay's standard Item Specifics format (and there is no relationship to GetAttributesCS).
87             For Half.com, this does not use the same Attributes logic as eBay's Item Specifics.
88             For Half.com, AttributeArray.Attribute.Value is required when you use AddItem.
89             see the eBay Web Services Guide for valid values.
90             You can revise AttributeArray.Attribute.Value for Half.com listings.
91              
92             Calls: AddItem
93             AddLiveAuctionItem
94             GetItemRecommendations
95             GetProducts
96             VerifyAddItem
97             RequiredInput: Conditionally
98              
99             Calls: RelistItem
100             ReviseItem
101             ReviseLiveAuctionItem
102             RequiredInput: No
103              
104             # Argument: reference to an array
105             of 'ns:ValType'
106              
107             =cut
108              
109             sub setValue {
110             my $self = shift;
111             $self->{'Value'} =
112             $self->convertArray_To_RefToArrayIfNeeded(@_);
113             }
114              
115             =head2 getValue()
116              
117             Calls: GetCategoryListings
118             GetItemRecommendations
119             Returned: Conditionally
120              
121             Calls: GetSearchResults
122             Returned: Conditionally
123             Details: DetailLevel: none, ItemReturnAttributes, ItemReturnCategories, ReturnAll
124             GranularityLevel: Coarse
125              
126              
127             Calls: GetItem
128             Returned: Conditionally
129             Details: DetailLevel: ItemReturnAttributes, ReturnAll
130              
131             Calls: GetOrders
132             Returned: Always
133             Details: DetailLevel: none
134              
135             # Returns: reference to an array
136             of 'ns:ValType'
137              
138             =cut
139              
140             sub getValue {
141             my $self = shift;
142             return $self->_getDataTypeArray('Value');
143             }
144              
145              
146              
147              
148             =head2 setAttributeID()
149              
150             Constant value that identifies the attribute in a language-independent way.
151             Unique within the attribute set.
152             See the Developer's Guide topics on Item Specifics and Pre-filled Item Information
153             for information about determining valid attribute IDs.
154             Not applicable to Half.com.
155              
156             Calls: AddItem
157             AddLiveAuctionItem
158             GetItemRecommendations
159             VerifyAddItem
160             RequiredInput: Conditionally
161             Context: AttributeSetArray
162              
163             Calls: RelistItem
164             ReviseItem
165             ReviseLiveAuctionItem
166             RequiredInput: No
167             Context: AttributeSetArray
168              
169             # Argument: 'xs:int'
170              
171             =cut
172              
173             sub setAttributeID {
174             my $self = shift;
175             $self->{'attributeID'} = shift
176             }
177              
178             =head2 getAttributeID()
179              
180             Calls: GetCategoryListings
181             GetItemRecommendations
182             Returned: Conditionally
183              
184             Calls: GetSearchResults
185             Returned: Conditionally
186             Details: DetailLevel: none, ItemReturnAttributes, ItemReturnCategories, ReturnAll
187             GranularityLevel: Coarse
188              
189              
190             Calls: GetItem
191             Returned: Conditionally
192             Details: DetailLevel: ItemReturnAttributes, ReturnAll
193              
194             # Returns: 'xs:int'
195              
196             =cut
197              
198             sub getAttributeID {
199             my $self = shift;
200             return $self->{'attributeID'};
201             }
202              
203              
204             =head2 setAttributeLabel()
205              
206             Name of the attribute being specified. This is not part of
207             eBay's standard Item Specifics format (i.e., there is no
208             relationship to GetAttributesCS). For GetCategoryListings, this
209             returns the value "Condition" to identify the item condition
210             attribute. For GetOrders, this is always returned for Half.com
211             orders. (It is not applicable to orders on the eBay.com site.)
212             For Half.com, see the eBay Web Services Guide for valid input
213             values. For Half.com, this field is required when you use
214             AddItem. You can revise this value for Half.com listings.
215              
216             Calls: AddItem
217             GetItemRecommendations
218             VerifyAddItem
219             RequiredInput: Conditionally
220             Context: AttributeArray
221              
222             Calls: ReviseItem
223             RequiredInput: No
224             Context: AttributeArray
225              
226             # Argument: 'xs:string'
227              
228             =cut
229              
230             sub setAttributeLabel {
231             my $self = shift;
232             $self->{'attributeLabel'} = shift
233             }
234              
235             =head2 getAttributeLabel()
236              
237             Calls: GetCategoryListings
238             Returned: Conditionally
239              
240             Calls: GetOrders
241             Returned: Always
242             Details: DetailLevel: none
243              
244             # Returns: 'xs:string'
245              
246             =cut
247              
248             sub getAttributeLabel {
249             my $self = shift;
250             return $self->{'attributeLabel'};
251             }
252              
253              
254              
255             ## Attribute and Property lists
256             sub getPropertiesList {
257             my $self = shift;
258             return \@gaProperties;
259             }
260              
261             sub getAttributesList {
262             my $self = shift;
263             return \@gaAttributes;
264             }
265              
266              
267              
268             1;