dwolla v1.0.1 Dwolla.Transfer View Source
Functions for transfers
endpoint.
Link to this section Summary
Functions
Cancels a transfer
Gets a transfer by id
Gets reason for a transfer's failure
Initiates a transfer
Link to this section Types
Link to this type
error()
View Source
error()
View Source
error() :: HTTPoison.Error.t() | Dwolla.Errors.t() | tuple()
error() :: HTTPoison.Error.t() | Dwolla.Errors.t() | tuple()
Link to this type
id()
View Source
id()
View Source
id() :: String.t()
id() :: String.t()
Link to this type
location()
View Source
location()
View Source
location() :: %{id: String.t()}
location() :: %{id: String.t()}
Link to this type
params() View Source
Link to this type
t()
View Source
t()
View Source
t() :: %Dwolla.Transfer{
amount: Dwolla.Transfer.Amount.t(),
can_cancel: boolean(),
created: String.t(),
dest_resource: String.t(),
dest_resource_id: String.t(),
id: String.t(),
metadata: Dwolla.Transfer.Metadata.t(),
source_funding_source_id: String.t(),
source_resource: String.t(),
source_resource_id: String.t(),
status: String.t()
}
t() :: %Dwolla.Transfer{ amount: Dwolla.Transfer.Amount.t(), can_cancel: boolean(), created: String.t(), dest_resource: String.t(), dest_resource_id: String.t(), id: String.t(), metadata: Dwolla.Transfer.Metadata.t(), source_funding_source_id: String.t(), source_resource: String.t(), source_resource_id: String.t(), status: String.t() }
Link to this type
token()
View Source
token()
View Source
token() :: String.t()
token() :: String.t()
Link to this section Functions
Link to this function
cancel(token, id)
View Source
cancel(token, id)
View Source
cancel(token(), id()) :: {:ok, Dwolla.Transfer.t()} | {:error, error()}
cancel(token(), id()) :: {:ok, Dwolla.Transfer.t()} | {:error, error()}
Cancels a transfer.
Link to this function
get(token, id)
View Source
get(token, id)
View Source
get(token(), id()) :: {:ok, Dwolla.Transfer.t()} | {:error, error()}
get(token(), id()) :: {:ok, Dwolla.Transfer.t()} | {:error, error()}
Gets a transfer by id.
Link to this function
get_transfer_failure_reason(token, id) View Source
Gets reason for a transfer's failure.
Link to this function
initiate(token, params, idempotency_key \\ nil) View Source
Initiates a transfer.
The parameters are verbose because of the many options available to the user
for setting the source and destination of the funds in the href
field.
Parameters
%{
_links: %{
source: %{
href: "https://api-sandbox.dwolla.com/funding-sources/..."
},
destination: %{
href: "https://api-sandbox.dwolla.com/funding-sources/..."
}
},
amount: %{
value: 100.00,
currency: "USD"
},
metadata: %{
vendor: "Acme Inc.",
note: "Invoice #12314"
}
}