File Coverage

lib/eBay/API/XML/DataType/UnitOfMeasurementType.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::UnitOfMeasurementType;
4              
5 1     1   1428 use strict;
  1         2  
  1         27  
6 1     1   6 use warnings;
  1         1  
  1         25  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. UnitOfMeasurementType.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::UnitOfMeasurementType
21              
22             =head1 DESCRIPTION
23              
24             Provides a mapping between suggested unit of measure strings and
25             other, less popular strings.
26              
27              
28              
29             =head1 SYNOPSIS
30              
31             =cut
32              
33              
34             =head1 INHERITANCE
35              
36             eBay::API::XML::DataType::UnitOfMeasurementType inherits from the L class
37              
38             =cut
39              
40 1     1   34 use eBay::API::XML::BaseDataType;
  0            
  0            
41             our @ISA = ("eBay::API::XML::BaseDataType");
42              
43              
44              
45             my @gaProperties = ( [ 'AlternateText', 'xs:string', '1', '', '' ]
46             , [ 'SuggestedText', 'xs:string', '', '', '' ]
47             );
48             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
49              
50             my @gaAttributes = (
51             );
52             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
53              
54             =head1 Subroutines:
55              
56             =cut
57              
58             sub new {
59             my $classname = shift;
60             my %args = @_;
61             my $self = $classname->SUPER::new(%args);
62             return $self;
63             }
64              
65             sub isScalar {
66             return 0;
67             }
68              
69              
70              
71             =head2 setAlternateText()
72              
73             A synonym for the unit of measure (such as a fully spelled out name
74             like "inches" instead of the standard abbreviation).
75             This can be used to help a seller map unit names they use in their
76             own catalog to unit names that are more popular on eBay.
77              
78             # Argument: reference to an array
79             of 'xs:string'
80              
81             =cut
82              
83             sub setAlternateText {
84             my $self = shift;
85             $self->{'AlternateText'} =
86             $self->convertArray_To_RefToArrayIfNeeded(@_);
87             }
88              
89             =head2 getAlternateText()
90              
91             Calls: GeteBayDetails
92             Returned: Conditionally
93              
94             # Returns: reference to an array
95             of 'xs:string'
96              
97             =cut
98              
99             sub getAlternateText {
100             my $self = shift;
101             return $self->_getDataTypeArray('AlternateText');
102             }
103              
104              
105             =head2 setSuggestedText()
106              
107             The preferred way to specify a given unit of measure name, such as
108             "in." (instead of "inches" or the " (double quote) symbol).
109              
110             # Argument: 'xs:string'
111              
112             =cut
113              
114             sub setSuggestedText {
115             my $self = shift;
116             $self->{'SuggestedText'} = shift
117             }
118              
119             =head2 getSuggestedText()
120              
121             Calls: GeteBayDetails
122             Returned: Conditionally
123              
124             # Returns: 'xs:string'
125              
126             =cut
127              
128             sub getSuggestedText {
129             my $self = shift;
130             return $self->{'SuggestedText'};
131             }
132              
133              
134              
135              
136              
137             ## Attribute and Property lists
138             sub getPropertiesList {
139             my $self = shift;
140             return \@gaProperties;
141             }
142              
143             sub getAttributesList {
144             my $self = shift;
145             return \@gaAttributes;
146             }
147              
148              
149              
150             1;