File Coverage

blib/lib/eBay/API/XML/DataType/AbstractResponseType.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::AbstractResponseType;
4              
5 2     2   3653 use strict;
  2         3  
  2         65  
6 2     2   9 use warnings;
  2         2  
  2         90  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. AbstractResponseType.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::AbstractResponseType
21              
22             =head1 DESCRIPTION
23              
24             Base type definition of a response payload that can carry any
25             type of payload content with following optional elements:
26             - timestamp of response message
27             - application-level acknowledgement
28             - application-level (business-level) errors and warnings
29              
30              
31              
32             =head1 SYNOPSIS
33              
34             =cut
35              
36              
37             =head1 INHERITANCE
38              
39             eBay::API::XML::DataType::AbstractResponseType inherits from the L class
40              
41             =cut
42              
43 2     2   88 use eBay::API::XML::BaseDataType;
  0            
  0            
44             our @ISA = ("eBay::API::XML::BaseDataType");
45              
46             use eBay::API::XML::DataType::BotBlockResponseType;
47             use eBay::API::XML::DataType::DuplicateInvocationDetailsType;
48             use eBay::API::XML::DataType::ErrorType;
49             use eBay::API::XML::DataType::Enum::AckCodeType;
50              
51              
52             my @gaProperties = ( [ 'Ack', 'ns:AckCodeType', ''
53             ,'eBay::API::XML::DataType::Enum::AckCodeType', '' ]
54             , [ 'BotBlock', 'ns:BotBlockResponseType', ''
55             ,'eBay::API::XML::DataType::BotBlockResponseType', '1' ]
56             , [ 'Build', 'xs:string', '', '', '' ]
57             , [ 'CorrelationID', 'xs:string', '', '', '' ]
58             , [ 'DuplicateInvocationDetails', 'ns:DuplicateInvocationDetailsType', ''
59             ,'eBay::API::XML::DataType::DuplicateInvocationDetailsType', '1' ]
60             , [ 'EIASToken', 'xs:string', '', '', '' ]
61             , [ 'Errors', 'ns:ErrorType', '1'
62             ,'eBay::API::XML::DataType::ErrorType', '1' ]
63             , [ 'HardExpirationWarning', 'xs:string', '', '', '' ]
64             , [ 'Message', 'xs:string', '', '', '' ]
65             , [ 'NotificationEventName', 'xs:string', '', '', '' ]
66             , [ 'NotificationSignature', 'xs:string', '', '', '' ]
67             , [ 'RecipientUserID', 'xs:string', '', '', '' ]
68             , [ 'Timestamp', 'xs:dateTime', '', '', '' ]
69             , [ 'Version', 'xs:string', '', '', '' ]
70             );
71             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
72              
73             my @gaAttributes = (
74             );
75             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
76              
77             =head1 Subroutines:
78              
79             =cut
80              
81             sub new {
82             my $classname = shift;
83             my %args = @_;
84             my $self = $classname->SUPER::new(%args);
85             return $self;
86             }
87              
88             sub isScalar {
89             return 0;
90             }
91              
92              
93              
94             =head2 setAck()
95              
96             A token representing the application-level acknowledgement code that indicates
97             the response status (e.g., success). The AckCodeType list specifies
98             the possible values for Ack.
99              
100             # Argument: 'ns:AckCodeType'
101              
102             =cut
103              
104             sub setAck {
105             my $self = shift;
106             $self->{'Ack'} = shift
107             }
108              
109             =head2 getAck()
110              
111             Calls: Returned: Always
112             AllCallsExcept: CompleteSale, GetPopularKeywords
113             AllValuesExcept: PartialFailure
114              
115             Calls: CompleteSale
116             GetPopularKeywords
117             Returned: Always
118              
119             # Returns: 'ns:AckCodeType'
120              
121             =cut
122              
123             sub getAck {
124             my $self = shift;
125             return $self->{'Ack'};
126             }
127              
128              
129             =head2 setBotBlock()
130              
131             Container of token, image URL and audio URL.
132              
133             # Argument: 'ns:BotBlockResponseType'
134              
135             =cut
136              
137             sub setBotBlock {
138             my $self = shift;
139             $self->{'BotBlock'} = shift
140             }
141              
142             =head2 getBotBlock()
143              
144             Calls: PlaceOffer
145             Returned: Conditionally
146              
147             # Returns: 'ns:BotBlockResponseType'
148              
149             =cut
150              
151             sub getBotBlock {
152             my $self = shift;
153             return $self->_getDataTypeInstance( 'BotBlock'
154             ,'eBay::API::XML::DataType::BotBlockResponseType');
155             }
156              
157              
158             =head2 setBuild()
159              
160             This refers to the specific software build that eBay used when processing the request
161             and generating the response. This includes the version number plus additional
162             information. eBay Developer Support may request the build information
163             when helping you resolve technical issues.
164              
165             # Argument: 'xs:string'
166              
167             =cut
168              
169             sub setBuild {
170             my $self = shift;
171             $self->{'Build'} = shift
172             }
173              
174             =head2 getBuild()
175              
176             Calls: Returned: Always
177             AllCalls:
178              
179             # Returns: 'xs:string'
180              
181             =cut
182              
183             sub getBuild {
184             my $self = shift;
185             return $self->{'Build'};
186             }
187              
188              
189             =head2 setCorrelationID()
190              
191             In most cases, all calls support a MessageID element in the request
192             and a CorrelationID element in the response. If you pass a message
193             ID in a request, we will return the same value in CorrelationID in
194             the response. You can use this for tracking that a response is
195             returned for every request and to match particular responses to
196             particular requests. If you do not pass MessageID in the request,
197             CorrelationID is not returned.
198            
199             Note:
200             GetCategories, GetAttributesCS, GetCategory2CS, GetAttributesXSL,
201             GetProductFinder, GetProductFinderXSL, and GetProductSearchPage
202             are designed to retrieve very large sets of metadata
203             that change once a day or less often. To improve performance,
204             these calls return cached responses when you request all available data
205             (with no filters). When this occurs, the MessageID and CorrelationID
206             fields aren't applicable.
207             However, if you specify an input filter to reduce the amount of data
208             returned, the calls retrieve the latest data (not cached).
209             When this occurs, MessageID and CorrelationID are applicable.
210            
211              
212             # Argument: 'xs:string'
213              
214             =cut
215              
216             sub setCorrelationID {
217             my $self = shift;
218             $self->{'CorrelationID'} = shift
219             }
220              
221             =head2 getCorrelationID()
222              
223             Calls: Returned: Conditionally
224             AllCalls:
225              
226             # Returns: 'xs:string'
227              
228             =cut
229              
230             sub getCorrelationID {
231             my $self = shift;
232             return $self->{'CorrelationID'};
233             }
234              
235              
236             =head2 setDuplicateInvocationDetails()
237              
238             Information that explains a failure due to a duplicate InvocationID being
239             passed in.
240              
241             # Argument: 'ns:DuplicateInvocationDetailsType'
242              
243             =cut
244              
245             sub setDuplicateInvocationDetails {
246             my $self = shift;
247             $self->{'DuplicateInvocationDetails'} = shift
248             }
249              
250             =head2 getDuplicateInvocationDetails()
251              
252             Calls: AddItem
253             AddLiveAuctionItem
254             AddOrder
255             AddSecondChanceItem
256             AddToItemDescription
257             PlaceOffer
258             RelistItem
259             ReviseCheckoutStatus
260             ReviseItem
261             ReviseLiveAuctionItem
262             Returned: Conditionally
263              
264             # Returns: 'ns:DuplicateInvocationDetailsType'
265              
266             =cut
267              
268             sub getDuplicateInvocationDetails {
269             my $self = shift;
270             return $self->_getDataTypeInstance( 'DuplicateInvocationDetails'
271             ,'eBay::API::XML::DataType::DuplicateInvocationDetailsType');
272             }
273              
274              
275             =head2 setEIASToken()
276              
277             Unique Identifier of Recipient user ID of the notification. Only returned by
278             Platform Notifications (not for regular API call responses).
279              
280             # Argument: 'xs:string'
281              
282             =cut
283              
284             sub setEIASToken {
285             my $self = shift;
286             $self->{'EIASToken'} = shift
287             }
288              
289             =head2 getEIASToken()
290              
291             # Returns: 'xs:string'
292              
293             =cut
294              
295             sub getEIASToken {
296             my $self = shift;
297             return $self->{'EIASToken'};
298             }
299              
300              
301             =head2 setErrors()
302              
303             A list of application-level errors (if any) that occurred when eBay
304             processed the request.
305              
306             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=ErrorHandling
307             Title: Error Handling
308              
309             # Argument: reference to an array
310             of 'ns:ErrorType'
311              
312             =cut
313              
314             sub setErrors {
315             my $self = shift;
316             $self->{'Errors'} =
317             $self->convertArray_To_RefToArrayIfNeeded(@_);
318             }
319              
320             =head2 getErrors()
321              
322             Calls: Returned: Conditionally
323             AllCalls:
324              
325             # Returns: reference to an array
326             of 'ns:ErrorType'
327              
328             =cut
329              
330             sub getErrors {
331             my $self = shift;
332             return $self->_getDataTypeArray('Errors');
333             }
334              
335              
336             =head2 setHardExpirationWarning()
337              
338             Expiration date of the user's authentication token. Only returned
339             within the 7-day period prior to a token's expiration. To ensure
340             that user authentication tokens are secure and to help avoid a
341             user's token being compromised, tokens have a limited life span. A
342             token is only valid for a period of time (set by eBay). After this
343             amount of time has passed, the token expires and must be replaced
344             with a new token.
345              
346             # Argument: 'xs:string'
347              
348             =cut
349              
350             sub setHardExpirationWarning {
351             my $self = shift;
352             $self->{'HardExpirationWarning'} = shift
353             }
354              
355             =head2 getHardExpirationWarning()
356              
357             Calls: Returned: Conditionally
358             AllCallsExcept: FetchToken
359              
360             # Returns: 'xs:string'
361              
362             =cut
363              
364             sub getHardExpirationWarning {
365             my $self = shift;
366             return $self->{'HardExpirationWarning'};
367             }
368              
369              
370             =head2 setMessage()
371              
372             Supplemental information from eBay, if applicable. May elaborate on errors or
373             provide useful hints for the seller. This data can accompany the call's normal
374             data result set or a result set that contains only errors. The string can
375             return HTML, including TABLE, IMG, and HREF elements. In this case, an HTML-
376             based application should be able to include the HTML as-is in the HTML page
377             that displays the results. A non-HTML application would need to parse the HTML
378             and convert the table elements and image references into UI elements
379             particular to the programming language used. Because this data is returned as
380             a string, the HTML markup elements are escaped with character entity
381             references (e.g.,<table><tr>...). See the
382             appendices in the eBay Web Services guide for general information about string
383             data types.
384              
385             # Argument: 'xs:string'
386              
387             =cut
388              
389             sub setMessage {
390             my $self = shift;
391             $self->{'Message'} = shift
392             }
393              
394             =head2 getMessage()
395              
396             Calls: AddItem
397             AddLiveAuctionItem
398             AddToItemDescription
399             EndItem
400             PlaceOffer
401             RelistItem
402             RespondToWantItNowPost
403             ReviseItem
404             ReviseLiveAuctionItem
405             VerifyAddItem
406             Returned: Conditionally
407              
408             # Returns: 'xs:string'
409              
410             =cut
411              
412             sub getMessage {
413             my $self = shift;
414             return $self->{'Message'};
415             }
416              
417              
418             =head2 setNotificationEventName()
419              
420             Event name of the notification. Only returned by Platform Notifications.
421              
422             # Argument: 'xs:string'
423              
424             =cut
425              
426             sub setNotificationEventName {
427             my $self = shift;
428             $self->{'NotificationEventName'} = shift
429             }
430              
431             =head2 getNotificationEventName()
432              
433             # Returns: 'xs:string'
434              
435             =cut
436              
437             sub getNotificationEventName {
438             my $self = shift;
439             return $self->{'NotificationEventName'};
440             }
441              
442              
443             =head2 setNotificationSignature()
444              
445             A Base64-encoded MD5 hash that allows the recipient of a Platform
446             Notification to verify this is a valid Platform Notification sent by
447             eBay.
448              
449             # Argument: 'xs:string'
450              
451             =cut
452              
453             sub setNotificationSignature {
454             my $self = shift;
455             $self->{'NotificationSignature'} = shift
456             }
457              
458             =head2 getNotificationSignature()
459              
460             # Returns: 'xs:string'
461              
462             =cut
463              
464             sub getNotificationSignature {
465             my $self = shift;
466             return $self->{'NotificationSignature'};
467             }
468              
469              
470             =head2 setRecipientUserID()
471              
472             Recipient user ID of the notification. Only returned by Platform Notifications.
473              
474             # Argument: 'xs:string'
475              
476             =cut
477              
478             sub setRecipientUserID {
479             my $self = shift;
480             $self->{'RecipientUserID'} = shift
481             }
482              
483             =head2 getRecipientUserID()
484              
485             # Returns: 'xs:string'
486              
487             =cut
488              
489             sub getRecipientUserID {
490             my $self = shift;
491             return $self->{'RecipientUserID'};
492             }
493              
494              
495             =head2 setTimestamp()
496              
497             This value represents the date and time when eBay processed the
498             request. The time zone of this value is GMT and the format is the
499             ISO 8601 date and time format (YYYY-MM-DDTHH:MM:SS.SSSZ). See Time
500             Values in the eBay Web Services guide for information about this
501             time format and converting to and from the GMT time zone.
502            
503             Note:
504             GetCategories, GetAttributesCS, GetCategory2CS, GetAttributesXSL,
505             GetProductFinder, GetProductFinderXSL, and GetProductSearchPage
506             are designed to retrieve very large sets of metadata
507             that change once a day or less often. To improve performance,
508             these calls return cached responses when you request all available data
509             (with no filters). When this occurs, this time value reflects the
510             time the cached response was created. Thus, this value is not
511             necessarily when the request was processed.
512             However, if you specify an input filter to reduce the amount of data
513             returned, the calls retrieve the latest data (not cached).
514             When this occurs, this time value does reflect when the request
515             was processed.
516              
517             # Argument: 'xs:dateTime'
518              
519             =cut
520              
521             sub setTimestamp {
522             my $self = shift;
523             $self->{'Timestamp'} = shift
524             }
525              
526             =head2 getTimestamp()
527              
528             Calls: Returned: Always
529             AllCalls:
530              
531             # Returns: 'xs:dateTime'
532              
533             =cut
534              
535             sub getTimestamp {
536             my $self = shift;
537             return $self->{'Timestamp'};
538             }
539              
540              
541             =head2 setVersion()
542              
543             The version of the response payload schema. Indicates the version of the
544             schema that eBay used to process the request.
545             See "Standard Data for All Calls" in the eBay Web Services Guide for information
546             on using the response version when troubleshooting "CustomCode" values that appear
547             in the response.
548              
549             # Argument: 'xs:string'
550              
551             =cut
552              
553             sub setVersion {
554             my $self = shift;
555             $self->{'Version'} = shift
556             }
557              
558             =head2 getVersion()
559              
560             Calls: Returned: Always
561             AllCalls:
562              
563             # Returns: 'xs:string'
564              
565             =cut
566              
567             sub getVersion {
568             my $self = shift;
569             return $self->{'Version'};
570             }
571              
572              
573              
574              
575              
576             ## Attribute and Property lists
577             sub getPropertiesList {
578             my $self = shift;
579             return \@gaProperties;
580             }
581              
582             sub getAttributesList {
583             my $self = shift;
584             return \@gaAttributes;
585             }
586              
587              
588              
589             1;