NAME
Marketplace::Ebay::Response - Generic response parser for ebay api calls
SYNOPSIS
my $ebay = Marketplace::Ebay->new(...);
my $res = $ebay->api_call('GeteBayOfficialTime', {});
if (defined($res)) {
my $parsed = Marketplace::Ebay::Response->new(struct => $res);
print "OK" if $parsed->is_success;
if (defined $parsed->fees) {
print "Total fees are " . $parsed->total_fees;
}
}
ACCESSORS
The constructor asks for a struct
key where the api_call
return value should be saved. This module provide some convenience routines.
struct
The XML data deserialized into a perl hashref. It should be the return value of Marketplace::Ebay's api_call, if defined.
SHORTCUTS
Given that we can't know beforehand which kind of response we have, depending on the API version and on the used XSD, the convention for all these shortcuts is to return undef when we can't reliably provide an answer (this is true for booleans as well, which return 0 or 1). undef
means that we don't know, so you're recommend to inspect the struct
yourself to make sense of the unknown, if you're expecting something.
is_success
Boolean.
version
The API version of the remote site.
item_id
The ItemID (if any) of the response
start_time
The StartTime (if any) of the response (auction start time)
end_time
The EndTime (if any) of the response (auction end time)
timestamp
The timestamp of the response.
errors
The unmodified Errors structure
errors_as_string
A single string with the errors found in the response. If you need more detailed info, you have to inspect errors
yourself.
fees
The fees detail returned by an add_item (or equivalent) call.
total_listing_fee
As per documentation: The total cost of all listing features is found in the Fees container whose Name is ListingFee. This does not reflect the full cost of listing and selling an item on eBay, for the Final Value Fee cannot be calculated by eBay until the listing has ended, when a final sale price is known. Total cost is then the sum of the Final Value Fee and the Fee corresponding to ListingFee.
http://developer.ebay.com/DevZone/guides/ebayfeatures/Development/Listing-Fees.html