SDK reference · Rails
acceptOffer
acceptOffer in @provenanceauth/rails/deals, Rails. The buyer's acceptance call: POST /v1/authorize/deals with the offer; resolves to the deal.
Signature
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
offerstringRequiredopts{ 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; }Required
Returns
Promise<{ object: "deal"; id: string; status: string; intent_token?: string; [k: string]: unknown }>
HTTP operation
Runs locally, with no request to the API.