View Source Money.Currency (Money v1.12.4)

Provides currency support to Money.

Some useful helper methods include:

A helper function exists for each currency using the lowercase three-character currency code.

examples

Examples

iex> Money.Currency.usd(100)
%Money{amount: 100, currency: :USD}

Link to this section Summary

Functions

Convenience method to create a Money object for the UAE Dirham (AED) currency.

Convenience method to create a Money object for the Afghani (AFN) currency.

Returns all the currencies

Convenience method to create a Money object for the Lek (ALL) currency.

Convenience method to create a Money object for the Armenian Dram (AMD) currency.

Convenience method to create a Money object for the Netherlands Antillian Guilder (ANG) currency.

Convenience method to create a Money object for the Kwanza (AOA) currency.

Convenience method to create a Money object for the Argentine Peso (ARS) currency.

Convenience method to create a Money object for the Australian Dollar (AUD) currency.

Convenience method to create a Money object for the Aruban Guilder (AWG) currency.

Convenience method to create a Money object for the Azerbaijanian Manat (AZN) currency.

Convenience method to create a Money object for the Convertible Marks (BAM) currency.

Convenience method to create a Money object for the Barbados Dollar (BBD) currency.

Convenience method to create a Money object for the Taka (BDT) currency.

Convenience method to create a Money object for the Bulgarian Lev (BGN) currency.

Convenience method to create a Money object for the Bahraini Dinar (BHD) currency.

Convenience method to create a Money object for the Burundi Franc (BIF) currency.

Convenience method to create a Money object for the Bermudian Dollar (customarily known as Bermuda Dollar) (BMD) currency.

Convenience method to create a Money object for the Brunei Dollar (BND) currency.

Convenience method to create a Money object for the Boliviano Mvdol (BOB) currency.

Convenience method to create a Money object for the Boliviano Mvdol (BOV) currency.

Convenience method to create a Money object for the Brazilian Real (BRL) currency.

Convenience method to create a Money object for the Bahamian Dollar (BSD) currency.

Convenience method to create a Money object for the Indian Rupee Ngultrum (BTN) currency.

Convenience method to create a Money object for the Pula (BWP) currency.

Convenience method to create a Money object for the Belarusian Ruble (BYN) currency.

Convenience method to create a Money object for the Belarusian Ruble (BYR) currency.

Convenience method to create a Money object for the Belize Dollar (BZD) currency.

Convenience method to create a Money object for the Canadian Dollar (CAD) currency.

Convenience method to create a Money object for the Congolese Franc (CDF) currency.

Convenience method to create a Money object for the Swiss Franc (CHF) currency.

Convenience method to create a Money object for the Chilean Peso Unidades de fomento (CLF) currency.

Convenience method to create a Money object for the Chilean Peso Unidades de fomento (CLP) currency.

Convenience method to create a Money object for the Yuan Renminbi (CNY) currency.

Convenience method to create a Money object for the Colombian Peso (COP) currency.

Convenience method to create a Money object for the Colombian Peso Unidad de Valor Real (COU) currency.

Convenience method to create a Money object for the Costa Rican Colon (CRC) currency.

Convenience method to create a Money object for the Cuban Peso Peso Convertible (CUC) currency.

Convenience method to create a Money object for the Cuban Peso Peso Convertible (CUP) currency.

Convenience method to create a Money object for the Cape Verde Escudo (CVE) currency.

Convenience method to create a Money object for the Czech Koruna (CZK) currency.

Convenience method to create a Money object for the Djibouti Franc (DJF) currency.

Convenience method to create a Money object for the Danish Krone (DKK) currency.

Convenience method to create a Money object for the Dominican Peso (DOP) currency.

Convenience method to create a Money object for the Algerian Dinar (DZD) currency.

Convenience method to create a Money object for the Kroon (EEK) currency.

Convenience method to create a Money object for the Egyptian Pound (EGP) currency.

Convenience method to create a Money object for the Nakfa (ERN) currency.

Convenience method to create a Money object for the Ethiopian Birr (ETB) currency.

Convenience method to create a Money object for the Euro (EUR) currency.

Returns true if a currency is defined

Returns the exponent of the currency or nil if it doesn’t exist.

Returns the exponent of the currency. An ArgumentError is raised if the currency doesn’t exist.

Convenience method to create a Money object for the Fiji Dollar (FJD) currency.

Convenience method to create a Money object for the Falkland Islands Pound (FKP) currency.

Convenience method to create a Money object for the Pound Sterling (GBP) currency.

Convenience method to create a Money object for the Lari (GEL) currency.

Returns a map with the name and symbol of the currency or nil if it doesn’t exist.

Returns a map with the name and symbol of the currency. An ArgumentError is raised if the currency doesn’t exist.

Convenience method to create a Money object for the Cedi (GHS) currency.

Convenience method to create a Money object for the Gibraltar Pound (GIP) currency.

Convenience method to create a Money object for the Dalasi (GMD) currency.

Convenience method to create a Money object for the Guinea Franc (GNF) currency.

Convenience method to create a Money object for the Quetzal (GTQ) currency.

Convenience method to create a Money object for the Guyana Dollar (GYD) currency.

Convenience method to create a Money object for the Hong Kong Dollar (HKD) currency.

Convenience method to create a Money object for the Lempira (HNL) currency.

Convenience method to create a Money object for the Croatian Kuna (HRK) currency.

Convenience method to create a Money object for the Gourde US Dollar (HTG) currency.

Convenience method to create a Money object for the Forint (HUF) currency.

Convenience method to create a Money object for the Rupiah (IDR) currency.

Convenience method to create a Money object for the New Israeli Sheqel (ILS) currency.

Convenience method to create a Money object for the Indian Rupee (INR) currency.

Convenience method to create a Money object for the Iraqi Dinar (IQD) currency.

Convenience method to create a Money object for the Iranian Rial (IRR) currency.

Convenience method to create a Money object for the Iceland Krona (ISK) currency.

Convenience method to create a Money object for the Jamaican Dollar (JMD) currency.

Convenience method to create a Money object for the Jordanian Dinar (JOD) currency.

Convenience method to create a Money object for the Yen (JPY) currency.

Convenience method to create a Money object for the Kenyan Shilling (KES) currency.

Convenience method to create a Money object for the Som (KGS) currency.

Convenience method to create a Money object for the Riel (KHR) currency.

Convenience method to create a Money object for the Comoro Franc (KMF) currency.

Convenience method to create a Money object for the North Korean Won (KPW) currency.

Convenience method to create a Money object for the Won (KRW) currency.

