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 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器