doumingo04696 2014-11-14 11:26
浏览 579
已采纳

如何为亚马逊MWS报告API设置报告类型

I have ordered this Transaction report from Amazon seller central because one can't request from Report's 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. 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"

$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_"));
  • 写回答

1条回答 默认 最新

  • douyingbei1458 2014-12-15 08:23
    关注

    you have to create a class of type typelist and send as parameter

    $TypeList = new MarketplaceWebService_Model_TypeList();
    $TypeList->setType('_GET_DATE_RANGE_FINANCIAL_TRANSACTION_DATA_');
    $request_report_list->setReportTypeList($TypeList);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看