Convenience method to create a Money object for the Kuwaiti Dinar (KWD) currency.

Convenience method to create a Money object for the Cayman Islands Dollar (KYD) currency.

Convenience method to create a Money object for the Tenge (KZT) currency.

Convenience method to create a Money object for the Kip (LAK) currency.

Convenience method to create a Money object for the Lebanese Pound (LBP) currency.

Convenience method to create a Money object for the Sri Lanka Rupee (LKR) currency.

Convenience method to create a Money object for the Liberian Dollar (LRD) currency.

Convenience method to create a Money object for the Rand Loti (LSL) currency.

Convenience method to create a Money object for the Lithuanian Litas (LTL) currency.

Convenience method to create a Money object for the Latvian Lats (LVL) currency.

Convenience method to create a Money object for the Libyan Dinar (LYD) currency.

Convenience method to create a Money object for the Moroccan Dirham (MAD) currency.

Convenience method to create a Money object for the Moldovan Leu (MDL) currency.

Convenience method to create a Money object for the Malagasy Ariary (MGA) currency.

Convenience method to create a Money object for the Denar (MKD) currency.

Convenience method to create a Money object for the Kyat (MMK) currency.

Convenience method to create a Money object for the Tugrik (MNT) currency.

Convenience method to create a Money object for the Pataca (MOP) currency.

Convenience method to create a Money object for the Ouguiya (MRO) currency.

Convenience method to create a Money object for the Ouguiya (MRU) currency.

Convenience method to create a Money object for the Mauritius Rupee (MUR) currency.

Convenience method to create a Money object for the Rufiyaa (MVR) currency.

Convenience method to create a Money object for the Kwacha (MWK) currency.

Convenience method to create a Money object for the Mexican Peso (MXN) currency.

Convenience method to create a Money object for the Mexican Peso Mexican Unidad de Inversion (UDI) (MXV) currency.

Convenience method to create a Money object for the Malaysian Ringgit (MYR) currency.

Convenience method to create a Money object for the Metical (MZN) currency.

Convenience method to create a Money object for the Rand Namibia Dollar (NAD) currency.

Returns the name of the currency or nil if it doesn’t exist.

Returns the name of the currency. An ArgumentError is raised if the currency doesn’t exist.

Convenience method to create a Money object for the Naira (NGN) currency.

Convenience method to create a Money object for the Cordoba Oro (NIO) currency.

Convenience method to create a Money object for the Norwegian Krone (NOK) currency.

Convenience method to create a Money object for the Nepalese Rupee (NPR) currency.

Returns the number of the currency or nil if it doesn’t exist.

Returns the number of the currency. An ArgumentError is raised if the currency doesn’t exist.

Convenience method to create a Money object for the New Zealand Dollar (NZD) currency.

Convenience method to create a Money object for the Rial Omani (OMR) currency.

Convenience method to create a Money object for the Balboa US Dollar (PAB) currency.

Convenience method to create a Money object for the Nuevo Sol (PEN) currency.

Convenience method to create a Money object for the Kina (PGK) currency.

Convenience method to create a Money object for the Philippine Peso (PHP) currency.

Convenience method to create a Money object for the Pakistan Rupee (PKR) currency.

Convenience method to create a Money object for the Zloty (PLN) currency.

Convenience method to create a Money object for the Guarani (PYG) currency.

Convenience method to create a Money object for the Qatari Rial (QAR) currency.

Convenience method to create a Money object for the New Leu (RON) currency.

Convenience method to create a Money object for the Serbian Dinar (RSD) currency.

Convenience method to create a Money object for the Russian Ruble (RUB) currency.

Convenience method to create a Money object for the Rwanda Franc (RWF) currency.

Convenience method to create a Money object for the Saudi Riyal (SAR) currency.

Convenience method to create a Money object for the Solomon Islands Dollar (SBD) currency.

Convenience method to create a Money object for the Seychelles Rupee (SCR) currency.

Convenience method to create a Money object for the Sudanese Pound (SDG) currency.

Convenience method to create a Money object for the Swedish Krona (SEK) currency.

Convenience method to create a Money object for the Singapore Dollar (SGD) currency.

Convenience method to create a Money object for the Saint Helena Pound (SHP) currency.

Convenience method to create a Money object for the Leone (SLE) currency.

Convenience method to create a Money object for the Leone (SLL) currency.

Convenience method to create a Money object for the Somali Shilling (SOS) currency.

Convenience method to create a Money object for the Surinam Dollar (SRD) currency.

Convenience method to create a Money object for the South Sudanese Pound (SSP) currency.

Convenience method to create a Money object for the Dobra (STD) currency.

Convenience method to create a Money object for the Dobra (STN) currency.

Returns the sub_units_count of the currency. An ArgumentError is raised if the currency doesn’t exist.

Convenience method to create a Money object for the El Salvador Colon US Dollar (SVC) currency.

Returns the symbol of the currency or nil if it doesn’t exist.

Returns the symbol of the currency. An ArgumentError is raised if the currency doesn’t exist.

Convenience method to create a Money object for the Syrian Pound (SYP) currency.

Convenience method to create a Money object for the Lilangeni (SZL) currency.

Convenience method to create a Money object for the Baht (THB) currency.

Convenience method to create a Money object for the Somoni (TJS) currency.

Convenience method to create a Money object for the Manat (TMT) currency.

Convenience method to create a Money object for the Tunisian Dinar (TND) currency.

Returns the atom representation of the currency key An ArgumentError is raised if the currency doesn’t exist.

Convenience method to create a Money object for the Pa'anga (TOP) currency.

Convenience method to create a Money object for the Turkish Lira (TRY) currency.

Convenience method to create a Money object for the Trinidad and Tobago Dollar (TTD) currency.

Convenience method to create a Money object for the New Taiwan Dollar (TWD) currency.

Convenience method to create a Money object for the Tanzanian Shilling (TZS) currency.

Convenience method to create a Money object for the Hryvnia (UAH) currency.

Convenience method to create a Money object for the Uganda Shilling (UGX) currency.

Convenience method to create a Money object for the US Dollar (USD) currency.

Convenience method to create a Money object for the US Dollar next-day funds (USN) currency.

Convenience method to create a Money object for the Peso Uruguayo Uruguay Peso en Unidades Indexadas (UYI) currency.

Convenience method to create a Money object for the Peso Uruguayo Uruguay Peso en Unidades Indexadas (UYU) currency.

Convenience method to create a Money object for the Uzbekistan Sum (UZS) currency.

Convenience method to create a Money object for the Bolivar Fuerte (VEF) currency.

Convenience method to create a Money object for the Venezuelan Bolivar Soberano (VES) currency.

