File Coverage

lib/eBay/API/XML/DataType/PromotionRuleType.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::PromotionRuleType;
4              
5 1     1   1330 use strict;
  1         3  
  1         43  
6 1     1   7 use warnings;
  1         2  
  1         36  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. PromotionRuleType.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::PromotionRuleType
21              
22             =head1 DESCRIPTION
23              
24             Defines a rule that promotes items or a store category when
25             a buyer views a specific item or store category.
26              
27              
28              
29             =head1 SYNOPSIS
30              
31             =cut
32              
33              
34             =head1 INHERITANCE
35              
36             eBay::API::XML::DataType::PromotionRuleType inherits from the L class
37              
38             =cut
39              
40 1     1   57 use eBay::API::XML::BaseDataType;
  0            
  0            
41             our @ISA = ("eBay::API::XML::BaseDataType");
42              
43             use eBay::API::XML::DataType::ItemIDType;
44             use eBay::API::XML::DataType::Enum::PromotionMethodCodeType;
45             use eBay::API::XML::DataType::Enum::PromotionSchemeCodeType;
46              
47              
48             my @gaProperties = ( [ 'PromotedKeywords', 'xs:string', '', '', '' ]
49             , [ 'PromotedStoreCategoryID', 'xs:long', '', '', '' ]
50             , [ 'PromotedeBayCategoryID', 'xs:string', '', '', '' ]
51             , [ 'PromotionMethod', 'ns:PromotionMethodCodeType', ''
52             ,'eBay::API::XML::DataType::Enum::PromotionMethodCodeType', '' ]
53             , [ 'PromotionScheme', 'ns:PromotionSchemeCodeType', ''
54             ,'eBay::API::XML::DataType::Enum::PromotionSchemeCodeType', '' ]
55             , [ 'ReferringItemID', 'ns:ItemIDType', ''
56             ,'eBay::API::XML::DataType::ItemIDType', '1' ]
57             , [ 'ReferringKeywords', 'xs:string', '', '', '' ]
58             , [ 'ReferringStoreCategoryID', 'xs:long', '', '', '' ]
59             , [ 'ReferringeBayCategoryID', 'xs:string', '', '', '' ]
60             );
61             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
62              
63             my @gaAttributes = (
64             );
65             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
66              
67             =head1 Subroutines:
68              
69             =cut
70              
71             sub new {
72             my $classname = shift;
73             my %args = @_;
74             my $self = $classname->SUPER::new(%args);
75             return $self;
76             }
77              
78             sub isScalar {
79             return 0;
80             }
81              
82              
83              
84             =head2 setPromotedKeywords()
85              
86             The keywords that identify promoted items. Use with a promotion scheme of
87             ItemToDefaultRule or DefaultRule. Only for Store owners.
88              
89             # Argument: 'xs:string'
90              
91             =cut
92              
93             sub setPromotedKeywords {
94             my $self = shift;
95             $self->{'PromotedKeywords'} = shift
96             }
97              
98             =head2 getPromotedKeywords()
99              
100             Calls: GetPromotionRules
101             Returned: Conditionally
102              
103             # Returns: 'xs:string'
104              
105             =cut
106              
107             sub getPromotedKeywords {
108             my $self = shift;
109             return $self->{'PromotedKeywords'};
110             }
111              
112              
113             =head2 setPromotedStoreCategoryID()
114              
115             The ID of the Store category being promoted. Use with a promotion scheme of
116             ItemToStoreCat, StoreToStoreCat, ItemToDefaultRule, or
117             DefaultRule. Only for Store owners.
118              
119             # Argument: 'xs:long'
120              
121             =cut
122              
123             sub setPromotedStoreCategoryID {
124             my $self = shift;
125             $self->{'PromotedStoreCategoryID'} = shift
126             }
127              
128             =head2 getPromotedStoreCategoryID()
129              
130             Calls: GetPromotionRules
131             Returned: Conditionally
132              
133             # Returns: 'xs:long'
134              
135             =cut
136              
137             sub getPromotedStoreCategoryID {
138             my $self = shift;
139             return $self->{'PromotedStoreCategoryID'};
140             }
141              
142              
143             =head2 setPromotedeBayCategoryID()
144              
145             The ID of the eBay category being promoted. Use with a promotion scheme of
146             ItemToDefaultRule or DefaultRule.
147              
148             # Argument: 'xs:string'
149              
150             =cut
151              
152             sub setPromotedeBayCategoryID {
153             my $self = shift;
154             $self->{'PromotedeBayCategoryID'} = shift
155             }
156              
157             =head2 getPromotedeBayCategoryID()
158              
159             Calls: GetPromotionRules
160             Returned: Conditionally
161              
162             # Returns: 'xs:string'
163              
164             =cut
165              
166             sub getPromotedeBayCategoryID {
167             my $self = shift;
168             return $self->{'PromotedeBayCategoryID'};
169             }
170              
171              
172             =head2 setPromotionMethod()
173              
174             The type of cross promotion, CrossSell or UpSell.
175              
176             # Argument: 'ns:PromotionMethodCodeType'
177              
178             =cut
179              
180             sub setPromotionMethod {
181             my $self = shift;
182             $self->{'PromotionMethod'} = shift
183             }
184              
185             =head2 getPromotionMethod()
186              
187             Calls: GetPromotionRules
188             Returned: Always
189              
190             # Returns: 'ns:PromotionMethodCodeType'
191              
192             =cut
193              
194             sub getPromotionMethod {
195             my $self = shift;
196             return $self->{'PromotionMethod'};
197             }
198              
199              
200             =head2 setPromotionScheme()
201              
202             The type of cross-promotion scheme you are defining.
203              
204             # Argument: 'ns:PromotionSchemeCodeType'
205              
206             =cut
207              
208             sub setPromotionScheme {
209             my $self = shift;
210             $self->{'PromotionScheme'} = shift
211             }
212              
213             =head2 getPromotionScheme()
214              
215             Calls: GetPromotionRules
216             Returned: Always
217              
218             # Returns: 'ns:PromotionSchemeCodeType'
219              
220             =cut
221              
222             sub getPromotionScheme {
223             my $self = shift;
224             return $self->{'PromotionScheme'};
225             }
226              
227              
228             =head2 setReferringItemID()
229              
230             The unique ID of the item the buyer is viewing or purchasing.
231             Use with a promotion scheme of ItemToItem or ItemToStoreCat.
232             Always use ReferringItemID or ReferringStoreCategoryID, but
233             not both.
234              
235             # Argument: 'ns:ItemIDType'
236              
237             =cut
238              
239             sub setReferringItemID {
240             my $self = shift;
241             $self->{'ReferringItemID'} = shift
242             }
243              
244             =head2 getReferringItemID()
245              
246             Calls: GetPromotionRules
247             Returned: Conditionally
248              
249             # Returns: 'ns:ItemIDType'
250              
251             =cut
252              
253             sub getReferringItemID {
254             my $self = shift;
255             return $self->_getDataTypeInstance( 'ReferringItemID'
256             ,'eBay::API::XML::DataType::ItemIDType');
257             }
258              
259              
260             =head2 setReferringKeywords()
261              
262             The keywords that identify referring items. Use with a promotion scheme of
263             ItemToDefaultRule or DefaultRule. Only for Store owners.
264              
265             # Argument: 'xs:string'
266              
267             =cut
268              
269             sub setReferringKeywords {
270             my $self = shift;
271             $self->{'ReferringKeywords'} = shift
272             }
273              
274             =head2 getReferringKeywords()
275              
276             Calls: GetPromotionRules
277             Returned: Conditionally
278              
279             # Returns: 'xs:string'
280              
281             =cut
282              
283             sub getReferringKeywords {
284             my $self = shift;
285             return $self->{'ReferringKeywords'};
286             }
287              
288              
289             =head2 setReferringStoreCategoryID()
290              
291             The ID of the store category the user is browsing. Use with a
292             promotion scheme of
293             StoreToStoreCat, ItemToDefaultRule or DefaultRule.
294             Always use ReferringStoreCategoryID or ReferringItemID, but
295             not both.
296              
297             # Argument: 'xs:long'
298              
299             =cut
300              
301             sub setReferringStoreCategoryID {
302             my $self = shift;
303             $self->{'ReferringStoreCategoryID'} = shift
304             }
305              
306             =head2 getReferringStoreCategoryID()
307              
308             Calls: GetPromotionRules
309             Returned: Conditionally
310              
311             # Returns: 'xs:long'
312              
313             =cut
314              
315             sub getReferringStoreCategoryID {
316             my $self = shift;
317             return $self->{'ReferringStoreCategoryID'};
318             }
319              
320              
321             =head2 setReferringeBayCategoryID()
322              
323             The ID of the eBay category being referred. Use with a promotion scheme
324             or ItemToDefaultRule or DefaultRule.
325              
326             # Argument: 'xs:string'
327              
328             =cut
329              
330             sub setReferringeBayCategoryID {
331             my $self = shift;
332             $self->{'ReferringeBayCategoryID'} = shift
333             }
334              
335             =head2 getReferringeBayCategoryID()
336              
337             Calls: GetPromotionRules
338             Returned: Conditionally
339              
340             # Returns: 'xs:string'
341              
342             =cut
343              
344             sub getReferringeBayCategoryID {
345             my $self = shift;
346             return $self->{'ReferringeBayCategoryID'};
347             }
348              
349              
350              
351              
352              
353             ## Attribute and Property lists
354             sub getPropertiesList {
355             my $self = shift;
356             return \@gaProperties;
357             }
358              
359             sub getAttributesList {
360             my $self = shift;
361             return \@gaAttributes;
362             }
363              
364              
365              
366             1;