File Coverage

lib/eBay/API/XML/DataType/VATDetailsType.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::VATDetailsType;
4              
5 1     1   1359 use strict;
  1         2  
  1         28  
6 1     1   4 use warnings;
  1         3  
  1         26  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. VATDetailsType.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::VATDetailsType
21              
22             =head1 DESCRIPTION
23              
24             Container for eBay's Business User features. A business seller can choose
25             to offer an item exclusively to bidders and buyers that also represent businesses.
26             Only applicable when the item is listed in a B2B-enabled category.
27             Currently, the eBay Germany (DE), Austria (AT), and Switzerland (CH) sites support
28             B2B business features.
29              
30              
31              
32             =head1 SYNOPSIS
33              
34             =cut
35              
36              
37             =head1 INHERITANCE
38              
39             eBay::API::XML::DataType::VATDetailsType inherits from the L class
40              
41             =cut
42              
43 1     1   35 use eBay::API::XML::BaseDataType;
  0            
  0            
44             our @ISA = ("eBay::API::XML::BaseDataType");
45              
46              
47              
48             my @gaProperties = ( [ 'BusinessSeller', 'xs:boolean', '', '', '' ]
49             , [ 'RestrictedToBusiness', 'xs:boolean', '', '', '' ]
50             , [ 'VATID', 'xs:string', '', '', '' ]
51             , [ 'VATPercent', 'xs:float', '', '', '' ]
52             , [ 'VATSite', 'xs:string', '', '', '' ]
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 setBusinessSeller()
78              
79             If true, this indicates that the seller is a business user
80             and intends to use listing features that are offered to
81             business users only. Applicable only to business sellers
82             residing in Germany, Austria, or Switzerland who are listing in
83             a B2B VAT- enabled category on the eBay Germany (DE), Austria
84             (AT), or Switzerland (CH) sites. The seller must have a valid
85             VAT ID registered with eBay. This must be set to true if
86             RestrictedToBusiness is true. It has no effect (and it's not returned)
87             if RestrictedToBusiness is false. If an item was not qualified as a
88             business item when originally listed, but meets the conditions for
89             business items when the item is revised or relisted, the seller can
90             convert the item to a business item by specifying the appropriate
91             VAT details. See the eBay Web Services guide for more information and additional rules.
92              
93             Calls: AddItem
94             GetItemRecommendations
95             RelistItem
96             ReviseItem
97             VerifyAddItem
98             RequiredInput: Conditionally
99              
100             # Argument: 'xs:boolean'
101              
102             =cut
103              
104             sub setBusinessSeller {
105             my $self = shift;
106             $self->{'BusinessSeller'} = shift
107             }
108              
109             =head2 isBusinessSeller()
110              
111             Calls: GetItem
112             Returned: Conditionally
113             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
114              
115             # Returns: 'xs:boolean'
116              
117             =cut
118              
119             sub isBusinessSeller {
120             my $self = shift;
121             return $self->{'BusinessSeller'};
122             }
123              
124              
125             =head2 setRestrictedToBusiness()
126              
127             If true, this indicates that the seller elects to offer the
128             item exclusively to business users. If false (or not returned),
129             this indicates that the seller elects to offer the item to all users.
130             Applicable only to business sellers residing in Germany,
131             Austria, or Switzerland who are listing in a B2B VAT-enabled
132             category on the eBay Germany (DE), Austria (AT), or Switzerland
133             (CH) sites. If this argument is true, the seller must have a
134             valid VAT-ID registered with eBay, and BusinessSeller must also
135             be true.
136              
137             Calls: AddItem
138             GetItemRecommendations
139             RelistItem
140             ReviseItem
141             VerifyAddItem
142             RequiredInput: No
143              
144             # Argument: 'xs:boolean'
145              
146             =cut
147              
148             sub setRestrictedToBusiness {
149             my $self = shift;
150             $self->{'RestrictedToBusiness'} = shift
151             }
152              
153             =head2 isRestrictedToBusiness()
154              
155             Calls: GetBidderList
156             Returned: Conditionally
157              
158             Calls: GetItem
159             Returned: Conditionally
160             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
161              
162             # Returns: 'xs:boolean'
163              
164             =cut
165              
166             sub isRestrictedToBusiness {
167             my $self = shift;
168             return $self->{'RestrictedToBusiness'};
169             }
170              
171              
172             =head2 setVATID()
173              
174             Displays the VatSite Id of the seller (in a business
175             card format) as part of the data returned in the
176             GetItem call if the seller's SellerBusinessCodeType
177             is set to 'Commercial'.
178              
179             # Argument: 'xs:string'
180              
181             =cut
182              
183             sub setVATID {
184             my $self = shift;
185             $self->{'VATID'} = shift
186             }
187              
188             =head2 getVATID()
189              
190             Calls: GetItem
191             Returned: Conditionally
192             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
193              
194             # Returns: 'xs:string'
195              
196             =cut
197              
198             sub getVATID {
199             my $self = shift;
200             return $self->{'VATID'};
201             }
202              
203              
204             =head2 setVATPercent()
205              
206             VAT rate for the item, if any. When the VATPercent is specified, the
207             item's VAT information appears on the item's listing page. In
208             addition, the seller can choose to print an invoice that
209             includes the item's net price, VAT percent, VAT amount, and
210             total price. Since VAT rates vary
211             depending on the item and on the user's country of residence, a
212             seller is responsible for entering the correct VAT rate; it is
213             not calculated by eBay. To specify a VATPercent, a seller must
214             have a VAT-ID registered with eBay and must be listing the item on a
215             VAT-enabled site. Max applicable length is 6 characters,
216             including the decimal (e.g., 12.345). The scale is 3 decimal places.
217             (If you pass in 12.3456, eBay may round up the value to 12.346.)
218             Note: The View Item page may display the precision to 2 decimal places
219             with no trailing zeros. However, the full value you send in is stored.
220              
221             Max: 30
222             Min: 0
223             MaxLength: 6
224              
225             Calls: AddItem
226             GetItemRecommendations
227             RelistItem
228             ReviseItem
229             VerifyAddItem
230             RequiredInput: Conditionally
231              
232             # Argument: 'xs:float'
233              
234             =cut
235              
236             sub setVATPercent {
237             my $self = shift;
238             $self->{'VATPercent'} = shift
239             }
240              
241             =head2 getVATPercent()
242              
243             Calls: GetBidderList
244             Returned: Conditionally
245              
246             Calls: GetItem
247             Returned: Conditionally
248             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
249              
250             # Returns: 'xs:float'
251              
252             =cut
253              
254             sub getVATPercent {
255             my $self = shift;
256             return $self->{'VATPercent'};
257             }
258              
259              
260             =head2 setVATSite()
261              
262             Displays the VatSite Id of the seller (in a business
263             card format) as part of the data returned in the
264             GetItem call if the seller's SellerBusinessCodeType
265             is set to 'Commercial'.
266              
267             # Argument: 'xs:string'
268              
269             =cut
270              
271             sub setVATSite {
272             my $self = shift;
273             $self->{'VATSite'} = shift
274             }
275              
276             =head2 getVATSite()
277              
278             Calls: GetItem
279             Returned: Conditionally
280             Details: DetailLevel: none, ItemReturnDescription, ItemReturnAttributes, ReturnAll
281              
282             # Returns: 'xs:string'
283              
284             =cut
285              
286             sub getVATSite {
287             my $self = shift;
288             return $self->{'VATSite'};
289             }
290              
291              
292              
293              
294              
295             ## Attribute and Property lists
296             sub getPropertiesList {
297             my $self = shift;
298             return \@gaProperties;
299             }
300              
301             sub getAttributesList {
302             my $self = shift;
303             return \@gaAttributes;
304             }
305              
306              
307              
308             1;