Convenience method to create a Money object for the Dong (VND) currency.

Convenience method to create a Money object for the Vatu (VUV) currency.

Convenience method to create a Money object for the Tala (WST) currency.

Convenience method to create a Money object for the CFA Franc BEAC (XAF) currency.

Convenience method to create a Money object for the Silver (XAG) currency.

Convenience method to create a Money object for the Gold (XAU) currency.

Convenience method to create a Money object for the Bond Markets Units European Composite Unit (EURCO) (XBA) currency.

Convenience method to create a Money object for the European Monetary Unit (E.M.U.-6) (XBB) currency.

Convenience method to create a Money object for the European Unit of Account 9(E.U.A.-9) (XBC) currency.

Convenience method to create a Money object for the European Unit of Account 17(E.U.A.-17) (XBD) currency.

Convenience method to create a Money object for the East Caribbean Dollar (XCD) currency.

Convenience method to create a Money object for the SDR (XDR) currency.

Convenience method to create a Money object for the UIC-Franc (XFU) currency.

Convenience method to create a Money object for the CFA Franc BCEAO (XOF) currency.

Convenience method to create a Money object for the Palladium (XPD) currency.

Convenience method to create a Money object for the CFP Franc (XPF) currency.

Convenience method to create a Money object for the Platinum (XPT) currency.

Convenience method to create a Money object for the Sucre (XSU) currency.

Convenience method to create a Money object for the Codes specifically reserved for testing purposes (XTS) currency.

Convenience method to create a Money object for the ADB Unit of Account (XUA) currency.

Convenience method to create a Money object for the Yemeni Rial (YER) currency.

Convenience method to create a Money object for the Rand (ZAR) currency.

Convenience method to create a Money object for the Zambian Kwacha (ZMW) currency.

Convenience method to create a Money object for the Zimbabwe Dollar (ZWL) currency.

Link to this section Types

@type index_type() :: Money.t() | String.t() | atom() | integer()

Link to this section Functions

Convenience method to create a Money object for the UAE Dirham (AED) currency.

examples

Examples

iex> Money.Currency.aed(100)
%Money{amount: 100, currency: :AED}

Convenience method to create a Money object for the Afghani (AFN) currency.

examples

Examples

iex> Money.Currency.afn(100)
%Money{amount: 100, currency: :AFN}
@spec all() :: map()

Returns all the currencies

examples

Examples

iex> Money.Currency.all |> Map.fetch!(:GBP)
%{name: "Pound Sterling", symbol: "£", exponent: 2, number: 826}

Convenience method to create a Money object for the Lek (ALL) currency.

examples

Examples

iex> Money.Currency.all(100)
%Money{amount: 100, currency: :ALL}

Convenience method to create a Money object for the Armenian Dram (AMD) currency.

examples

Examples

iex> Money.Currency.amd(100)
%Money{amount: 100, currency: :AMD}

Convenience method to create a Money object for the Netherlands Antillian Guilder (ANG) currency.

examples

Examples

iex> Money.Currency.ang(100)
%Money{amount: 100, currency: :ANG}

Convenience method to create a Money object for the Kwanza (AOA) currency.

examples

Examples

iex> Money.Currency.aoa(100)
%Money{amount: 100, currency: :AOA}

Convenience method to create a Money object for the Argentine Peso (ARS) currency.

examples

Examples

iex> Money.Currency.ars(100)
%Money{amount: 100, currency: :ARS}

Convenience method to create a Money object for the Australian Dollar (AUD) currency.

examples

Examples

iex> Money.Currency.aud(100)
%Money{amount: 100, currency: :AUD}

Convenience method to create a Money object for the Aruban Guilder (AWG) currency.

examples

Examples

iex> Money.Currency.awg(100)
%Money{amount: 100, currency: :AWG}

Convenience method to create a Money object for the Azerbaijanian Manat (AZN) currency.

examples

Examples

iex> Money.Currency.azn(100)
%Money{amount: 100, currency: :AZN}

Convenience method to create a Money object for the Convertible Marks (BAM) currency.

examples

Examples

iex> Money.Currency.bam(100)
%Money{amount: 100, currency: :BAM}

Convenience method to create a Money object for the Barbados Dollar (BBD) currency.

examples

Examples

iex> Money.Currency.bbd(100)
%Money{amount: 100, currency: :BBD}

Convenience method to create a Money object for the Taka (BDT) currency.

examples

Examples

iex> Money.Currency.bdt(100)
%Money{amount: 100, currency: :BDT}

Convenience method to create a Money object for the Bulgarian Lev (BGN) currency.

examples

Examples

iex> Money.Currency.bgn(100)
%Money{amount: 100, currency: :BGN}

Convenience method to create a Money object for the Bahraini Dinar (BHD) currency.

examples

Examples

iex> Money.Currency.bhd(100)
%Money{amount: 100, currency: :BHD}

Convenience method to create a Money object for the Burundi Franc (BIF) currency.

examples

Examples

iex> Money.Currency.bif(100)
%Money{amount: 100, currency: :BIF}

Convenience method to create a Money object for the Bermudian Dollar (customarily known as Bermuda Dollar) (BMD) currency.

examples

Examples

iex> Money.Currency.bmd(100)
%Money{amount: 100, currency: :BMD}

Convenience method to create a Money object for the Brunei Dollar (BND) currency.

examples

Examples

iex> Money.Currency.bnd(100)
%Money{amount: 100, currency: :BND}

Convenience method to create a Money object for the Boliviano Mvdol (BOB) currency.

examples

Examples

iex> Money.Currency.bob(100)
%Money{amount: 100, currency: :BOB}

Convenience method to create a Money object for the Boliviano Mvdol (BOV) currency.

examples

Examples

iex> Money.Currency.bov(100)
%Money{amount: 100, currency: :BOV}

Convenience method to create a Money object for the Brazilian Real (BRL) currency.

examples

Examples

iex> Money.Currency.brl(100)
%Money{amount: 100, currency: :BRL}

Convenience method to create a Money object for the Bahamian Dollar (BSD) currency.

examples

Examples

iex> Money.Currency.bsd(100)
%Money{amount: 100, currency: :BSD}

Convenience method to create a Money object for the Indian Rupee Ngultrum (BTN) currency.

examples

Examples

iex> Money.Currency.btn(100)
%Money{amount: 100, currency: :BTN}

Convenience method to create a Money object for the Pula (BWP) currency.

examples

Examples

iex> Money.Currency.bwp(100)
%Money{amount: 100, currency: :BWP}

Convenience method to create a Money object for the Belarusian Ruble (BYN) currency.

