bran v0.2.0 BRAN View Source

Documentation for BRAN.

Link to this section Summary

Functions

validate Returns a tuple with {:ok, :valid} or {:error, :reason}, after checking if the combination of bank_code, agency_number, account_number and digit is valid

Link to this section Functions

Link to this function

validate(bank_code, agency_code, account_with_digit)

View Source

Specs

validate(binary(), binary(), binary()) ::
  {:error,
   :invalid_account_number_length
   | :invalid_account_type
   | :invalid_agency_code_length
   | :not_supported
   | :not_valid}
  | {:ok, :valid}
Link to this function

validate(bank_code, agency_code, account_number, digit)

View Source

Specs

validate(String.t(), String.t(), String.t(), String.t() | Integer.t()) ::
  {:error,
   :invalid_account_number_length
   | :invalid_account_type
   | :invalid_agency_code_length
   | :not_supported
   | :not_valid}
  | {:ok, :valid}

validate Returns a tuple with {:ok, :valid} or {:error, :reason}, after checking if the combination of bank_code, agency_number, account_number and digit is valid

Examples

iex> BRAN.validate("341","2545", "02366", 1)