# Class LittleGhost::DecisionRequest

Documentation version: Edge

Canonical HTML: https://littleghostai.org/docs/LittleGhost/DecisionRequest.html

Carries the state, questions, and request controls passed to a decision
provider.

## Inheritance

`LittleGhost::DecisionRequest < Data`

## Attributes

<a id="attribute-i-cancellation_token"></a>
### `cancellation_token` (R)

Token the provider checks while the request runs.

<a id="attribute-i-deadline"></a>
### `deadline` (R)

Optional request deadline passed to the provider.

<a id="attribute-i-questions"></a>
### `questions` (R)

Frozen question declarations, each with a string `id`.

<a id="attribute-i-state"></a>
### `state` (R)

Application state evaluated by the provider.

## Class methods

<a id="method-c-new"></a>
### `.new`

```ruby
new(state:, questions:, cancellation_token: Support::CancellationToken.new, deadline: nil) -> DecisionRequest
```

Validates and freezes question declarations before a provider request.
