Object::eBay::Condition - Represents a condition used by eBay
# assuming that $item is an Object::eBay::Item object my $condition = $item->condition; # supports string and numeric context print "Condition: $condition\n"; # "Condition: Brand New" print "Shiny!\n" if $condition == 1000; # numeric context # accessor methods are also available my $condition_id = $condition->condition_id; # just the condition ID my $name = $condition->display_name; # same as numeric context my $string = $condition->as_string; # same as string context
eBay allows sellers to describe the condition of their item using several pre-determined descriptions. These descriptions depend on the listing category but often include values like "Brand New" or "Acceptable". Each textual value is associated with a numeric code which uniquely identifies the value for the particular category. Presumably the codes are identical across sites regardless of the site's language.
An Object::eBay::Condition object represents a particular condition. Methods on Object::eBay::Item return Condition objects where appropriate.
As mentioned in the "SYNOPSIS", string and numeric context are supported. In numeric context, the object evaluates to eBay's numeric condition identifier. In string context, the object evaluates to a string which describes the condition (see "as_string" for details).
Returns a string with a natural language description of the condition. For example "Brand New" or "Acceptable" or "Very Good", etc.
This method provides the value for string context.
Returns a number identifying the condition. The possible values are determined by eBay and vary from category to category.
Identical to "as_string"
These exceptions are thrown when constructing a Condition object from an invalid hashref. This indicates a problem (or change) with eBay's XML response.
Object::eBay::Condition requires no configuration files or environment variables.
Class::Std
None known.
Please report any bugs or feature requests to bug-object-ebay at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Object-eBay. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-object-ebay at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Object::eBay;
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Object-eBay
CPAN Ratings
http://cpanratings.perl.org/d/Object-eBay
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Object-eBay
Search CPAN
http://search.cpan.org/dist/Object-eBay
Michael Hendricks <michael@ndrix.org>
Copyright (c) 2010 Michael Hendricks (<michael@ndrix.org>). All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Object::eBay, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Object::eBay
CPAN shell
perl -MCPAN -e shell install Object::eBay
For more information on module installation, please visit the detailed CPAN module installation guide.