Class: Onfido::CountryCodes

Inherits:
Object
  • Object
show all
Defined in:
lib/onfido/models/country_codes.rb

Constant Summary collapse

ABW =
"ABW".freeze
AFG =
"AFG".freeze
AGO =
"AGO".freeze
AIA =
"AIA".freeze
ALA =
"ALA".freeze
ALB =
"ALB".freeze
AND =
"AND".freeze
ARE =
"ARE".freeze
ARG =
"ARG".freeze
ARM =
"ARM".freeze
ASM =
"ASM".freeze
ATA =
"ATA".freeze
ATF =
"ATF".freeze
ATG =
"ATG".freeze
AUS =
"AUS".freeze
AUT =
"AUT".freeze
AZE =
"AZE".freeze
BDI =
"BDI".freeze
BEL =
"BEL".freeze
BEN =
"BEN".freeze
BES =
"BES".freeze
BFA =
"BFA".freeze
BGD =
"BGD".freeze
BGR =
"BGR".freeze
BHR =
"BHR".freeze
BHS =
"BHS".freeze
BIH =
"BIH".freeze
BLM =
"BLM".freeze
BLR =
"BLR".freeze
BLZ =
"BLZ".freeze
BMU =
"BMU".freeze
BOL =
"BOL".freeze
BRA =
"BRA".freeze
BRB =
"BRB".freeze
BRN =
"BRN".freeze
BTN =
"BTN".freeze
BVT =
"BVT".freeze
BWA =
"BWA".freeze
CAF =
"CAF".freeze
CAN =
"CAN".freeze
CCK =
"CCK".freeze
CHE =
"CHE".freeze
CHL =
"CHL".freeze
CHN =
"CHN".freeze
CIV =
"CIV".freeze
CMR =
"CMR".freeze
COD =
"COD".freeze
COG =
"COG".freeze
COK =
"COK".freeze
COL =
"COL".freeze
COM =
"COM".freeze
CPV =
"CPV".freeze
CRI =
"CRI".freeze
CUB =
"CUB".freeze
CUW =
"CUW".freeze
CXR =
"CXR".freeze
CYM =
"CYM".freeze
CYP =
"CYP".freeze
CZE =
"CZE".freeze
DEU =
"DEU".freeze
DJI =
"DJI".freeze
DMA =
"DMA".freeze
DNK =
"DNK".freeze
DOM =
"DOM".freeze
DZA =
"DZA".freeze
ECU =
"ECU".freeze
EGY =
"EGY".freeze
ERI =
"ERI".freeze
ESH =
"ESH".freeze
ESP =
"ESP".freeze
EST =
"EST".freeze
ETH =
"ETH".freeze
FIN =
"FIN".freeze
FJI =
"FJI".freeze
FLK =
"FLK".freeze
FRA =
"FRA".freeze
FRO =
"FRO".freeze
FSM =
"FSM".freeze
GAB =
"GAB".freeze
GBR =
"GBR".freeze
GEO =
"GEO".freeze
GGY =
"GGY".freeze
GHA =
"GHA".freeze
GIB =
"GIB".freeze
GIN =
"GIN".freeze
GLP =
"GLP".freeze
GMB =
"GMB".freeze
GNB =
"GNB".freeze
GNQ =
"GNQ".freeze
GRC =
"GRC".freeze
GRD =
"GRD".freeze
GRL =
"GRL".freeze
GTM =
"GTM".freeze
GUF =
"GUF".freeze
GUM =
"GUM".freeze
GUY =
"GUY".freeze
HKG =
"HKG".freeze
HMD =
"HMD".freeze
HND =
"HND".freeze
HRV =
"HRV".freeze
HTI =
"HTI".freeze
HUN =
"HUN".freeze
IDN =
"IDN".freeze
IMN =
"IMN".freeze
IND =
"IND".freeze
IOT =
"IOT".freeze
IRL =
"IRL".freeze
IRN =
"IRN".freeze
IRQ =
"IRQ".freeze
ISL =
"ISL".freeze
ISR =
"ISR".freeze
ITA =
"ITA".freeze
JAM =
"JAM".freeze
JEY =
"JEY".freeze
JOR =
"JOR".freeze
JPN =
"JPN".freeze
KAZ =
"KAZ".freeze
KEN =
"KEN".freeze
KGZ =
"KGZ".freeze
KHM =
"KHM".freeze
KIR =
"KIR".freeze
KNA =
"KNA".freeze
KOR =
"KOR".freeze
KWT =
"KWT".freeze
LAO =
"LAO".freeze
LBN =
"LBN".freeze
LBR =
"LBR".freeze
LBY =
"LBY".freeze
LCA =
"LCA".freeze
LIE =
"LIE".freeze
LKA =
"LKA".freeze
LSO =
"LSO".freeze
LTU =
"LTU".freeze
LUX =
"LUX".freeze
LVA =
"LVA".freeze
MAC =
"MAC".freeze
MAF =
"MAF".freeze
MAR =
"MAR".freeze
MCO =
"MCO".freeze
MDA =
"MDA".freeze
MDG =
"MDG".freeze
MDV =
"MDV".freeze
MEX =
"MEX".freeze
MHL =
"MHL".freeze
MKD =
"MKD".freeze
MLI =
"MLI".freeze
MLT =
"MLT".freeze
MMR =
"MMR".freeze
MNE =
"MNE".freeze
MNG =
"MNG".freeze
MNP =
"MNP".freeze
MOZ =
"MOZ".freeze
MRT =
"MRT".freeze
MSR =
"MSR".freeze
MTQ =
"MTQ".freeze
MUS =
"MUS".freeze
MWI =
"MWI".freeze
MYS =
"MYS".freeze
MYT =
"MYT".freeze
NAM =
"NAM".freeze
NCL =
"NCL".freeze
NER =
"NER".freeze
NFK =
"NFK".freeze
NGA =
"NGA".freeze
NIC =
"NIC".freeze
NIU =
"NIU".freeze
NLD =
"NLD".freeze
NOR =
"NOR".freeze
NPL =
"NPL".freeze
NRU =
"NRU".freeze
NZL =
"NZL".freeze
OMN =
"OMN".freeze
PAK =
"PAK".freeze
PAN =
"PAN".freeze
PCN =
"PCN".freeze
PER =
"PER".freeze
PHL =
"PHL".freeze
PLW =
"PLW".freeze
PNG =
"PNG".freeze
POL =
"POL".freeze
PRI =
"PRI".freeze
PRK =
"PRK".freeze
PRT =
"PRT".freeze
PRY =
"PRY".freeze
PSE =
"PSE".freeze
PYF =
"PYF".freeze
QAT =
"QAT".freeze
REU =
"REU".freeze
RKS =
"RKS".freeze
ROU =
"ROU".freeze
RUS =
"RUS".freeze
RWA =
"RWA".freeze
SAU =
"SAU".freeze
SDN =
"SDN".freeze
SEN =
"SEN".freeze
SGP =
"SGP".freeze
SGS =
"SGS".freeze
SHN =
"SHN".freeze
SJM =
"SJM".freeze
SLB =
"SLB".freeze
SLE =
"SLE".freeze
SLV =
"SLV".freeze
SMR =
"SMR".freeze
SOM =
"SOM".freeze
SPM =
"SPM".freeze
SRB =
"SRB".freeze
SSD =
"SSD".freeze
STP =
"STP".freeze
SUR =
"SUR".freeze
SVK =
"SVK".freeze
SVN =
"SVN".freeze
SWE =
"SWE".freeze
SWZ =
"SWZ".freeze
SXM =
"SXM".freeze
SYC =
"SYC".freeze
SYR =
"SYR".freeze
TCA =
"TCA".freeze
TCD =
"TCD".freeze
TGO =
"TGO".freeze
THA =
"THA".freeze
TJK =
"TJK".freeze
TKL =
"TKL".freeze
TKM =
"TKM".freeze
TLS =
"TLS".freeze
TON =
"TON".freeze
TTO =
"TTO".freeze
TUN =
"TUN".freeze
TUR =
"TUR".freeze
TUV =
"TUV".freeze
TWN =
"TWN".freeze
TZA =
"TZA".freeze
UGA =
"UGA".freeze
UKR =
"UKR".freeze
UMI =
"UMI".freeze
URY =
"URY".freeze
USA =
"USA".freeze
UZB =
"UZB".freeze
VAT =
"VAT".freeze
VCT =
"VCT".freeze
VEN =
"VEN".freeze
VGB =
"VGB".freeze
VIR =
"VIR".freeze
VNM =
"VNM".freeze
VUT =
"VUT".freeze
WLF =
"WLF".freeze
WSM =
"WSM".freeze
YEM =
"YEM".freeze
ZAF =
"ZAF".freeze
ZMB =
"ZMB".freeze
ZWE =
"ZWE".freeze
UNKNOWN_DEFAULT_OPEN_API =
"unknown_default_open_api".freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.all_varsObject



