File Coverage

lib/eBay/API/XML/DataType/DiscountProfileType.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::DiscountProfileType;
4              
5 1     1   1324 use strict;
  1         2  
  1         30  
6 1     1   6 use warnings;
  1         2  
  1         33  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. DiscountProfileType.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::DiscountProfileType
21              
22             =head1 DESCRIPTION
23              
24             Details of a flat or calculated shipping discount profile.
25              
26              
27              
28             =head1 SYNOPSIS
29              
30             =cut
31              
32              
33             =head1 INHERITANCE
34              
35             eBay::API::XML::DataType::DiscountProfileType inherits from the L class
36              
37             =cut
38              
39 1     1   43 use eBay::API::XML::BaseDataType;
  0            
  0            
40             our @ISA = ("eBay::API::XML::BaseDataType");
41              
42             use eBay::API::XML::DataType::AmountType;
43             use eBay::API::XML::DataType::MeasureType;
44              
45              
46             my @gaProperties = ( [ 'DiscountProfileID', 'xs:string', '', '', '' ]
47             , [ 'DiscountProfileName', 'xs:string', '', '', '' ]
48             , [ 'EachAdditionalAmount', 'ns:AmountType', ''
49             ,'eBay::API::XML::DataType::AmountType', '1' ]
50             , [ 'EachAdditionalAmountOff', 'ns:AmountType', ''
51             ,'eBay::API::XML::DataType::AmountType', '1' ]
52             , [ 'EachAdditionalPercentOff', 'xs:float', '', '', '' ]
53             , [ 'MappedDiscountProfileID', 'xs:string', '', '', '' ]
54             , [ 'WeightOff', 'ns:MeasureType', ''
55             ,'eBay::API::XML::DataType::MeasureType', '1' ]
56             );
57             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
58              
59             my @gaAttributes = (
60             );
61             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
62              
63             =head1 Subroutines:
64              
65             =cut
66              
67             sub new {
68             my $classname = shift;
69             my %args = @_;
70             my $self = $classname->SUPER::new(%args);
71             return $self;
72             }
73              
74             sub isScalar {
75             return 0;
76             }
77              
78              
79              
80             =head2 setDiscountProfileID()
81              
82             The unique eBay-created ID for the shipping discount, assigned when the
83             profile is created. On input, if ModifyActionCode is Add, this is ignored if
84             provided. If ModifyActionCode is Modify, all details of the new version of the
85             profile must be provided. If ModifyActionCode is Delete, DiscountProfileID is
86             required, MappingDiscountProfileID is optional, and all other fields of
87             DiscountProfile are ignored.
88              
89             Calls: SetShippingDiscountProfiles
90             RequiredInput: Conditionally
91              
92             # Argument: 'xs:string'
93              
94             =cut
95              
96             sub setDiscountProfileID {
97             my $self = shift;
98             $self->{'DiscountProfileID'} = shift
99             }
100              
101             =head2 getDiscountProfileID()
102              
103             Calls: GetShippingDiscountProfiles
104             Returned: Conditionally
105              
106             Calls: GetItem
107             Returned: Conditionally
108             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
109              
110             # Returns: 'xs:string'
111              
112             =cut
113              
114             sub getDiscountProfileID {
115             my $self = shift;
116             return $self->{'DiscountProfileID'};
117             }
118              
119              
120             =head2 setDiscountProfileName()
121              
122             The user's title for this profile. On input, if ModifyActionCode is Add, this
123             is ignored (if provided) if this is the first profile being created and
124             required if there is more than one profile of that type (flat rate versus
125             calculated) already. To modify the name, set ModifyActionCode to Update and
126             provide all details for the profile. On output, DiscountProfileName is only
127             returned if the user defined more than one profile.
128              
129             Calls: SetShippingDiscountProfiles
130             RequiredInput: Conditionally
131              
132             # Argument: 'xs:string'
133              
134             =cut
135              
136             sub setDiscountProfileName {
137             my $self = shift;
138             $self->{'DiscountProfileName'} = shift
139             }
140              
141             =head2 getDiscountProfileName()
142              
143             Calls: GetShippingDiscountProfiles
144             Returned: Conditionally
145              
146             Calls: GetItem
147             Returned: Conditionally
148             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
149              
150             # Returns: 'xs:string'
151              
152             =cut
153              
154             sub getDiscountProfileName {
155             my $self = shift;
156             return $self->{'DiscountProfileName'};
157             }
158              
159              
160             =head2 setEachAdditionalAmount()
161              
162             The amount, if the seller specified EachAdditionalAmount as the type of profile,
163             as noted in FlatShippingDiscount.DiscountName.
164             Flat rate shipping only.
165              
166             Calls: SetShippingDiscountProfiles
167             RequiredInput: Conditionally
168             Context: FlatShippingDiscount
169              
170             # Argument: 'ns:AmountType'
171              
172             =cut
173              
174             sub setEachAdditionalAmount {
175             my $self = shift;
176             $self->{'EachAdditionalAmount'} = shift
177             }
178              
179             =head2 getEachAdditionalAmount()
180              
181             Calls: GetShippingDiscountProfiles
182             Returned: Conditionally
183             Context: FlatShippingDiscount
184              
185             Calls: GetItem
186             Returned: Conditionally
187             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
188             Context: FlatShippingDiscount
189             InternationalFlatShippingDiscount
190              
191             # Returns: 'ns:AmountType'
192              
193             =cut
194              
195             sub getEachAdditionalAmount {
196             my $self = shift;
197             return $self->_getDataTypeInstance( 'EachAdditionalAmount'
198             ,'eBay::API::XML::DataType::AmountType');
199             }
200              
201              
202             =head2 setEachAdditionalAmountOff()
203              
204             The amount, if the seller specified EachAdditionalAmountOff as the type of profile,
205             as noted in FlatShippingDiscount.DiscountName.
206             Flat rate shipping only.
207              
208             Calls: SetShippingDiscountProfiles
209             RequiredInput: Conditionally
210             Context: FlatShippingDiscount
211              
212             # Argument: 'ns:AmountType'
213              
214             =cut
215              
216             sub setEachAdditionalAmountOff {
217             my $self = shift;
218             $self->{'EachAdditionalAmountOff'} = shift
219             }
220              
221             =head2 getEachAdditionalAmountOff()
222              
223             Calls: GetShippingDiscountProfiles
224             Returned: Conditionally
225             Context: FlatShippingDiscount
226              
227             Calls: GetItem
228             Returned: Conditionally
229             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
230             Context: FlatShippingDiscount
231             InternationalFlatShippingDiscount
232              
233             # Returns: 'ns:AmountType'
234              
235             =cut
236              
237             sub getEachAdditionalAmountOff {
238             my $self = shift;
239             return $self->_getDataTypeInstance( 'EachAdditionalAmountOff'
240             ,'eBay::API::XML::DataType::AmountType');
241             }
242              
243              
244             =head2 setEachAdditionalPercentOff()
245              
246             The percent (expressed in decimal, as in .5 for 50%), if the seller specified
247             EachAdditionalPercentOff as the type of profile,
248             as noted in FlatShippingDiscount.DiscountName.
249             Flat rate shipping only.
250              
251             Calls: SetShippingDiscountProfiles
252             RequiredInput: Conditionally
253             Context: FlatShippingDiscount
254              
255             # Argument: 'xs:float'
256              
257             =cut
258              
259             sub setEachAdditionalPercentOff {
260             my $self = shift;
261             $self->{'EachAdditionalPercentOff'} = shift
262             }
263              
264             =head2 getEachAdditionalPercentOff()
265              
266             Calls: GetShippingDiscountProfiles
267             Returned: Conditionally
268             Context: FlatShippingDiscount
269              
270             Calls: GetItem
271             Returned: Conditionally
272             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
273             Context: FlatShippingDiscount
274             InternationalFlatShippingDiscount
275              
276             # Returns: 'xs:float'
277              
278             =cut
279              
280             sub getEachAdditionalPercentOff {
281             my $self = shift;
282             return $self->{'EachAdditionalPercentOff'};
283             }
284              
285              
286             =head2 setMappedDiscountProfileID()
287              
288             For SetShippingDiscountProfiles, if MappedDiscountProfileID is omitted when
289             ModifyActionCode is Delete, any listings currently using the profile
290             identified by DiscountProfileID will have that profile removed. For
291             SetShippingDiscountProfiles and GetItem, this is the intended discount profile
292             mapping.
293              
294             Calls: SetShippingDiscountProfiles
295             RequiredInput: Conditionally
296             Context: CalculatedShippingDiscount
297              
298             # Argument: 'xs:string'
299              
300             =cut
301              
302             sub setMappedDiscountProfileID {
303             my $self = shift;
304             $self->{'MappedDiscountProfileID'} = shift
305             }
306              
307             =head2 getMappedDiscountProfileID()
308              
309             Calls: GetShippingDiscountProfiles
310             Returned: Conditionally
311             Context: CalculatedShippingDiscount
312              
313             Calls: GetItem
314             Returned: Conditionally
315             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
316             Context: CalculatedShippingDiscount
317             InternationalCalculatedShippingDiscount
318              
319             # Returns: 'xs:string'
320              
321             =cut
322              
323             sub getMappedDiscountProfileID {
324             my $self = shift;
325             return $self->{'MappedDiscountProfileID'};
326             }
327              
328              
329             =head2 setWeightOff()
330              
331             The weight by which to reduce the combined item weight, if the seller
332             specified WeightOff as the type of profile, as noted in
333             CalculatedShippingDiscount.DiscountName. The smallest unit is used (e.g.
334             ounces).
335             Calculated shipping only.
336              
337             Calls: SetShippingDiscountProfiles
338             RequiredInput: Conditionally
339             Context: CalculatedShippingDiscount
340              
341             # Argument: 'ns:MeasureType'
342              
343             =cut
344              
345             sub setWeightOff {
346             my $self = shift;
347             $self->{'WeightOff'} = shift
348             }
349              
350             =head2 getWeightOff()
351              
352             Calls: GetShippingDiscountProfiles
353             Returned: Conditionally
354             Context: CalculatedShippingDiscount
355              
356             Calls: GetItem
357             Returned: Conditionally
358             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
359             Context: CalculatedShippingDiscount
360             InternationalCalculatedShippingDiscount
361              
362             # Returns: 'ns:MeasureType'
363              
364             =cut
365              
366             sub getWeightOff {
367             my $self = shift;
368             return $self->_getDataTypeInstance( 'WeightOff'
369             ,'eBay::API::XML::DataType::MeasureType');
370             }
371              
372              
373              
374              
375              
376             ## Attribute and Property lists
377             sub getPropertiesList {
378             my $self = shift;
379             return \@gaProperties;
380             }
381              
382             sub getAttributesList {
383             my $self = shift;
384             return \@gaAttributes;
385             }
386              
387              
388              
389             1;