> ## Documentation Index
> Fetch the complete documentation index at: https://docs.playtolia.com/llms.txt
> Use this file to discover all available pages before exploring further.

# PlaytoliaEntitlements

> Non-consumable and time-limited entitlement management

### Methods

| Method                              | Parameters | Returns                   | Notes                                    |
| ----------------------------------- | ---------- | ------------------------- | ---------------------------------------- |
| `GetAllEntitlements()`              | —          | `List<PlayerEntitlement>` | Includes expired — filter by `IsExpired` |
| `GetEntitlementByGrantId(grantId)`  | `string`   | `PlayerEntitlement?`      | Returns valid only; null = not entitled  |
| `GetEntitlementsByGrantId(grantId)` | `string`   | `List<PlayerEntitlement>` | Returns valid only                       |
| `GetEntitlementByItemId(itemId)`    | `string`   | `PlayerEntitlement?`      | Returns valid only                       |
| `Refresh()`                         | —          | `void`                    |                                          |
| `AddListener(listener)`             | `Action`   | `void`                    |                                          |
| `RemoveListener(listener)`          | `Action`   | `void`                    |                                          |

<Info>Targeted getters (`ByGrantId`, `ByItemId`) return only non-expired entitlements. `GetAllEntitlements()` returns everything — check `IsExpired` when using it.</Info>

### PlayerEntitlement

| Field       | Type        | Notes             |
| ----------- | ----------- | ----------------- |
| `Id`        | `string`    |                   |
| `GrantId`   | `string`    | Used for querying |
| `Amount`    | `long`      |                   |
| `CreatedAt` | `string`    |                   |
| `ExpiresAt` | `string`    |                   |
| `StoreItem` | `StoreItem` |                   |
| `IsExpired` | `bool`      |                   |
