File Coverage

blib/lib/eBay/API/XML/DataType/AbstractRequestType.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::AbstractRequestType;
4              
5 2     2   1015 use strict;
  2         4  
  2         84  
6 2     2   14 use warnings;
  2         5  
  2         83  
7              
8             ##########################################################################
9             #
10             # Module: ............... eBay/API/XML
11             # File: ................. AbstractRequestType.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::AbstractRequestType
21              
22             =head1 DESCRIPTION
23              
24             Base type definition of the request payload, which can carry any type of payload
25             content plus optional versioning information and detail level requirements. All
26             concrete request types (e.g., AddItemRequestType) are derived from the abstract
27             request type. The naming convention we use for the concrete type names is the name
28             of the service (the verb or call name) followed by "RequestType":
29             VerbNameRequestType
30              
31              
32              
33             =head1 SYNOPSIS
34              
35             =cut
36              
37              
38             =head1 INHERITANCE
39              
40             eBay::API::XML::DataType::AbstractRequestType inherits from the L class
41              
42             =cut
43              
44 2     2   1213 use eBay::API::XML::BaseDataType;
  0            
  0            
45             our @ISA = ("eBay::API::XML::BaseDataType");
46              
47             use eBay::API::XML::DataType::BotBlockRequestType;
48             use eBay::API::XML::DataType::UUIDType;
49             use eBay::API::XML::DataType::XMLRequesterCredentialsType;
50             use eBay::API::XML::DataType::Enum::DetailLevelCodeType;
51             use eBay::API::XML::DataType::Enum::ErrorHandlingCodeType;
52             use eBay::API::XML::DataType::Enum::WarningLevelCodeType;
53              
54              
55             my @gaProperties = ( [ 'BotBlock', 'ns:BotBlockRequestType', ''
56             ,'eBay::API::XML::DataType::BotBlockRequestType', '1' ]
57             , [ 'DetailLevel', 'ns:DetailLevelCodeType', '1'
58             ,'eBay::API::XML::DataType::Enum::DetailLevelCodeType', '' ]
59             , [ 'EndUserIP', 'xs:string', '', '', '' ]
60             , [ 'ErrorHandling', 'ns:ErrorHandlingCodeType', ''
61             ,'eBay::API::XML::DataType::Enum::ErrorHandlingCodeType', '' ]
62             , [ 'ErrorLanguage', 'xs:string', '', '', '' ]
63             , [ 'InvocationID', 'ns:UUIDType', ''
64             ,'eBay::API::XML::DataType::UUIDType', '1' ]
65             , [ 'MessageID', 'xs:string', '', '', '' ]
66             , [ 'OutputSelector', 'xs:string', '1', '', '' ]
67             , [ 'RequesterCredentials', 'ns:XMLRequesterCredentialsType', ''
68             ,'eBay::API::XML::DataType::XMLRequesterCredentialsType', '1' ]
69             , [ 'Version', 'xs:string', '', '', '' ]
70             , [ 'WarningLevel', 'ns:WarningLevelCodeType', ''
71             ,'eBay::API::XML::DataType::Enum::WarningLevelCodeType', '' ]
72             );
73             push @gaProperties, @{eBay::API::XML::BaseDataType::getPropertiesList()};
74              
75             my @gaAttributes = (
76             );
77             push @gaAttributes, @{eBay::API::XML::BaseDataType::getAttributesList()};
78              
79             =head1 Subroutines:
80              
81             =cut
82              
83             sub new {
84             my $classname = shift;
85             my %args = @_;
86             my $self = $classname->SUPER::new(%args);
87             return $self;
88             }
89              
90             sub isScalar {
91             return 0;
92             }
93              
94              
95              
96             =head2 setBotBlock()
97              
98             Container for a token and for user input.
99              
100             Calls: PlaceOffer
101             RequiredInput: Conditionally
102              
103             # Argument: 'ns:BotBlockRequestType'
104              
105             =cut
106              
107             sub setBotBlock {
108             my $self = shift;
109             $self->{'BotBlock'} = shift
110             }
111              
112             =head2 getBotBlock()
113              
114             # Returns: 'ns:BotBlockRequestType'
115              
116             =cut
117              
118             sub getBotBlock {
119             my $self = shift;
120             return $self->_getDataTypeInstance( 'BotBlock'
121             ,'eBay::API::XML::DataType::BotBlockRequestType');
122             }
123              
124              
125             =head2 setDetailLevel()
126              
127             Detail levels are instructions that define standard subsets of
128             data to return for particular data components (e.g., each
129             Item, Transaction, or User) within the response payload.
130             For example, a particular detail level might cause the
131             response to include buyer-related data in every result
132             (e.g., for every Item), but no seller-related data.
133             Specifying a detail level is like using a
134             predefined attribute list in the SELECT clause of an SQL query.
135             Use the DetailLevel element to specify the required detail level
136             that the client application needs pertaining to the data components
137             that are applicable to the request.
138            
139             The DetailLevelCodeType defines the
140             global list of available detail levels for all request types.
141             Most request types support certain detail
142             levels or none at all. If you pass a detail level that exists
143             in the schema but that isn't valid for a particular request,
144             eBay ignores it processes the request without it.
145             For each request type, see the detail level tables in the
146             Input/Output Reference to determine which detail levels are
147             applicable and which elements are returned for each applicable
148             detail level. (Some detail level tables are still in the
149             eBay Web Services guide. They will be moved to the
150             Input/Output Reference in a future release.)
151            
Note that DetailLevel is required input for
152             GetMyMessages.
153            
154             With GetSellerList and other calls that retrieve large data sets,
155             please avoid using ReturnAll when possible. For example, if you use
156             GetSellerList, use a GranularityLevel or use the
157             GetSellerEvents call instead. If you do use ReturnAll with
158             GetSellerList, use a small EntriesPerPage value and a short
159             EndTimeFrom/EndTimeTo range for better performance.
160              
161             PresentDetails: Yes
162              
163             Calls: GetMyMessages
164             RequiredInput: No
165             OnlyTheseValues: ReturnSummary, ReturnHeaders, ReturnMessages
166              
167             Calls: GetAdFormatLeads
168             GetAttributesCS
169             GetAttributesXSL
170             GetBestOffers
171             GetCategories
172             GetCategory2CS
173             GetCategoryMappings
174             GetFeedback
175             GetOrders
176             GetProductFinder
177             GetProductFinderXSL
178             GetProductSearchPage
179             GetSellerEvents
180             GetTaxTable
181             RequiredInput: No
182             OnlyTheseValues: ReturnAll, none
183              
184             Calls: GetCategoryFeatures
185             GetMyeBayBuying
186             GetMyeBaySelling
187             GetUser
188             GetUserDisputes
189             RequiredInput: No
190             OnlyTheseValues: ReturnAll, ReturnSummary, none
191              
192             Calls: GetItemTransactions
193             GetSellerList
194             GetSellerTransactions
195             RequiredInput: No
196             OnlyTheseValues: ItemReturnDescription, ReturnAll, none
197              
198             Calls: GetOrderTransactions
199             RequiredInput: No
200             OnlyTheseValues: ItemReturnDescription, ReturnAll, none
201              
202             Calls: GetItem
203             RequiredInput: No
204             OnlyTheseValues: ItemReturnAttributes, ItemReturnDescription, ReturnAll, none
205              
206             Calls: GetSearchResults
207             RequiredInput: No
208             OnlyTheseValues: ItemReturnAttributes, ItemReturnCategories, ReturnAll, none
209              
210             # Argument: reference to an array
211             of 'ns:DetailLevelCodeType'
212              
213             =cut
214              
215             sub setDetailLevel {
216             my $self = shift;
217             $self->{'DetailLevel'} =
218             $self->convertArray_To_RefToArrayIfNeeded(@_);
219             }
220              
221             =head2 getDetailLevel()
222              
223             # Returns: reference to an array
224             of 'ns:DetailLevelCodeType'
225              
226             =cut
227              
228             sub getDetailLevel {
229             my $self = shift;
230             return $self->_getDataTypeArray('DetailLevel');
231             }
232              
233              
234             =head2 setEndUserIP()
235              
236             The public IP address of the machine from which the request is sent.
237             Your application captures that IP address and includes it in
238             a call request. eBay evaluates requests for safety (also see
239             the BotBlock container
240             in the request and response of this call).
241              
242             Calls: PlaceOffer
243             RequiredInput: Yes
244              
245             # Argument: 'xs:string'
246              
247             =cut
248              
249             sub setEndUserIP {
250             my $self = shift;
251             $self->{'EndUserIP'} = shift
252             }
253              
254             =head2 getEndUserIP()
255              
256             # Returns: 'xs:string'
257              
258             =cut
259              
260             sub getEndUserIP {
261             my $self = shift;
262             return $self->{'EndUserIP'};
263             }
264              
265              
266             =head2 setErrorHandling()
267              
268             Error tolerance level for the call. This is a preference
269             that specifies how eBay should handle requests that contain
270             invalid data or that could partially fail. This gives you some control
271             over whether eBay returns warnings or blocking errors
272             and how eBay processes the invalid data.
273            
274             For AddItem and related calls, this field is only applicable when
275             the listing includes Item Specifics and Pre-filled Item Information
276             (such as AttributeSetArray and ProductListingDetails).
277              
278             Calls: AddItem
279             AddLiveAuctionItem
280             RelistItem
281             ReviseItem
282             ReviseLiveAuctionItem
283             VerifyAddItem
284             RequiredInput: No
285             Default: BestEffort
286             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=AttributeErrorHandling, Title: Attribute Error Handling
287              
288             Calls: CompleteSale
289             RequiredInput: No
290             Default: FailOnError
291             OnlyTheseValues: BestEffort, FailOnError
292              
293             # Argument: 'ns:ErrorHandlingCodeType'
294              
295             =cut
296              
297             sub setErrorHandling {
298             my $self = shift;
299             $self->{'ErrorHandling'} = shift
300             }
301              
302             =head2 getErrorHandling()
303              
304             # Returns: 'ns:ErrorHandlingCodeType'
305              
306             =cut
307              
308             sub getErrorHandling {
309             my $self = shift;
310             return $self->{'ErrorHandling'};
311             }
312              
313              
314             =head2 setErrorLanguage()
315              
316             Use ErrorLanguage to return error strings for the call in a different language
317             from the language commonly associated with the site that the requesting user
318             is registered with. Specify the standard RFC 3066 language identification tag
319             (e.g., en_US).
320            
321             ID--- country
322             ----- -----
323             de_AT Austria
324             de_CH Switzerland
325             de_DE Germany
326             en_AU Australia
327             en_CA Canada
328             en_GB United Kingdom
329             en_SG Singapore
330             en_US United States
331             es_ES Spain
332             fr_BE Belgium (French)
333             fr_CA Canada (French)
334             fr_FR France
335             it_IT Italy
336             nl_BE Belgium (Dutch)
337             nl_NL Netherlands
338             zh_CN China
339             en_IN India
340             en_IE Ireland
341             zh_HK Hong Kong
342              
343             SeeLink: URL: http://www.ietf.org/rfc/rfc3066.txt
344             Title: Tags for the Identification of Languages
345              
346             Calls: RequiredInput: No
347             AllCalls:
348              
349             # Argument: 'xs:string'
350              
351             =cut
352              
353             sub setErrorLanguage {
354             my $self = shift;
355             $self->{'ErrorLanguage'} = shift
356             }
357              
358             =head2 getErrorLanguage()
359              
360             # Returns: 'xs:string'
361              
362             =cut
363              
364             sub getErrorLanguage {
365             my $self = shift;
366             return $self->{'ErrorLanguage'};
367             }
368              
369              
370             =head2 setInvocationID()
371              
372             A unique identifer for a particular call. If the same InvocationID is passed
373             in after it has been passed in once on a call that succeeded for a particular
374             application and user, then an error will be returned. The identifier can
375             only contain digits from 0-9 and letters from A-F. The
376             identifier must be 32 characters long. For example,
377             1FB02B2-9D27-3acb-ABA2-9D539C374228.
378              
379             MaxLength: 32
380              
381             Calls: AddOrder
382             AddToItemDescription
383             PlaceOffer
384             ReviseCheckoutStatus
385             ReviseItem
386             RequiredInput: No
387              
388             # Argument: 'ns:UUIDType'
389              
390             =cut
391              
392             sub setInvocationID {
393             my $self = shift;
394             $self->{'InvocationID'} = shift
395             }
396              
397             =head2 getInvocationID()
398              
399             # Returns: 'ns:UUIDType'
400              
401             =cut
402              
403             sub getInvocationID {
404             my $self = shift;
405             return $self->_getDataTypeInstance( 'InvocationID'
406             ,'eBay::API::XML::DataType::UUIDType');
407             }
408              
409              
410             =head2 setMessageID()
411              
412             In most cases, all calls support a MessageID element in the request and a
413             CorrelationID element in the response. If you pass a message ID in a request,
414             we will return the same value in CorrelationID in the response. You can use
415             this for tracking that a response is returned for every request and to match
416             particular responses to particular requests. If you do not pass MessageID in
417             the request, CorrelationID is not returned.
418            
419             Note:
420             GetCategories, GetAttributesCS, GetCategory2CS, GetAttributesXSL,
421             GetProductFinder, GetProductFinderXSL, and GetProductSearchPage
422             are designed to retrieve very large sets of metadata
423             that change once a day or less often. To improve performance,
424             these calls return cached responses when you request all available data
425             (with no filters). When this occurs, the MessageID and CorrelationID
426             fields aren't applicable.
427             However, if you specify an input filter to reduce the amount of data
428             returned, the calls retrieve the latest data (not cached).
429             When this occurs, MessageID and CorrelationID are applicable.
430            
431              
432             Calls: RequiredInput: No
433             AllCalls:
434              
435             # Argument: 'xs:string'
436              
437             =cut
438              
439             sub setMessageID {
440             my $self = shift;
441             $self->{'MessageID'} = shift
442             }
443              
444             =head2 getMessageID()
445              
446             # Returns: 'xs:string'
447              
448             =cut
449              
450             sub getMessageID {
451             my $self = shift;
452             return $self->{'MessageID'};
453             }
454              
455              
456             =head2 setOutputSelector()
457              
458             You can use the OutputSelector field to restrict the data returned by this call.
459             When you make a call such as GetItem that retrieves data from eBay,
460             the OutputSelector field is useful for restricting the data returned.
461             This field makes the call response easier to use, especially when a large payload
462             would be returned. If you use the OutputSelector field, the output data
463             will include only the fields you specified in the request.
464             For example, if you are using GetItem and you want the item data
465             in the response to be restricted to the ViewItemURL
466             (the URL where a user can view the listing) and BuyItNowPrice, then
467             within the GetItem request, specify those output fields.
468             To use this field, see the information at the following link.
469              
470             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=ConfiguringOutputRetrieveData
471             Title: Selecting Fields to Retrieve
472              
473             Calls: GetAccount
474             GetAdFormatLeads
475             GetAllBidders
476             GetBestOffers
477             GetBidderList
478             GetCategories
479             GetCategoryFeatures
480             GetCategoryListings
481             GetCrossPromotions
482             GetFeedback
483             GetHighBidders
484             GetItem
485             GetItemsAwaitingFeedback
486             GetItemShipping
487             GetItemTransactions
488             GetMemberMessages
489             GetMyeBayBuying
490             GetMyeBaySelling
491             GetMyMessages
492             GetNotificationPreferences
493             GetOrders
494             GetOrderTransactions
495             GetProducts
496             GetSearchResults
497             GetSellerEvents
498             GetSellerList
499             GetSellerPayments
500             GetSellerTransactions
501             RequiredInput: No
502              
503             # Argument: reference to an array
504             of 'xs:string'
505              
506             =cut
507              
508             sub setOutputSelector {
509             my $self = shift;
510             $self->{'OutputSelector'} =
511             $self->convertArray_To_RefToArrayIfNeeded(@_);
512             }
513              
514             =head2 getOutputSelector()
515              
516             # Returns: reference to an array
517             of 'xs:string'
518              
519             =cut
520              
521             sub getOutputSelector {
522             my $self = shift;
523             return $self->_getDataTypeArray('OutputSelector');
524             }
525              
526              
527             =head2 setRequesterCredentials()
528              
529             Authentication information for the user on whose behalf the application is
530             making the request. Only registered eBay users are allowed to make API calls. To
531             verify that a user is registered, your application needs to pass a user-specific
532             value called an "authentication token" in the request. This is equivalent to
533             signing in on the eBay Web site. As API calls do not pass session information,
534             you need to pass the user's authentication token every time you invoke a call on
535             their behalf. All calls require an authentication token, except the calls you
536             use to retrieve a token in the first place. (For such calls, you use the eBay
537             member's username and password instead.)
538              
539             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=AuthNAuth
540             Title: Authentication & Authorization
541              
542             Calls: RequiredInput: Yes
543             AllCalls:
544              
545             # Argument: 'ns:XMLRequesterCredentialsType'
546              
547             =cut
548              
549             sub setRequesterCredentials {
550             my $self = shift;
551             $self->{'RequesterCredentials'} = shift
552             }
553              
554             =head2 getRequesterCredentials()
555              
556             # Returns: 'ns:XMLRequesterCredentialsType'
557              
558             =cut
559              
560             sub getRequesterCredentials {
561             my $self = shift;
562             return $self->_getDataTypeInstance( 'RequesterCredentials'
563             ,'eBay::API::XML::DataType::XMLRequesterCredentialsType');
564             }
565              
566              
567             =head2 setVersion()
568              
569             The version number of the API code that you are
570             programming against (e.g., 549).
571             The version you specify for a call has these basic effects:
572             - It indicates the version of the code lists and other
573             data that eBay should use to process your request.
574             - It indicates the schema version you are using.
575             You need to use a version that is greater than or equal to the
576             lowest supported version.
577            
578             For the SOAP API: If you are using the SOAP API,
579             this field is required. Specify the version of the WSDL your
580             application is using.
581            
582             For the XML API: If you are using the XML API,
583             this field has no effect. Instead, specify the version in the
584             X-EBAY-API-COMPATIBILITY-LEVEL HTTP header.
585             (If you specify Version in the body of an XML API request and it
586             is different from the value in the HTTP header, eBay returns an
587             informational warning that the value in the HTTP header was used
588             instead.)
589              
590             SeeLink: URL: http://developer.ebay.com/DevZone/XML/docs/WebHelp/index.htm?context=eBay_XML_API&topic=HTTPHeaders
591             Title: HTTP Headers (XML API Only)
592             , URL: ../../HowTo/eBayWS/eBaySchemaVersioning.html
593             Title: eBay Schema Versioning Strategy
594             , URL: ../../HowTo/eBayWS/eBaySchemaVersioning.html#VersionSupportSchedule
595             Title: Lowest Supported Version
596              
597              
598             Calls: RequiredInput: Conditionally
599             AllCalls:
600              
601             # Argument: 'xs:string'
602              
603             =cut
604              
605             sub setVersion {
606             my $self = shift;
607             $self->{'Version'} = shift
608             }
609              
610             =head2 getVersion()
611              
612             # Returns: 'xs:string'
613              
614             =cut
615              
616             sub getVersion {
617             my $self = shift;
618             return $self->{'Version'};
619             }
620              
621              
622             =head2 setWarningLevel()
623              
624             Controls whether or not to return warnings when the application passes
625             unrecognized or deprecated elements in a request.
626            
627             An unrecognized element is one that is not defined in any supported
628             version of the schema. Schema element names are case-sensitive,
629             so using WarningLevel can also help you remove any potential hidden
630             bugs within your application due to incorrect case or spelling in
631             field names before you put your application into the
632             Production environment.
633            
634             WarningLevel only validates elements; it doesn't validate
635             XML attributes. It also doesn't control warnings related to
636             user-entered strings or numbers, or warnings for
637             logical errors.
638            
639             We recommend that you only use this during development and debugging.
640             Do not use this in requests in your production code.
641              
642             SeeLink: URL: https://ebay.custhelp.com/cgi-bin/ebay.cfg/php/enduser/std_adp.php?p_faqid=499
643             Title: Warning Level
644              
645             Calls: RequiredInput: No
646             AllCalls:
647              
648             # Argument: 'ns:WarningLevelCodeType'
649              
650             =cut
651              
652             sub setWarningLevel {
653             my $self = shift;
654             $self->{'WarningLevel'} = shift
655             }
656              
657             =head2 getWarningLevel()
658              
659             # Returns: 'ns:WarningLevelCodeType'
660              
661             =cut
662              
663             sub getWarningLevel {
664             my $self = shift;
665             return $self->{'WarningLevel'};
666             }
667              
668              
669              
670              
671              
672             ## Attribute and Property lists
673             sub getPropertiesList {
674             my $self = shift;
675             return \@gaProperties;
676             }
677              
678             sub getAttributesList {
679             my $self = shift;
680             return \@gaAttributes;
681             }
682              
683              
684              
685             1;