File Coverage

lib/eBay/API/XML/DataType/FlatShippingDiscountType.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::FlatShippingDiscountType;
4              
5 1     1   1256 use strict;
  1         2  
  1         42  
6 1     1   5 use warnings;
  1         2  
  1         32  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. FlatShippingDiscountType.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::FlatShippingDiscountType
21              
22             =head1 DESCRIPTION
23              
24             Details of an individual discount profile defined by the
25             user for flat rate shipping.
26              
27              
28              
29             =head1 SYNOPSIS
30              
31             =cut
32              
33              
34             =head1 INHERITANCE
35              
36             eBay::API::XML::DataType::FlatShippingDiscountType inherits from the L class
37              
38             =cut
39              
40 1     1   41 use eBay::API::XML::BaseDataType;
  0            
  0            
41             our @ISA = ("eBay::API::XML::BaseDataType");
42              
43             use eBay::API::XML::DataType::DiscountProfileType;
44             use eBay::API::XML::DataType::Enum::DiscountNameCodeType;
45              
46              
47             my @gaProperties = ( [ 'DiscountName', 'ns:DiscountNameCodeType', ''
48             ,'eBay::API::XML::DataType::Enum::DiscountNameCodeType', '' ]
49             , [ 'DiscountProfile', 'ns:DiscountProfileType', '1'
50             ,'eBay::API::XML::DataType::DiscountProfileType', '1' ]
51             );
52             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
53              
54             my @gaAttributes = (
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 setDiscountName()
76              
77             The type of discount or "rule" that is being used by the profile.
78             The value corresponding to the selected rule is set in the same-named field
79             of FlatShippingDiscount.DiscountProfile. All are "variable" rules, as
80             defined in the documentation on shipping discount profiles.
81              
82             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=ShippingDiscountProfiles
83             Title: Shipping Cost Discount Profiles
84              
85             Calls: SetShippingDiscountProfiles
86             RequiredInput: Conditionally
87             OnlyTheseValues:
88             EachAdditionalAmount, EachAdditionalAmountOff, EachAdditionalPercentOff
89            
90              
91             # Argument: 'ns:DiscountNameCodeType'
92              
93             =cut
94              
95             sub setDiscountName {
96             my $self = shift;
97             $self->{'DiscountName'} = shift
98             }
99              
100             =head2 getDiscountName()
101              
102             Calls: GetShippingDiscountProfiles
103             Returned: Conditionally
104             OnlyTheseValues:
105             EachAdditionalAmount, EachAdditionalAmountOff, EachAdditionalPercentOff
106            
107              
108             Calls: GetItem
109             Returned: Conditionally
110             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
111             OnlyTheseValues:
112             EachAdditionalAmount, EachAdditionalAmountOff, EachAdditionalPercentOff
113            
114              
115             # Returns: 'ns:DiscountNameCodeType'
116              
117             =cut
118              
119             sub getDiscountName {
120             my $self = shift;
121             return $self->{'DiscountName'};
122             }
123              
124              
125             =head2 setDiscountProfile()
126              
127             Details of this particular flat rate shipping discount profile. If
128             ModifyActionCode is Modify, all details of the new version of the profile must
129             be provided. If ModifyActionCode is Delete, DiscountProfileID is required,
130             MappingDiscountProfileID is optional, and all other fields of DiscountProfile
131             are ignored. Restrictions of how many profiles you can have for a given
132             discount rule are discussed in the documentation on shipping discount
133             profiles.
134              
135             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=ShippingDiscountProfiles
136             Title: Shipping Cost Discount Profiles
137              
138             Calls: SetShippingDiscountProfiles
139             RequiredInput: Conditionally
140             OnlyTheseValues:
141             EachAdditionalAmount, EachAdditionalAmountOff, EachAdditionalPercentOff
142            
143              
144             # Argument: reference to an array
145             of 'ns:DiscountProfileType'
146              
147             =cut
148              
149             sub setDiscountProfile {
150             my $self = shift;
151             $self->{'DiscountProfile'} =
152             $self->convertArray_To_RefToArrayIfNeeded(@_);
153             }
154              
155             =head2 getDiscountProfile()
156              
157             Calls: GetShippingDiscountProfiles
158             Returned: Conditionally
159              
160             Calls: GetItem
161             Returned: Conditionally
162             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
163              
164             # Returns: reference to an array
165             of 'ns:DiscountProfileType'
166              
167             =cut
168              
169             sub getDiscountProfile {
170             my $self = shift;
171             return $self->_getDataTypeArray('DiscountProfile');
172             }
173              
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;