dwolla v1.0.1 Dwolla.Utils View Source
Utility functions.
Link to this section Summary
Functions
Encodes HTTP request
Handles HTTP response from Dwolla
Creates a idempotency header with an MD5 hash of the parameters submitted or provided binary value
Converts request payload to Dwolla-friendly camel case
Converts keys in Dwolla response to Elixir-friendly snake case
Validates parameter payload against a list of required fields
Link to this section Functions
Link to this function
encode_params(params, cred \\ %{}) View Source
Encodes HTTP request.
Link to this function
handle_resp(arg, schema)
View Source
handle_resp(arg, schema)
View Source
handle_resp(
{:ok, HTTPoison.Response.t()} | {:error, HTTPoison.Error.t()},
atom()
) :: {:ok, any()} | {:error, HTTPoison.Error.t() | Dwolla.Errors.t() | any()}
handle_resp( {:ok, HTTPoison.Response.t()} | {:error, HTTPoison.Error.t()}, atom() ) :: {:ok, any()} | {:error, HTTPoison.Error.t() | Dwolla.Errors.t() | any()}
Handles HTTP response from Dwolla.
Link to this function
idempotency_header(idempotency_key) View Source
Creates a idempotency header with an MD5 hash of the parameters submitted or provided binary value.
Link to this function
to_camel_case(payload) View Source
Converts request payload to Dwolla-friendly camel case.
Link to this function
to_snake_case(response) View Source
Converts keys in Dwolla response to Elixir-friendly snake case.
Link to this function
validate_params(params, fields) View Source
Validates parameter payload against a list of required fields.