File Coverage

lib/eBay/API/XML/DataType/DateType.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::DateType;
4              
5 1     1   1286 use strict;
  1         2  
  1         32  
6 1     1   6 use warnings;
  1         2  
  1         33  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. DateType.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::DateType
21              
22             =head1 DESCRIPTION
23              
24             Defines year, month, and day as individual components of a date.
25             Only applicable to use cases that support incomplete dates.
26             Otherwise, we use xs:dateTime (or xs:date, as appropriate).
27              
28              
29              
30             =head1 SYNOPSIS
31              
32             =cut
33              
34              
35             =head1 INHERITANCE
36              
37             eBay::API::XML::DataType::DateType inherits from the L class
38              
39             =cut
40              
41 1     1   42 use eBay::API::XML::BaseDataType;
  0            
  0            
42             our @ISA = ("eBay::API::XML::BaseDataType");
43              
44              
45              
46             my @gaProperties = ( [ 'Day', 'xs:int', '', '', '' ]
47             , [ 'Month', 'xs:int', '', '', '' ]
48             , [ 'Year', 'xs:int', '', '', '' ]
49             );
50             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
51              
52             my @gaAttributes = (
53             );
54             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
55              
56             =head1 Subroutines:
57              
58             =cut
59              
60             sub new {
61             my $classname = shift;
62             my %args = @_;
63             my $self = $classname->SUPER::new(%args);
64             return $self;
65             }
66              
67             sub isScalar {
68             return 0;
69             }
70              
71              
72              
73             =head2 setDay()
74              
75             A calendar day (e.g., 2 or 02). For ticket searches,
76             Day is only valid if Month is also specified.
77              
78             Calls: GetSearchResults
79             RequiredInput: No
80             Max: 31
81             Min: 1
82              
83             # Argument: 'xs:int'
84              
85             =cut
86              
87             sub setDay {
88             my $self = shift;
89             $self->{'Day'} = shift
90             }
91              
92             =head2 getDay()
93              
94             # Returns: 'xs:int'
95              
96             =cut
97              
98             sub getDay {
99             my $self = shift;
100             return $self->{'Day'};
101             }
102              
103              
104             =head2 setMonth()
105              
106             A calendar month (e.g., 2 or 02 for February).
107             For ticket searches, Month is required if
108             Day is specified.
109              
110             Calls: GetSearchResults
111             RequiredInput: Conditionally
112             Max: 12
113             Min: 1
114              
115             # Argument: 'xs:int'
116              
117             =cut
118              
119             sub setMonth {
120             my $self = shift;
121             $self->{'Month'} = shift
122             }
123              
124             =head2 getMonth()
125              
126             # Returns: 'xs:int'
127              
128             =cut
129              
130             sub getMonth {
131             my $self = shift;
132             return $self->{'Month'};
133             }
134              
135              
136             =head2 setYear()
137              
138             A year in the form YYYY. For ticket searches on the US site,
139             only specify 2007 or 2008. If you specify any other year,
140             it is ignored.
141              
142             Calls: GetSearchResults
143             RequiredInput: No
144              
145             # Argument: 'xs:int'
146              
147             =cut
148              
149             sub setYear {
150             my $self = shift;
151             $self->{'Year'} = shift
152             }
153              
154             =head2 getYear()
155              
156             # Returns: 'xs:int'
157              
158             =cut
159              
160             sub getYear {
161             my $self = shift;
162             return $self->{'Year'};
163             }
164              
165              
166              
167              
168              
169             ## Attribute and Property lists
170             sub getPropertiesList {
171             my $self = shift;
172             return \@gaProperties;
173             }
174              
175             sub getAttributesList {
176             my $self = shift;
177             return \@gaAttributes;
178             }
179              
180              
181              
182             1;