File Coverage

lib/eBay/API/XML/DataType/SpellingSuggestionType.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::SpellingSuggestionType;
4              
5 1     1   1281 use strict;
  1         2  
  1         37  
6 1     1   6 use warnings;
  1         3  
  1         32  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. SpellingSuggestionType.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::SpellingSuggestionType
21              
22             =head1 DESCRIPTION
23              
24             Suggested spelling of mispelled search terms, along with the number of matching items that would have been returned if the suggestions had been used.
25              
26              
27              
28             =head1 SYNOPSIS
29              
30             =cut
31              
32              
33             =head1 INHERITANCE
34              
35             eBay::API::XML::DataType::SpellingSuggestionType 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              
43              
44             my @gaProperties = ( [ 'MatchingItemCount', 'xs:int', '', '', '' ]
45             , [ 'Text', 'xs:string', '1', '', '' ]
46             );
47             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
48              
49             my @gaAttributes = (
50             );
51             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
52              
53             =head1 Subroutines:
54              
55             =cut
56              
57             sub new {
58             my $classname = shift;
59             my %args = @_;
60             my $self = $classname->SUPER::new(%args);
61             return $self;
62             }
63              
64             sub isScalar {
65             return 0;
66             }
67              
68              
69              
70             =head2 setMatchingItemCount()
71              
72             The number of matching items if the suggested spelling of the search term or terms had
73             been used. If multiple terms are used, MatchingItemCount applies to the terms taken as a unit.
74              
75             # Argument: 'xs:int'
76              
77             =cut
78              
79             sub setMatchingItemCount {
80             my $self = shift;
81             $self->{'MatchingItemCount'} = shift
82             }
83              
84             =head2 getMatchingItemCount()
85              
86             Calls: GetSearchResults
87             Returned: Conditionally
88             Details: DetailLevel: ItemReturnAttributes, ItemReturnCategories, none, ReturnAll
89              
90             # Returns: 'xs:int'
91              
92             =cut
93              
94             sub getMatchingItemCount {
95             my $self = shift;
96             return $self->{'MatchingItemCount'};
97             }
98              
99              
100             =head2 setText()
101              
102             Suggestion for a different spelling of the search term or terms. The suggestions are given in Text tags
103             and the suggestion for the first word is given before the suggestion for subsequent words.
104             Suggestions are based on correctly-spelled terms in items, so suggestions vary over time and depend on
105             whether a word or word combination is in one or more items.
106              
107             # Argument: reference to an array
108             of 'xs:string'
109              
110             =cut
111              
112             sub setText {
113             my $self = shift;
114             $self->{'Text'} =
115             $self->convertArray_To_RefToArrayIfNeeded(@_);
116             }
117              
118             =head2 getText()
119              
120             Calls: GetSearchResults
121             Returned: Conditionally
122             Details: DetailLevel: ItemReturnAttributes, ItemReturnCategories, none, ReturnAll
123              
124             # Returns: reference to an array
125             of 'xs:string'
126              
127             =cut
128              
129             sub getText {
130             my $self = shift;
131             return $self->_getDataTypeArray('Text');
132             }
133              
134              
135              
136              
137              
138             ## Attribute and Property lists
139             sub getPropertiesList {
140             my $self = shift;
141             return \@gaProperties;
142             }
143              
144             sub getAttributesList {
145             my $self = shift;
146             return \@gaAttributes;
147             }
148              
149              
150              
151             1;