Mercury.SafeRequests (mercury_client v1.0.0)

Copy Markdown View Source

The Mercury SAFEs API — Simple Agreements for Future Equity.

Summary

Functions

Downloads the SAFE agreement PDF, returning the raw bytes. GET /safe-requests/{id}/document

Returns a single SAFE request by ID. GET /safe-requests/{id}

Returns every SAFE request for the organisation (not paginated). GET /safe-requests

Functions

download_document(client, safe_id)

@spec download_document(client :: Mercury.Client.t(), safe_id :: String.t()) ::
  {:ok, binary()} | {:error, Exception.t()}

Downloads the SAFE agreement PDF, returning the raw bytes. GET /safe-requests/{id}/document

download_document!(client, safe_id)

@spec download_document!(client :: Mercury.Client.t(), safe_id :: String.t()) ::
  binary()

get(client, safe_id)

@spec get(client :: Mercury.Client.t(), safe_id :: String.t()) ::
  {:ok, Mercury.SafeRequest.t()} | {:error, Exception.t()}

Returns a single SAFE request by ID. GET /safe-requests/{id}

get!(client, safe_id)

@spec get!(client :: Mercury.Client.t(), safe_id :: String.t()) ::
  Mercury.SafeRequest.t()

list(client)

@spec list(client :: Mercury.Client.t()) ::
  {:ok, [Mercury.SafeRequest.t()]} | {:error, Exception.t()}

Returns every SAFE request for the organisation (not paginated). GET /safe-requests

list!(client)

@spec list!(client :: Mercury.Client.t()) :: [Mercury.SafeRequest.t()]