Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 2.13 KB

README.md

File metadata and controls

56 lines (36 loc) · 2.13 KB

CustomerSessions

(customerSessions)

Overview

Available Operations

  • create - Create Customer Session

create

Create a customer session.

Example Usage

declare(strict_types=1);

require 'vendor/autoload.php';

use Polar;
use Polar\Models\Components;

$security = '<YOUR_BEARER_TOKEN_HERE>';

$sdk = Polar\Polar::builder()->setSecurity($security)->build();

$request = new Components\CustomerSessionCreate(
    customerId: '<value>',
);

$response = $sdk->customerSessions->create(
    request: $request
);

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

Parameters

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

Response

?Operations\CustomerSessionsCreateResponse

Errors

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