# acceptOffer

acceptOffer in @provenanceauth/rails/deals, Rails. The buyer's acceptance call: `POST /v1/authorize/deals` with the offer; resolves to the deal.

## Signature

```ts
acceptOffer(offer: string, opts: { apiBase: string; apiKey: string; agent_session_id: string; agent_id?: string; grant_id?: string; mandate_token?: string; purpose?: string; require_seller_person?: boolean; fetch?: typeof fetch; idempotencyKey?: string; }): Promise<{ object: "deal"; id: string; status: string; intent_token?: string; [k: string]: unknown }>
```

## Parameters

- `offer` (string)
- `opts` ({ apiBase: string; apiKey: string; agent_session_id: string; agent_id?: string; grant_id?: string; mandate_token?: string; purpose?: string; require_seller_person?: boolean; fetch?: typeof fetch; idempotencyKey?: string; })

## Returns

`Promise<{ object: "deal"; id: string; status: string; intent_token?: string; [k: string]: unknown }>`

Runs locally, with no request to the API.
