[英]How do I set report type for Amazon MWS report api
I have ordered this Transaction report from Amazon seller central because one can't request from Report's API. 我已从Amazon卖方中心订购了此交易报告,因为无法从Report的API请求。 Now I am trying to download this report using report api which is working fine, But now I am trying to set the report type to "_GET_DATE_RANGE_FINANCIAL_TRANSACTION_DATA_" so that I get requested report list for only this type of report. 现在,我尝试使用工作正常的报告api下载此报告,但是现在,我尝试将报告类型设置为“ _GET_DATE_RANGE_FINANCIAL_TRANSACTION_DATA_”,以便仅获得此报告类型的报告列表。 I am using the code below but it's giving me this error 我正在使用下面的代码,但它给了我这个错误
"Fatal error: Call to a member function getType() on a non-object in /AmazonAPI/ReportsAPIClass/src/MarketplaceWebService/Client.php on line 1605" “致命错误:在第1605行的/AmazonAPI/ReportsAPIClass/src/MarketplaceWebService/Client.php中的非对象上调用成员函数getType()”
$config = array(
'ServiceURL' => $serviceURL,
'ProxyHost' => null,
'ProxyPort' => -1,
'MaxErrorRetry' => 3,
);
$service = new MarketplaceWebService_Client(
$AWS_ACCESS_KEY_ID, $AWS_SECRET_ACCESS_KEY, $config, $APPLICATION_NAME, $APPLICATION_VERSION);
//===========================GETS REPORT ID
$request_report_list = new MarketplaceWebService_Model_GetReportListRequest();
$request_report_list->setMerchant($MERCHANT_ID);
$request_report_list->setAcknowledged(false);
$request_report_list->setMarketplace($MARKETPLACE_ID);
$request_report_list->setReportTypeList(array("TypeList" => "_GET_DATE_RANGE_FINANCIAL_TRANSACTION_DATA_"));
you have to create a class of type typelist and send as parameter 您必须创建一个类型为typelist的类并作为参数发送
$TypeList = new MarketplaceWebService_Model_TypeList();
$TypeList->setType('_GET_DATE_RANGE_FINANCIAL_TRANSACTION_DATA_');
$request_report_list->setReportTypeList($TypeList);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.