270
271
272
# File 'lib/onfido/models/country_codes.rb', line 270

def self.all_vars
  @all_vars ||= [ABW, AFG, AGO, AIA, ALA, ALB, AND, ARE, ARG, ARM, ASM, ATA, ATF, ATG, AUS, AUT, AZE, BDI, BEL, BEN, BES, BFA, BGD, BGR, BHR, BHS, BIH, BLM, BLR, BLZ, BMU, BOL, BRA, BRB, BRN, BTN, BVT, BWA, CAF, CAN, CCK, CHE, CHL, CHN, CIV, CMR, COD, COG, COK, COL, COM, CPV, CRI, CUB, CUW, CXR, CYM, CYP, CZE, DEU, DJI, DMA, DNK, DOM, DZA, ECU, EGY, ERI, ESH, ESP, EST, ETH, FIN, FJI, FLK, FRA, FRO, FSM, GAB, GBR, GEO, GGY, GHA, GIB, GIN, GLP, GMB, GNB, GNQ, GRC, GRD, GRL, GTM, GUF, GUM, GUY, HKG, HMD, HND, HRV, HTI, HUN, IDN, IMN, IND, IOT, IRL, IRN, IRQ, ISL, ISR, ITA, JAM, JEY, JOR, JPN, KAZ, KEN, KGZ, KHM, KIR, KNA, KOR, KWT, LAO, LBN, LBR, LBY, LCA, LIE, LKA, LSO, LTU, LUX, LVA, MAC, MAF, MAR, MCO, MDA, MDG, MDV, MEX, MHL, MKD, MLI, MLT, MMR, MNE, MNG, MNP, MOZ, MRT, MSR, MTQ, MUS, MWI, MYS, MYT, NAM, NCL, NER, NFK, NGA, NIC, NIU, NLD, NOR, NPL, NRU, NZL, OMN, PAK, PAN, PCN, PER, PHL, PLW, PNG, POL, PRI, PRK, PRT, PRY, PSE, PYF, QAT, REU, RKS, ROU, RUS, RWA, SAU, SDN, SEN, SGP, SGS, SHN, SJM, SLB, SLE, SLV, SMR, SOM, SPM, SRB, SSD, STP, SUR, SVK, SVN, SWE, SWZ, SXM, SYC, SYR, TCA, TCD, TGO, THA, TJK, TKL, TKM, TLS, TON, TTO, TUN, TUR, TUV, TWN, TZA, UGA, UKR, UMI, URY, USA, UZB, VAT, VCT, VEN, VGB, VIR, VNM, VUT, WLF, WSM, YEM, ZAF, ZMB, ZWE, UNKNOWN_DEFAULT_OPEN_API].freeze
end

.build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



277
278
279
# File 'lib/onfido/models/country_codes.rb', line 277

def self.build_from_hash(value)
  new.build_from_hash(value)
end

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



284
285
286
287
# File 'lib/onfido/models/country_codes.rb', line 284

def build_from_hash(value)
  return value if CountryCodes.all_vars.include?(value)
  raise "Invalid ENUM value #{value} for class #CountryCodes"
end