Skip Menu |

This queue is for tickets about the Net-eBay CPAN distribution.

Report information
The Basics
Id: 120763
Status: new
Priority: 0/
Queue: Net-eBay

People
Owner: Nobody in particular
Requestors: DBOYS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Allow to use array as input paramater for 'submitRequest' method
eBay supports methods(AddItems, EndItems) which allow to use list as input parameter. You can find patch in attachment which allow such functionality.
Subject: Net_eBay.patch
--- eBay.pm 2017-03-14 14:08:57.451297959 +0200 +++ /usr/local/share/perl/5.18.2/Net/eBay.pm 2017-03-14 14:09:43.883297128 +0200 @@ -429,7 +429,7 @@ <$name"."Request xmlns=\"urn:ebay:apis:eBLBaseComponents\"> <RequesterCredentials>\n"; #if request credentials exist, use the username/password - if(defined $request->{RequesterCredentials}) { + if((ref($request) eq 'HASH') && (defined $request->{RequesterCredentials})) { #if username or password is not defined, we can't use request credentials if(not defined $request->{RequesterCredentials}{Username} or @@ -448,9 +448,19 @@ } else { $xml .= " <eBayAuthToken>$this->{Token}</eBayAuthToken>\n"; } - + + my $xml_content = ''; + if (ref($request) eq 'ARRAY') { + for my $item(@{$request || []}) { + $xml_content .= hash2xml( 2, $item ); + } + } + else { + $xml_content = hash2xml( 2, $request ); + } + $xml .= "</RequesterCredentials> -" . hash2xml( 2, $request ) . " +" . $xml_content . " </$name"."Request> ";