SOAP::Amazon::MerchantTransport - An easy to connect to Amazon Merchant Services
Version 0.02 $Id: MerchantTransport.pm,v 1.1 2006/01/30 17:58:42 nathan Exp $
This module provides a simple way to access Amazon's Merchant Services via SOAP. It is based on SOAP::Lite.
use SOAP::Amazon::MerchantTransport; my $a = SOAP::Amazon::MerchantTransport->new( merchantname => 'Bill Shop', merchant => 'Q_M_FOOBAR_1234', username => 'joe@schmo.com.com', password => 'SDNDJNDNFJDJ', url => 'https://merchant-api-qa.amazon.com/foobar/' ); $som = $a->getAllPendingDocumentInfo($doctype); $som = $a->getDocument($documentID); $som = $a->postDocument($requesttype, $document); $som = $a->postDocumentDownloadAck(@documentIdentifiers)
All of these methods, by default return a SOAP::SOM Object unless you specify a handler for the return values.
NOTE: It is possible to write your own handlers to return a different object, but no such modules have been created at the time of this writing. Therefore the documentation will always refer to the return value of the get/post documents as being a SOAP::SOM, but obviously if you specify a handler the return object will be different.
If you want to debug, simply import SOAP::Lite with debugging options on into your script. This has the global effect of turning debugging on. e.g.
use SOAP::Lite +trace => [qw( debug )];
This module is to ease the submission of XML Feeds to Amazon.
This module does not write your Amazon XML Feeds, it only simplifies the submission of those feeds. If you need help writing the Amazon XML Feeds for pricing, inventory, orders, etc. view the sample feeds in the Amazon Documentation. Contact your integration manager for access to these.
Also this module does not handle SOAP errors for you. It uses SOAP::Lite to submit the XML requests and returns a SOAP::SOM object, unless another handler is specified.
Creating a new MerchantTransport object is easy: my $a = SOAP::Amazon::MerchantTransport->new( merchantname => 'Bill Shop', merchant => 'Q_M_FOOBAR_1234', username => 'joe@schmo.com.com', password => 'SDNDJNDNFJDJ', url => 'https://merchant-api-qa.amazon.com/foobar/' );
All of these parameters are required.
If you want the response to be something other than an SOAP::SOM object you can pass in the qualified name of the module you want to use as the return values. e.g. ... handler => 'SOAP::Amazon::MSReturnVal', ... This module is currently ficticious. See "Writing Your Own Response Handler" for more information.
Given a type of document to retrieve, returns an array of TODO s.
Valid values for the $doctype are: orders, or payments. You can also pass the exact values Amazon calls for: _GET_ORDERS_DATA_ or _GET_PAYMENT_SETTLEMENT_DATA_, but the first method is preferred.
orders
payments
_GET_ORDERS_DATA_
_GET_PAYMENT_SETTLEMENT_DATA_
Given the documentTransactionID (given to you by Amazon) returns a SOAP::SOM containing the document.
Given the DocumentID received from getAllPendingDocumentInfo returns the a SOAP::SOM containing the return values.
Given a request type string, local identifier, and an Amazon xml content string returns a SOAP::SOM containing the return values.
Valid Request Types are:
product productRelationship productOverrides productImage productPricing inventoryAvailability testOrders orderAck orderFulfillment paymentAdjustment storeData
$localID is a local identifier. You could try Data::UUID.
$content is a string containing the XML you want to post to Amazon.
TODO
If no argument is given it returns the appropriate value. If there is an argument the value is set.
Examples:
$a->merchantname('Foo Bar Merch'); $a->merchant('Q_M_FOOBAR_1234'); $a->username('joe@schmo.com'); $a->password('raboof'); $a->url('https://merchant-api-qa.amazon.com/whatever/'); my $m = $a->merchant; # $m is now 'Q_M_FOOBAR_1234' etc...
TODO: this feauture is not yet complete.
Nate Murray, <nate at natemurray.com>
<nate at natemurray.com>
There are no known bugs as of version 0.2, just a couple incomplete features.
Please report any bugs or feature requests to bug-soap-amazon-merchantservices at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SOAP-Amazon-MerchantTransport. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-soap-amazon-merchantservices at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc SOAP::Amazon::MerchantTransport
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/SOAP-Amazon-MerchantTransport
CPAN Ratings
http://cpanratings.perl.org/d/SOAP-Amazon-MerchantTransport
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=SOAP-Amazon-MerchantTransport
Search CPAN
http://search.cpan.org/dist/SOAP-Amazon-MerchantTransport
Copyright 2006 Nate Murray, 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 SOAP::Amazon::MerchantTransport, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SOAP::Amazon::MerchantTransport
CPAN shell
perl -MCPAN -e shell install SOAP::Amazon::MerchantTransport
For more information on module installation, please visit the detailed CPAN module installation guide.