# NamiEntitlement

{% tabs %}
{% tab title="Swift" %}

```swift
public class NamiEntitlement : NSObject, Codable {
  var activePurchases : NamiPurchase
  var desc : String
  var name : String
  var namiId : String
  var purchasedSkus : [NamiSKU] = []
  var referenceId : String
  var relatedSkus : [NamiSKU] = []
}
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
class NamiEntitlement(
    val name: String?,
    val desc: String? = null,
    val namiId: String?,
    val referenceId: String,
    val relatedSKUs: List<NamiSKU> = listOf(),
    val purchasedSKUs: List<NamiSKU> = listOf(),
    val activePurchases: List<NamiPurchase> = listOf()
)
```

{% endtab %}

{% tab title="Flutter" %}

```dart
class NamiEntitlement {
  final String? name;
  final String? desc;
  final String? namiId;
  final String referenceId;
  final List<NamiSKU> relatedSKUs;
  final List<NamiSKU> purchasedSKUs;
  final List<NamiPurchase> activePurchases;
}
```

{% endtab %}

{% tab title="React Native" %}

```tsx
export type NamiEntitlement = {
  activePurchases: NamiPurchase[];
  desc: string;
  name: string;
  namiId: string;
  purchasedSkus: NamiSKU[];
  referenceId: string;
  relatedSkus: NamiSKU[];
};
```

{% endtab %}

{% tab title="Unity" %}

```c
public class NamiEntitlement
{
    public List<NamiPurchase> ActivePurchases { get; private set; }
    public string Desc { get; private set; }
    public string Name { get; private set; }
    public string NamiId { get; private set; }
    public List<NamiSKU> PurchasedSKUs { get; private set; }
    public string ReferenceId { get; private set; }
    public List<NamiSKU> RelatedSKUs { get; private set; }
}
```

{% endtab %}
{% endtabs %}

**Parameters**

* `activePurchases` - a `NamiPurchase` object corresponding to the purchase that granted the entitlement. Will contain any general metadata know by the SDK. If the purchase was made on the current device, will contain additional platform-specific data.
* `desc` - the description for the entitlement, set in the Control Center.
* `name` - the name of the entitlement, set in the Control Center.
* `namiId` - an internal id used by Nami for the entitlement
* `purchasedSkus` - a list of [NamiSKU](ref:namisku) objects for the purchased in-app products that granted the entitlement. May contain some general metadata about the in-app purchase product when available. If the entitlement was purchased on device, this object will contain data about the in-app purchase product.
* `referenceId` - the unique id used to reference the entitlement, set in the Control Center
* `relatedSkus` - a list of [NamiSKU](ref:namisku) objects. This is the list of all known in-app purchase products that can grant this entitlement. Set in the Control Center.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.namiml.com/sdk-reference/namientitlementmanager/namientitlement.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