examples

Examples

iex> Money.Currency.byn(100)
%Money{amount: 100, currency: :BYN}

Convenience method to create a Money object for the Belarusian Ruble (BYR) currency.

examples

Examples

iex> Money.Currency.byr(100)
%Money{amount: 100, currency: :BYR}

Convenience method to create a Money object for the Belize Dollar (BZD) currency.

examples

Examples

iex> Money.Currency.bzd(100)
%Money{amount: 100, currency: :BZD}

Convenience method to create a Money object for the Canadian Dollar (CAD) currency.

examples

Examples

iex> Money.Currency.cad(100)
%Money{amount: 100, currency: :CAD}

Convenience method to create a Money object for the Congolese Franc (CDF) currency.

examples

Examples

iex> Money.Currency.cdf(100)
%Money{amount: 100, currency: :CDF}

Convenience method to create a Money object for the Swiss Franc (CHF) currency.

examples

Examples

iex> Money.Currency.chf(100)
%Money{amount: 100, currency: :CHF}

Convenience method to create a Money object for the Chilean Peso Unidades de fomento (CLF) currency.

examples

Examples

iex> Money.Currency.clf(100)
%Money{amount: 100, currency: :CLF}

Convenience method to create a Money object for the Chilean Peso Unidades de fomento (CLP) currency.

examples

Examples

iex> Money.Currency.clp(100)
%Money{amount: 100, currency: :CLP}

Convenience method to create a Money object for the Yuan Renminbi (CNY) currency.

examples

Examples

iex> Money.Currency.cny(100)
%Money{amount: 100, currency: :CNY}

Convenience method to create a Money object for the Colombian Peso (COP) currency.

examples

Examples

iex> Money.Currency.cop(100)
%Money{amount: 100, currency: :COP}

Convenience method to create a Money object for the Colombian Peso Unidad de Valor Real (COU) currency.

examples

Examples

iex> Money.Currency.cou(100)
%Money{amount: 100, currency: :COU}

Convenience method to create a Money object for the Costa Rican Colon (CRC) currency.

examples

Examples

iex> Money.Currency.crc(100)
%Money{amount: 100, currency: :CRC}

Convenience method to create a Money object for the Cuban Peso Peso Convertible (CUC) currency.

examples

Examples

iex> Money.Currency.cuc(100)
%Money{amount: 100, currency: :CUC}

Convenience method to create a Money object for the Cuban Peso Peso Convertible (CUP) currency.

examples

Examples

iex> Money.Currency.cup(100)
%Money{amount: 100, currency: :CUP}

Convenience method to create a Money object for the Cape Verde Escudo (CVE) currency.

examples

Examples

iex> Money.Currency.cve(100)
%Money{amount: 100, currency: :CVE}

Convenience method to create a Money object for the Czech Koruna (CZK) currency.

examples

Examples

iex> Money.Currency.czk(100)
%Money{amount: 100, currency: :CZK}

Convenience method to create a Money object for the Djibouti Franc (DJF) currency.

examples

Examples

iex> Money.Currency.djf(100)
%Money{amount: 100, currency: :DJF}

Convenience method to create a Money object for the Danish Krone (DKK) currency.

examples

Examples

iex> Money.Currency.dkk(100)
%Money{amount: 100, currency: :DKK}

Convenience method to create a Money object for the Dominican Peso (DOP) currency.

examples

Examples

iex> Money.Currency.dop(100)
%Money{amount: 100, currency: :DOP}

Convenience method to create a Money object for the Algerian Dinar (DZD) currency.

examples

Examples

iex> Money.Currency.dzd(100)
%Money{amount: 100, currency: :DZD}

Convenience method to create a Money object for the Kroon (EEK) currency.

examples

Examples

iex> Money.Currency.eek(100)
%Money{amount: 100, currency: :EEK}

Convenience method to create a Money object for the Egyptian Pound (EGP) currency.

examples

Examples

iex> Money.Currency.egp(100)
%Money{amount: 100, currency: :EGP}

Convenience method to create a Money object for the Nakfa (ERN) currency.

examples

Examples

iex> Money.Currency.ern(100)
%Money{amount: 100, currency: :ERN}

Convenience method to create a Money object for the Ethiopian Birr (ETB) currency.

examples

Examples

iex> Money.Currency.etb(100)
%Money{amount: 100, currency: :ETB}

Convenience method to create a Money object for the Euro (EUR) currency.

examples

Examples

iex> Money.Currency.eur(100)
%Money{amount: 100, currency: :EUR}
@spec exists?(index_type()) :: boolean()

Returns true if a currency is defined

examples

Examples

iex> Money.Currency.exists?(:USD)
true

iex> Money.Currency.exists?("USD")
true

iex> Money.Currency.exists?(:WRONG)
false
@spec exponent(index_type()) :: integer() | nil

Returns the exponent of the currency or nil if it doesn’t exist.

examples

Examples

iex> Money.Currency.exponent(:USD)
2

iex> Money.Currency.exponent(:WRONG)
nil
@spec exponent!(index_type()) :: integer()

Returns the exponent of the currency. An ArgumentError is raised if the currency doesn’t exist.

examples

Examples

iex> Money.Currency.exponent!(:USD)
2

iex> Money.Currency.exponent!(:WRONG)
** (ArgumentError) currency WRONG doesn’t exist

Convenience method to create a Money object for the Fiji Dollar (FJD) currency.

examples

Examples

iex> Money.Currency.fjd(100)
%Money{amount: 100, currency: :FJD}

Convenience method to create a Money object for the Falkland Islands Pound (FKP) currency.

examples

Examples

iex> Money.Currency.fkp(100)
%Money{amount: 100, currency: :FKP}

Convenience method to create a Money object for the Pound Sterling (GBP) currency.

examples

Examples

iex> Money.Currency.gbp(100)
%Money{amount: 100, currency: :GBP}

Convenience method to create a Money object for the Lari (GEL) currency.

examples

Examples

iex> Money.Currency.gel(100)
%Money{amount: 100, currency: :GEL}
@spec get(index_type()) :: map() | nil

Returns a map with the name and symbol of the currency or nil if it doesn’t exist.

examples

Examples

iex> Money.Currency.get(:USD)
%{name: "US Dollar", symbol: "$", exponent: 2, number: 840}

iex> Money.Currency.get(:WRONG)
nil

iex> Money.Currency.get(826)
%{name: "Pound Sterling", symbol: "£", exponent: 2, number: 826}
@spec get!(index_type()) :: map()

Returns a map with the name and symbol of the currency. An ArgumentError is raised if the currency doesn’t exist.

