| Object-eBay documentation | Contained in the Object-eBay distribution. |
Object::eBay::ListingDetails - Represents an item's listing details
# assuming that $item contains an Object::eBay::Item object
my $end_time = $item->listing_details->end_time();
print "Ends: $end_time\n"; # "Ends: 2005-09-03T12:18:19.21.000Z"
Represents listing details about an eBay item.
Objects of class Object::eBay::ListingDetails cannot be constructed directly.
Similar to end_time except it returns a DateTime object. If this method is invoked, you must have a version of the DateTime package installed.
Returns an ISO8601 formatted string indicating the UTC time that the item is scheduled to end. If the item has ended, it indicates the time when the item ended.
Returns an Object::eBay::Boolean object indicating whether or not this auction has buy it now available at the moment. An auction might be listed with a Buy It Now price but once a bid is placed, Buy It Now is no longer available. There are some other business rules which might affect whether or not Buy It Now is available. See http://xrl.us/dwo72 for some details.
Similar to start_time except it returns a DateTime object. If this method is invoked, you must have a version of the DateTime package installed.
Returns an ISO8601 formatted string indicating the UTC time that the item started.
None
Object::eBay::ListingDetails requires no configuration files or environment variables.
None known.
Please report any bugs or feature requests to
bug-object-ebay-listingdetails 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.
You can find documentation for this module with the perldoc command.
perldoc Object::eBay
You can also look for information at:
Michael Hendricks <michael@ndrix.org>
Copyright (c) 2006 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.
| Object-eBay documentation | Contained in the Object-eBay distribution. |
package Object::eBay::ListingDetails; our $VERSION = '0.4.0'; use Class::Std; { use warnings; use strict; use base qw( Object::eBay ); # ListingDetails is a second-class citizen because there's no eBay API # call that returns just a ListingDetails object. sub api_call { q{} }; sub response_field { q{} }; __PACKAGE__->simple_attributes(qw{ EndTime StartTime }); __PACKAGE__->complex_attributes({ BuyItNowAvailable => { # we'll wrap this in is_buy_it_now_available class => 'Boolean', } }); # this is necessary because BuyItNowAvailable is missing # if the BIN price is 0 sub is_buy_it_now_available { my ($self) = @_; my $answer = eval { $self->buy_it_now_available }; my $exception = $@; return $answer if not $exception; if ( $exception =~ m/Can't find 'BuyItNowAvailable' via/ ) { return Object::eBay::Boolean->new({ object_details => 'false', }); } die $exception; # rethrow the exception } sub end_datetime { my ($self) = @_; my $iso = $self->end_time or die "EndTime was unavailable\n"; return $self->_make_datetime($iso); } sub start_datetime { my ($self) = @_; my $iso = $self->start_time or die "StartTime was unavailable\n"; return $self->_make_datetime($iso); } } 1; __END__