View Source Dwolla.WebhookSubscription (dwolla v1.0.1)

Functions for webhook-subscriptions endpoint.

Link to this section Summary

Functions

Creates a webhook subscription.

Deletes a webhook subscription.

Gets a webhook subscription by id.

Lists webhook subscriptions.

Pauses a webhook subscription.

Resume a webhook subscription.

Lists webhooks for a given webhook subscription.

Link to this section Types

Specs

error() :: HTTPoison.Error.t() | Dwolla.Errors.t() | tuple()

Specs

id() :: String.t()

Specs

location() :: %{id: String.t()}

Specs

params() :: %{required(atom()) => any()}

Specs

t() :: %Dwolla.WebhookSubscription{
  created: String.t(),
  id: String.t(),
  paused: boolean(),
  url: String.t()
}

Specs

token() :: String.t()

Link to this section Functions

Specs

create(token(), map()) :: {:ok, location()} | {:error, error()}

Creates a webhook subscription.

Parameters

%{
  url: "http://myapplication.com/webhooks",
  secret: "s3cret"
}

Specs

delete(token(), id()) :: {:ok, t()} | {:error, error()}

Deletes a webhook subscription.

Specs

get(token(), id()) :: {:ok, t()} | {:error, error()}

Gets a webhook subscription by id.

Specs

list(token()) :: {:ok, [t()]} | {:error, error()}

Lists webhook subscriptions.

Specs

pause(token(), id()) :: {:ok, t()} | {:error, error()}

Pauses a webhook subscription.

Specs

resume(token(), id()) :: {:ok, t()} | {:error, error()}

Resume a webhook subscription.

Link to this function

webhooks(token, id, params \\ %{})

View Source

Specs

webhooks(token(), id(), params() | nil) ::
  {:ok, [Dwolla.Webhook.t()]} | {:error, error()}

Lists webhooks for a given webhook subscription.

Parameters (optional)

%{
  limit: 50,
  offset: 0
}