interchange / Amazon-MWS

API binding for Amazon's Marketplace Web Services.
8 stars 8 forks source link

Can't provide MWSAuthToken or other API arguments #18

Open srchulo opened 4 years ago

srchulo commented 4 years ago

I have a very old version of this module (before it was even on CPAN), and I just upgraded to the one on CPAN. It looks like there is no way to provide an MWSAuthToken for a request. Previously, it was included when creating the object.

You can pass in arguments to a method, like RequestReport:

# $MWSAuthToken is not used
$mws->RequestReport(ReportType => $report_type, MWSAuthToken  => $MWSAuthToken)

But they are only used if they are specified in the parameters defined for the API call in define_api_method:

https://github.com/interchange/Amazon-MWS/blob/master/lib/Amazon/MWS/Routines.pm#L43

racke commented 4 years ago

Do you still have the old version of the module?

srchulo commented 4 years ago

Thanks for the quick response. After examining it more closely, I think someone actually took your module while it was on Github before it was on CPAN and modified it :)

However, I am still having trouble with getting MWSAuthToken to work with the current module as an arg since it's not defined as a parameter for ReportRequest:

https://github.com/interchange/Amazon-MWS/blob/master/lib/Amazon/MWS/Reports.pm#L5

Am I maybe using the module incorrectly?