(subscriptions)
Export subscriptions as a CSV file.
declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
$security = '<YOUR_BEARER_TOKEN_HERE>';
$sdk = Polar\Polar::builder()->setSecurity($security)->build();
$response = $sdk->subscriptions->export(
organizationId: [
'<value>',
]
);
if ($response->any !== null) {
// handle response
}
Parameter | Type | Required | Description |
---|---|---|---|
organizationId |
string|array|null | ➖ | Filter by organization ID. |
?Operations\SubscriptionsExportResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\HTTPValidationError | 422 | application/json |
Errors\APIException | 4XX, 5XX | */* |
List subscriptions.
declare(strict_types=1);
require 'vendor/autoload.php';
use Polar;
use Polar\Models\Operations;
$security = '<YOUR_BEARER_TOKEN_HERE>';
$sdk = Polar\Polar::builder()->setSecurity($security)->build();
$request = new Operations\SubscriptionsListRequest();
$responses = $sdk->subscriptions->list(
request: $request
);
foreach ($responses as $response) {
if ($response->statusCode === 200) {
// handle response
}
}
Parameter | Type | Required | Description |
---|---|---|---|
$request |
Operations\SubscriptionsListRequest | ✔️ | The request object to use for the request. |
?Operations\SubscriptionsListResponse
Error Type | Status Code | Content Type |
---|---|---|
Errors\HTTPValidationError | 422 | application/json |
Errors\APIException | 4XX, 5XX | */* |