コード例 #1
0
 */
$service = new Services\BulkDataExchangeService(array('authToken' => $config['sandbox']['userToken'], 'sandbox' => true));
/**
 * Create the request object.
 *
 * For more information about creating a request object, see:
 * http://devbay.net/sdk/guides/getting-started/#request-object
 */
$request = new Types\GetJobsRequest();
/**
 * Send the request to the getJobs service operation.
 *
 * For more information about calling a service operation, see:
 * http://devbay.net/sdk/guides/getting-started/#service-operation
 */
$response = $service->getJobs($request);
/**
 * Output the result of calling the service operation.
 *
 * For more information about working with the service response object, see:
 * http://devbay.net/sdk/guides/getting-started/#response-object
 */
if (isset($response->errorMessage)) {
    foreach ($response->errorMessage->error as $error) {
        printf("%s: %s\n\n", $error->severity === BulkDataExchange\Enums\ErrorSeverity::C_ERROR ? 'Error' : 'Warning', $error->message);
    }
}
if ($response->ack !== 'Failure') {
    /**
     * Just display the first 3 jobs from the response.
     */