File Coverage

lib/eBay/API/XML/DataType/PromotionalShippingDiscountDetailsType.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::PromotionalShippingDiscountDetailsType;
4              
5 1     1   1409 use strict;
  1         3  
  1         38  
6 1     1   6 use warnings;
  1         2  
  1         35  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. PromotionalShippingDiscountDetailsType.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::PromotionalShippingDiscountDetailsType
21              
22             =head1 DESCRIPTION
23              
24             Details of a promotional shipping discount.
25              
26              
27              
28             =head1 SYNOPSIS
29              
30             =cut
31              
32              
33             =head1 INHERITANCE
34              
35             eBay::API::XML::DataType::PromotionalShippingDiscountDetailsType inherits from the L class
36              
37             =cut
38              
39 1     1   48 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::Enum::DiscountNameCodeType;
44              
45              
46             my @gaProperties = ( [ 'DiscountName', 'ns:DiscountNameCodeType', ''
47             ,'eBay::API::XML::DataType::Enum::DiscountNameCodeType', '' ]
48             , [ 'ItemCount', 'xs:int', '', '', '' ]
49             , [ 'OrderAmount', 'ns:AmountType', ''
50             ,'eBay::API::XML::DataType::AmountType', '1' ]
51             , [ 'ShippingCost', 'ns:AmountType', ''
52             ,'eBay::API::XML::DataType::AmountType', '1' ]
53             );
54             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
55              
56             my @gaAttributes = (
57             );
58             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
59              
60             =head1 Subroutines:
61              
62             =cut
63              
64             sub new {
65             my $classname = shift;
66             my %args = @_;
67             my $self = $classname->SUPER::new(%args);
68             return $self;
69             }
70              
71             sub isScalar {
72             return 0;
73             }
74              
75              
76              
77             =head2 setDiscountName()
78              
79             The type of promotional shipping discount that is detailed in the profile.
80             If MaximumShippingCostPerOrder, see ShippingCost.
81             If ShippingCostXForAmountY, see ShippingCost and OrderAmount.
82             If ShippingCostXForItemCountN, see ShippingCost and ItemCount.
83              
84             Calls: SetShippingDiscountProfiles
85             RequiredInput: Conditionally
86             OnlyTheseValues:
87             MaximumShippingCostPerOrder, ShippingCostXForAmountY, ShippingCostXForItemCountN
88            
89              
90             # Argument: 'ns:DiscountNameCodeType'
91              
92             =cut
93              
94             sub setDiscountName {
95             my $self = shift;
96             $self->{'DiscountName'} = shift
97             }
98              
99             =head2 getDiscountName()
100              
101             Calls: GetShippingDiscountProfiles
102             Returned: Conditionally
103             OnlyTheseValues:
104             MaximumShippingCostPerOrder, ShippingCostXForAmountY, ShippingCostXForItemCountN
105            
106              
107             Calls: GetItem
108             Returned: Conditionally
109             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
110             OnlyTheseValues:
111             MaximumShippingCostPerOrder, ShippingCostXForAmountY, ShippingCostXForItemCountN
112            
113              
114             # Returns: 'ns:DiscountNameCodeType'
115              
116             =cut
117              
118             sub getDiscountName {
119             my $self = shift;
120             return $self->{'DiscountName'};
121             }
122              
123              
124             =head2 setItemCount()
125              
126             This is the number of items, when DiscountName is set to ShippingCostXForItemsY.
127              
128             Calls: SetShippingDiscountProfiles
129             RequiredInput: Conditionally
130              
131             # Argument: 'xs:int'
132              
133             =cut
134              
135             sub setItemCount {
136             my $self = shift;
137             $self->{'ItemCount'} = shift
138             }
139              
140             =head2 getItemCount()
141              
142             Calls: GetShippingDiscountProfiles
143             Returned: Conditionally
144              
145             Calls: GetItem
146             Returned: Conditionally
147             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
148              
149             # Returns: 'xs:int'
150              
151             =cut
152              
153             sub getItemCount {
154             my $self = shift;
155             return $self->{'ItemCount'};
156             }
157              
158              
159             =head2 setOrderAmount()
160              
161             This is the cost Y of the order (not including shipping cost),
162             when DiscountName is set to ShippingCostXForAmountY.
163              
164             Calls: SetShippingDiscountProfiles
165             RequiredInput: Conditionally
166              
167             # Argument: 'ns:AmountType'
168              
169             =cut
170              
171             sub setOrderAmount {
172             my $self = shift;
173             $self->{'OrderAmount'} = shift
174             }
175              
176             =head2 getOrderAmount()
177              
178             Calls: GetShippingDiscountProfiles
179             Returned: Conditionally
180              
181             Calls: GetItem
182             Returned: Conditionally
183             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
184              
185             # Returns: 'ns:AmountType'
186              
187             =cut
188              
189             sub getOrderAmount {
190             my $self = shift;
191             return $self->_getDataTypeInstance( 'OrderAmount'
192             ,'eBay::API::XML::DataType::AmountType');
193             }
194              
195              
196             =head2 setShippingCost()
197              
198             This is shipping cost X, when DiscountName is either ShippingCostXForAmountY or
199             ShippingCostXForItemCountN, and is the maximum cost when DiscountName is
200             MaximumShippingCostPerOrder.
201              
202             Calls: SetShippingDiscountProfiles
203             RequiredInput: Conditionally
204              
205             # Argument: 'ns:AmountType'
206              
207             =cut
208              
209             sub setShippingCost {
210             my $self = shift;
211             $self->{'ShippingCost'} = shift
212             }
213              
214             =head2 getShippingCost()
215              
216             Calls: GetShippingDiscountProfiles
217             Returned: Conditionally
218              
219             Calls: GetItem
220             Returned: Conditionally
221             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
222              
223             # Returns: 'ns:AmountType'
224              
225             =cut
226              
227             sub getShippingCost {
228             my $self = shift;
229             return $self->_getDataTypeInstance( 'ShippingCost'
230             ,'eBay::API::XML::DataType::AmountType');
231             }
232              
233              
234              
235              
236              
237             ## Attribute and Property lists
238             sub getPropertiesList {
239             my $self = shift;
240             return \@gaProperties;
241             }
242              
243             sub getAttributesList {
244             my $self = shift;
245             return \@gaAttributes;
246             }
247              
248              
249              
250             1;