当前位置: 首页>>代码示例>>PHP>>正文


PHP MarketplaceWebService_Interface::getReport方法代码示例

本文整理汇总了PHP中MarketplaceWebService_Interface::getReport方法的典型用法代码示例。如果您正苦于以下问题:PHP MarketplaceWebService_Interface::getReport方法的具体用法?PHP MarketplaceWebService_Interface::getReport怎么用?PHP MarketplaceWebService_Interface::getReport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MarketplaceWebService_Interface的用法示例。


在下文中一共展示了MarketplaceWebService_Interface::getReport方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: invokeGetReport

 function invokeGetReport(MarketplaceWebService_Interface $service, $request)
 {
     try {
         $response = $service->getReport($request);
         return stream_get_contents($request->getReport());
     } catch (MarketplaceWebService_Exception $ex) {
         $message = 'MWS Report API : Caught Exception : ' . $ex->getMessage() . "\n";
         $message .= "Response Status Code: " . $ex->getStatusCode() . "\n";
         $message .= "Error Code: " . $ex->getErrorCode() . "\n";
         $message .= "Error Type: " . $ex->getErrorType() . "\n";
         $param['message'] = $message;
         $this->generate_log($param);
     }
 }
开发者ID:booklein,项目名称:wpbookle,代码行数:14,代码来源:GetReport.php

示例2: invokeGetReport

/**
 * Get Report Action Sample
 * The GetReport operation returns the contents of a report. Reports can potentially be
 * very large (>100MB) which is why we only return one report at a time, and in a
 * streaming fashion.
 *   
 * @param MarketplaceWebService_Interface $service instance of MarketplaceWebService_Interface
 * @param mixed $request MarketplaceWebService_Model_GetReport or array of parameters
 */
function invokeGetReport(MarketplaceWebService_Interface $service, $request)
{
    try {
        $response = $service->getReport($request);
        echo "Service Response\n";
        echo "=============================================================================\n";
        echo "        GetReportResponse\n";
        if ($response->isSetGetReportResult()) {
            $getReportResult = $response->getGetReportResult();
            echo "            GetReport";
            if ($getReportResult->isSetContentMd5()) {
                echo "                ContentMd5";
                echo "                " . $getReportResult->getContentMd5() . "\n";
            }
        }
        if ($response->isSetResponseMetadata()) {
            echo "            ResponseMetadata\n";
            $responseMetadata = $response->getResponseMetadata();
            if ($responseMetadata->isSetRequestId()) {
                echo "                RequestId\n";
                echo "                    " . $responseMetadata->getRequestId() . "\n";
            }
        }
        echo "        Report Contents\n";
        echo stream_get_contents($request->getReport()) . "\n";
    } catch (MarketplaceWebService_Exception $ex) {
        echo "Caught Exception: " . $ex->getMessage() . "\n";
        echo "Response Status Code: " . $ex->getStatusCode() . "\n";
        echo "Error Code: " . $ex->getErrorCode() . "\n";
        echo "Error Type: " . $ex->getErrorType() . "\n";
        echo "Request ID: " . $ex->getRequestId() . "\n";
        echo "XML: " . $ex->getXML() . "\n";
    }
}
开发者ID:F1p,项目名称:amazon-mws-php-fork,代码行数:43,代码来源:GetReportSample.php

示例3: invokeGetReport

/**
 * Get Report Action Sample
 * The GetReport operation returns the contents of a report. Reports can potentially be
 * very large (>100MB) which is why we only return one report at a time, and in a
 * streaming fashion.
 *   
 * @param MarketplaceWebService_Interface $service instance of MarketplaceWebService_Interface
 * @param mixed $request MarketplaceWebService_Model_GetReport or array of parameters
 */
function invokeGetReport(MarketplaceWebService_Interface $service, $request)
{
    global $reportId;
    try {
        $response = $service->getReport($request);
        echo "Service Response\n";
        echo "=============================================================================\n";
        echo "        GetReportResponse\n";
        if ($response->isSetGetReportResult()) {
            $getReportResult = $response->getGetReportResult();
            echo "            GetReport";
            if ($getReportResult->isSetContentMd5()) {
                echo "                ContentMd5";
                echo "                " . $getReportResult->getContentMd5() . "\n";
            }
        }
        if ($response->isSetResponseMetadata()) {
            echo "            ResponseMetadata\n";
            $responseMetadata = $response->getResponseMetadata();
            if ($responseMetadata->isSetRequestId()) {
                echo "                RequestId\n";
                echo "                    " . $responseMetadata->getRequestId() . "\n";
            }
        }
        echo "        Report Contents\n";
        // echo (stream_get_contents($request->getReport()) . "\n");
        file_put_contents('/tmp/_GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_' . $reportId . '.txt', stream_get_contents($request->getReport()));
    } catch (MarketplaceWebService_Exception $ex) {
        echo "Caught Exception: " . $ex->getMessage() . "\n";
        echo "Response Status Code: " . $ex->getStatusCode() . "\n";
        echo "Error Code: " . $ex->getErrorCode() . "\n";
        echo "Error Type: " . $ex->getErrorType() . "\n";
        echo "Request ID: " . $ex->getRequestId() . "\n";
        echo "XML: " . $ex->getXML() . "\n";
    }
}
开发者ID:soothion,项目名称:amazon-mws-sdk,代码行数:45,代码来源:GetReportSample.php

示例4: Get_Report

/**
 * Retrieves and return the actual report.
 *
 * @param MarketplaceWebService_Interface $service instance of MarketplaceWebService_Interface
 * @param mixed $request MarketplaceWebService_Model_GetReport or array of parameters
 * @return string
 */
function Get_Report(MarketplaceWebService_Interface $Service, $Request)
{
    try {
        $Res = $Service->getReport($Request);
        if ($Res->isSetGetReportResult()) {
            $Res = $Res->getGetReportResult();
            if ($Res->isSetContentMd5()) {
                $Res->getContentMd5();
            }
        }
        return stream_get_contents($Request->getReport());
    } catch (MarketplaceWebService_Exception $ex) {
        echo <<<OutEx
<pre>
Function: Get_Report ()
Caught Exception: {$ex->getMessage()}
Response Status Code: {$ex->getStatusCode()}
Error Code: {$ex->getErrorCode()}
Error Type: {$ex->getErrorType()}
Request ID: {$ex->getRequestId()}
XML: {$ex->getXML()}
ResponseHeaderMetadata: {$ex->getResponseHeaderMetadata()}
OutEx;
        die;
    }
}
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:33,代码来源:amazon.php


注:本文中的MarketplaceWebService_Interface::getReport方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。