Skip to content

Latest commit

 

History

History
105 lines (66 loc) · 3.88 KB

README.md

File metadata and controls

105 lines (66 loc) · 3.88 KB

Subscriptions

(subscriptions)

Overview

Available Operations

  • export - Export Subscriptions
  • list - List Subscriptions

export

Export subscriptions as a CSV file.

Example Usage

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
}

Parameters

Parameter Type Required Description
organizationId string|array|null Filter by organization ID.

Response

?Operations\SubscriptionsExportResponse

Errors

Error Type Status Code Content Type
Errors\HTTPValidationError 422 application/json
Errors\APIException 4XX, 5XX */*

list

List subscriptions.

Example Usage

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
    }
}

Parameters

Parameter Type Required Description
$request Operations\SubscriptionsListRequest ✔️ The request object to use for the request.

Response

?Operations\SubscriptionsListResponse

Errors

Error Type Status Code Content Type
Errors\HTTPValidationError 422 application/json
Errors\APIException 4XX, 5XX */*