Deputy.Constants.Gender (Deputy v0.5.0)

Copy Markdown View Source

Integer codes for the intGender field used in employee creation.

Use the functions below to embed values in request payloads and the is_*/1 guards to pattern-match on responses.

Examples

iex> Deputy.Constants.Gender.male()
1

iex> Deputy.Constants.Gender.female()
2

iex> Deputy.Constants.Gender.unspecified()
3

iex> import Deputy.Constants.Gender
iex> is_male(1)
true

Summary

Functions

Female (intGender: 2)

Guard: matches the female gender code (2).

Guard: matches the male gender code (1).

Guard: matches the unspecified gender code (3).

Male (intGender: 1)

Not specified (intGender: 3)

Functions

female()

Female (intGender: 2)

is_female(value)

(macro)

Guard: matches the female gender code (2).

is_male(value)

(macro)

Guard: matches the male gender code (1).

is_unspecified(value)

(macro)

Guard: matches the unspecified gender code (3).

male()

Male (intGender: 1)

unspecified()

Not specified (intGender: 3)