Object::eBay::Condition(3)

NAME
Object::eBay::Condition - Represents a condition used by eBay

SYNOPSIS
    # 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

DESCRIPTION
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).

METHODS

  as_string
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.

  condition_id
Returns a number identifying the condition. The possible values are determined by eBay and vary from category to category.

  display_name
Identical to "as_string"

DIAGNOSTICS

  Missing ConditionID

  Missing ConditionDisplayName
These exceptions are thrown when constructing a Condition object from an invalid hashref. This indicates a problem (or change) with eBay's XML response.

CONFIGURATION AND ENVIRONMENT
Object::eBay::Condition requires no configuration files or environment variables.

DEPENDENCIES

•   Class::Std

INCOMPATIBILITIES
None known.

BUGS AND LIMITATIONS
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.

SUPPORT
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>

ACKNOWLEDGEMENTS

AUTHOR
Michael Hendricks <michael@ndrix.org>

LICENSE AND COPYRIGHT
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.