File Coverage

lib/eBay/API/XML/DataType/PromotedItemType.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::PromotedItemType;
4              
5 1     1   1197 use strict;
  1         2  
  1         35  
6 1     1   6 use warnings;
  1         1  
  1         29  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. PromotedItemType.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::PromotedItemType
21              
22             =head1 DESCRIPTION
23              
24             Contains the data describing one cross-promoted item.
25              
26              
27              
28             =head1 SYNOPSIS
29              
30             =cut
31              
32              
33             =head1 INHERITANCE
34              
35             eBay::API::XML::DataType::PromotedItemType inherits from the L class
36              
37             =cut
38              
39 1     1   35 use eBay::API::XML::BaseDataType;
  0            
  0            
40             our @ISA = ("eBay::API::XML::BaseDataType");
41              
42             use eBay::API::XML::DataType::ItemIDType;
43             use eBay::API::XML::DataType::PromotionDetailsType;
44             use eBay::API::XML::DataType::Enum::ListingTypeCodeType;
45             use eBay::API::XML::DataType::Enum::PromotionItemSelectionCodeType;
46              
47              
48             my @gaProperties = ( [ 'ItemID', 'ns:ItemIDType', ''
49             ,'eBay::API::XML::DataType::ItemIDType', '1' ]
50             , [ 'ListingType', 'ns:ListingTypeCodeType', ''
51             ,'eBay::API::XML::DataType::Enum::ListingTypeCodeType', '' ]
52             , [ 'PictureURL', 'xs:string', '', '', '' ]
53             , [ 'Position', 'xs:int', '', '', '' ]
54             , [ 'PromotionDetails', 'ns:PromotionDetailsType', '1'
55             ,'eBay::API::XML::DataType::PromotionDetailsType', '1' ]
56             , [ 'SelectionType', 'ns:PromotionItemSelectionCodeType', ''
57             ,'eBay::API::XML::DataType::Enum::PromotionItemSelectionCodeType', '' ]
58             , [ 'TimeLeft', 'xs:duration', '', '', '' ]
59             , [ 'Title', 'xs:string', '', '', '' ]
60             );
61             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
62              
63             my @gaAttributes = (
64             );
65             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
66              
67             =head1 Subroutines:
68              
69             =cut
70              
71             sub new {
72             my $classname = shift;
73             my %args = @_;
74             my $self = $classname->SUPER::new(%args);
75             return $self;
76             }
77              
78             sub isScalar {
79             return 0;
80             }
81              
82              
83              
84             =head2 setItemID()
85              
86             The unique ID of the item for which there is a promotion.
87              
88             MaxLength: 19 (Note: The eBay database specifies 38. Currently, Item IDs are usually 9 to 12 digits)
89              
90             # Argument: 'ns:ItemIDType'
91              
92             =cut
93              
94             sub setItemID {
95             my $self = shift;
96             $self->{'ItemID'} = shift
97             }
98              
99             =head2 getItemID()
100              
101             Calls: GetPromotionRules
102             Returned: Conditionally
103              
104             Calls: GetItem
105             Returned: Conditionally
106             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
107              
108             Calls: GetCrossPromotions
109             Returned: Always
110              
111             # Returns: 'ns:ItemIDType'
112              
113             =cut
114              
115             sub getItemID {
116             my $self = shift;
117             return $self->_getDataTypeInstance( 'ItemID'
118             ,'eBay::API::XML::DataType::ItemIDType');
119             }
120              
121              
122             =head2 setListingType()
123              
124             The listing type under which the cross-promoted item
125             is being offered.
126            
127             Note:
128             Lead generated items are only cross-promoted
129             if they are in the classified ad format (ListingSubtype=ClassifiedAd).
130              
131             # Argument: 'ns:ListingTypeCodeType'
132              
133             =cut
134              
135             sub setListingType {
136             my $self = shift;
137             $self->{'ListingType'} = shift
138             }
139              
140             =head2 getListingType()
141              
142             Calls: GetItem
143             Returned: Conditionally
144             AllValuesExcept: Unknown, Live, Auction, PersonalOffer,
145             Half, Express
146             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
147              
148             Calls: GetCrossPromotions
149             Returned: Always
150             AllValuesExcept: Unknown, Live, Auction, PersonalOffer,
151             Half, Express
152              
153             # Returns: 'ns:ListingTypeCodeType'
154              
155             =cut
156              
157             sub getListingType {
158             my $self = shift;
159             return $self->{'ListingType'};
160             }
161              
162              
163             =head2 setPictureURL()
164              
165             URL for an image hosted by eBay Picture Services (EPS) or self-hosted for
166             the promoted item, if any.
167              
168             # Argument: 'xs:string'
169              
170             =cut
171              
172             sub setPictureURL {
173             my $self = shift;
174             $self->{'PictureURL'} = shift
175             }
176              
177             =head2 getPictureURL()
178              
179             Calls: GetItem
180             Returned: Conditionally
181             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
182              
183             # Returns: 'xs:string'
184              
185             =cut
186              
187             sub getPictureURL {
188             my $self = shift;
189             return $self->{'PictureURL'};
190             }
191              
192              
193             =head2 setPosition()
194              
195             The ordinal position of the cross-promoted item
196             in the display. If the display is from top to bottom,
197             1 is at top. If the display is from left to right, 1
198             is at left.
199              
200             # Argument: 'xs:int'
201              
202             =cut
203              
204             sub setPosition {
205             my $self = shift;
206             $self->{'Position'} = shift
207             }
208              
209             =head2 getPosition()
210              
211             Calls: GetPromotionRules
212             Returned: Conditionally
213              
214             Calls: GetItem
215             Returned: Conditionally
216             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
217              
218             Calls: GetCrossPromotions
219             Returned: Always
220              
221             # Returns: 'xs:int'
222              
223             =cut
224              
225             sub getPosition {
226             my $self = shift;
227             return $self->{'Position'};
228             }
229              
230              
231             =head2 setPromotionDetails()
232              
233             Contains the details about the promoted item for a given PromotionPriceType. Output only.
234             Returned with request versions 485 or higher.
235              
236             # Argument: reference to an array
237             of 'ns:PromotionDetailsType'
238              
239             =cut
240              
241             sub setPromotionDetails {
242             my $self = shift;
243             $self->{'PromotionDetails'} =
244             $self->convertArray_To_RefToArrayIfNeeded(@_);
245             }
246              
247             =head2 getPromotionDetails()
248              
249             Calls: GetItem
250             Returned: Conditionally
251             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
252              
253             Calls: GetCrossPromotions
254             Returned: Always
255              
256             # Returns: reference to an array
257             of 'ns:PromotionDetailsType'
258              
259             =cut
260              
261             sub getPromotionDetails {
262             my $self = shift;
263             return $self->_getDataTypeArray('PromotionDetails');
264             }
265              
266              
267             =head2 setSelectionType()
268              
269             The manner in which the cross-promoted item was chosen
270             to be associated with the referring item. Output only.
271              
272             # Argument: 'ns:PromotionItemSelectionCodeType'
273              
274             =cut
275              
276             sub setSelectionType {
277             my $self = shift;
278             $self->{'SelectionType'} = shift
279             }
280              
281             =head2 getSelectionType()
282              
283             Calls: GetPromotionRules
284             Returned: Conditionally
285              
286             Calls: GetItem
287             Returned: Conditionally
288             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
289              
290             Calls: GetCrossPromotions
291             Returned: Always
292              
293             # Returns: 'ns:PromotionItemSelectionCodeType'
294              
295             =cut
296              
297             sub getSelectionType {
298             my $self = shift;
299             return $self->{'SelectionType'};
300             }
301              
302              
303             =head2 setTimeLeft()
304              
305             Time left before the listing for the cross-promoted item ends. Output only.
306             The duration is represented in the ISO 8601 duration format (PnYnMnDTnHnMnS).
307             See Data Types in the eBay Web Services guide for information about this
308             format.
309             For ended listings, the time left is PT0S (zero seconds).
310              
311             # Argument: 'xs:duration'
312              
313             =cut
314              
315             sub setTimeLeft {
316             my $self = shift;
317             $self->{'TimeLeft'} = shift
318             }
319              
320             =head2 getTimeLeft()
321              
322             Calls: GetItem
323             Returned: Conditionally
324             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
325              
326             Calls: GetCrossPromotions
327             Returned: Always
328              
329             # Returns: 'xs:duration'
330              
331             =cut
332              
333             sub getTimeLeft {
334             my $self = shift;
335             return $self->{'TimeLeft'};
336             }
337              
338              
339             =head2 setTitle()
340              
341             The title of the promoted item for display in the
342             referring item's page. Output only.
343              
344             # Argument: 'xs:string'
345              
346             =cut
347              
348             sub setTitle {
349             my $self = shift;
350             $self->{'Title'} = shift
351             }
352              
353             =head2 getTitle()
354              
355             Calls: GetItem
356             Returned: Conditionally
357             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
358              
359             Calls: GetCrossPromotions
360             Returned: Always
361              
362             # Returns: 'xs:string'
363              
364             =cut
365              
366             sub getTitle {
367             my $self = shift;
368             return $self->{'Title'};
369             }
370              
371              
372              
373              
374              
375             ## Attribute and Property lists
376             sub getPropertiesList {
377             my $self = shift;
378             return \@gaProperties;
379             }
380              
381             sub getAttributesList {
382             my $self = shift;
383             return \@gaAttributes;
384             }
385              
386              
387              
388             1;