Apruve v0.1.0 Apruve.WebhookEndpoint View Source

Module for Apruve webhook endpoints.

More information available at https://docs.apruve.com/v4.0/reference#webhookendpoints

Link to this section Summary

Functions

Get all webhook endpoints belonging to a merchant. By merchant id

Delete a webhook endpoint by merchant id and webhook endpoint id

WebhookEndpoint struct from JSON string

Get a single webhook endpoint by merchant id and webhook endpoint id

JSON string from WebhookEndpoint struct

Link to this section Types

Link to this type t() View Source
t() :: %Apruve.WebhookEndpoint{
  id: term(),
  merchant_id: term(),
  url: term(),
  version: term()
}
Link to this type webhook_endpoint_id() View Source
webhook_endpoint_id() :: String.t()

Link to this section Functions

Link to this function all_by_merchant_id(merchant_id, p_client_config \\ :from_app_config) View Source
all_by_merchant_id(
  Apruve.Merchant.merchant_id(),
  Apruve.ClientConfig.t() | :from_app_config
) :: {:ok, [t()]} | {:error, any()}

Get all webhook endpoints belonging to a merchant. By merchant id.

Link to this function create(webhook_endpoint, p_client_config \\ :from_app_config) View Source
create(t(), Apruve.ClientConfig.t() | :from_app_config) ::
  {:ok, t()} | {:error, any()}

Create a new webhook endpoint.

version should be “v4”

Link to this function delete(merchant_id, webhook_endpoint_id, p_client_config \\ :from_app_config) View Source
delete(
  Apruve.Merchant.merchant_id(),
  webhook_endpoint_id(),
  Apruve.ClientConfig.t() | :from_app_config
) :: :ok | {:error, any()}

Delete a webhook endpoint by merchant id and webhook endpoint id.

Link to this function from_json(json_string) View Source
from_json(String.t()) ::
  {:ok, t()} | {:error, :could_not_make_struct_from_json}

WebhookEndpoint struct from JSON string.

Link to this function get(merchant_id, webhook_endpoint_id, p_client_config \\ :from_app_config) View Source
get(
  Apruve.Merchant.merchant_id(),
  webhook_endpoint_id(),
  Apruve.ClientConfig.t() | :from_app_config
) :: {:ok, t()} | {:error, any()}

Get a single webhook endpoint by merchant id and webhook endpoint id.

Link to this function to_json(webhook_endpoint) View Source
to_json(%Apruve.WebhookEndpoint{
  id: term(),
  merchant_id: term(),
  url: term(),
  version: term()
}) :: {:ok, String.t()} | {:error, any()}

JSON string from WebhookEndpoint struct.