examples

Examples

iex> Money.Currency.get!(:USD)
%{name: "US Dollar", symbol: "$", exponent: 2, number: 840}

iex> Money.Currency.get!(:WRONG)
** (ArgumentError) currency WRONG doesn’t exist

Convenience method to create a Money object for the Cedi (GHS) currency.

examples

Examples

iex> Money.Currency.ghs(100)
%Money{amount: 100, currency: :GHS}

Convenience method to create a Money object for the Gibraltar Pound (GIP) currency.

examples

Examples

iex> Money.Currency.gip(100)
%Money{amount: 100, currency: :GIP}

Convenience method to create a Money object for the Dalasi (GMD) currency.

examples

Examples

iex> Money.Currency.gmd(100)
%Money{amount: 100, currency: :GMD}

Convenience method to create a Money object for the Guinea Franc (GNF) currency.

examples

Examples

iex> Money.Currency.gnf(100)
%Money{amount: 100, currency: :GNF}

Convenience method to create a Money object for the Quetzal (GTQ) currency.

examples

Examples

iex> Money.Currency.gtq(100)
%Money{amount: 100, currency: :GTQ}

Convenience method to create a Money object for the Guyana Dollar (GYD) currency.

examples

Examples

iex> Money.Currency.gyd(100)
%Money{amount: 100, currency: :GYD}

Convenience method to create a Money object for the Hong Kong Dollar (HKD) currency.

examples

Examples

iex> Money.Currency.hkd(100)
%Money{amount: 100, currency: :HKD}

Convenience method to create a Money object for the Lempira (HNL) currency.

examples

Examples

iex> Money.Currency.hnl(100)
%Money{amount: 100, currency: :HNL}

Convenience method to create a Money object for the Croatian Kuna (HRK) currency.

examples

Examples

iex> Money.Currency.hrk(100)
%Money{amount: 100, currency: :HRK}

Convenience method to create a Money object for the Gourde US Dollar (HTG) currency.

examples

Examples

iex> Money.Currency.htg(100)
%Money{amount: 100, currency: :HTG}

Convenience method to create a Money object for the Forint (HUF) currency.

examples

Examples

iex> Money.Currency.huf(100)
%Money{amount: 100, currency: :HUF}

Convenience method to create a Money object for the Rupiah (IDR) currency.

examples

Examples

iex> Money.Currency.idr(100)
%Money{amount: 100, currency: :IDR}

Convenience method to create a Money object for the New Israeli Sheqel (ILS) currency.

examples

Examples

iex> Money.Currency.ils(100)
%Money{amount: 100, currency: :ILS}

Convenience method to create a Money object for the Indian Rupee (INR) currency.

examples

Examples

iex> Money.Currency.inr(100)
%Money{amount: 100, currency: :INR}

Convenience method to create a Money object for the Iraqi Dinar (IQD) currency.

examples

Examples

iex> Money.Currency.iqd(100)
%Money{amount: 100, currency: :IQD}

Convenience method to create a Money object for the Iranian Rial (IRR) currency.

examples

Examples

iex> Money.Currency.irr(100)
%Money{amount: 100, currency: :IRR}

Convenience method to create a Money object for the Iceland Krona (ISK) currency.

examples

Examples

iex> Money.Currency.isk(100)
%Money{amount: 100, currency: :ISK}

Convenience method to create a Money object for the Jamaican Dollar (JMD) currency.

examples

Examples

iex> Money.Currency.jmd(100)
%Money{amount: 100, currency: :JMD}

Convenience method to create a Money object for the Jordanian Dinar (JOD) currency.

examples

Examples

iex> Money.Currency.jod(100)
%Money{amount: 100, currency: :JOD}

Convenience method to create a Money object for the Yen (JPY) currency.

examples

Examples

iex> Money.Currency.jpy(100)
%Money{amount: 100, currency: :JPY}

Convenience method to create a Money object for the Kenyan Shilling (KES) currency.

examples

Examples

iex> Money.Currency.kes(100)
%Money{amount: 100, currency: :KES}

Convenience method to create a Money object for the Som (KGS) currency.

examples

Examples

iex> Money.Currency.kgs(100)
%Money{amount: 100, currency: :KGS}

Convenience method to create a Money object for the Riel (KHR) currency.

examples

Examples

iex> Money.Currency.khr(100)
%Money{amount: 100, currency: :KHR}

Convenience method to create a Money object for the Comoro Franc (KMF) currency.

examples

Examples

iex> Money.Currency.kmf(100)
%Money{amount: 100, currency: :KMF}

Convenience method to create a Money object for the North Korean Won (KPW) currency.

examples

Examples

iex> Money.Currency.kpw(100)
%Money{amount: 100, currency: :KPW}

Convenience method to create a Money object for the Won (KRW) currency.

examples

Examples

iex> Money.Currency.krw(100)
%Money{amount: 100, currency: :KRW}

Convenience method to create a Money object for the Kuwaiti Dinar (KWD) currency.

examples

Examples

iex> Money.Currency.kwd(100)
%Money{amount: 100, currency: :KWD}

Convenience method to create a Money object for the Cayman Islands Dollar (KYD) currency.

examples

Examples

iex> Money.Currency.kyd(100)
%Money{amount: 100, currency: :KYD}

Convenience method to create a Money object for the Tenge (KZT) currency.

examples

Examples

iex> Money.Currency.kzt(100)
%Money{amount: 100, currency: :KZT}

Convenience method to create a Money object for the Kip (LAK) currency.

examples

Examples

iex> Money.Currency.lak(100)
%Money{amount: 100, currency: :LAK}

Convenience method to create a Money object for the Lebanese Pound (LBP) currency.

examples

Examples

iex> Money.Currency.lbp(100)
%Money{amount: 100, currency: :LBP}

Convenience method to create a Money object for the Sri Lanka Rupee (LKR) currency.

examples

Examples

iex> Money.Currency.lkr(100)
%Money{amount: 100, currency: :LKR}

Convenience method to create a Money object for the Liberian Dollar (LRD) currency.

examples

Examples

iex> Money.Currency.lrd(100)
%Money{amount: 100, currency: :LRD}

Convenience method to create a Money object for the Rand Loti (LSL) currency.

examples

Examples

iex> Money.Currency.lsl(100)
%Money{amount: 100, currency: :LSL}

Convenience method to create a Money object for the Lithuanian Litas (LTL) currency.

examples

Examples

iex> Money.Currency.ltl(100)
%Money{amount: 100, currency: :LTL}

Convenience method to create a Money object for the Latvian Lats (LVL) currency.

