PHP code example of google / shopping-merchant-issueresolution

1. Go to this page and download the library: Download google/shopping-merchant-issueresolution library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

google / shopping-merchant-issueresolution example snippets


Google\ApiCore\ApiException;
Google\Shopping\Merchant\IssueResolution\V1\Client\IssueResolutionServiceClient;
Google\Shopping\Merchant\IssueResolution\V1\RenderAccountIssuesRequest;
Google\Shopping\Merchant\IssueResolution\V1\RenderAccountIssuesResponse;

// Create a client.
$issueResolutionServiceClient = new IssueResolutionServiceClient();

// Prepare the request message.
$request = (new RenderAccountIssuesRequest())
    ->setName($formattedName);

// Call the API and handle any network failures.
try {
    /** @var RenderAccountIssuesResponse $response */
    $response = $issueResolutionServiceClient->renderAccountIssues($request);
    printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString());
} catch (ApiException $ex) {
    printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage());
}