Skip to content

Commit

Permalink
Spec phone number types (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceful-james authored Dec 13, 2024
1 parent bd2d5bc commit 374db68
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/ex_phone_number/constants/phone_number_types.ex
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
defmodule ExPhoneNumber.Constants.PhoneNumberTypes do
@all_types [
:fixed_line,
:mobile,
:fixed_line_or_mobile,
:toll_free,
:premium_rate,
:shared_cost,
:voip,
:personal_number,
:pager,
:uan,
:voicemail,
:unknown
]

@type t :: unquote(Enum.reduce(@all_types, &{:|, [], [&1, &2]}))

@spec all_types() :: [t()]
def all_types, do: @all_types

def fixed_line(), do: :fixed_line

def mobile(), do: :mobile
Expand Down

0 comments on commit 374db68

Please sign in to comment.