examples

Examples

iex> Money.Currency.lvl(100)
%Money{amount: 100, currency: :LVL}

Convenience method to create a Money object for the Libyan Dinar (LYD) currency.

examples

Examples

iex> Money.Currency.lyd(100)
%Money{amount: 100, currency: :LYD}

Convenience method to create a Money object for the Moroccan Dirham (MAD) currency.

examples

Examples

iex> Money.Currency.mad(100)
%Money{amount: 100, currency: :MAD}

Convenience method to create a Money object for the Moldovan Leu (MDL) currency.

examples

Examples

iex> Money.Currency.mdl(100)
%Money{amount: 100, currency: :MDL}

Convenience method to create a Money object for the Malagasy Ariary (MGA) currency.

examples

Examples

iex> Money.Currency.mga(100)
%Money{amount: 100, currency: :MGA}

Convenience method to create a Money object for the Denar (MKD) currency.

examples

Examples

iex> Money.Currency.mkd(100)
%Money{amount: 100, currency: :MKD}

Convenience method to create a Money object for the Kyat (MMK) currency.

examples

Examples

iex> Money.Currency.mmk(100)
%Money{amount: 100, currency: :MMK}

Convenience method to create a Money object for the Tugrik (MNT) currency.

examples

Examples

iex> Money.Currency.mnt(100)
%Money{amount: 100, currency: :MNT}

Convenience method to create a Money object for the Pataca (MOP) currency.

examples

Examples

iex> Money.Currency.mop(100)
%Money{amount: 100, currency: :MOP}

Convenience method to create a Money object for the Ouguiya (MRO) currency.

examples

Examples

iex> Money.Currency.mro(100)
%Money{amount: 100, currency: :MRO}

Convenience method to create a Money object for the Ouguiya (MRU) currency.

examples

Examples

iex> Money.Currency.mru(100)
%Money{amount: 100, currency: :MRU}

Convenience method to create a Money object for the Mauritius Rupee (MUR) currency.

examples

Examples

iex> Money.Currency.mur(100)
%Money{amount: 100, currency: :MUR}

Convenience method to create a Money object for the Rufiyaa (MVR) currency.

examples

Examples

iex> Money.Currency.mvr(100)
%Money{amount: 100, currency: :MVR}

Convenience method to create a Money object for the Kwacha (MWK) currency.

examples

Examples

iex> Money.Currency.mwk(100)
%Money{amount: 100, currency: :MWK}

Convenience method to create a Money object for the Mexican Peso (MXN) currency.

examples

Examples

iex> Money.Currency.mxn(100)
%Money{amount: 100, currency: :MXN}

Convenience method to create a Money object for the Mexican Peso Mexican Unidad de Inversion (UDI) (MXV) currency.

examples

Examples

iex> Money.Currency.mxv(100)
%Money{amount: 100, currency: :MXV}

Convenience method to create a Money object for the Malaysian Ringgit (MYR) currency.

examples

Examples

iex> Money.Currency.myr(100)
%Money{amount: 100, currency: :MYR}

Convenience method to create a Money object for the Metical (MZN) currency.

examples

Examples

iex> Money.Currency.mzn(100)
%Money{amount: 100, currency: :MZN}

Convenience method to create a Money object for the Rand Namibia Dollar (NAD) currency.

examples

Examples

iex> Money.Currency.nad(100)
%Money{amount: 100, currency: :NAD}
@spec name(index_type()) :: String.t() | nil

Returns the name of the currency or nil if it doesn’t exist.

examples

Examples

iex> Money.Currency.name(:USD)
"US Dollar"

iex> Money.Currency.name(:WRONG)
nil
@spec name!(index_type()) :: String.t()

Returns the name of the currency. An ArgumentError is raised if the currency doesn’t exist.

examples

Examples

iex> Money.Currency.name!(:USD)
"US Dollar"

iex> Money.Currency.name!(:WRONG)
** (ArgumentError) currency WRONG doesn’t exist

Convenience method to create a Money object for the Naira (NGN) currency.

examples

Examples

iex> Money.Currency.ngn(100)
%Money{amount: 100, currency: :NGN}

Convenience method to create a Money object for the Cordoba Oro (NIO) currency.

examples

Examples

iex> Money.Currency.nio(100)
%Money{amount: 100, currency: :NIO}

Convenience method to create a Money object for the Norwegian Krone (NOK) currency.

examples

Examples

iex> Money.Currency.nok(100)
%Money{amount: 100, currency: :NOK}

Convenience method to create a Money object for the Nepalese Rupee (NPR) currency.

examples

Examples

iex> Money.Currency.npr(100)
%Money{amount: 100, currency: :NPR}
@spec number(index_type()) :: integer() | nil

Returns the number of the currency or nil if it doesn’t exist.

examples

Examples

iex> Money.Currency.number(:USD)
840

iex> Money.Currency.number(:WRONG)
nil
@spec number!(index_type()) :: integer()

Returns the number of the currency. An ArgumentError is raised if the currency doesn’t exist.

examples

Examples

iex> Money.Currency.number!(:EUR)
978

iex> Money.Currency.exponent!(:WRONG)
** (ArgumentError) currency WRONG doesn’t exist

Convenience method to create a Money object for the New Zealand Dollar (NZD) currency.

examples

Examples

iex> Money.Currency.nzd(100)
%Money{amount: 100, currency: :NZD}

Convenience method to create a Money object for the Rial Omani (OMR) currency.

examples

Examples

iex> Money.Currency.omr(100)
%Money{amount: 100, currency: :OMR}

Convenience method to create a Money object for the Balboa US Dollar (PAB) currency.

examples

Examples

iex> Money.Currency.pab(100)
%Money{amount: 100, currency: :PAB}

Convenience method to create a Money object for the Nuevo Sol (PEN) currency.

examples

Examples

iex> Money.Currency.pen(100)
%Money{amount: 100, currency: :PEN}

Convenience method to create a Money object for the Kina (PGK) currency.

examples

Examples

iex> Money.Currency.pgk(100)
%Money{amount: 100, currency: :PGK}

Convenience method to create a Money object for the Philippine Peso (PHP) currency.

examples

Examples

iex> Money.Currency.php(100)
%Money{amount: 100, currency: :PHP}

Convenience method to create a Money object for the Pakistan Rupee (PKR) currency.

examples

Examples

iex> Money.Currency.pkr(100)
%Money{amount: 100, currency: :PKR}

Convenience method to create a Money object for the Zloty (PLN) currency.

examples

Examples

iex> Money.Currency.pln(100)
%Money{amount: 100, currency: :PLN}

