File Coverage

lib/eBay/API/XML/DataType/ListingDurationDefinitionType.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::ListingDurationDefinitionType;
4              
5 1     1   1571 use strict;
  1         3  
  1         29  
6 1     1   6 use warnings;
  1         3  
  1         38  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. ListingDurationDefinitionType.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::ListingDurationDefinitionType
21              
22             =head1 DESCRIPTION
23              
24             A container node for a set of durations that apply to a certain listing type.
25              
26              
27              
28             =head1 SYNOPSIS
29              
30             =cut
31              
32              
33             =head1 INHERITANCE
34              
35             eBay::API::XML::DataType::ListingDurationDefinitionType inherits from the L class
36              
37             =cut
38              
39 1     1   41 use eBay::API::XML::BaseDataType;
  0            
  0            
40             our @ISA = ("eBay::API::XML::BaseDataType");
41              
42              
43              
44             my @gaProperties = ( [ 'Duration', 'xs:token', '1', '', '' ]
45             );
46             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
47              
48             my @gaAttributes = ( [ 'durationSetID', 'xs:int', '', '', '' ]
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 setDuration()
70              
71             Specifies the length of time an auction can be open, in days. The allowed durations
72             vary according to the type of listing. The value GTC means Good Til Canceled.
73              
74             # Argument: reference to an array
75             of 'xs:token'
76              
77             =cut
78              
79             sub setDuration {
80             my $self = shift;
81             $self->{'Duration'} =
82             $self->convertArray_To_RefToArrayIfNeeded(@_);
83             }
84              
85             =head2 getDuration()
86              
87             Calls: GetCategoryFeatures
88             Returned: Conditionally
89             Details: DetailLevel: ReturnAll
90              
91             # Returns: reference to an array
92             of 'xs:token'
93              
94             =cut
95              
96             sub getDuration {
97             my $self = shift;
98             return $self->_getDataTypeArray('Duration');
99             }
100              
101              
102              
103              
104             =head2 setDurationSetID()
105              
106             Identifies the type of listing to which the set of durations applies. The durationSetID value corresponds to the listing types returned in Category.ListingDuration (also in the call response).
107              
108             # Argument: 'xs:int'
109              
110             =cut
111              
112             sub setDurationSetID {
113             my $self = shift;
114             $self->{'durationSetID'} = shift
115             }
116              
117             =head2 getDurationSetID()
118              
119             Calls: GetCategoryFeatures
120             Returned: Conditionally
121             Details: DetailLevel: ReturnAll
122              
123             # Returns: 'xs:int'
124              
125             =cut
126              
127             sub getDurationSetID {
128             my $self = shift;
129             return $self->{'durationSetID'};
130             }
131              
132              
133              
134             ## Attribute and Property lists
135             sub getPropertiesList {
136             my $self = shift;
137             return \@gaProperties;
138             }
139              
140             sub getAttributesList {
141             my $self = shift;
142             return \@gaAttributes;
143             }
144              
145              
146              
147             1;