Skip to content

Latest commit

 

History

History
204 lines (147 loc) · 11.4 KB

File metadata and controls

204 lines (147 loc) · 11.4 KB

Reports.Executions

Overview

Available Operations

  • list - List executions for report
  • url - Create URL for executed report
  • get - Get executed report

list

List all executions of a specific report.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Gr4vy;

$sdk = Gr4vy\SDK::builder()
    ->setMerchantAccountId('default')
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$responses = $sdk->reports->executions->list(
    reportId: '4d4c7123-b794-4fad-b1b9-5ab2606e6bbe',
    limit: 20

);


foreach ($responses as $response) {
    if ($response->statusCode === 200) {
        // handle response
    }
}

Parameters

Parameter Type Required Description Example
reportId string ✔️ The ID of the report to retrieve details for. 4d4c7123-b794-4fad-b1b9-5ab2606e6bbe
cursor ?string A pointer to the page of results to return. ZXhhbXBsZTE
limit ?int The maximum number of items that are at returned. 20
merchantAccountId ?string The ID of the merchant account to use for this request. default

Response

?ListReportExecutionsResponse

Errors

Error Type Status Code Content Type
Errors\Error400 400 application/json
Errors\Error401 401 application/json
Errors\Error403 403 application/json
Errors\Error404 404 application/json
Errors\Error405 405 application/json
Errors\Error409 409 application/json
Errors\HTTPValidationError 422 application/json
Errors\Error425 425 application/json
Errors\Error429 429 application/json
Errors\Error500 500 application/json
Errors\Error502 502 application/json
Errors\Error504 504 application/json
errors\APIException 4XX, 5XX */*

url

Creates a download URL for a specific execution of a report.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Gr4vy;

$sdk = Gr4vy\SDK::builder()
    ->setMerchantAccountId('default')
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->reports->executions->url(
    reportId: '4d4c7123-b794-4fad-b1b9-5ab2606e6bbe',
    reportExecutionId: '003bc416-f32a-420c-8eb2-062a386e1fb0',
    reportExecutionUrlGenerate: $reportExecutionUrlGenerate

);

if ($response->reportExecutionUrl !== null) {
    // handle response
}

Parameters

Parameter Type Required Description Example
reportId string ✔️ The ID of the report to retrieve a URL for. 4d4c7123-b794-4fad-b1b9-5ab2606e6bbe
reportExecutionId string ✔️ The ID of the execution of a report to retrieve a URL for. 003bc416-f32a-420c-8eb2-062a386e1fb0
merchantAccountId ?string The ID of the merchant account to use for this request. default
reportExecutionUrlGenerate ?ReportExecutionUrlGenerate N/A

Response

?CreateReportExecutionUrlResponse

Errors

Error Type Status Code Content Type
Errors\Error400 400 application/json
Errors\Error401 401 application/json
Errors\Error403 403 application/json
Errors\Error404 404 application/json
Errors\Error405 405 application/json
Errors\Error409 409 application/json
Errors\HTTPValidationError 422 application/json
Errors\Error425 425 application/json
Errors\Error429 429 application/json
Errors\Error500 500 application/json
Errors\Error502 502 application/json
Errors\Error504 504 application/json
errors\APIException 4XX, 5XX */*

get

Fetch a specific executed report.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Gr4vy;

$sdk = Gr4vy\SDK::builder()
    ->setMerchantAccountId('default')
    ->setSecurity(
        '<YOUR_BEARER_TOKEN_HERE>'
    )
    ->build();



$response = $sdk->reports->executions->get(
    reportExecutionId: '003bc416-f32a-420c-8eb2-062a386e1fb0'
);

if ($response->reportExecution !== null) {
    // handle response
}

Parameters

Parameter Type Required Description Example
reportExecutionId string ✔️ The ID of the execution of a report to retrieve details for. 003bc416-f32a-420c-8eb2-062a386e1fb0
merchantAccountId ?string The ID of the merchant account to use for this request. default

Response

?GetReportExecutionResponse

Errors

Error Type Status Code Content Type
Errors\Error400 400 application/json
Errors\Error401 401 application/json
Errors\Error403 403 application/json
Errors\Error404 404 application/json
Errors\Error405 405 application/json
Errors\Error409 409 application/json
Errors\HTTPValidationError 422 application/json
Errors\Error425 425 application/json
Errors\Error429 429 application/json
Errors\Error500 500 application/json
Errors\Error502 502 application/json
Errors\Error504 504 application/json
errors\APIException 4XX, 5XX */*