Convenience method to create a Money object for the Guarani (PYG) currency.

examples

Examples

iex> Money.Currency.pyg(100)
%Money{amount: 100, currency: :PYG}

Convenience method to create a Money object for the Qatari Rial (QAR) currency.

examples

Examples

iex> Money.Currency.qar(100)
%Money{amount: 100, currency: :QAR}

Convenience method to create a Money object for the New Leu (RON) currency.

examples

Examples

iex> Money.Currency.ron(100)
%Money{amount: 100, currency: :RON}

Convenience method to create a Money object for the Serbian Dinar (RSD) currency.

examples

Examples

iex> Money.Currency.rsd(100)
%Money{amount: 100, currency: :RSD}

Convenience method to create a Money object for the Russian Ruble (RUB) currency.

examples

Examples

iex> Money.Currency.rub(100)
%Money{amount: 100, currency: :RUB}

Convenience method to create a Money object for the Rwanda Franc (RWF) currency.

examples

Examples

iex> Money.Currency.rwf(100)
%Money{amount: 100, currency: :RWF}

Convenience method to create a Money object for the Saudi Riyal (SAR) currency.

examples

Examples

iex> Money.Currency.sar(100)
%Money{amount: 100, currency: :SAR}

Convenience method to create a Money object for the Solomon Islands Dollar (SBD) currency.

examples

Examples

iex> Money.Currency.sbd(100)
%Money{amount: 100, currency: :SBD}

Convenience method to create a Money object for the Seychelles Rupee (SCR) currency.

examples

Examples

iex> Money.Currency.scr(100)
%Money{amount: 100, currency: :SCR}

Convenience method to create a Money object for the Sudanese Pound (SDG) currency.

examples

Examples

iex> Money.Currency.sdg(100)
%Money{amount: 100, currency: :SDG}

Convenience method to create a Money object for the Swedish Krona (SEK) currency.

examples

Examples

iex> Money.Currency.sek(100)
%Money{amount: 100, currency: :SEK}

Convenience method to create a Money object for the Singapore Dollar (SGD) currency.

examples

Examples

iex> Money.Currency.sgd(100)
%Money{amount: 100, currency: :SGD}

Convenience method to create a Money object for the Saint Helena Pound (SHP) currency.

examples

Examples

iex> Money.Currency.shp(100)
%Money{amount: 100, currency: :SHP}

Convenience method to create a Money object for the Leone (SLE) currency.

examples

Examples

iex> Money.Currency.sle(100)
%Money{amount: 100, currency: :SLE}

Convenience method to create a Money object for the Leone (SLL) currency.

examples

Examples

iex> Money.Currency.sll(100)
%Money{amount: 100, currency: :SLL}

Convenience method to create a Money object for the Somali Shilling (SOS) currency.

examples

Examples

iex> Money.Currency.sos(100)
%Money{amount: 100, currency: :SOS}

Convenience method to create a Money object for the Surinam Dollar (SRD) currency.

examples

Examples

iex> Money.Currency.srd(100)
%Money{amount: 100, currency: :SRD}

Convenience method to create a Money object for the South Sudanese Pound (SSP) currency.

examples

Examples

iex> Money.Currency.ssp(100)
%Money{amount: 100, currency: :SSP}

Convenience method to create a Money object for the Dobra (STD) currency.

examples

Examples

iex> Money.Currency.std(100)
%Money{amount: 100, currency: :STD}

Convenience method to create a Money object for the Dobra (STN) currency.

examples

Examples

iex> Money.Currency.stn(100)
%Money{amount: 100, currency: :STN}
Link to this function

sub_units_count!(currency)

View Source
@spec sub_units_count!(index_type()) :: integer()

Returns the sub_units_count of the currency. An ArgumentError is raised if the currency doesn’t exist.

examples

Examples

iex> Money.Currency.sub_units_count!(:USD)
100

iex> Money.Currency.sub_units_count!(:JPY)
1

iex> Money.Currency.sub_units_count!(:WRONG)
** (ArgumentError) currency WRONG doesn’t exist

Convenience method to create a Money object for the El Salvador Colon US Dollar (SVC) currency.

examples

Examples

iex> Money.Currency.svc(100)
%Money{amount: 100, currency: :SVC}
@spec symbol(index_type()) :: String.t() | nil

Returns the symbol of the currency or nil if it doesn’t exist.

examples

Examples

iex> Money.Currency.symbol(:USD)
"$"

iex> Money.Currency.symbol(:WRONG)
nil
@spec symbol!(index_type()) :: String.t()

Returns the symbol of the currency. An ArgumentError is raised if the currency doesn’t exist.

examples

Examples

iex> Money.Currency.symbol!(:USD)
"$"

iex> Money.Currency.symbol!(:WRONG)
** (ArgumentError) currency WRONG doesn’t exist

Convenience method to create a Money object for the Syrian Pound (SYP) currency.

examples

Examples

iex> Money.Currency.syp(100)
%Money{amount: 100, currency: :SYP}

Convenience method to create a Money object for the Lilangeni (SZL) currency.

examples

Examples

iex> Money.Currency.szl(100)
%Money{amount: 100, currency: :SZL}

Convenience method to create a Money object for the Baht (THB) currency.

examples

Examples

iex> Money.Currency.thb(100)
%Money{amount: 100, currency: :THB}

Convenience method to create a Money object for the Somoni (TJS) currency.

examples

Examples

iex> Money.Currency.tjs(100)
%Money{amount: 100, currency: :TJS}

Convenience method to create a Money object for the Manat (TMT) currency.

examples

Examples

iex> Money.Currency.tmt(100)
%Money{amount: 100, currency: :TMT}

Convenience method to create a Money object for the Tunisian Dinar (TND) currency.

examples

Examples

iex> Money.Currency.tnd(100)
%Money{amount: 100, currency: :TND}
@spec to_atom(index_type()) :: atom()

Returns the atom representation of the currency key An ArgumentError is raised if the currency doesn’t exist.

examples

Examples

iex> Money.Currency.to_atom("usd")
:USD

iex> Money.Currency.to_atom(:WRONG)
** (ArgumentError) currency WRONG doesn’t exist

Convenience method to create a Money object for the Pa'anga (TOP) currency.

examples

Examples

iex> Money.Currency.top(100)
%Money{amount: 100, currency: :TOP}

Convenience method to create a Money object for the Turkish Lira (TRY) currency.

examples

Examples

iex> Money.Currency.try(100)
%Money{amount: 100, currency: :TRY}

Convenience method to create a Money object for the Trinidad and Tobago Dollar (TTD) currency.

examples

