File Coverage

lib/eBay/API/XML/DataType/PromotionalSaleType.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::PromotionalSaleType;
4              
5 1     1   1293 use strict;
  1         3  
  1         34  
6 1     1   5 use warnings;
  1         2  
  1         32  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. PromotionalSaleType.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::PromotionalSaleType
21              
22             =head1 DESCRIPTION
23              
24             Details for a single promotional sale.
25              
26              
27              
28             =head1 SYNOPSIS
29              
30             =cut
31              
32              
33             =head1 INHERITANCE
34              
35             eBay::API::XML::DataType::PromotionalSaleType inherits from the L class
36              
37             =cut
38              
39 1     1   42 use eBay::API::XML::BaseDataType;
  0            
  0            
40             our @ISA = ("eBay::API::XML::BaseDataType");
41              
42             use eBay::API::XML::DataType::ItemIDArrayType;
43             use eBay::API::XML::DataType::Enum::DiscountCodeType;
44             use eBay::API::XML::DataType::Enum::PromotionalSaleStatusCodeType;
45             use eBay::API::XML::DataType::Enum::PromotionalSaleTypeCodeType;
46              
47              
48             my @gaProperties = ( [ 'DiscountType', 'ns:DiscountCodeType', ''
49             ,'eBay::API::XML::DataType::Enum::DiscountCodeType', '' ]
50             , [ 'DiscountValue', 'xs:double', '', '', '' ]
51             , [ 'PromotionalSaleEndTime', 'xs:dateTime', '', '', '' ]
52             , [ 'PromotionalSaleID', 'xs:long', '', '', '' ]
53             , [ 'PromotionalSaleItemIDArray', 'ns:ItemIDArrayType', ''
54             ,'eBay::API::XML::DataType::ItemIDArrayType', '1' ]
55             , [ 'PromotionalSaleName', 'xs:string', '', '', '' ]
56             , [ 'PromotionalSaleStartTime', 'xs:dateTime', '', '', '' ]
57             , [ 'PromotionalSaleType', 'ns:PromotionalSaleTypeCodeType', ''
58             ,'eBay::API::XML::DataType::Enum::PromotionalSaleTypeCodeType', '' ]
59             , [ 'Status', 'ns:PromotionalSaleStatusCodeType', ''
60             ,'eBay::API::XML::DataType::Enum::PromotionalSaleStatusCodeType', '' ]
61             );
62             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
63              
64             my @gaAttributes = (
65             );
66             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
67              
68             =head1 Subroutines:
69              
70             =cut
71              
72             sub new {
73             my $classname = shift;
74             my %args = @_;
75             my $self = $classname->SUPER::new(%args);
76             return $self;
77             }
78              
79             sub isScalar {
80             return 0;
81             }
82              
83              
84              
85             =head2 setDiscountType()
86              
87             Type of a promotional sale discount for items (for example, percentage).
88             Applies to price discount sales only.
89              
90             Calls: SetPromotionalSale
91             RequiredInput: Conditionally
92              
93             # Argument: 'ns:DiscountCodeType'
94              
95             =cut
96              
97             sub setDiscountType {
98             my $self = shift;
99             $self->{'DiscountType'} = shift
100             }
101              
102             =head2 getDiscountType()
103              
104             Calls: GetPromotionalSaleDetails
105             Returned: Conditionally
106              
107             # Returns: 'ns:DiscountCodeType'
108              
109             =cut
110              
111             sub getDiscountType {
112             my $self = shift;
113             return $self->{'DiscountType'};
114             }
115              
116              
117             =head2 setDiscountValue()
118              
119             Value of a promotional sale discount for items, a percentage discount
120             or a fixed amount reduction. Percentage discounts must be at least 5% and
121             cannot exceed 75% of the original listing price. Fixed amount discounts
122             will be in the currency of the original listing.
123             Applies to price discount sales only.
124              
125             Calls: SetPromotionalSale
126             RequiredInput: Conditionally
127              
128             # Argument: 'xs:double'
129              
130             =cut
131              
132             sub setDiscountValue {
133             my $self = shift;
134             $self->{'DiscountValue'} = shift
135             }
136              
137             =head2 getDiscountValue()
138              
139             Calls: GetPromotionalSaleDetails
140             Returned: Conditionally
141              
142             # Returns: 'xs:double'
143              
144             =cut
145              
146             sub getDiscountValue {
147             my $self = shift;
148             return $self->{'DiscountValue'};
149             }
150              
151              
152             =head2 setPromotionalSaleEndTime()
153              
154             End date of a promotional sale discount for items. Maximum listing durations
155             vary by site from 14 days to 45 days. The minimum promotional sale duration is 1 day for most sites, but 3 days on some sites.
156              
157             Calls: SetPromotionalSale
158             RequiredInput: Conditionally
159              
160             # Argument: 'xs:dateTime'
161              
162             =cut
163              
164             sub setPromotionalSaleEndTime {
165             my $self = shift;
166             $self->{'PromotionalSaleEndTime'} = shift
167             }
168              
169             =head2 getPromotionalSaleEndTime()
170              
171             Calls: GetPromotionalSaleDetails
172             Returned: Conditionally
173              
174             # Returns: 'xs:dateTime'
175              
176             =cut
177              
178             sub getPromotionalSaleEndTime {
179             my $self = shift;
180             return $self->{'PromotionalSaleEndTime'};
181             }
182              
183              
184             =head2 setPromotionalSaleID()
185              
186             Unique ID of a promotional sale (discount and/or free shipping) for items.
187             This field is an input field only for the SetPromotionalSale call
188             and only if you are not adding a new promotional sale.
189              
190             Calls: SetPromotionalSale
191             RequiredInput: Conditionally
192              
193             # Argument: 'xs:long'
194              
195             =cut
196              
197             sub setPromotionalSaleID {
198             my $self = shift;
199             $self->{'PromotionalSaleID'} = shift
200             }
201              
202             =head2 getPromotionalSaleID()
203              
204             Calls: GetPromotionalSaleDetails
205             Returned: Conditionally
206              
207             # Returns: 'xs:long'
208              
209             =cut
210              
211             sub getPromotionalSaleID {
212             my $self = shift;
213             return $self->{'PromotionalSaleID'};
214             }
215              
216              
217             =head2 setPromotionalSaleItemIDArray()
218              
219             Items covered by a promotional sale.
220              
221             # Argument: 'ns:ItemIDArrayType'
222              
223             =cut
224              
225             sub setPromotionalSaleItemIDArray {
226             my $self = shift;
227             $self->{'PromotionalSaleItemIDArray'} = shift
228             }
229              
230             =head2 getPromotionalSaleItemIDArray()
231              
232             Calls: GetPromotionalSaleDetails
233             Returned: Conditionally
234              
235             # Returns: 'ns:ItemIDArrayType'
236              
237             =cut
238              
239             sub getPromotionalSaleItemIDArray {
240             my $self = shift;
241             return $self->_getDataTypeInstance( 'PromotionalSaleItemIDArray'
242             ,'eBay::API::XML::DataType::ItemIDArrayType');
243             }
244              
245              
246             =head2 setPromotionalSaleName()
247              
248             Name of a promotional sale for items.
249              
250             Calls: SetPromotionalSale
251             RequiredInput: Conditionally
252              
253             # Argument: 'xs:string'
254              
255             =cut
256              
257             sub setPromotionalSaleName {
258             my $self = shift;
259             $self->{'PromotionalSaleName'} = shift
260             }
261              
262             =head2 getPromotionalSaleName()
263              
264             Calls: GetPromotionalSaleDetails
265             Returned: Conditionally
266              
267             # Returns: 'xs:string'
268              
269             =cut
270              
271             sub getPromotionalSaleName {
272             my $self = shift;
273             return $self->{'PromotionalSaleName'};
274             }
275              
276              
277             =head2 setPromotionalSaleStartTime()
278              
279             Start date of a promotional sale for items. Promotional sales can start
280             immediately or be scheduled to start at a later date. Some sites require
281             items to have been listed for a specific duration before they can be added
282             to a promotional sale (for example, on the US site, items must have been
283             listed for a day before they can be added to a promotional sale).
284              
285             Calls: SetPromotionalSale
286             RequiredInput: Conditionally
287              
288             # Argument: 'xs:dateTime'
289              
290             =cut
291              
292             sub setPromotionalSaleStartTime {
293             my $self = shift;
294             $self->{'PromotionalSaleStartTime'} = shift
295             }
296              
297             =head2 getPromotionalSaleStartTime()
298              
299             Calls: GetPromotionalSaleDetails
300             Returned: Conditionally
301              
302             # Returns: 'xs:dateTime'
303              
304             =cut
305              
306             sub getPromotionalSaleStartTime {
307             my $self = shift;
308             return $self->{'PromotionalSaleStartTime'};
309             }
310              
311              
312             =head2 setPromotionalSaleType()
313              
314             Type of promotional sale: price discount, free shipping, or both.
315              
316             Calls: SetPromotionalSale
317             RequiredInput: Conditionally
318              
319             # Argument: 'ns:PromotionalSaleTypeCodeType'
320              
321             =cut
322              
323             sub setPromotionalSaleType {
324             my $self = shift;
325             $self->{'PromotionalSaleType'} = shift
326             }
327              
328             =head2 getPromotionalSaleType()
329              
330             Calls: GetPromotionalSaleDetails
331             Returned: Conditionally
332              
333             # Returns: 'ns:PromotionalSaleTypeCodeType'
334              
335             =cut
336              
337             sub getPromotionalSaleType {
338             my $self = shift;
339             return $self->{'PromotionalSaleType'};
340             }
341              
342              
343             =head2 setStatus()
344              
345             Status of a promotional sale for items.
346              
347             # Argument: 'ns:PromotionalSaleStatusCodeType'
348              
349             =cut
350              
351             sub setStatus {
352             my $self = shift;
353             $self->{'Status'} = shift
354             }
355              
356             =head2 getStatus()
357              
358             Calls: GetPromotionalSaleDetails
359             Returned: Conditionally
360              
361             # Returns: 'ns:PromotionalSaleStatusCodeType'
362              
363             =cut
364              
365             sub getStatus {
366             my $self = shift;
367             return $self->{'Status'};
368             }
369              
370              
371              
372              
373              
374             ## Attribute and Property lists
375             sub getPropertiesList {
376             my $self = shift;
377             return \@gaProperties;
378             }
379              
380             sub getAttributesList {
381             my $self = shift;
382             return \@gaAttributes;
383             }
384              
385              
386              
387             1;