Removed esbuild and bumped to 0.1.1
This commit is contained in:
parent
390036bafb
commit
6b5f3676c8
31
README.md
31
README.md
|
@ -12,7 +12,7 @@ In just a few letters and numbers, the IBAN captures all of the country, bank, a
|
||||||
|
|
||||||
### Successfull case to parse IBAN
|
### Successfull case to parse IBAN
|
||||||
|
|
||||||
Parse string with valid formatted IBAN from supported country
|
#### Parse string with valid formatted IBAN from supported country
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
{:ok, iban} = "FI2112345600000785" |> IbanEx.Parser.parse()
|
{:ok, iban} = "FI2112345600000785" |> IbanEx.Parser.parse()
|
||||||
|
@ -20,22 +20,24 @@ IO.inspect(iban)
|
||||||
IbanEx.Iban.pretty(iban)
|
IbanEx.Iban.pretty(iban)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Response
|
#### Success case responses
|
||||||
|
|
||||||
%IbanEx.Iban{
|
```elixir
|
||||||
|
%IbanEx.Iban{
|
||||||
country_code: "FI",
|
country_code: "FI",
|
||||||
check_digits: "21",
|
check_digits: "21",
|
||||||
bank_code: "123456",
|
bank_code: "123456",
|
||||||
branch_code: nil,
|
branch_code: nil,
|
||||||
national_check: "5",
|
national_check: "5",
|
||||||
account_number: "0000078"
|
account_number: "0000078"
|
||||||
}
|
}
|
||||||
|
|
||||||
"FI 21 123456 0000078 5"
|
"FI 21 123456 0000078 5"
|
||||||
|
```
|
||||||
|
|
||||||
### Errors cases of IBAN parsing
|
### Errors cases of IBAN parsing
|
||||||
|
|
||||||
Parse strings with invalid formatted IBANs from unsupported and supported countries
|
#### Parse strings with invalid formatted IBANs from unsupported and supported countries
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
{:error, unsupported_country_code} = "AZ21NABZ00000000137010001944" |> IbanEx.Parser.parse()
|
{:error, unsupported_country_code} = "AZ21NABZ00000000137010001944" |> IbanEx.Parser.parse()
|
||||||
|
@ -48,22 +50,22 @@ IO.inspect(IbanEx.Error.message(invalid_length_code), label: invalid_length_code
|
||||||
IO.inspect(IbanEx.Error.message(invalid_checksum), label: invalid_checksum)
|
IO.inspect(IbanEx.Error.message(invalid_checksum), label: invalid_checksum)
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Response
|
#### Error cases response
|
||||||
|
|
||||||
unsupported_country_code: "Unsupported country code"
|
|
||||||
invalid_length: "IBAN violates the required length"
|
|
||||||
invalid_checksum: "IBAN's checksum is invalid"
|
|
||||||
|
|
||||||
|
```elixir
|
||||||
|
unsupported_country_code: "Unsupported country code"
|
||||||
|
invalid_length: "IBAN violates the required length"
|
||||||
|
invalid_checksum: "IBAN's checksum is invalid"
|
||||||
|
```
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
|
The package can be installed by adding `iban_ex` to your list of dependencies in `mix.exs`:
|
||||||
by adding `iban_ex` to your list of dependencies in `mix.exs`:
|
|
||||||
|
|
||||||
```elixir
|
```elixir
|
||||||
def deps do
|
def deps do
|
||||||
[
|
[
|
||||||
{:iban_ex, "~> 0.1.0"}
|
{:iban_ex, "~> 0.1.1"}
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
@ -71,4 +73,3 @@ end
|
||||||
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
|
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
|
||||||
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
|
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
|
||||||
be found at <https://hexdocs.pm/iban_ex>.
|
be found at <https://hexdocs.pm/iban_ex>.
|
||||||
|
|
||||||
|
|
3
mix.exs
3
mix.exs
|
@ -2,7 +2,7 @@ defmodule IbanEx.MixProject do
|
||||||
use Mix.Project
|
use Mix.Project
|
||||||
|
|
||||||
@source_url "https://g.tulz.dev/opensource/iban-ex"
|
@source_url "https://g.tulz.dev/opensource/iban-ex"
|
||||||
@version "0.1.0"
|
@version "0.1.1"
|
||||||
|
|
||||||
def project do
|
def project do
|
||||||
[
|
[
|
||||||
|
@ -68,7 +68,6 @@ defmodule IbanEx.MixProject do
|
||||||
{:ex_doc, ">= 0.0.0", only: ~w(dev test)a, runtime: false},
|
{:ex_doc, ">= 0.0.0", only: ~w(dev test)a, runtime: false},
|
||||||
{:sobelow, ">= 0.0.0", only: ~w(dev test)a, runtime: false},
|
{:sobelow, ">= 0.0.0", only: ~w(dev test)a, runtime: false},
|
||||||
{:mix_audit, ">= 0.0.0", only: ~w(dev test)a, runtime: false},
|
{:mix_audit, ">= 0.0.0", only: ~w(dev test)a, runtime: false},
|
||||||
{:esbuild, "~> 0.7.0", runtime: Mix.env() == :dev},
|
|
||||||
{:observer_cli, "~> 1.7.4", only: :dev, runtime: false},
|
{:observer_cli, "~> 1.7.4", only: :dev, runtime: false},
|
||||||
{:elixir_sense, github: "elixir-lsp/elixir_sense", only: ~w(dev)a}
|
{:elixir_sense, github: "elixir-lsp/elixir_sense", only: ~w(dev)a}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue