Skip to content

GetEntitlementDecisionRequest

Source code in docs_src/capo_appmonetization/types/get_entitlement_decision_request.py
class GetEntitlementDecisionRequest(TypedDict, closed=True):
    app_id: "capo_appmonetization.types.app_id.AppId"
    """The ID of the app."""
    user_id: "capo_appmonetization.types.user_id.UserId"
    """An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value."""
    event_type: "capo_appmonetization.types.source_event_type.SourceEventType"
    """The type of action the user is attempting, used to determine the applicable plan capability and quota. Use the same event type you will send on the event."""
    scope: "capo_appmonetization.types.request_scope.RequestScope"
    """The environment of the app that this operation applies to. Specify live to use the live app, or sandbox to use the app's isolated test environment."""
    quantity: "capo_appmonetization.types.quantity.Quantity"
    """The number of units the pending action will consume, as a non-negative decimal string (the same Quantity shape PutEvent uses). Send the real amount if known, otherwise your best upper estimate (for example a request's max tokens). Used when a metric counts events or sums or maxes the event quantity itself. The decision is DENY when usage already reached the limit, or when folding this event in would push it past (SUM and COUNT add the increment; MAX takes the larger of current usage and the increment)."""
    properties: NotRequired[
        "capo_appmonetization.types.event_properties.EventProperties"
    ]
    """The same event properties you will send on the event. Each metric's filter is applied to them, and a summed or maxed field value is read from them. Omit them or send {} when the event has none; a metric that sums or maxes a property then rejects the check, as PutEvent rejects the event. Do not include personally identifiable or otherwise sensitive data in these values."""

app_id instance-attribute

app_id: AppId

The ID of the app.

event_type instance-attribute

event_type: SourceEventType

The type of action the user is attempting, used to determine the applicable plan capability and quota. Use the same event type you will send on the event.

properties instance-attribute

properties: NotRequired[EventProperties]

The same event properties you will send on the event. Each metric's filter is applied to them, and a summed or maxed field value is read from them. Omit them or send {} when the event has none; a metric that sums or maxes a property then rejects the check, as PutEvent rejects the event. Do not include personally identifiable or otherwise sensitive data in these values.

quantity instance-attribute

quantity: Quantity

The number of units the pending action will consume, as a non-negative decimal string (the same Quantity shape PutEvent uses). Send the real amount if known, otherwise your best upper estimate (for example a request's max tokens). Used when a metric counts events or sums or maxes the event quantity itself. The decision is DENY when usage already reached the limit, or when folding this event in would push it past (SUM and COUNT add the increment; MAX takes the larger of current usage and the increment).

scope instance-attribute

scope: RequestScope

The environment of the app that this operation applies to. Specify live to use the live app, or sandbox to use the app's isolated test environment.

user_id instance-attribute

user_id: UserId

An opaque identifier that you assign to an end user. Do not include personally identifiable or otherwise sensitive data in this value.