dwolla v1.0.1 Dwolla.WebhookSubscription View Source

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

Link to this type

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

Link to this type

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

Link to this type

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

Link to this section Functions

Link to this function

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

Creates a webhook subscription.

Parameters

%{
  url: "http://myapplication.com/webhooks",
  secret: "s3cret"
}
Link to this function

delete(token, id) View Source
delete(token(), id()) ::
  {:ok, Dwolla.WebhookSubscription.t()} | {:error, error()}

Deletes a webhook subscription.

Link to this function

get(token, id) View Source
get(token(), id()) ::
  {:ok, Dwolla.WebhookSubscription.t()} | {:error, error()}

Gets a webhook subscription by id.

Link to this function

list(token) View Source
list(token()) :: {:ok, [Dwolla.WebhookSubscription.t()]} | {:error, error()}

Lists webhook subscriptions.

Link to this function

pause(token, id) View Source
pause(token(), id()) ::
  {:ok, Dwolla.WebhookSubscription.t()} | {:error, error()}

Pauses a webhook subscription.

Link to this function

resume(token, id) View Source
resume(token(), id()) ::
  {:ok, Dwolla.WebhookSubscription.t()} | {:error, error()}

Resume a webhook subscription.

Link to this function

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

Lists webhooks for a given webhook subscription.

Parameters (optional)

%{
  limit: 50,
  offset: 0
}