Skip to content

Latest commit

 

History

History
68 lines (45 loc) · 3.53 KB

README.md

File metadata and controls

68 lines (45 loc) · 3.53 KB

ConsumerRequestCounts

(vault->consumerRequestCounts)

Overview

Available Operations

  • list - Consumer request counts

list

Get consumer request counts within a given datetime range.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Apideck\Unify;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Unify\Apideck::builder()
    ->setConsumerId('test-consumer')
    ->setAppId('dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX')
    ->setSecurity($security)->build();



$response = $sdk->vault->consumerRequestCounts->list(
    consumerId: 'test_user_id',
    startDatetime: '2021-05-01T12:00:00.000Z',
    endDatetime: '2021-05-30T12:00:00.000Z',
    appId: 'dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX'

);

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

Parameters

Parameter Type Required Description Example
consumerId string ✔️ ID of the consumer to return test_user_id
startDatetime string ✔️ Scopes results to requests that happened after datetime 2021-05-01T12:00:00.000Z
endDatetime string ✔️ Scopes results to requests that happened before datetime 2021-05-30T12:00:00.000Z
appId ?string The ID of your Unify application dSBdXd2H6Mqwfg0atXHXYcysLJE9qyn1VwBtXHX

Response

?Operations\VaultConsumerRequestCountsAllResponse

Errors

Error Type Status Code Content Type
Errors\BadRequestResponse 400 application/json
Errors\UnauthorizedResponse 401 application/json
Errors\PaymentRequiredResponse 402 application/json
Errors\NotFoundResponse 404 application/json
Errors\UnprocessableResponse 422 application/json
Errors\APIException 4XX, 5XX */*