1######################################################################
2package Net::Amazon::Request::UPC;
3######################################################################
4use warnings;
5use strict;
6use base qw(Net::Amazon::Request);
7
8##################################################
9sub new {
10##################################################
11    my($class, %options) = @_;
12
13    $class->_assert_options_defined(\%options, qw(upc));
14
15    $class->_convert_option(\%options,
16                            'upc',
17                            'ItemId');
18
19	$options{'IdType'} = 'UPC';
20
21    my $self = $class->SUPER::new(%options);
22
23    $self->_convert_itemsearch();
24
25    bless $self, $class;   # reconsecrate
26}
27
281;
29
30__END__
31
32=head1 NAME
33
34Net::Amazon::Request::UPC - request class for UPC search
35
36=head1 SYNOPSIS
37
38  use Net::Amazon;
39  use Net::Amazon::Request::UPC;
40
41  my $ua = Net::Amazon->new(
42      token       => 'YOUR_AMZN_TOKEN'
43  );
44
45  my $req = Net::Amazon::Request::UPC->new(
46      upc  => '724381198421',
47      mode => 'music',
48
49  );
50
51    # Response is of type Net::Amazon::Response::UPC
52  my $resp = $ua->request($req);
53
54=head1 DESCRIPTION
55
56C<Net::Amazon::Request::UPC> is a class used to submit UPC (product barcode)
57search requests to the Amazon web service.
58
59The UPC number to search for is specified in the C<upc> parameter.
60It currently works with the following values of the C<mode> parameter:
61C<music>,
62C<classical>,
63C<software>,
64C<dvd>,
65C<video>,
66C<vhs>,
67C<electronics>,
68C<pc-hardware>, and
69C<photo>.
70
71Upon success, the response's C<properties()> method will return a single
72C<Net::Amazon::Property::Music> object.
73
74=head2 METHODS
75
76=over 4
77
78=item new(upc => $upc)
79
80Constructs a new C<Net::Amazon::Request::UPC> object, used to query
81the Amazon web service for an item with the given UPC number.
82
83=back
84
85=head1 AUTHOR
86
87Mike Schilli, E<lt>m@perlmeister.comE<gt>
88
89=head1 COPYRIGHT AND LICENSE
90
91Copyright 2003 by Mike Schilli E<lt>m@perlmeister.comE<gt>
92
93This library is free software; you can redistribute it and/or modify
94it under the same terms as Perl itself.
95
96=cut
97