dwolla v1.0.2 Dwolla.Customer View Source
Functions for customers
endpoint.
Link to this section Summary
Functions
Creates a customer
Creates a customer funding source
Creates an unverified customer
Creates a verified customer
Gets a customer by id
Lists a customer's funding sources
Searches customer by first name, last name and email. Results paginated
Searchs a customer's transfers. Results paginated
Suspends a customer
Updates a customer's metadata
Updates a customer to verified
status
Link to this section Types
error()
View Source
error() :: HTTPoison.Error.t() | Dwolla.Errors.t() | atom() | tuple()
error() :: HTTPoison.Error.t() | Dwolla.Errors.t() | atom() | tuple()
id()
View Source
id() :: String.t()
id() :: String.t()
location()
View Source
location() :: %{id: String.t()}
location() :: %{id: String.t()}
params() View Source
token()
View Source
token() :: String.t()
token() :: String.t()
Link to this section Functions
create(token, params) View Source
Creates a customer.
See Dwolla.Customer.create_unverified/2
and Dwolla.Customer.create_verified/2
.
create_funding_source(token, id, params) View Source
Creates a customer funding source.
Parameters
%{
routing_number: "222222226",
account_number: "123456789",
type: "checking",
name: "Ben's checking"
}
create_unverified(token, params) View Source
Creates an unverified customer.
Validates payload for required fields before calling Dwolla API.
Parameters
%{first_name: "Steve", last_name: "Rogers", email: "cap@example.com"}
create_verified(token, params) View Source
Creates a verified customer.
Validates payload for required fields before calling Dwolla API.
Parameters
%{
first_name: "Steve",
last_name: "Rogers",
email: "cap@example.com",
type: "personal",
address1: "1600 Pennsylvania Ave",
city: "Washington",
state: "DC",
postal_code: "20500",
date_of_birth: "1918-07-04",
ssn: "1776"
}
get(token, id)
View Source
get(token(), id()) :: {:ok, Dwolla.Customer.t()} | {:error, error()}
get(token(), id()) :: {:ok, Dwolla.Customer.t()} | {:error, error()}
Gets a customer by id.
list_funding_sources(token, id, removed \\ true)
View Source
list_funding_sources(token(), id(), boolean()) ::
{:ok, [Dwolla.FundingSource.t()]} | {:error, error()}
list_funding_sources(token(), id(), boolean()) :: {:ok, [Dwolla.FundingSource.t()]} | {:error, error()}
Lists a customer's funding sources.
search(token, params \\ %{})
View Source
search(token(), params()) :: {:ok, [Dwolla.Customer.t()]} | {:error, error()}
search(token(), params()) :: {:ok, [Dwolla.Customer.t()]} | {:error, error()}
Searches customer by first name, last name and email. Results paginated.
Parameters (optional)
%{limit: 50, offset: 0, search: "Steve"}
search_transfers(token, id, params \\ %{})
View Source
search_transfers(token(), id(), params()) ::
{:ok, [Dwolla.Transfer.t()]} | {:error, error()}
search_transfers(token(), id(), params()) :: {:ok, [Dwolla.Transfer.t()]} | {:error, error()}
Searchs a customer's transfers. Results paginated.
Parameters
%{startDate: "2017-04-01", endDate: "2017-04-30", status: "pending"}
suspend(token, id)
View Source
suspend(token(), id()) :: {:ok, Dwolla.Customer.t()} | {:error, error()}
suspend(token(), id()) :: {:ok, Dwolla.Customer.t()} | {:error, error()}
Suspends a customer.
update(token, id, params)
View Source
update(token(), id(), params()) ::
{:ok, Dwolla.Customer.t()} | {:error, error()}
update(token(), id(), params()) :: {:ok, Dwolla.Customer.t()} | {:error, error()}
Updates a customer's metadata.
verify(token, id, params)
View Source
verify(token(), id(), params()) ::
{:ok, Dwolla.Customer.t()} | {:error, error()}
verify(token(), id(), params()) :: {:ok, Dwolla.Customer.t()} | {:error, error()}
Updates a customer to verified
status.
Parameters
%{
first_name: "Steve",
last_name: "Rogers",
email: "cap@example.com",
address1: "1600 Pennsylvania Ave",
city: "Washington",
state: "DC",
postal_code: "20500",
date_of_birth: "1918-07-04",
ssn: "1776"
}