File Coverage

lib/eBay/API/XML/DataType/ProductFamilyType.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::ProductFamilyType;
4              
5 1     1   1087 use strict;
  1         2  
  1         25  
6 1     1   3 use warnings;
  1         2  
  1         26  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. ProductFamilyType.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::ProductFamilyType
21              
22             =head1 DESCRIPTION
23              
24             A set of results returned from a catalog product search. Use
25             GetProductSearchResults or GetProductFamilyMembers to perform the search. See the
26             guide for information about Pre-filled Item Information (Catalogs) functionality.
27              
28              
29              
30             =head1 SYNOPSIS
31              
32             =cut
33              
34              
35             =head1 INHERITANCE
36              
37             eBay::API::XML::DataType::ProductFamilyType inherits from the L class
38              
39             =cut
40              
41 1     1   32 use eBay::API::XML::BaseDataType;
  0            
  0            
42             our @ISA = ("eBay::API::XML::BaseDataType");
43              
44             use eBay::API::XML::DataType::ProductType;
45              
46              
47             my @gaProperties = ( [ 'FamilyMembers', 'ns:ProductType', '1'
48             ,'eBay::API::XML::DataType::ProductType', '1' ]
49             , [ 'ParentProduct', 'ns:ProductType', ''
50             ,'eBay::API::XML::DataType::ProductType', '1' ]
51             );
52             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
53              
54             my @gaAttributes = ( [ 'hasMoreChildren', 'xs:boolean', '', '', '' ]
55             );
56             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
57              
58             =head1 Subroutines:
59              
60             =cut
61              
62             sub new {
63             my $classname = shift;
64             my %args = @_;
65             my $self = $classname->SUPER::new(%args);
66             return $self;
67             }
68              
69             sub isScalar {
70             return 0;
71             }
72              
73              
74              
75             =head2 setFamilyMembers()
76              
77             A set of products (within the same product family) that match the search query.
78              
79             # Argument: reference to an array
80             of 'ns:ProductType'
81              
82             =cut
83              
84             sub setFamilyMembers {
85             my $self = shift;
86             $self->{'FamilyMembers'} =
87             $self->convertArray_To_RefToArrayIfNeeded(@_);
88             }
89              
90             =head2 getFamilyMembers()
91              
92             Calls: GetProductFamilyMembers
93             GetProductSearchResults
94             Returned: Always
95              
96             # Returns: reference to an array
97             of 'ns:ProductType'
98              
99             =cut
100              
101             sub getFamilyMembers {
102             my $self = shift;
103             return $self->_getDataTypeArray('FamilyMembers');
104             }
105              
106              
107             =head2 setParentProduct()
108              
109             A transient header that describes the current search results. Contains a
110             an ID, a subset of attributes, and a typical stock photo
111             to help a user easily distinguish the products in the current result set
112             from products in other result sets returned in the same response.
113             One ParentProduct is returned per ProductFamily.
114              
115             # Argument: 'ns:ProductType'
116              
117             =cut
118              
119             sub setParentProduct {
120             my $self = shift;
121             $self->{'ParentProduct'} = shift
122             }
123              
124             =head2 getParentProduct()
125              
126             Calls: GetProductFamilyMembers
127             GetProductSearchResults
128             Returned: Always
129              
130             # Returns: 'ns:ProductType'
131              
132             =cut
133              
134             sub getParentProduct {
135             my $self = shift;
136             return $self->_getDataTypeInstance( 'ParentProduct'
137             ,'eBay::API::XML::DataType::ProductType');
138             }
139              
140              
141              
142              
143             =head2 setHasMoreChildren()
144              
145             If true, the product family has more products than you requested in
146             MaxChildrenPerFamily for a query in the GetProductSearchResults request.
147             In this case, no products are returned in the GetProductSearchResults response.
148             (Call GetProductFamilyMembers to retrieve all products in the family.)
149             If false, the product family has MaxChildrenPerFamily or fewer product
150             children, and the call returns all products in the family.
151              
152             # Argument: 'xs:boolean'
153              
154             =cut
155              
156             sub setHasMoreChildren {
157             my $self = shift;
158             $self->{'hasMoreChildren'} = shift
159             }
160              
161             =head2 isHasMoreChildren()
162              
163             Calls: GetProductFamilyMembers
164             GetProductSearchResults
165             Returned: Always
166              
167             # Returns: 'xs:boolean'
168              
169             =cut
170              
171             sub isHasMoreChildren {
172             my $self = shift;
173             return $self->{'hasMoreChildren'};
174             }
175              
176              
177              
178             ## Attribute and Property lists
179             sub getPropertiesList {
180             my $self = shift;
181             return \@gaProperties;
182             }
183              
184             sub getAttributesList {
185             my $self = shift;
186             return \@gaAttributes;
187             }
188              
189              
190              
191             1;