Examples

iex> Money.Currency.ttd(100)
%Money{amount: 100, currency: :TTD}

Convenience method to create a Money object for the New Taiwan Dollar (TWD) currency.

examples

Examples

iex> Money.Currency.twd(100)
%Money{amount: 100, currency: :TWD}

Convenience method to create a Money object for the Tanzanian Shilling (TZS) currency.

examples

Examples

iex> Money.Currency.tzs(100)
%Money{amount: 100, currency: :TZS}

Convenience method to create a Money object for the Hryvnia (UAH) currency.

examples

Examples

iex> Money.Currency.uah(100)
%Money{amount: 100, currency: :UAH}

Convenience method to create a Money object for the Uganda Shilling (UGX) currency.

examples

Examples

iex> Money.Currency.ugx(100)
%Money{amount: 100, currency: :UGX}

Convenience method to create a Money object for the US Dollar (USD) currency.

examples

Examples

iex> Money.Currency.usd(100)
%Money{amount: 100, currency: :USD}

Convenience method to create a Money object for the US Dollar next-day funds (USN) currency.

examples

Examples

iex> Money.Currency.usn(100)
%Money{amount: 100, currency: :USN}

Convenience method to create a Money object for the Peso Uruguayo Uruguay Peso en Unidades Indexadas (UYI) currency.

examples

Examples

iex> Money.Currency.uyi(100)
%Money{amount: 100, currency: :UYI}

Convenience method to create a Money object for the Peso Uruguayo Uruguay Peso en Unidades Indexadas (UYU) currency.

examples

Examples

iex> Money.Currency.uyu(100)
%Money{amount: 100, currency: :UYU}

Convenience method to create a Money object for the Uzbekistan Sum (UZS) currency.

examples

Examples

iex> Money.Currency.uzs(100)
%Money{amount: 100, currency: :UZS}

Convenience method to create a Money object for the Bolivar Fuerte (VEF) currency.

examples

Examples

iex> Money.Currency.vef(100)
%Money{amount: 100, currency: :VEF}

Convenience method to create a Money object for the Venezuelan Bolivar Soberano (VES) currency.

examples

Examples

iex> Money.Currency.ves(100)
%Money{amount: 100, currency: :VES}

Convenience method to create a Money object for the Dong (VND) currency.

examples

Examples

iex> Money.Currency.vnd(100)
%Money{amount: 100, currency: :VND}

Convenience method to create a Money object for the Vatu (VUV) currency.

examples

Examples

iex> Money.Currency.vuv(100)
%Money{amount: 100, currency: :VUV}

Convenience method to create a Money object for the Tala (WST) currency.

examples

Examples

iex> Money.Currency.wst(100)
%Money{amount: 100, currency: :WST}

Convenience method to create a Money object for the CFA Franc BEAC (XAF) currency.

examples

Examples

iex> Money.Currency.xaf(100)
%Money{amount: 100, currency: :XAF}

Convenience method to create a Money object for the Silver (XAG) currency.

examples

Examples

iex> Money.Currency.xag(100)
%Money{amount: 100, currency: :XAG}

Convenience method to create a Money object for the Gold (XAU) currency.

examples

Examples

iex> Money.Currency.xau(100)
%Money{amount: 100, currency: :XAU}

Convenience method to create a Money object for the Bond Markets Units European Composite Unit (EURCO) (XBA) currency.

examples

Examples

iex> Money.Currency.xba(100)
%Money{amount: 100, currency: :XBA}

Convenience method to create a Money object for the European Monetary Unit (E.M.U.-6) (XBB) currency.

examples

Examples

iex> Money.Currency.xbb(100)
%Money{amount: 100, currency: :XBB}

Convenience method to create a Money object for the European Unit of Account 9(E.U.A.-9) (XBC) currency.

examples

Examples

iex> Money.Currency.xbc(100)
%Money{amount: 100, currency: :XBC}

Convenience method to create a Money object for the European Unit of Account 17(E.U.A.-17) (XBD) currency.

examples

Examples

iex> Money.Currency.xbd(100)
%Money{amount: 100, currency: :XBD}

Convenience method to create a Money object for the East Caribbean Dollar (XCD) currency.

examples

Examples

iex> Money.Currency.xcd(100)
%Money{amount: 100, currency: :XCD}

Convenience method to create a Money object for the SDR (XDR) currency.

examples

Examples

iex> Money.Currency.xdr(100)
%Money{amount: 100, currency: :XDR}

Convenience method to create a Money object for the UIC-Franc (XFU) currency.

examples

Examples

iex> Money.Currency.xfu(100)
%Money{amount: 100, currency: :XFU}

Convenience method to create a Money object for the CFA Franc BCEAO (XOF) currency.

examples

Examples

iex> Money.Currency.xof(100)
%Money{amount: 100, currency: :XOF}

Convenience method to create a Money object for the Palladium (XPD) currency.

examples

Examples

iex> Money.Currency.xpd(100)
%Money{amount: 100, currency: :XPD}

Convenience method to create a Money object for the CFP Franc (XPF) currency.

examples

Examples

iex> Money.Currency.xpf(100)
%Money{amount: 100, currency: :XPF}

Convenience method to create a Money object for the Platinum (XPT) currency.

examples

Examples

iex> Money.Currency.xpt(100)
%Money{amount: 100, currency: :XPT}

Convenience method to create a Money object for the Sucre (XSU) currency.

examples

Examples

iex> Money.Currency.xsu(100)
%Money{amount: 100, currency: :XSU}

Convenience method to create a Money object for the Codes specifically reserved for testing purposes (XTS) currency.

examples

Examples

iex> Money.Currency.xts(100)
%Money{amount: 100, currency: :XTS}

Convenience method to create a Money object for the ADB Unit of Account (XUA) currency.

examples

Examples

iex> Money.Currency.xua(100)
%Money{amount: 100, currency: :XUA}

Convenience method to create a Money object for the Yemeni Rial (YER) currency.

examples

Examples

iex> Money.Currency.yer(100)
%Money{amount: 100, currency: :YER}

Convenience method to create a Money object for the Rand (ZAR) currency.

examples

Examples

iex> Money.Currency.zar(100)
%Money{amount: 100, currency: :ZAR}

Convenience method to create a Money object for the Zambian Kwacha (ZMW) currency.

examples

Examples

iex> Money.Currency.zmw(100)
%Money{amount: 100, currency: :ZMW}

Convenience method to create a Money object for the Zimbabwe Dollar (ZWL) currency.

examples

Examples

iex> Money.Currency.zwl(100)
%Money{amount: 100, currency: :ZWL}