File Coverage

lib/eBay/API/XML/DataType/SearchLocationFilterType.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::SearchLocationFilterType;
4              
5 1     1   1175 use strict;
  1         2  
  1         30  
6 1     1   4 use warnings;
  1         2  
  1         27  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. SearchLocationFilterType.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::SearchLocationFilterType
21              
22             =head1 DESCRIPTION
23              
24             One of the data filters used when searching for items using GetSearchResults.
25             Allows filtering based on an item's location (where the seller would be shipping
26             the item from) or an item's availability (which eBay sites the item can be
27             purchased from).
28              
29              
30              
31             =head1 SYNOPSIS
32              
33             =cut
34              
35              
36             =head1 INHERITANCE
37              
38             eBay::API::XML::DataType::SearchLocationFilterType inherits from the L class
39              
40             =cut
41              
42 1     1   35 use eBay::API::XML::BaseDataType;
  0            
  0            
43             our @ISA = ("eBay::API::XML::BaseDataType");
44              
45             use eBay::API::XML::DataType::SearchLocationType;
46             use eBay::API::XML::DataType::Enum::CountryCodeType;
47             use eBay::API::XML::DataType::Enum::CurrencyCodeType;
48             use eBay::API::XML::DataType::Enum::ItemLocationCodeType;
49              
50              
51             my @gaProperties = ( [ 'CountryCode', 'ns:CountryCodeType', ''
52             ,'eBay::API::XML::DataType::Enum::CountryCodeType', '' ]
53             , [ 'Currency', 'ns:CurrencyCodeType', ''
54             ,'eBay::API::XML::DataType::Enum::CurrencyCodeType', '' ]
55             , [ 'ItemLocation', 'ns:ItemLocationCodeType', ''
56             ,'eBay::API::XML::DataType::Enum::ItemLocationCodeType', '' ]
57             , [ 'SearchLocation', 'ns:SearchLocationType', ''
58             ,'eBay::API::XML::DataType::SearchLocationType', '1' ]
59             );
60             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
61              
62             my @gaAttributes = (
63             );
64             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
65              
66             =head1 Subroutines:
67              
68             =cut
69              
70             sub new {
71             my $classname = shift;
72             my %args = @_;
73             my $self = $classname->SUPER::new(%args);
74             return $self;
75             }
76              
77             sub isScalar {
78             return 0;
79             }
80              
81              
82              
83             =head2 setCountryCode()
84              
85             Country the item is either located in or available to (depending on the
86             value specified in ItemLocation).
87              
88             Calls: GetSearchResults
89             RequiredInput: No
90              
91             # Argument: 'ns:CountryCodeType'
92              
93             =cut
94              
95             sub setCountryCode {
96             my $self = shift;
97             $self->{'CountryCode'} = shift
98             }
99              
100             =head2 getCountryCode()
101              
102             # Returns: 'ns:CountryCodeType'
103              
104             =cut
105              
106             sub getCountryCode {
107             my $self = shift;
108             return $self->{'CountryCode'};
109             }
110              
111              
112             =head2 setCurrency()
113              
114             Limits the result set to just those items with a specified currency.
115              
116             Calls: GetSearchResults
117             RequiredInput: No
118              
119             # Argument: 'ns:CurrencyCodeType'
120              
121             =cut
122              
123             sub setCurrency {
124             my $self = shift;
125             $self->{'Currency'} = shift
126             }
127              
128             =head2 getCurrency()
129              
130             # Returns: 'ns:CurrencyCodeType'
131              
132             =cut
133              
134             sub getCurrency {
135             my $self = shift;
136             return $self->{'Currency'};
137             }
138              
139              
140             =head2 setItemLocation()
141              
142             Specifies whether the filter should be for items located in the country
143             specified in Country or available to that country.
144              
145             Calls: GetSearchResults
146             RequiredInput: No
147              
148             # Argument: 'ns:ItemLocationCodeType'
149              
150             =cut
151              
152             sub setItemLocation {
153             my $self = shift;
154             $self->{'ItemLocation'} = shift
155             }
156              
157             =head2 getItemLocation()
158              
159             # Returns: 'ns:ItemLocationCodeType'
160              
161             =cut
162              
163             sub getItemLocation {
164             my $self = shift;
165             return $self->{'ItemLocation'};
166             }
167              
168              
169             =head2 setSearchLocation()
170              
171             Specifies filtering based on the location of the item or its availability
172             relative to an eBay site. Or, allows for filtering based on regional listing.
173              
174             Calls: GetSearchResults
175             RequiredInput: No
176              
177             # Argument: 'ns:SearchLocationType'
178              
179             =cut
180              
181             sub setSearchLocation {
182             my $self = shift;
183             $self->{'SearchLocation'} = shift
184             }
185              
186             =head2 getSearchLocation()
187              
188             # Returns: 'ns:SearchLocationType'
189              
190             =cut
191              
192             sub getSearchLocation {
193             my $self = shift;
194             return $self->_getDataTypeInstance( 'SearchLocation'
195             ,'eBay::API::XML::DataType::SearchLocationType');
196             }
197              
198              
199              
200              
201              
202             ## Attribute and Property lists
203             sub getPropertiesList {
204             my $self = shift;
205             return \@gaProperties;
206             }
207              
208             sub getAttributesList {
209             my $self = shift;
210             return \@gaAttributes;
211             }
212              
213              
214              
215             1;