View Source Dwolla.Customer (dwolla v1.0.3)
Functions for customers
endpoint.
Link to this section Summary
Functions
Creates a customer.
Creates a customer beneficial owner.
Creates a customer funding source.
Creates an unverified customer.
Creates a verified customer.
Gets a customer by id.
List beneficial owners
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
Specs
error() :: HTTPoison.Error.t() | Dwolla.Errors.t() | atom() | tuple()
Specs
id() :: String.t()
Specs
location() :: %{id: String.t()}
Specs
Specs
t() :: %Dwolla.Customer{ address1: String.t(), address2: String.t(), certify_beneficial_ownership: boolean(), city: String.t(), created: String.t(), email: String.t(), first_name: String.t(), id: String.t(), last_name: String.t(), phone: String.t(), postal_code: String.t(), state: String.t(), status: String.t(), type: String.t(), verify_beneficial_ownership: boolean() }
Specs
token() :: String.t()
Link to this section Functions
Specs
Creates a customer.
See Dwolla.Customer.create_unverified/2
and Dwolla.Customer.create_verified/2
.
Specs
Creates a customer beneficial owner.
Parameters
%{
first_name: "John",
last_name: "Smith",
date_of_birth: "1900-01-01",
ssn: "000-00-0000",
address: %{
address1: "1 Main St.",
address2: "Apt 1", # optional
city: "New York",
state_province_region: "NY",
postal_code: "10019",
country: "US
}
}
Specs
Creates a customer funding source.
Parameters
%{
routing_number: "222222226",
account_number: "123456789",
type: "checking",
name: "Ben's checking"
}
Specs
Creates an unverified customer.
Validates payload for required fields before calling Dwolla API.
Parameters
%{first_name: "Steve", last_name: "Rogers", email: "cap@example.com"}
Specs
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"
}
Specs
Gets a customer by id.
Specs
list_beneficial_owners(token(), id()) :: {:ok, [Dwolla.BeneficialOwner.t()]} | {:error, error()}
List beneficial owners
Specs
list_funding_sources(token(), id(), boolean()) :: {:ok, [Dwolla.FundingSource.t()]} | {:error, error()}
Lists a customer's funding sources.
Specs
Searches customer by first name, last name and email. Results paginated.
Parameters (optional)
%{limit: 50, offset: 0, search: "Steve"}
Specs
search_transfers(token(), id(), params()) :: {:ok, %{transfers: [Dwolla.Transfer.t()], total: integer()}} | {:error, error()}
Searchs a customer's transfers. Results paginated.
Parameters
%{start_date: "2017-04-01", end_date: "2017-04-30", status: "pending"}
Specs
Suspends a customer.
Specs
Updates a customer's metadata.
Specs
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"
}