PandaDoc.PhoenixController behaviour (pandadoc.com API v0.1.2) View Source
Implements a PhoenixController that can be easily wired up and used.
Examples
defmodule YourAppWeb.PandaDocController do
  use PandaDoc.PhoenixController
  def handle_document_change(id, status, _details) do
    id
    |> Documents.get_by_pandadoc_id!()
    |> Documents.update_document(%{status: status})
  end
  def handle_document_complete(id, pdf, status, _details) do
    id
    |> Documents.get_by_pandadoc_id!()
    |> Documents.update_document(%{data: pdf, status: status})
  end
endPut the following lines into your router.ex and configure the WebHook in the pandadoc portal.
  post "/callbacks/pandadoc", YourAppWeb.PandaDocController, :webhook        Link to this section Summary
Callbacks
Triggers when a PandaDoc document changed.
Triggers when a PandaDoc document has been completed/signed.
Link to this section Callbacks
Specs
Triggers when a PandaDoc document changed.
Specs
Triggers when a PandaDoc document has been completed/signed.