diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2007-11-11 06:55:13 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2007-11-11 06:55:13 +0000 |
| commit | 3282be229999dc36c197b264d63063a18d136331 (patch) | |
| tree | 98a42db29d955b39e7bed1b599fdcc56c3a29de9 /lib/Net/Amazon/Result | |
| parent | cfdd733c17cfa4f1a43b827a656e9e53cc2524ac (diff) | |
| download | xxv-3282be229999dc36c197b264d63063a18d136331.tar.gz xxv-3282be229999dc36c197b264d63063a18d136331.tar.bz2 | |
* Update installation list with required modules
* Remove unused/doubled provided external perl moduls
Diffstat (limited to 'lib/Net/Amazon/Result')
| -rw-r--r-- | lib/Net/Amazon/Result/Seller.pm | 130 | ||||
| -rw-r--r-- | lib/Net/Amazon/Result/Seller/Listing.pm | 146 |
2 files changed, 0 insertions, 276 deletions
diff --git a/lib/Net/Amazon/Result/Seller.pm b/lib/Net/Amazon/Result/Seller.pm deleted file mode 100644 index cb876a6..0000000 --- a/lib/Net/Amazon/Result/Seller.pm +++ /dev/null @@ -1,130 +0,0 @@ -###################################################################### -package Net::Amazon::Result::Seller; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon); - -use Data::Dumper; -use Log::Log4perl qw(:easy); -use Net::Amazon::Result::Seller::Listing; - -our @DEFAULT_ATTRIBUTES = qw(StoreName SellerNickname - NumberOfOpenListings StoreId); -__PACKAGE__->make_accessor($_) for @DEFAULT_ATTRIBUTES; -__PACKAGE__->make_array_accessor($_) for qw(listings); - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - if(!$options{xmlref}) { - die "Mandatory param xmlref missing"; - } - - my @listings = (); - - my $self = { - %options, - }; - - bless $self, $class; - - # Set default attributes - for my $attr (@DEFAULT_ATTRIBUTES) { - DEBUG "Setting attribute $attr to $options{xmlref}->{$attr}"; - $self->$attr($options{xmlref}->{$attr}); - } - - for my $listing (@{$options{xmlref}->{ListingProductInfo}->{ListingProductDetails}}) { - push @listings, - Net::Amazon::Result::Seller::Listing->new( - xmlref => $listing); - } - - $self->listings(\@listings); - - return $self; -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - my $result = $self->StoreName() . - " (" . - $self->SellerNickname() . - "): " . - $self->NumberOfOpenListings() . - ""; - - return $result; -} - -1; - -__END__ - -=head1 NAME - -Net::Amazon::Result::Seller - Class for Seller info - -=head1 SYNOPSIS - - use Net::Amazon; - - # ... - - if($resp->is_success()) { - print $resp->result()->as_string(); - } - -=head1 DESCRIPTION - -C<Net::Amazon::Result::Seller> is a container for results on a seller -search. It contains data on one particular seller (the one turned up by -the previous search) and the listings this seller is currently running. - -=head2 METHODS - -=over 4 - -=item StoreName() - -Name of the seller's store. - -=item SellerNickname() - -Seller's nickname. - -=item StoreId() - -ID of seller's store. - -=item NumberOfOpenListings() - -Number of listings the seller has currently open. - -=item listings() - -Returns an array of C<Net::Amazon::Result::Seller::Listing> objects. -See the documentation of this class for details. - -=back - -=head1 SEE ALSO - -=head1 AUTHOR - -Mike Schilli, E<lt>m@perlmeister.comE<gt> - -=head1 COPYRIGHT AND LICENSE - -Copyright 2004 by Mike Schilli E<lt>m@perlmeister.comE<gt> - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut diff --git a/lib/Net/Amazon/Result/Seller/Listing.pm b/lib/Net/Amazon/Result/Seller/Listing.pm deleted file mode 100644 index c09ec08..0000000 --- a/lib/Net/Amazon/Result/Seller/Listing.pm +++ /dev/null @@ -1,146 +0,0 @@ -###################################################################### -package Net::Amazon::Result::Seller::Listing; -###################################################################### -use warnings; -use strict; -use base qw(Net::Amazon); - -use Data::Dumper; -use Log::Log4perl qw(:easy); - -our @DEFAULT_ATTRIBUTES = qw( - ExchangeStartDate ExchangeConditionType - ExchangeAsin ExchangeSellerId ExchangeEndDate ExchangePrice - ExchangeSellerRating ExchangeStatus ExchangeId ExchangeTitle - ExchangeQuantityAllocated ExchangeQuantity ExchangeSellerCountry - ExchangeSellerState ExchangeSellerNickname ExchangeFeaturedCategory - ExchangeAvailability ExchangeOfferingType ListingId ExchangeCondition - ExchangeDescription -); - -__PACKAGE__->make_accessor($_) for @DEFAULT_ATTRIBUTES; - -################################################## -sub new { -################################################## - my($class, %options) = @_; - - if(!$options{xmlref}) { - die "Mandatory param xmlref missing"; - } - - my $self = { - %options, - }; - - bless $self, $class; - - DEBUG "Calling Listing with xmlref=", Dumper($options{xmlref}); - - # Set default attributes - for my $attr (@DEFAULT_ATTRIBUTES) { - $self->$attr($options{xmlref}->{$attr}); - } - - return $self; -} - -################################################## -sub as_string { -################################################## - my($self) = @_; - - my $result = - $self->ExchangeTitle() . - " (" . - $self->ExchangeAsin() . - "): " . - $self->ExchangePrice() . - ""; - - return $result; -} - -1; - -__END__ - -=head1 NAME - -Net::Amazon::Result::Seller::Listing - Class for a single Listing of a Seller - -=head1 SYNOPSIS - - for($seller_search_resp->result()->seller()->listings()) { - print $_->as_string(), "\n"; - } - -=head1 DESCRIPTION - -C<Net::Amazon::Result::Seller::Listing> is a container for a single listing -owned by a third-party seller, who is represented by a -C<Net::Amazon::Result::Seller> object. - -An object of this class is also returned by an C<Exchange> request, using -C<Net::Amazon::Response::Exchange>'s C<result> method. - -=head2 METHODS - -=over 4 - -=item ExchangeStartDate() - -=item ExchangeConditionType() - -=item ExchangeAsin() - -=item ExchangeSellerId() - -=item ExchangeEndDate() - -=item ExchangePrice() - -=item ExchangeSellerRating() - -=item ExchangeStatus() - -=item ExchangeId() - -=item ExchangeTitle() - -=item ExchangeQuantityAllocated() - -=item ExchangeQuantity() - -=item ExchangeSellerCountry() - -=item ExchangeSellerState() - -=item ExchangeSellerNickname() - -=item ExchangeFeaturedCategory() - -=item ExchangeAvailability() - -=item ExchangeOfferingType() - -=item ListingId() - -=item ExchangeCondition() - -=back - -=head1 SEE ALSO - -=head1 AUTHOR - -Mike Schilli, E<lt>m@perlmeister.comE<gt> - -=head1 COPYRIGHT AND LICENSE - -Copyright 2004 by Mike Schilli E<lt>m@perlmeister.comE<gt> - -This library is free software; you can redistribute it and/or modify -it under the same terms as Perl itself. - -=cut |
