File Coverage

lib/eBay/API/XML/DataType/LabelType.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::LabelType;
4              
5 1     1   1336 use strict;
  1         2  
  1         32  
6 1     1   6 use warnings;
  1         3  
  1         35  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. LabelType.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::LabelType
21              
22             =head1 DESCRIPTION
23              
24             Applicable when working with Pre-filled Item Information (Catalogs) functionality.
25             The label to display when presenting the attribute to a user.
26             Not necessarily the same as the attribute's label as defined in the
27             characteristic set (i.e., the label could be overridden by the catalog).
28              
29              
30              
31             =head1 SYNOPSIS
32              
33             =cut
34              
35              
36             =head1 INHERITANCE
37              
38             eBay::API::XML::DataType::LabelType inherits from the L class
39              
40             =cut
41              
42 1     1   42 use eBay::API::XML::BaseDataType;
  0            
  0            
43             our @ISA = ("eBay::API::XML::BaseDataType");
44              
45              
46              
47             my @gaProperties = ( [ 'Name', 'xs:string', '', '', '' ]
48             );
49             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
50              
51             my @gaAttributes = ( [ 'visible', 'xs:boolean', '', '', '' ]
52             );
53             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
54              
55             =head1 Subroutines:
56              
57             =cut
58              
59             sub new {
60             my $classname = shift;
61             my %args = @_;
62             my $self = $classname->SUPER::new(%args);
63             return $self;
64             }
65              
66             sub isScalar {
67             return 0;
68             }
69              
70              
71              
72             =head2 setName()
73              
74             The label to display when presenting the attribute to a user
75             (e.g., "Title" or "Manufacturer").
76            
77             The label is defined for the product, and is therefore not
78             necessarily the same as the label that is defined in the characteristic set
79             returned by another call like GetAttributesCS.
80            
81             For GetProductSearchPage: If the attribute's label is "Keyword",
82             it means you can enter the attribute's ID and a string value in the
83             SearchAttributes node of GetProductSearchResults,
84             and then eBay will search for the string against one or more attributes in the catalog.
85             For example, for strollers, GetProductSearchPage only returns a Keyword attribute
86             instead of separate Brand, Product Type, and Model attributes (for the US site).
87             So, you can use the single Keyword attribute to search against all of those attributes.
88            
89              
90             # Argument: 'xs:string'
91              
92             =cut
93              
94             sub setName {
95             my $self = shift;
96             $self->{'Name'} = shift
97             }
98              
99             =head2 getName()
100              
101             Calls: GetProductFamilyMembers
102             GetProductSearchPage
103             GetProductSearchResults
104             Returned: Always
105             Details: DetailLevel: ReturnAll
106              
107             Calls: GetProducts
108             Returned: Conditionally
109              
110             # Returns: 'xs:string'
111              
112             =cut
113              
114             sub getName {
115             my $self = shift;
116             return $self->{'Name'};
117             }
118              
119              
120              
121              
122             =head2 setVisible()
123              
124             If true, the label name is visible on the eBay site. If false, the label is not visible.
125             Usage of this information is optional. You are not required to display labels in
126             the same manner as eBay.
127              
128             # Argument: 'xs:boolean'
129              
130             =cut
131              
132             sub setVisible {
133             my $self = shift;
134             $self->{'visible'} = shift
135             }
136              
137             =head2 isVisible()
138              
139             Calls: GetProductFamilyMembers
140             GetProductSearchPage
141             GetProductSearchResults
142             Returned: Always
143             Details: DetailLevel: ReturnAll
144              
145             # Returns: 'xs:boolean'
146              
147             =cut
148              
149             sub isVisible {
150             my $self = shift;
151             return $self->{'visible'};
152             }
153              
154              
155              
156             ## Attribute and Property lists
157             sub getPropertiesList {
158             my $self = shift;
159             return \@gaProperties;
160             }
161              
162             sub getAttributesList {
163             my $self = shift;
164             return \@gaAttributes;
165             }
166              
167              
168              
169             1;