File Coverage

lib/eBay/API/XML/DataType/BestOfferType.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::BestOfferType;
4              
5 1     1   1928 use strict;
  1         2  
  1         33  
6 1     1   4 use warnings;
  1         1  
  1         77  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. BestOfferType.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::BestOfferType
21              
22             =head1 DESCRIPTION
23              
24             Details about a best offer.
25              
26              
27              
28             =head1 SYNOPSIS
29              
30             =cut
31              
32              
33             =head1 INHERITANCE
34              
35             eBay::API::XML::DataType::BestOfferType inherits from the L class
36              
37             =cut
38              
39 1     1   99 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::BestOfferIDType;
44             use eBay::API::XML::DataType::UserType;
45             use eBay::API::XML::DataType::Enum::BestOfferStatusCodeType;
46             use eBay::API::XML::DataType::Enum::BestOfferTypeCodeType;
47              
48              
49             my @gaProperties = ( [ 'BestOfferCodeType', 'ns:BestOfferTypeCodeType', ''
50             ,'eBay::API::XML::DataType::Enum::BestOfferTypeCodeType', '' ]
51             , [ 'BestOfferID', 'ns:BestOfferIDType', ''
52             ,'eBay::API::XML::DataType::BestOfferIDType', '1' ]
53             , [ 'Buyer', 'ns:UserType', ''
54             ,'eBay::API::XML::DataType::UserType', '1' ]
55             , [ 'BuyerMessage', 'xs:string', '', '', '' ]
56             , [ 'CallStatus', 'xs:string', '', '', '' ]
57             , [ 'ExpirationTime', 'xs:dateTime', '', '', '' ]
58             , [ 'Price', 'ns:AmountType', ''
59             ,'eBay::API::XML::DataType::AmountType', '1' ]
60             , [ 'Quantity', 'xs:int', '', '', '' ]
61             , [ 'SellerMessage', 'xs:string', '', '', '' ]
62             , [ 'Status', 'ns:BestOfferStatusCodeType', ''
63             ,'eBay::API::XML::DataType::Enum::BestOfferStatusCodeType', '' ]
64             );
65             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
66              
67             my @gaAttributes = (
68             );
69             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
70              
71             =head1 Subroutines:
72              
73             =cut
74              
75             sub new {
76             my $classname = shift;
77             my %args = @_;
78             my $self = $classname->SUPER::new(%args);
79             return $self;
80             }
81              
82             sub isScalar {
83             return 0;
84             }
85              
86              
87              
88             =head2 setBestOfferCodeType()
89              
90             The best offer type.
91              
92             # Argument: 'ns:BestOfferTypeCodeType'
93              
94             =cut
95              
96             sub setBestOfferCodeType {
97             my $self = shift;
98             $self->{'BestOfferCodeType'} = shift
99             }
100              
101             =head2 getBestOfferCodeType()
102              
103             Calls: GetBestOffers
104             Returned: Always
105             Details: DetailLevel: none, ReturnAll
106              
107             # Returns: 'ns:BestOfferTypeCodeType'
108              
109             =cut
110              
111             sub getBestOfferCodeType {
112             my $self = shift;
113             return $self->{'BestOfferCodeType'};
114             }
115              
116              
117             =head2 setBestOfferID()
118              
119             An ID to distinguish this best offer from other best offers
120             made on the item.
121              
122             # Argument: 'ns:BestOfferIDType'
123              
124             =cut
125              
126             sub setBestOfferID {
127             my $self = shift;
128             $self->{'BestOfferID'} = shift
129             }
130              
131             =head2 getBestOfferID()
132              
133             Calls: GetBestOffers
134             Returned: Always
135             Details: DetailLevel: none, ReturnAll
136              
137             Calls: PlaceOffer
138             Returned: Conditionally
139              
140             # Returns: 'ns:BestOfferIDType'
141              
142             =cut
143              
144             sub getBestOfferID {
145             my $self = shift;
146             return $self->_getDataTypeInstance( 'BestOfferID'
147             ,'eBay::API::XML::DataType::BestOfferIDType');
148             }
149              
150              
151             =head2 setBuyer()
152              
153             Information about the buyer who made the best offer.
154              
155             # Argument: 'ns:UserType'
156              
157             =cut
158              
159             sub setBuyer {
160             my $self = shift;
161             $self->{'Buyer'} = shift
162             }
163              
164             =head2 getBuyer()
165              
166             Calls: GetBestOffers
167             Returned: Always
168             Details: DetailLevel: none, ReturnAll
169              
170             # Returns: 'ns:UserType'
171              
172             =cut
173              
174             sub getBuyer {
175             my $self = shift;
176             return $self->_getDataTypeInstance( 'Buyer'
177             ,'eBay::API::XML::DataType::UserType');
178             }
179              
180              
181             =head2 setBuyerMessage()
182              
183             Text message that was provided by a buyer when placing a best offer.
184              
185             MaxLength: 500 (in bytes)
186              
187             # Argument: 'xs:string'
188              
189             =cut
190              
191             sub setBuyerMessage {
192             my $self = shift;
193             $self->{'BuyerMessage'} = shift
194             }
195              
196             =head2 getBuyerMessage()
197              
198             Calls: GetBestOffers
199             Returned: Conditionally
200             Details: DetailLevel: ReturnAll
201              
202             # Returns: 'xs:string'
203              
204             =cut
205              
206             sub getBuyerMessage {
207             my $self = shift;
208             return $self->{'BuyerMessage'};
209             }
210              
211              
212             =head2 setCallStatus()
213              
214             The status of the call, either Success or Failure.
215              
216             # Argument: 'xs:string'
217              
218             =cut
219              
220             sub setCallStatus {
221             my $self = shift;
222             $self->{'CallStatus'} = shift
223             }
224              
225             =head2 getCallStatus()
226              
227             Calls: RespondToBestOffer
228             Returned: Always
229              
230             # Returns: 'xs:string'
231              
232             =cut
233              
234             sub getCallStatus {
235             my $self = shift;
236             return $self->{'CallStatus'};
237             }
238              
239              
240             =head2 setExpirationTime()
241              
242             Date and time (in GMT) the offer naturally expires (if the
243             seller has not accepted or declined the offer).
244              
245             # Argument: 'xs:dateTime'
246              
247             =cut
248              
249             sub setExpirationTime {
250             my $self = shift;
251             $self->{'ExpirationTime'} = shift
252             }
253              
254             =head2 getExpirationTime()
255              
256             Calls: GetBestOffers
257             Returned: Always
258             Details: DetailLevel: none, ReturnAll
259              
260             # Returns: 'xs:dateTime'
261              
262             =cut
263              
264             sub getExpirationTime {
265             my $self = shift;
266             return $self->{'ExpirationTime'};
267             }
268              
269              
270             =head2 setPrice()
271              
272             The amount of the best offer.
273              
274             # Argument: 'ns:AmountType'
275              
276             =cut
277              
278             sub setPrice {
279             my $self = shift;
280             $self->{'Price'} = shift
281             }
282              
283             =head2 getPrice()
284              
285             Calls: GetBestOffers
286             Returned: Always
287             Details: DetailLevel: none, ReturnAll
288              
289             # Returns: 'ns:AmountType'
290              
291             =cut
292              
293             sub getPrice {
294             my $self = shift;
295             return $self->_getDataTypeInstance( 'Price'
296             ,'eBay::API::XML::DataType::AmountType');
297             }
298              
299              
300             =head2 setQuantity()
301              
302             The number of items for which the buyer is making an offer.
303              
304             # Argument: 'xs:int'
305              
306             =cut
307              
308             sub setQuantity {
309             my $self = shift;
310             $self->{'Quantity'} = shift
311             }
312              
313             =head2 getQuantity()
314              
315             Calls: GetBestOffers
316             Returned: Always
317             Details: DetailLevel: none, ReturnAll
318              
319             # Returns: 'xs:int'
320              
321             =cut
322              
323             sub getQuantity {
324             my $self = shift;
325             return $self->{'Quantity'};
326             }
327              
328              
329             =head2 setSellerMessage()
330              
331             Text response to buyer from seller.
332              
333             MaxLength: 500 (in bytes)
334              
335             # Argument: 'xs:string'
336              
337             =cut
338              
339             sub setSellerMessage {
340             my $self = shift;
341             $self->{'SellerMessage'} = shift
342             }
343              
344             =head2 getSellerMessage()
345              
346             Calls: GetBestOffers
347             Returned: Conditionally
348             Details: DetailLevel: none, ReturnAll
349              
350             # Returns: 'xs:string'
351              
352             =cut
353              
354             sub getSellerMessage {
355             my $self = shift;
356             return $self->{'SellerMessage'};
357             }
358              
359              
360             =head2 setStatus()
361              
362             The state of the offer. In the case of
363             a PlaceOffer response that specified a best offer,
364             Status may be "Accepted" if the best offer
365             was at or above an auto-accept price.
366              
367             # Argument: 'ns:BestOfferStatusCodeType'
368              
369             =cut
370              
371             sub setStatus {
372             my $self = shift;
373             $self->{'Status'} = shift
374             }
375              
376             =head2 getStatus()
377              
378             Calls: GetBestOffers
379             Returned: Always
380             Details: DetailLevel: none, ReturnAll
381              
382             Calls: PlaceOffer
383             Returned: Conditionally
384              
385             # Returns: 'ns:BestOfferStatusCodeType'
386              
387             =cut
388              
389             sub getStatus {
390             my $self = shift;
391             return $self->{'Status'};
392             }
393              
394              
395              
396              
397              
398             ## Attribute and Property lists
399             sub getPropertiesList {
400             my $self = shift;
401             return \@gaProperties;
402             }
403              
404             sub getAttributesList {
405             my $self = shift;
406             return \@gaAttributes;
407             }
408              
409              
410              
411             1;