country_with_currency 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b006d4474b7b4ce132faaeb1601c931fe99173f0
4
+ data.tar.gz: 55b8b7a3e1a4893c605411f37add509b454c401e
5
+ SHA512:
6
+ metadata.gz: 1faf220956bd53fa6959abc97ae36673d55b5f3c8430a8d5c4c5d040517c6bbc7f01deeb65a05065eab660ea10319c37e2f29d9c1bf869bba5688d6c6289b73b
7
+ data.tar.gz: 37a5fff0432d8f96e481c4ebbaefba836dc669e82b4f2f73d7de4c1a0c2bc48748251714ca8e0f044817c7cf33d02d58fb45ca79fdf4dec83dd752b5adeeed1c
data/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ /nbproject
19
+ .rvmrc
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --drb
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in country_with_currency.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Diganta Mandal
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # CountryWithCurrency
2
+
3
+ Provides a helper to get a country list along with ISO 3166-1 code, country number, currency code and currency symbol by following ISO 3166 country list.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'country_with_currency'
10
+
11
+ And then execute:
12
+
13
+ $ bundle install
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install country_with_currency
18
+
19
+ ## Basic Usage
20
+
21
+ To get all countries:
22
+
23
+ Country.all
24
+ => [#<Country:0xa1b6e80 @number="004", @iso="AFG", @currency="AFN", @name="Afghanistan", @symbol="Af">,...]
25
+
26
+
27
+ ## Attribute-Based Finder
28
+
29
+ You can lookup a country or an array of countries using any of the data attributes via the find_by_attribute dynamic finder:
30
+
31
+ Country.find_by_name('United States')
32
+ => [#<Country:0xa1b8a00 @number="840", @iso="USA", @currency="USD", @name="United States", @symbol="$">]
33
+ Country.find_by_iso('USA')
34
+ => [#<Country:0xa1b8a00 @number="840", @iso="USA", @currency="USD", @name="United States", @symbol="$">]
35
+ Country.find_by_currency('INR')
36
+ => [#<Country:0xa1b43c4 @number="356", @iso="IND", @currency="INR", @name="India", @symbol="Rs.">]
37
+ Country.find_by_number(840)
38
+ => [#<Country:0x8b64a10 @number="840", @iso="USA", @currency="USD", @name="United States", @symbol="$">]
39
+
40
+
41
+ ## Contributing
42
+
43
+ 1. Fork it ( http://github.com/dark-prince/country_with_currency/fork )
44
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
45
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
46
+ 4. Push to the branch (`git push origin my-new-feature`)
47
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ RSpec::Core::RakeTask.new('spec')
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'country_with_currency/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.platform = Gem::Platform::RUBY
8
+ spec.name = "country_with_currency"
9
+ spec.version = CountryWithCurrency::VERSION
10
+ spec.summary = %q{Provides a helper to get a country list along with ISO code, currency code and currency symbol by following ISO 3166 country list.}
11
+ spec.description = %q{Provides a helper to get a country list along with ISO code, currency code and currency symbol by following ISO 3166 country list.}
12
+ spec.license = "MIT"
13
+ spec.authors = ["Diganta Mandal"]
14
+ spec.email = ["urs.diganta@gmail.com"]
15
+ spec.homepage = "https://github.com/dark-prince/country_with_currency"
16
+ spec.required_ruby_version = ">= 1.9.3"
17
+ spec.required_rubygems_version = ">= 1.8.11"
18
+ spec.files = `git ls-files`.split($/)
19
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
+ spec.require_paths = ["lib"]
22
+ spec.add_development_dependency "bundler", "~> 1.5"
23
+ spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "rspec", "~> 2.14"
25
+ spec.add_development_dependency "yard", "~> 0.8"
26
+ spec.add_development_dependency "kramdown", "~> 1.1"
27
+ end
@@ -0,0 +1,3 @@
1
+ require "yaml" unless defined?(YAML)
2
+ require "country_with_currency/version"
3
+ require "country_with_currency/country"
@@ -0,0 +1,95 @@
1
+ class Country
2
+ # @return [Integer] Returns the Number of country.
3
+ # @return [Integer] Returns the ISO 3166-1 code of country.
4
+ # @return [Integer] Returns the ISO 4217 code of currency.
5
+ # @return [String] Returns the Name of country.
6
+ # @return [String] Returns the Symbol of currency.
7
+ attr_reader :number, :iso, :currency, :name, :symbol
8
+
9
+ # Thrown when an unknown country is requested.
10
+ class UnknownCountry < StandardError; end
11
+
12
+ # Thrown when an unknown attribute is requested.
13
+ class UnknownAttribute < StandardError; end
14
+
15
+ def initialize(data={})
16
+ @number = data["number"]
17
+ @iso = data["iso3"]
18
+ @currency = data["currency"]
19
+ @name = data["name"]
20
+ @symbol = data["symbol"]
21
+ end
22
+
23
+ class << self
24
+ attr_accessor :countries
25
+ attr_reader :alpha3
26
+
27
+ # All countries
28
+ #
29
+ # Example
30
+ #
31
+ # Country.all
32
+ #
33
+ # Returns an Array with value of all country objects
34
+ def all
35
+ countries
36
+ end
37
+
38
+ # Overriding method_missing to add dynamic finders.
39
+ #
40
+ # *args - standard method_missing arguments
41
+ #
42
+ # Examples
43
+ #
44
+ # Country.find_by_iso("USA")
45
+ # Country.find_by_name("United States")
46
+ #
47
+ # Returns an Array with value of country object/objects
48
+ # Raises NoMethodError if couldn't find a method
49
+ # Raises UnknownAttribute if couldn't find a valid attribute
50
+ # Raises UnknownCountry if couldn't find any country object
51
+ def method_missing(*args)
52
+ regex = args.first.to_s.match(/^find_by_(.*)/)
53
+ # Check if the missing method applies to Country
54
+ super if !regex || $1.nil?
55
+ @alpha3 = args[1]
56
+ select_by($1, @alpha3)
57
+ end
58
+
59
+ private
60
+
61
+ def load_file(file)
62
+ YAML.load_file(file).each do |code, options|
63
+ add(new(code))
64
+ end
65
+ end
66
+
67
+ def add(country)
68
+ self.countries ||= []
69
+ self.countries << country
70
+ end
71
+
72
+ def select_by(attribute, val)
73
+ attr, value = parse_attributes(attribute.downcase, (val ? val.to_s.downcase : val))
74
+
75
+ data = countries.select { |c| c.send(attr.to_sym).downcase == value }
76
+ validate(data)
77
+ data
78
+ end
79
+
80
+ def parse_attributes(attr, val)
81
+ raise UnknownAttribute, "Invalid attribute '#{attr}'." unless [:number, :iso, :currency, :name, :symbol].include?(attr.to_sym)
82
+
83
+ [attr, val]
84
+ end
85
+
86
+ # Raise errors for invalid countries.
87
+ def validate(country)
88
+ raise UnknownCountry, "Country not found." if country.empty?
89
+ end
90
+
91
+ private :new
92
+ end
93
+
94
+ load_file(File.join(File.dirname(__FILE__), '..', 'data', 'countries.yaml'))
95
+ end
@@ -0,0 +1,3 @@
1
+ module CountryWithCurrency
2
+ VERSION = "1.0.0"
3
+ end
@@ -0,0 +1,1136 @@
1
+ ---
2
+ - currency: AFN
3
+ symbol: Af
4
+ number: '004'
5
+ iso3: AFG
6
+ name: Afghanistan
7
+ - currency: ALL
8
+ symbol: L
9
+ number: 008
10
+ iso3: ALB
11
+ name: Albania
12
+ - currency: DZD
13
+ symbol: "دج"
14
+ number: '012'
15
+ iso3: DZA
16
+ name: Algeria
17
+ - currency: USD
18
+ symbol: "$"
19
+ number: '016'
20
+ iso3: ASM
21
+ name: American Samoa
22
+ - currency: EUR
23
+ symbol: "€"
24
+ number: '020'
25
+ iso3: AND
26
+ name: Andorra
27
+ - currency: AOA
28
+ symbol: Kz
29
+ number: '024'
30
+ iso3: AGO
31
+ name: Angola
32
+ - currency: XCD
33
+ symbol: "$"
34
+ number: '660'
35
+ iso3: AIA
36
+ name: Anguilla
37
+ - currency: XCD
38
+ symbol: "$"
39
+ number: 028
40
+ iso3: ATG
41
+ name: Antigua and Barbuda
42
+ - currency: ARS
43
+ symbol: "$"
44
+ number: '032'
45
+ iso3: ARG
46
+ name: Argentina
47
+ - currency: AMD
48
+ symbol: "Դրամ"
49
+ number: '051'
50
+ iso3: ARM
51
+ name: Armenia
52
+ - currency: AWG
53
+ symbol: Afl.
54
+ number: '533'
55
+ iso3: ABW
56
+ name: Aruba
57
+ - currency: AUD
58
+ symbol: "$"
59
+ number: '036'
60
+ iso3: AUS
61
+ name: Australia
62
+ - currency: EUR
63
+ symbol: "€"
64
+ number: '040'
65
+ iso3: AUT
66
+ name: Austria
67
+ - currency: AZN
68
+ symbol: m.
69
+ number: '031'
70
+ iso3: AZE
71
+ name: Azerbaijan
72
+ - currency: BSD
73
+ symbol: "$"
74
+ number: '044'
75
+ iso3: BHS
76
+ name: Bahamas
77
+ - currency: BHD
78
+ symbol: ".د.ب"
79
+ number: 048
80
+ iso3: BHR
81
+ name: Bahrain
82
+ - currency: BDT
83
+ symbol: "৳"
84
+ number: '050'
85
+ iso3: BGD
86
+ name: Bangladesh
87
+ - currency: BBD
88
+ symbol: "$"
89
+ number: '052'
90
+ iso3: BRB
91
+ name: Barbados
92
+ - currency: BYR
93
+ symbol: Br
94
+ number: '112'
95
+ iso3: BLR
96
+ name: Belarus
97
+ - currency: EUR
98
+ symbol: "€"
99
+ number: '056'
100
+ iso3: BEL
101
+ name: Belgium
102
+ - currency: BZD
103
+ symbol: "$"
104
+ number: 084
105
+ iso3: BLZ
106
+ name: Belize
107
+ - currency: XOF
108
+ symbol: Fr
109
+ number: '204'
110
+ iso3: BEN
111
+ name: Benin
112
+ - currency: BMD
113
+ symbol: "$"
114
+ number: '060'
115
+ iso3: BMU
116
+ name: Bermuda
117
+ - currency: BMD
118
+ symbol: "$"
119
+ number: '064'
120
+ iso3: BTN
121
+ name: Bhutan
122
+ - currency: BOB
123
+ symbol: Bs.
124
+ number: 068
125
+ iso3: BOL
126
+ name: Bolivia
127
+ - currency: BAM
128
+ symbol: KM
129
+ number: '070'
130
+ iso3: BIH
131
+ name: Bosnia and Herzegovina
132
+ - currency: BWP
133
+ symbol: P
134
+ number: '072'
135
+ iso3: BWA
136
+ name: Botswana
137
+ - currency: BRL
138
+ symbol: R$
139
+ number: '076'
140
+ iso3: BRA
141
+ name: Brazil
142
+ - currency: BND
143
+ symbol: "$"
144
+ number: 096
145
+ iso3: BRN
146
+ name: Brunei Darussalam
147
+ - currency: BGN
148
+ symbol: "лв."
149
+ number: '100'
150
+ iso3: BGR
151
+ name: Bulgaria
152
+ - currency: XOF
153
+ symbol: Fr
154
+ number: '854'
155
+ iso3: BFA
156
+ name: Burkina Faso
157
+ - currency: BIF
158
+ symbol: Fr
159
+ number: '108'
160
+ iso3: BDI
161
+ name: Burundi
162
+ - currency: KHR
163
+ symbol: "៛"
164
+ number: '116'
165
+ iso3: KHM
166
+ name: Cambodia
167
+ - currency: XAF
168
+ symbol: Fr
169
+ number: '120'
170
+ iso3: CMR
171
+ name: Cameroon
172
+ - currency: CAD
173
+ symbol: "$"
174
+ number: '170'
175
+ iso3: CAN
176
+ name: Canada
177
+ - currency: CVE
178
+ symbol: "$"
179
+ number: '132'
180
+ iso3: CPV
181
+ name: Cape Verde
182
+ - currency: KYD
183
+ symbol: "$"
184
+ number: '136'
185
+ iso3: CYM
186
+ name: Cayman Islands
187
+ - currency: XAF
188
+ symbol: Fr
189
+ number: '140'
190
+ iso3: CAF
191
+ name: Central African Republic
192
+ - currency: XAF
193
+ symbol: Fr
194
+ number: '148'
195
+ iso3: TCD
196
+ name: Chad
197
+ - currency: CLP
198
+ symbol: "$"
199
+ number: '152'
200
+ iso3: CHL
201
+ name: Chile
202
+ - currency: CNY
203
+ symbol: "¥"
204
+ number: '156'
205
+ iso3: CHN
206
+ name: China
207
+ - currency: COP
208
+ symbol: "$"
209
+ number: '170'
210
+ iso3: COL
211
+ name: Colombia
212
+ - currency: KMF
213
+ symbol: Fr
214
+ number: '174'
215
+ iso3: COM
216
+ name: Comoros
217
+ - currency: CDF
218
+ symbol: Fr
219
+ number: '178'
220
+ iso3: COG
221
+ name: Congo
222
+ - currency: CDF
223
+ symbol: FC
224
+ number: '180'
225
+ iso3: COD
226
+ name: Congo, the Democratic Republic of the
227
+ - currency: NZD
228
+ symbol: "$"
229
+ number: '184'
230
+ iso3: COK
231
+ name: Cook Islands
232
+ - currency: CRC
233
+ symbol: "₡"
234
+ number: '188'
235
+ iso3: CRI
236
+ name: Costa Rica
237
+ - currency: XOF
238
+ symbol: Fr
239
+ number: '384'
240
+ iso3: CIV
241
+ name: Cote D'Ivoire
242
+ - currency: HRK
243
+ symbol: kn
244
+ number: '191'
245
+ iso3: HRV
246
+ name: Croatia
247
+ - currency: CUP
248
+ symbol: "$"
249
+ number: '192'
250
+ iso3: CUB
251
+ name: Cuba
252
+ - currency: EUR
253
+ symbol: "€"
254
+ number: '196'
255
+ iso3: CYP
256
+ name: Cyprus
257
+ - currency: CZK
258
+ symbol: Kč
259
+ number: '203'
260
+ iso3: CZE
261
+ name: Czech Republic
262
+ - currency: DKK
263
+ symbol: kr
264
+ number: '208'
265
+ iso3: DNK
266
+ name: Denmark
267
+ - currency: DJF
268
+ symbol: Fr
269
+ number: '262'
270
+ iso3: DJI
271
+ name: Djibouti
272
+ - currency: XCD
273
+ symbol: "$"
274
+ number: '212'
275
+ iso3: DMA
276
+ name: Dominica
277
+ - currency: DOP
278
+ symbol: "$"
279
+ number: '214'
280
+ iso3: DOM
281
+ name: Dominican Republic
282
+ - currency: USD
283
+ symbol: "$"
284
+ number: '218'
285
+ iso3: ECU
286
+ name: Ecuador
287
+ - currency: EGP
288
+ symbol: "£"
289
+ number: '818'
290
+ iso3: EGY
291
+ name: Egypt
292
+ - currency: USD
293
+ symbol: "$"
294
+ number: '222'
295
+ iso3: SLV
296
+ name: El Salvador
297
+ - currency: XAF
298
+ symbol: Fr
299
+ number: '226'
300
+ iso3: GNQ
301
+ name: Equatorial Guinea
302
+ - currency: ERN
303
+ symbol: Nfk
304
+ number: '232'
305
+ iso3: ERI
306
+ name: Eritrea
307
+ - currency: EUR
308
+ symbol: "€"
309
+ number: '233'
310
+ iso3: EST
311
+ name: Estonia
312
+ - currency: ETB
313
+ symbol: Br
314
+ number: '231'
315
+ iso3: ETH
316
+ name: Ethiopia
317
+ - currency: EKP
318
+ symbol: "£"
319
+ number: '238'
320
+ iso3: FLK
321
+ name: Falkland Islands (Malvinas)
322
+ - currency: DKK
323
+ symbol: kr
324
+ number: '234'
325
+ iso3: FRO
326
+ name: Faroe Islands
327
+ - currency: FJD
328
+ symbol: "$"
329
+ number: '242'
330
+ iso3: FJI
331
+ name: Fiji
332
+ - currency: EUR
333
+ symbol: "€"
334
+ number: '246'
335
+ iso3: FIN
336
+ name: Finland
337
+ - currency: EUR
338
+ symbol: "€"
339
+ number: '250'
340
+ iso3: FRA
341
+ name: France
342
+ - currency: EUR
343
+ symbol: "€"
344
+ number: '254'
345
+ iso3: GUF
346
+ name: French Guiana
347
+ - currency: XPF
348
+ symbol: Fr
349
+ number: '258'
350
+ iso3: PYF
351
+ name: French Polynesia
352
+ - currency: XAF
353
+ symbol: Fr
354
+ number: '266'
355
+ iso3: GAB
356
+ name: Gabon
357
+ - currency: GMD
358
+ symbol: D
359
+ number: '270'
360
+ iso3: GMB
361
+ name: Gambia
362
+ - currency: GEL
363
+ symbol: "ლ"
364
+ number: '268'
365
+ iso3: GEO
366
+ name: Georgia
367
+ - currency: EUR
368
+ symbol: "€"
369
+ number: '276'
370
+ iso3: DEU
371
+ name: Germany
372
+ - currency: GHS
373
+ symbol: "₵"
374
+ number: '288'
375
+ iso3: GHA
376
+ name: Ghana
377
+ - currency: GIP
378
+ symbol: "£"
379
+ number: '292'
380
+ iso3: GIB
381
+ name: Gibraltar
382
+ - currency: EUR
383
+ symbol: "€"
384
+ number: '300'
385
+ iso3: GRC
386
+ name: Greece
387
+ - currency: DKK
388
+ symbol: kr.
389
+ number: '304'
390
+ iso3: GRL
391
+ name: Greenland
392
+ - currency: XCD
393
+ symbol: "$"
394
+ number: '308'
395
+ iso3: GRD
396
+ name: Grenada
397
+ - currency: EUR
398
+ symbol: "£"
399
+ number: '312'
400
+ iso3: GLP
401
+ name: Guadeloupe
402
+ - currency: USD
403
+ symbol: "$"
404
+ number: '316'
405
+ iso3: GUM
406
+ name: Guam
407
+ - currency: GTQ
408
+ symbol: Q
409
+ number: '320'
410
+ iso3: GTM
411
+ name: Guatemala
412
+ - currency: GNF
413
+ symbol: Fr
414
+ number: '324'
415
+ iso3: GIN
416
+ name: Guinea
417
+ - currency: XOF
418
+ symbol: Fr
419
+ number: '624'
420
+ iso3: GNB
421
+ name: Guinea-Bissau
422
+ - currency: GYD
423
+ symbol: "$"
424
+ number: '328'
425
+ iso3: GUY
426
+ name: Guyana
427
+ - currency: HTG
428
+ symbol: G
429
+ number: '332'
430
+ iso3: HTI
431
+ name: Haiti
432
+ - currency: EUR
433
+ symbol: "€"
434
+ number: '336'
435
+ iso3: VAT
436
+ name: Holy See (Vatican City State)
437
+ - currency: HNL
438
+ symbol: L
439
+ number: '340'
440
+ iso3: HND
441
+ name: Honduras
442
+ - currency: HKD
443
+ symbol: "$"
444
+ number: '344'
445
+ iso3: HKG
446
+ name: Hong Kong
447
+ - currency: HUF
448
+ symbol: Ft
449
+ number: '348'
450
+ iso3: HUN
451
+ name: Hungary
452
+ - currency: ISK
453
+ symbol: kr
454
+ number: '352'
455
+ iso3: ISL
456
+ name: Iceland
457
+ - currency: INR
458
+ symbol: Rs.
459
+ number: '356'
460
+ iso3: IND
461
+ name: India
462
+ - currency: IDR
463
+ symbol: Rp
464
+ number: '360'
465
+ iso3: IDN
466
+ name: Indonesia
467
+ - currency: IRR
468
+ symbol: "﷼"
469
+ number: '364'
470
+ iso3: IRN
471
+ name: Iran, Islamic Republic of
472
+ - currency: IQD
473
+ symbol: "د.ع"
474
+ number: '368'
475
+ iso3: IRQ
476
+ name: Iraq
477
+ - currency: EUR
478
+ symbol: "€"
479
+ number: '372'
480
+ iso3: IRL
481
+ name: Ireland
482
+ - currency: ILS
483
+ symbol: "₪"
484
+ number: '376'
485
+ iso3: ISR
486
+ name: Israel
487
+ - currency: EUR
488
+ symbol: "€"
489
+ number: '380'
490
+ iso3: ITA
491
+ name: Italy
492
+ - currency: JMD
493
+ symbol: "$"
494
+ number: '388'
495
+ iso3: JAM
496
+ name: Jamaica
497
+ - currency: JPY
498
+ symbol: "¥"
499
+ number: '392'
500
+ iso3: JPN
501
+ name: Japan
502
+ - currency: JOD
503
+ symbol: "د.ا"
504
+ number: '400'
505
+ iso3: JOR
506
+ name: Jordan
507
+ - currency: KZT
508
+ symbol: "лв"
509
+ number: '398'
510
+ iso3: KAZ
511
+ name: Kazakhstan
512
+ - currency: KES
513
+ symbol: Sh
514
+ number: '404'
515
+ iso3: KEN
516
+ name: Kenya
517
+ - currency: AUD
518
+ symbol: "$"
519
+ number: '296'
520
+ iso3: KIR
521
+ name: Kiribati
522
+ - currency: KPW
523
+ symbol: "₩"
524
+ number: '408'
525
+ iso3: PRK
526
+ name: Korea, Democratic People's Republic of
527
+ - currency: KPW
528
+ symbol: "₩"
529
+ number: '410'
530
+ iso3: KOR
531
+ name: Korea, Republic of
532
+ - currency: KWD
533
+ symbol: "د.ك"
534
+ number: '414'
535
+ iso3: KWT
536
+ name: Kuwait
537
+ - currency: KGS
538
+ symbol: "лв"
539
+ number: '417'
540
+ iso3: KGZ
541
+ name: Kyrgyzstan
542
+ - currency: LAK
543
+ symbol: "₭"
544
+ number: '418'
545
+ iso3: LAO
546
+ name: Lao People's Democratic Republic
547
+ - currency: LVL
548
+ symbol: Ls
549
+ number: '428'
550
+ iso3: LVA
551
+ name: Latvia
552
+ - currency: LBP
553
+ symbol: "£"
554
+ number: '422'
555
+ iso3: LBN
556
+ name: Lebanon
557
+ - currency: LSL
558
+ symbol: L
559
+ number: '426'
560
+ iso3: LSO
561
+ name: Lesotho
562
+ - currency: LRD
563
+ symbol: "$"
564
+ number: '430'
565
+ iso3: LBR
566
+ name: Liberia
567
+ - currency: LYD
568
+ symbol: "ل.د"
569
+ number: '434'
570
+ iso3: LBY
571
+ name: Libyan Arab Jamahiriya
572
+ - currency: CHF
573
+ symbol: Fr
574
+ number: '438'
575
+ iso3: LIE
576
+ name: Liechtenstein
577
+ - currency: LTL
578
+ symbol: Lt
579
+ number: '440'
580
+ iso3: LTU
581
+ name: Lithuania
582
+ - currency: EUR
583
+ symbol: "€"
584
+ number: '442'
585
+ iso3: LUX
586
+ name: Luxembourg
587
+ - currency: MOP
588
+ symbol: MOP$
589
+ number: '446'
590
+ iso3: MAC
591
+ name: Macao
592
+ - currency: MKD
593
+ symbol: "ден"
594
+ number: '807'
595
+ iso3: MKD
596
+ name: Macedonia, the Former Yugoslav Republic of
597
+ - currency: MKD
598
+ symbol: "ден"
599
+ number: '450'
600
+ iso3: MDG
601
+ name: Madagascar
602
+ - currency: MWK
603
+ symbol: MK
604
+ number: '454'
605
+ iso3: MWI
606
+ name: Malawi
607
+ - currency: MYR
608
+ symbol: RM
609
+ number: '458'
610
+ iso3: MYS
611
+ name: Malaysia
612
+ - currency: MVR
613
+ symbol: ".ރ"
614
+ number: '462'
615
+ iso3: MDV
616
+ name: Maldives
617
+ - currency: XOF
618
+ symbol: Fr
619
+ number: '466'
620
+ iso3: MLI
621
+ name: Mali
622
+ - currency: EUR
623
+ symbol: "€"
624
+ number: '470'
625
+ iso3: MLT
626
+ name: Malta
627
+ - currency: USD
628
+ symbol: "$"
629
+ number: '584'
630
+ iso3: MHL
631
+ name: Marshall Islands
632
+ - currency: EUR
633
+ symbol: "€"
634
+ number: '474'
635
+ iso3: MTQ
636
+ name: Martinique
637
+ - currency: MRO
638
+ symbol: UM
639
+ number: '478'
640
+ iso3: MRT
641
+ name: Mauritania
642
+ - currency: MUR
643
+ symbol: "₨"
644
+ number: '480'
645
+ iso3: MUS
646
+ name: Mauritius
647
+ - currency: MXN
648
+ symbol: "$"
649
+ number: '484'
650
+ iso3: MEX
651
+ name: Mexico
652
+ - currency: USD
653
+ symbol: "$"
654
+ number: '583'
655
+ iso3: FSM
656
+ name: Micronesia, Federated States of
657
+ - currency: MDL
658
+ symbol: leu
659
+ number: '498'
660
+ iso3: MDA
661
+ name: Moldova, Republic of
662
+ - currency: EUR
663
+ symbol: "€"
664
+ number: '492'
665
+ iso3: MCO
666
+ name: Monaco
667
+ - currency: MNT
668
+ symbol: "₮"
669
+ number: '496'
670
+ iso3: MNG
671
+ name: Mongolia
672
+ - currency: XCD
673
+ symbol: "$"
674
+ number: '500'
675
+ iso3: MSR
676
+ name: Montserrat
677
+ - currency: MAD
678
+ symbol: "د.م."
679
+ number: '504'
680
+ iso3: MAR
681
+ name: Morocco
682
+ - currency: MZN
683
+ symbol: MT
684
+ number: '508'
685
+ iso3: MOZ
686
+ name: Mozambique
687
+ - currency: MMK
688
+ symbol: K
689
+ number: '104'
690
+ iso3: MMR
691
+ name: Myanmar
692
+ - currency: NAD
693
+ symbol: N$
694
+ number: '516'
695
+ iso3: NAM
696
+ name: Namibia
697
+ - currency: AUD
698
+ symbol: "$"
699
+ number: '520'
700
+ iso3: NRU
701
+ name: Nauru
702
+ - currency: NPR
703
+ symbol: "रू."
704
+ number: '524'
705
+ iso3: NPL
706
+ name: Nepal
707
+ - currency: EUR
708
+ symbol: "€"
709
+ number: '528'
710
+ iso3: NLD
711
+ name: Netherlands
712
+ - currency: ANG
713
+ symbol: NAƒ
714
+ number: '530'
715
+ iso3: ANT
716
+ name: Netherlands Antilles
717
+ - currency: XPF
718
+ symbol: F
719
+ number: '540'
720
+ iso3: NCL
721
+ name: New Caledonia
722
+ - currency: NZD
723
+ symbol: "$"
724
+ number: '554'
725
+ iso3: NZL
726
+ name: New Zealand
727
+ - currency: NIO
728
+ symbol: C$
729
+ number: '558'
730
+ iso3: NIC
731
+ name: Nicaragua
732
+ - currency: XOF
733
+ symbol: CFA
734
+ number: '562'
735
+ iso3: NER
736
+ name: Niger
737
+ - currency: NGN
738
+ symbol: "₦"
739
+ number: '566'
740
+ iso3: NGA
741
+ name: Nigeria
742
+ - currency: NZD
743
+ symbol: "$"
744
+ number: '570'
745
+ iso3: NIU
746
+ name: Niue
747
+ - currency: AUD
748
+ symbol: "$"
749
+ number: '574'
750
+ iso3: NFK
751
+ name: Norfolk Island
752
+ - currency: USD
753
+ symbol: "$"
754
+ number: '580'
755
+ iso3: MNP
756
+ name: Northern Mariana Islands
757
+ - currency: NOK
758
+ symbol: kr
759
+ number: '578'
760
+ iso3: NOR
761
+ name: Norway
762
+ - currency: OMR
763
+ symbol: "ر.ع."
764
+ number: '512'
765
+ iso3: OMN
766
+ name: Oman
767
+ - currency: PKR
768
+ symbol: "₨"
769
+ number: '586'
770
+ iso3: PAK
771
+ name: Pakistan
772
+ - currency: USD
773
+ symbol: "$"
774
+ number: '585'
775
+ iso3: PLW
776
+ name: Palau
777
+ - currency: PAB
778
+ symbol: B/.
779
+ number: '591'
780
+ iso3: PAN
781
+ name: Panama
782
+ - currency: PGK
783
+ symbol: K
784
+ number: '598'
785
+ iso3: PNG
786
+ name: Papua New Guinea
787
+ - currency: PYG
788
+ symbol: Gs
789
+ number: '600'
790
+ iso3: PRY
791
+ name: Paraguay
792
+ - currency: PEN
793
+ symbol: S/.
794
+ number: '604'
795
+ iso3: PER
796
+ name: Peru
797
+ - currency: PHP
798
+ symbol: "₱"
799
+ number: '608'
800
+ iso3: PHL
801
+ name: Philippines
802
+ - currency: NZD
803
+ symbol: "$"
804
+ number: '612'
805
+ iso3: PCN
806
+ name: Pitcairn
807
+ - currency: PLN
808
+ symbol: zł
809
+ number: '616'
810
+ iso3: POL
811
+ name: Poland
812
+ - currency: EUR
813
+ symbol: "€"
814
+ number: '620'
815
+ iso3: PRT
816
+ name: Portugal
817
+ - currency: USD
818
+ symbol: "$"
819
+ number: '630'
820
+ iso3: PRI
821
+ name: Puerto Rico
822
+ - currency: QAR
823
+ symbol: "﷼"
824
+ number: '634'
825
+ iso3: QAT
826
+ name: Qatar
827
+ - currency: EUR
828
+ symbol: "€"
829
+ number: '638'
830
+ iso3: REU
831
+ name: Reunion
832
+ - currency: RON
833
+ symbol: lei
834
+ number: '642'
835
+ iso3: ROM
836
+ name: Romania
837
+ - currency: RUB
838
+ symbol: "руб"
839
+ number: '643'
840
+ iso3: RUS
841
+ name: Russian Federation
842
+ - currency: RWF
843
+ symbol: FRw
844
+ number: '646'
845
+ iso3: RWA
846
+ name: Rwanda
847
+ - currency: SHP
848
+ symbol: "£"
849
+ number: '654'
850
+ iso3: SHN
851
+ name: Saint Helena
852
+ - currency: XCD
853
+ symbol: "$"
854
+ number: '659'
855
+ iso3: KNA
856
+ name: Saint Kitts and Nevis
857
+ - currency: XCD
858
+ symbol: "$"
859
+ number: '662'
860
+ iso3: LCA
861
+ name: Saint Lucia
862
+ - currency: EUR
863
+ symbol: "€"
864
+ number: '666'
865
+ iso3: SPM
866
+ name: Saint Pierre and Miquelon
867
+ - currency: XCD
868
+ symbol: "$"
869
+ number: '670'
870
+ iso3: VCT
871
+ name: Saint Vincent and the Grenadines
872
+ - currency: WST
873
+ symbol: WS$
874
+ number: '882'
875
+ iso3: WSM
876
+ name: Samoa
877
+ - currency: EUR
878
+ symbol: "€"
879
+ number: '674'
880
+ iso3: SMR
881
+ name: San Marino
882
+ - currency: STD
883
+ symbol: Db
884
+ number: '678'
885
+ iso3: STP
886
+ name: Sao Tome and Principe
887
+ - currency: SAR
888
+ symbol: "﷼"
889
+ number: '682'
890
+ iso3: SAU
891
+ name: Saudi Arabia
892
+ - currency: XOF
893
+ symbol: CFA
894
+ number: '686'
895
+ iso3: SEN
896
+ name: Senegal
897
+ - currency: RSD
898
+ symbol: "Дин."
899
+ number: '688'
900
+ iso3: SRB
901
+ name: Serbia
902
+ - currency: SCR
903
+ symbol: "₨"
904
+ number: '690'
905
+ iso3: SYC
906
+ name: Seychelles
907
+ - currency: SLL
908
+ symbol: Le
909
+ number: '694'
910
+ iso3: SLE
911
+ name: Sierra Leone
912
+ - currency: SGD
913
+ symbol: "$"
914
+ number: '702'
915
+ iso3: SGP
916
+ name: Singapore
917
+ - currency: EUR
918
+ symbol: "€"
919
+ number: '703'
920
+ iso3: SVK
921
+ name: Slovakia
922
+ - currency: EUR
923
+ symbol: "€"
924
+ number: '705'
925
+ iso3: SVN
926
+ name: Slovenia
927
+ - currency: SBD
928
+ symbol: "$"
929
+ number: 090
930
+ iso3: SLB
931
+ name: Solomon Islands
932
+ - currency: SOS
933
+ symbol: S
934
+ number: '706'
935
+ iso3: SOM
936
+ name: Somalia
937
+ - currency: ZAR
938
+ symbol: R
939
+ number: '710'
940
+ iso3: ZAF
941
+ name: South Africa
942
+ - currency: EUR
943
+ symbol: "€"
944
+ number: '724'
945
+ iso3: ESP
946
+ name: Spain
947
+ - currency: LKR
948
+ symbol: Rs
949
+ number: '144'
950
+ iso3: LKA
951
+ name: Sri Lanka
952
+ - currency: SDG
953
+ symbol: "£"
954
+ number: '736'
955
+ iso3: SDN
956
+ name: Sudan
957
+ - currency: SRD
958
+ symbol: "$"
959
+ number: '740'
960
+ iso3: SUR
961
+ name: Suriname
962
+ - currency: NOK
963
+ symbol: kr
964
+ number: '744'
965
+ iso3: SJM
966
+ name: Svalbard and Jan Mayen
967
+ - currency: SZL
968
+ symbol: L
969
+ number: '748'
970
+ iso3: SWZ
971
+ name: Swaziland
972
+ - currency: SEK
973
+ symbol: kr
974
+ number: '752'
975
+ iso3: SWE
976
+ name: Sweden
977
+ - currency: CHF
978
+ symbol: CHF
979
+ number: '756'
980
+ iso3: CHE
981
+ name: Switzerland
982
+ - currency: SYP
983
+ symbol: "£S"
984
+ number: '760'
985
+ iso3: SYR
986
+ name: Syrian Arab Republic
987
+ - currency: TWD
988
+ symbol: NT$
989
+ number: '158'
990
+ iso3: TWN
991
+ name: Taiwan, Province of China
992
+ - currency: TJS
993
+ symbol: TS
994
+ number: '762'
995
+ iso3: TJK
996
+ name: Tajikistan
997
+ - currency: TZS
998
+ symbol: x/y
999
+ number: '834'
1000
+ iso3: TZA
1001
+ name: Tanzania, United Republic of
1002
+ - currency: THB
1003
+ symbol: "฿"
1004
+ number: '764'
1005
+ iso3: THA
1006
+ name: Thailand
1007
+ - currency: XOF
1008
+ symbol: CFA
1009
+ number: '768'
1010
+ iso3: TGO
1011
+ name: Togo
1012
+ - currency: NZD
1013
+ symbol: "$"
1014
+ number: '772'
1015
+ iso3: TKL
1016
+ name: Tokelau
1017
+ - currency: TOP
1018
+ symbol: T$
1019
+ number: '776'
1020
+ iso3: TON
1021
+ name: Tonga
1022
+ - currency: TTD
1023
+ symbol: TT$
1024
+ number: '780'
1025
+ iso3: TTO
1026
+ name: Trinidad and Tobago
1027
+ - currency: TND
1028
+ symbol: "د.ت"
1029
+ number: '788'
1030
+ iso3: TUN
1031
+ name: Tunisia
1032
+ - currency: TRY
1033
+ symbol: "も"
1034
+ number: '792'
1035
+ iso3: TUR
1036
+ name: Turkey
1037
+ - currency: TMT
1038
+ symbol: m
1039
+ number: '795'
1040
+ iso3: TKM
1041
+ name: Turkmenistan
1042
+ - currency: USD
1043
+ symbol: "$"
1044
+ number: '796'
1045
+ iso3: TCA
1046
+ name: Turks and Caicos Islands
1047
+ - currency: TVD
1048
+ symbol: "$"
1049
+ number: '798'
1050
+ iso3: TUV
1051
+ name: Tuvalu
1052
+ - currency: UGX
1053
+ symbol: USh
1054
+ number: '800'
1055
+ iso3: UGA
1056
+ name: Uganda
1057
+ - currency: UAH
1058
+ symbol: "₴"
1059
+ number: '804'
1060
+ iso3: UKR
1061
+ name: Ukraine
1062
+ - currency: AED
1063
+ symbol: "د.إ"
1064
+ number: '784'
1065
+ iso3: ARE
1066
+ name: United Arab Emirates
1067
+ - currency: GBP
1068
+ symbol: "£"
1069
+ number: '826'
1070
+ iso3: GBR
1071
+ name: United Kingdom
1072
+ - currency: USD
1073
+ symbol: "$"
1074
+ number: '840'
1075
+ iso3: USA
1076
+ name: United States
1077
+ - currency: UYU
1078
+ symbol: "$U"
1079
+ number: '858'
1080
+ iso3: URY
1081
+ name: Uruguay
1082
+ - currency: UZS
1083
+ symbol: "лв"
1084
+ number: '860'
1085
+ iso3: UZB
1086
+ name: Uzbekistan
1087
+ - currency: VUV
1088
+ symbol: VT
1089
+ number: '548'
1090
+ iso3: VUT
1091
+ name: Vanuatu
1092
+ - currency: VEF
1093
+ symbol: Bs
1094
+ number: '862'
1095
+ iso3: VEN
1096
+ name: Venezuela
1097
+ - currency: VND
1098
+ symbol: "₫"
1099
+ number: '704'
1100
+ iso3: VNM
1101
+ name: Viet Nam
1102
+ - currency: USD
1103
+ symbol: "$"
1104
+ number: 092
1105
+ iso3: VGB
1106
+ name: Virgin Islands, British
1107
+ - currency: USD
1108
+ symbol: "$"
1109
+ number: '850'
1110
+ iso3: VIR
1111
+ name: Virgin Islands, U.s.
1112
+ - currency: XPF
1113
+ symbol: F
1114
+ number: '876'
1115
+ iso3: WLF
1116
+ name: Wallis and Futuna
1117
+ - currency: MAD
1118
+ symbol: "د.م."
1119
+ number: '732'
1120
+ iso3: ESH
1121
+ name: Western Sahara
1122
+ - currency: YER
1123
+ symbol: "﷼"
1124
+ number: '887'
1125
+ iso3: YEM
1126
+ name: Yemen
1127
+ - currency: ZMK
1128
+ symbol: ZK
1129
+ number: '894'
1130
+ iso3: ZMB
1131
+ name: Zambia
1132
+ - currency: ZWD
1133
+ symbol: Z$
1134
+ number: '716'
1135
+ iso3: ZWE
1136
+ name: Zimbabwe