address_geocoder 0.0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7d28807cbcb73761882a1d8f7d136038f500cfc4
4
+ data.tar.gz: 0fa2b3eec737ca656ee84463d62dff46eaf55f18
5
+ SHA512:
6
+ metadata.gz: f8f7d47c258d9e9e600dc5e330b3b5828d648cb428de525bd9eb2212cbfd8ae4179d1f1513c41c2ba497a03c03230e4ad75907ca3d445020c37f2e890a426071
7
+ data.tar.gz: 0bd932a2ee0a09b962caa1cafd974f23e5d4914d33c21f8fcc6a80243585e1671391cfb0be9db6024bff1894126df4aab1bfa70ce53970423142370513813915
@@ -0,0 +1,19 @@
1
+ .DS_Store
2
+ lib/.DS_Store
3
+ .env
4
+ /tmp/
5
+ /Gemfile.lock
6
+ /.bundle/
7
+
8
+ # RSpec
9
+ .rspec
10
+ /log
11
+ /tmp
12
+ /pkg/
13
+ /coverage/
14
+ /spec/reports/
15
+
16
+ # Yardoc
17
+ /.yardoc
18
+ /_yardoc/
19
+ /doc
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.3
4
+ before_install: gem install bundler -v 1.11.2
5
+ script:
6
+ - 'bundle exec yard -n'
7
+ - 'bundle exec rspec --color --require spec_helper'
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at ctlong.970@gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development, :test do
4
+ gem 'bundler', '~> 1.11'
5
+ gem 'rake', '~> 10.0'
6
+ gem 'pry', '~> 0.10.3'
7
+ gem 'rspec', '~> 3.4.0'
8
+ gem 'yard'
9
+ end
10
+
11
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Carson Long
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,72 @@
1
+ = AddressGeocoder
2
+
3
+ {<img src="https://codeclimate.com/github/ctlong/address_geocoder/badges/gpa.svg" />}[https://codeclimate.com/github/ctlong/address_geocoder]
4
+ {<img src="https://travis-ci.org/ctlong/address_geocoder.svg?branch=master" />}[https://travis-ci.org/ctlong/address_geocoder.svg?branch=master]
5
+
6
+ <b>AddressGeocoder</b> is a Ruby interface to certain Maps APIs that allow you to validate and geocode addresses.
7
+
8
+ Some APIs may require certain credentials to access.
9
+
10
+ == Getting started
11
+
12
+ AddressGeocoder was written and tested on Rails >= 4.2.5. You can install it by adding in to your Gemfile with:
13
+
14
+ gem 'address_geocoder'
15
+
16
+ Run the bundle command to install it.
17
+
18
+ == Basic usage
19
+
20
+ Require the library:
21
+
22
+ require 'address_geocoder'
23
+
24
+ Create a client:
25
+
26
+ client = MapsApi::Google::Client.new
27
+
28
+ You can set some or all of the address information when or after creating the client (country names are {ISO 3166-1 Alpha-2}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] codes):
29
+
30
+ client = MapsApi::Google::Client.new(
31
+ country: 'Your country',
32
+ state: 'Your state',
33
+ city: 'Your city',
34
+ postal_code: 'Your postal code',
35
+ street: 'Your street',
36
+ language: 'The language to return your response in',
37
+ api_key: 'Your api key for an API'
38
+ )
39
+
40
+ client.street = 'A different street'
41
+
42
+ Validating an address:
43
+
44
+ client.valid_address? # returns true or false
45
+
46
+ Finding suggested addresses:
47
+
48
+ client.suggested_addresses # returns a list of addresses that most closely match your inputted addresss
49
+
50
+ Additional methods:
51
+
52
+ client.response # returns the marketplace's actual response
53
+ client.address # returns the current user inputted address
54
+ client.former_address # returns the last address that was used in a call, nil if no call has been made.
55
+
56
+ == The APIs
57
+
58
+ === Google
59
+
60
+ Currently the only API we have integrated. All validations are done using {Google's Geocoding API}[https://developers.google.com/maps/documentation/geocoding/intro]. Although an {API key}[https://developers.google.com/maps/documentation/geocoding/get-api-key] is not required, it is recommended to track usage and upgrade your call limit if required. Google provides a maximum of 2,000 free calls per day to either your IP address or API key.
61
+
62
+ == How it works
63
+
64
+ <b>AddressGeocoder</b> sends addresses in varying formats to the Maps API of your choice. A positive response indicates that the address is valid. After a positive response the gem can parse returned elements to suggest a formatted address.
65
+
66
+ == Development and tests
67
+
68
+ We are open to suggestions and improvements. Just don't forget to write tests before the pull request.
69
+
70
+ == Bug reporting
71
+
72
+ If you discover a problem with our gem, please let us know about it: {ctlong/address_geocoder/issues}[https://github.com/ctlong/address_geocoder/issues]
@@ -0,0 +1,4 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+ RSpec::Core::RakeTask.new(:spec)
4
+ task default: :spec
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'address_geocoder/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'address_geocoder'
8
+ s.version = AddressGeocoder::VERSION
9
+ s.authors = ['Carson Long', 'Wing Leung Choi']
10
+ s.email = ['ctlong.970@gmail.com', 'wingleungchoi@gmail.com']
11
+
12
+ s.summary = 'Address validation and geocoding'
13
+ s.description = 'Calls and parses various maps APIs for accurate address validation and geocoding'
14
+ s.homepage = 'https://github.com/ctlong/address_geocoder'
15
+ s.license = 'MIT'
16
+ s.platform = Gem::Platform::RUBY
17
+
18
+ s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ s.bindir = 'bin'
20
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
21
+ s.require_paths = ['lib']
22
+
23
+ s.post_install_message = 'Happy mapping!'
24
+
25
+ s.add_dependency 'httparty', '~> 0.13.7'
26
+ end
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'address_geocoder'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ require 'irb'
10
+ IRB.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,1000 @@
1
+ AD:
2
+ :country_name: Andorra
3
+ :alpha3: AND
4
+ :has_postal_code: true
5
+ AE:
6
+ :country_name: United Arab Emirates
7
+ :alpha3: ARE
8
+ :has_postal_code: false
9
+ AF:
10
+ :country_name: Afghanistan
11
+ :alpha3: AFG
12
+ :has_postal_code: true
13
+ AG:
14
+ :country_name: Antigua and Barbuda
15
+ :alpha3: ATG
16
+ :has_postal_code: false
17
+ AI:
18
+ :country_name: Anguilla
19
+ :alpha3: AIA
20
+ :has_postal_code: true
21
+ AL:
22
+ :country_name: Albania
23
+ :alpha3: ALB
24
+ :has_postal_code: true
25
+ AM:
26
+ :country_name: Armenia
27
+ :alpha3: ARM
28
+ :has_postal_code: true
29
+ AO:
30
+ :country_name: Angola
31
+ :alpha3: AGO
32
+ :has_postal_code: false
33
+ AQ:
34
+ :country_name: Antarctica
35
+ :alpha3: ATA
36
+ :has_postal_code: true
37
+ AR:
38
+ :country_name: Argentina
39
+ :alpha3: ARG
40
+ :has_postal_code: true
41
+ AS:
42
+ :country_name: American Samoa
43
+ :alpha3: ASM
44
+ :has_postal_code: true
45
+ AT:
46
+ :country_name: Austria
47
+ :alpha3: AUT
48
+ :has_postal_code: true
49
+ AU:
50
+ :country_name: Australia
51
+ :alpha3: AUS
52
+ :has_postal_code: true
53
+ AW:
54
+ :country_name: Aruba
55
+ :alpha3: ABW
56
+ :has_postal_code: false
57
+ AX:
58
+ :country_name: Åland
59
+ :alpha3: ALA
60
+ :has_postal_code: true
61
+ AZ:
62
+ :country_name: Azerbaijan
63
+ :alpha3: AZE
64
+ :has_postal_code: true
65
+ BA:
66
+ :country_name: Bosnia and Herzegovina
67
+ :alpha3: BIH
68
+ :has_postal_code: true
69
+ BB:
70
+ :country_name: Barbados
71
+ :alpha3: BRB
72
+ :has_postal_code: true
73
+ BD:
74
+ :country_name: Bangladesh
75
+ :alpha3: BGD
76
+ :has_postal_code: true
77
+ BE:
78
+ :country_name: Belgium
79
+ :alpha3: BEL
80
+ :has_postal_code: true
81
+ BF:
82
+ :country_name: Burkina Faso
83
+ :alpha3: BFA
84
+ :has_postal_code: false
85
+ BG:
86
+ :country_name: Bulgaria
87
+ :alpha3: BGR
88
+ :has_postal_code: true
89
+ BH:
90
+ :country_name: Bahrain
91
+ :alpha3: BHR
92
+ :has_postal_code: true
93
+ BI:
94
+ :country_name: Burundi
95
+ :alpha3: BDI
96
+ :has_postal_code: false
97
+ BJ:
98
+ :country_name: Benin
99
+ :alpha3: BEN
100
+ :has_postal_code: false
101
+ BL:
102
+ :country_name: Saint Barthélemy
103
+ :alpha3: BLM
104
+ :has_postal_code: true
105
+ BM:
106
+ :country_name: Bermuda
107
+ :alpha3: BMU
108
+ :has_postal_code: true
109
+ BN:
110
+ :country_name: Brunei
111
+ :alpha3: BRN
112
+ :has_postal_code: true
113
+ BO:
114
+ :country_name: Bolivia
115
+ :alpha3: BOL
116
+ :has_postal_code: true
117
+ BQ:
118
+ :country_name: Bonaire
119
+ :alpha3: BES
120
+ :has_postal_code: true
121
+ BR:
122
+ :country_name: Brazil
123
+ :alpha3: BRA
124
+ :has_postal_code: true
125
+ BS:
126
+ :country_name: Bahamas
127
+ :alpha3: BHS
128
+ :has_postal_code: false
129
+ BT:
130
+ :country_name: Bhutan
131
+ :alpha3: BTN
132
+ :has_postal_code: true
133
+ BV:
134
+ :country_name: Bouvet Island
135
+ :alpha3: BVT
136
+ :has_postal_code: true
137
+ BW:
138
+ :country_name: Botswana
139
+ :alpha3: BWA
140
+ :has_postal_code: false
141
+ BY:
142
+ :country_name: Belarus
143
+ :alpha3: BLR
144
+ :has_postal_code: true
145
+ BZ:
146
+ :country_name: Belize
147
+ :alpha3: BLZ
148
+ :has_postal_code: false
149
+ CA:
150
+ :country_name: Canada
151
+ :alpha3: CAN
152
+ :has_postal_code: true
153
+ CC:
154
+ :country_name: Cocos [Keeling] Islands
155
+ :alpha3: CCK
156
+ :has_postal_code: true
157
+ CD:
158
+ :country_name: Democratic Republic of the Congo
159
+ :alpha3: COD
160
+ :has_postal_code: false
161
+ CF:
162
+ :country_name: Central African Republic
163
+ :alpha3: CAF
164
+ :has_postal_code: false
165
+ CG:
166
+ :country_name: Republic of the Congo
167
+ :alpha3: COG
168
+ :has_postal_code: false
169
+ CH:
170
+ :country_name: Switzerland
171
+ :alpha3: CHE
172
+ :has_postal_code: true
173
+ CI:
174
+ :country_name: Ivory Coast
175
+ :alpha3: CIV
176
+ :has_postal_code: false
177
+ CK:
178
+ :country_name: Cook Islands
179
+ :alpha3: COK
180
+ :has_postal_code: false
181
+ CL:
182
+ :country_name: Chile
183
+ :alpha3: CHL
184
+ :has_postal_code: true
185
+ CM:
186
+ :country_name: Cameroon
187
+ :alpha3: CMR
188
+ :has_postal_code: false
189
+ CN:
190
+ :country_name: China
191
+ :alpha3: CHN
192
+ :has_postal_code: true
193
+ CO:
194
+ :country_name: Colombia
195
+ :alpha3: COL
196
+ :has_postal_code: true
197
+ CR:
198
+ :country_name: Costa Rica
199
+ :alpha3: CRI
200
+ :has_postal_code: true
201
+ CU:
202
+ :country_name: Cuba
203
+ :alpha3: CUB
204
+ :has_postal_code: true
205
+ CV:
206
+ :country_name: Cape Verde
207
+ :alpha3: CPV
208
+ :has_postal_code: true
209
+ CW:
210
+ :country_name: Curacao
211
+ :alpha3: CUW
212
+ :has_postal_code: true
213
+ CX:
214
+ :country_name: Christmas Island
215
+ :alpha3: CXR
216
+ :has_postal_code: true
217
+ CY:
218
+ :country_name: Cyprus
219
+ :alpha3: CYP
220
+ :has_postal_code: true
221
+ CZ:
222
+ :country_name: Czech Republic
223
+ :alpha3: CZE
224
+ :has_postal_code: true
225
+ DE:
226
+ :country_name: Germany
227
+ :alpha3: DEU
228
+ :has_postal_code: true
229
+ DJ:
230
+ :country_name: Djibouti
231
+ :alpha3: DJI
232
+ :has_postal_code: false
233
+ DK:
234
+ :country_name: Denmark
235
+ :alpha3: DNK
236
+ :has_postal_code: true
237
+ DM:
238
+ :country_name: Dominica
239
+ :alpha3: DMA
240
+ :has_postal_code: false
241
+ DO:
242
+ :country_name: Dominican Republic
243
+ :alpha3: DOM
244
+ :has_postal_code: true
245
+ DZ:
246
+ :country_name: Algeria
247
+ :alpha3: DZA
248
+ :has_postal_code: true
249
+ EC:
250
+ :country_name: Ecuador
251
+ :alpha3: ECU
252
+ :has_postal_code: true
253
+ EE:
254
+ :country_name: Estonia
255
+ :alpha3: EST
256
+ :has_postal_code: true
257
+ EG:
258
+ :country_name: Egypt
259
+ :alpha3: EGY
260
+ :has_postal_code: true
261
+ EH:
262
+ :country_name: Western Sahara
263
+ :alpha3: ESH
264
+ :has_postal_code: true
265
+ ER:
266
+ :country_name: Eritrea
267
+ :alpha3: ERI
268
+ :has_postal_code: false
269
+ ES:
270
+ :country_name: Spain
271
+ :alpha3: ESP
272
+ :has_postal_code: true
273
+ ET:
274
+ :country_name: Ethiopia
275
+ :alpha3: ETH
276
+ :has_postal_code: true
277
+ FI:
278
+ :country_name: Finland
279
+ :alpha3: FIN
280
+ :has_postal_code: true
281
+ FJ:
282
+ :country_name: Fiji
283
+ :alpha3: FJI
284
+ :has_postal_code: false
285
+ FK:
286
+ :country_name: Falkland Islands
287
+ :alpha3: FLK
288
+ :has_postal_code: true
289
+ FM:
290
+ :country_name: Micronesia
291
+ :alpha3: FSM
292
+ :has_postal_code: true
293
+ FO:
294
+ :country_name: Faroe Islands
295
+ :alpha3: FRO
296
+ :has_postal_code: true
297
+ FR:
298
+ :country_name: France
299
+ :alpha3: FRA
300
+ :has_postal_code: true
301
+ GA:
302
+ :country_name: Gabon
303
+ :alpha3: GAB
304
+ :has_postal_code: true
305
+ GB:
306
+ :country_name: United Kingdom
307
+ :alpha3: GBR
308
+ :has_postal_code: true
309
+ GD:
310
+ :country_name: Grenada
311
+ :alpha3: GRD
312
+ :has_postal_code: false
313
+ GE:
314
+ :country_name: Georgia
315
+ :alpha3: GEO
316
+ :has_postal_code: true
317
+ GF:
318
+ :country_name: French Guiana
319
+ :alpha3: GUF
320
+ :has_postal_code: true
321
+ GG:
322
+ :country_name: Guernsey
323
+ :alpha3: GGY
324
+ :has_postal_code: true
325
+ GH:
326
+ :country_name: Ghana
327
+ :alpha3: GHA
328
+ :has_postal_code: false
329
+ GI:
330
+ :country_name: Gibraltar
331
+ :alpha3: GIB
332
+ :has_postal_code: true
333
+ GL:
334
+ :country_name: Greenland
335
+ :alpha3: GRL
336
+ :has_postal_code: true
337
+ GM:
338
+ :country_name: Gambia
339
+ :alpha3: GMB
340
+ :has_postal_code: false
341
+ GN:
342
+ :country_name: Guinea
343
+ :alpha3: GIN
344
+ :has_postal_code: false
345
+ GP:
346
+ :country_name: Guadeloupe
347
+ :alpha3: GLP
348
+ :has_postal_code: true
349
+ GQ:
350
+ :country_name: Equatorial Guinea
351
+ :alpha3: GNQ
352
+ :has_postal_code: false
353
+ GR:
354
+ :country_name: Greece
355
+ :alpha3: GRC
356
+ :has_postal_code: true
357
+ GS:
358
+ :country_name: South Georgia and the South Sandwich Islands
359
+ :alpha3: SGS
360
+ :has_postal_code: true
361
+ GT:
362
+ :country_name: Guatemala
363
+ :alpha3: GTM
364
+ :has_postal_code: true
365
+ GU:
366
+ :country_name: Guam
367
+ :alpha3: GUM
368
+ :has_postal_code: true
369
+ GW:
370
+ :country_name: Guinea-Bissau
371
+ :alpha3: GNB
372
+ :has_postal_code: true
373
+ GY:
374
+ :country_name: Guyana
375
+ :alpha3: GUY
376
+ :has_postal_code: false
377
+ HK:
378
+ :country_name: Hong Kong
379
+ :alpha3: HKG
380
+ :has_postal_code: false
381
+ HM:
382
+ :country_name: Heard Island and McDonald Islands
383
+ :alpha3: HMD
384
+ :has_postal_code: true
385
+ HN:
386
+ :country_name: Honduras
387
+ :alpha3: HND
388
+ :has_postal_code: true
389
+ HR:
390
+ :country_name: Croatia
391
+ :alpha3: HRV
392
+ :has_postal_code: true
393
+ HT:
394
+ :country_name: Haiti
395
+ :alpha3: HTI
396
+ :has_postal_code: true
397
+ HU:
398
+ :country_name: Hungary
399
+ :alpha3: HUN
400
+ :has_postal_code: true
401
+ ID:
402
+ :country_name: Indonesia
403
+ :alpha3: IDN
404
+ :has_postal_code: true
405
+ IE:
406
+ :country_name: Ireland
407
+ :alpha3: IRL
408
+ :has_postal_code: false
409
+ IL:
410
+ :country_name: Israel
411
+ :alpha3: ISR
412
+ :has_postal_code: true
413
+ IM:
414
+ :country_name: Isle of Man
415
+ :alpha3: IMN
416
+ :has_postal_code: true
417
+ IN:
418
+ :country_name: India
419
+ :alpha3: IND
420
+ :has_postal_code: true
421
+ IO:
422
+ :country_name: British Indian Ocean Territory
423
+ :alpha3: IOT
424
+ :has_postal_code: true
425
+ IQ:
426
+ :country_name: Iraq
427
+ :alpha3: IRQ
428
+ :has_postal_code: true
429
+ IR:
430
+ :country_name: Iran
431
+ :alpha3: IRN
432
+ :has_postal_code: true
433
+ IS:
434
+ :country_name: Iceland
435
+ :alpha3: ISL
436
+ :has_postal_code: true
437
+ IT:
438
+ :country_name: Italy
439
+ :alpha3: ITA
440
+ :has_postal_code: true
441
+ JE:
442
+ :country_name: Jersey
443
+ :alpha3: JEY
444
+ :has_postal_code: true
445
+ JM:
446
+ :country_name: Jamaica
447
+ :alpha3: JAM
448
+ :has_postal_code: false
449
+ JO:
450
+ :country_name: Jordan
451
+ :alpha3: JOR
452
+ :has_postal_code: true
453
+ JP:
454
+ :country_name: Japan
455
+ :alpha3: JPN
456
+ :has_postal_code: true
457
+ KE:
458
+ :country_name: Kenya
459
+ :alpha3: KEN
460
+ :has_postal_code: false
461
+ KG:
462
+ :country_name: Kyrgyzstan
463
+ :alpha3: KGZ
464
+ :has_postal_code: true
465
+ KH:
466
+ :country_name: Cambodia
467
+ :alpha3: KHM
468
+ :has_postal_code: true
469
+ KI:
470
+ :country_name: Kiribati
471
+ :alpha3: KIR
472
+ :has_postal_code: false
473
+ KM:
474
+ :country_name: Comoros
475
+ :alpha3: COM
476
+ :has_postal_code: false
477
+ KN:
478
+ :country_name: Saint Kitts and Nevis
479
+ :alpha3: KNA
480
+ :has_postal_code: false
481
+ KP:
482
+ :country_name: North Korea
483
+ :alpha3: PRK
484
+ :has_postal_code: false
485
+ KR:
486
+ :country_name: South Korea
487
+ :alpha3: KOR
488
+ :has_postal_code: true
489
+ KW:
490
+ :country_name: Kuwait
491
+ :alpha3: KWT
492
+ :has_postal_code: true
493
+ KY:
494
+ :country_name: Cayman Islands
495
+ :alpha3: CYM
496
+ :has_postal_code: true
497
+ KZ:
498
+ :country_name: Kazakhstan
499
+ :alpha3: KAZ
500
+ :has_postal_code: true
501
+ LA:
502
+ :country_name: Laos
503
+ :alpha3: LAO
504
+ :has_postal_code: true
505
+ LB:
506
+ :country_name: Lebanon
507
+ :alpha3: LBN
508
+ :has_postal_code: true
509
+ LC:
510
+ :country_name: Saint Lucia
511
+ :alpha3: LCA
512
+ :has_postal_code: false
513
+ LI:
514
+ :country_name: Liechtenstein
515
+ :alpha3: LIE
516
+ :has_postal_code: true
517
+ LK:
518
+ :country_name: Sri Lanka
519
+ :alpha3: LKA
520
+ :has_postal_code: true
521
+ LR:
522
+ :country_name: Liberia
523
+ :alpha3: LBR
524
+ :has_postal_code: true
525
+ LS:
526
+ :country_name: Lesotho
527
+ :alpha3: LSO
528
+ :has_postal_code: true
529
+ LT:
530
+ :country_name: Lithuania
531
+ :alpha3: LTU
532
+ :has_postal_code: true
533
+ LU:
534
+ :country_name: Luxembourg
535
+ :alpha3: LUX
536
+ :has_postal_code: true
537
+ LV:
538
+ :country_name: Latvia
539
+ :alpha3: LVA
540
+ :has_postal_code: true
541
+ LY:
542
+ :country_name: Libya
543
+ :alpha3: LBY
544
+ :has_postal_code: true
545
+ MA:
546
+ :country_name: Morocco
547
+ :alpha3: MAR
548
+ :has_postal_code: true
549
+ MC:
550
+ :country_name: Monaco
551
+ :alpha3: MCO
552
+ :has_postal_code: true
553
+ MD:
554
+ :country_name: Moldova
555
+ :alpha3: MDA
556
+ :has_postal_code: true
557
+ ME:
558
+ :country_name: Montenegro
559
+ :alpha3: MNE
560
+ :has_postal_code: true
561
+ MF:
562
+ :country_name: Saint Martin
563
+ :alpha3: MAF
564
+ :has_postal_code: true
565
+ MG:
566
+ :country_name: Madagascar
567
+ :alpha3: MDG
568
+ :has_postal_code: true
569
+ MH:
570
+ :country_name: Marshall Islands
571
+ :alpha3: MHL
572
+ :has_postal_code: true
573
+ MK:
574
+ :country_name: Macedonia
575
+ :alpha3: MKD
576
+ :has_postal_code: true
577
+ ML:
578
+ :country_name: Mali
579
+ :alpha3: MLI
580
+ :has_postal_code: false
581
+ MM:
582
+ :country_name: Myanmar [Burma]
583
+ :alpha3: MMR
584
+ :has_postal_code: true
585
+ MN:
586
+ :country_name: Mongolia
587
+ :alpha3: MNG
588
+ :has_postal_code: true
589
+ MO:
590
+ :country_name: Macao
591
+ :alpha3: MAC
592
+ :has_postal_code: false
593
+ MP:
594
+ :country_name: Northern Mariana Islands
595
+ :alpha3: MNP
596
+ :has_postal_code: true
597
+ MQ:
598
+ :country_name: Martinique
599
+ :alpha3: MTQ
600
+ :has_postal_code: true
601
+ MR:
602
+ :country_name: Mauritania
603
+ :alpha3: MRT
604
+ :has_postal_code: false
605
+ MS:
606
+ :country_name: Montserrat
607
+ :alpha3: MSR
608
+ :has_postal_code: false
609
+ MT:
610
+ :country_name: Malta
611
+ :alpha3: MLT
612
+ :has_postal_code: true
613
+ MU:
614
+ :country_name: Mauritius
615
+ :alpha3: MUS
616
+ :has_postal_code: false
617
+ MV:
618
+ :country_name: Maldives
619
+ :alpha3: MDV
620
+ :has_postal_code: true
621
+ MW:
622
+ :country_name: Malawi
623
+ :alpha3: MWI
624
+ :has_postal_code: false
625
+ MX:
626
+ :country_name: Mexico
627
+ :alpha3: MEX
628
+ :has_postal_code: true
629
+ MY:
630
+ :country_name: Malaysia
631
+ :alpha3: MYS
632
+ :has_postal_code: true
633
+ MZ:
634
+ :country_name: Mozambique
635
+ :alpha3: MOZ
636
+ :has_postal_code: true
637
+ NA:
638
+ :country_name: Namibia
639
+ :alpha3: NAM
640
+ :has_postal_code: true
641
+ NC:
642
+ :country_name: New Caledonia
643
+ :alpha3: NCL
644
+ :has_postal_code: true
645
+ NE:
646
+ :country_name: Niger
647
+ :alpha3: NER
648
+ :has_postal_code: true
649
+ NF:
650
+ :country_name: Norfolk Island
651
+ :alpha3: NFK
652
+ :has_postal_code: true
653
+ NG:
654
+ :country_name: Nigeria
655
+ :alpha3: NGA
656
+ :has_postal_code: true
657
+ NI:
658
+ :country_name: Nicaragua
659
+ :alpha3: NIC
660
+ :has_postal_code: true
661
+ NL:
662
+ :country_name: Netherlands
663
+ :alpha3: NLD
664
+ :has_postal_code: true
665
+ NO:
666
+ :country_name: Norway
667
+ :alpha3: NOR
668
+ :has_postal_code: true
669
+ NP:
670
+ :country_name: Nepal
671
+ :alpha3: NPL
672
+ :has_postal_code: true
673
+ NR:
674
+ :country_name: Nauru
675
+ :alpha3: NRU
676
+ :has_postal_code: false
677
+ NU:
678
+ :country_name: Niue
679
+ :alpha3: NIU
680
+ :has_postal_code: false
681
+ NZ:
682
+ :country_name: New Zealand
683
+ :alpha3: NZL
684
+ :has_postal_code: true
685
+ OM:
686
+ :country_name: Oman
687
+ :alpha3: OMN
688
+ :has_postal_code: true
689
+ PA:
690
+ :country_name: Panama
691
+ :alpha3: PAN
692
+ :has_postal_code: false
693
+ PE:
694
+ :country_name: Peru
695
+ :alpha3: PER
696
+ :has_postal_code: true
697
+ PF:
698
+ :country_name: French Polynesia
699
+ :alpha3: PYF
700
+ :has_postal_code: true
701
+ PG:
702
+ :country_name: Papua New Guinea
703
+ :alpha3: PNG
704
+ :has_postal_code: true
705
+ PH:
706
+ :country_name: Philippines
707
+ :alpha3: PHL
708
+ :has_postal_code: true
709
+ PK:
710
+ :country_name: Pakistan
711
+ :alpha3: PAK
712
+ :has_postal_code: true
713
+ PL:
714
+ :country_name: Poland
715
+ :alpha3: POL
716
+ :has_postal_code: true
717
+ PM:
718
+ :country_name: Saint Pierre and Miquelon
719
+ :alpha3: SPM
720
+ :has_postal_code: true
721
+ PN:
722
+ :country_name: Pitcairn Islands
723
+ :alpha3: PCN
724
+ :has_postal_code: true
725
+ PR:
726
+ :country_name: Puerto Rico
727
+ :alpha3: PRI
728
+ :has_postal_code: true
729
+ PS:
730
+ :country_name: Palestine
731
+ :alpha3: PSE
732
+ :has_postal_code: true
733
+ PT:
734
+ :country_name: Portugal
735
+ :alpha3: PRT
736
+ :has_postal_code: true
737
+ PW:
738
+ :country_name: Palau
739
+ :alpha3: PLW
740
+ :has_postal_code: true
741
+ PY:
742
+ :country_name: Paraguay
743
+ :alpha3: PRY
744
+ :has_postal_code: true
745
+ QA:
746
+ :country_name: Qatar
747
+ :alpha3: QAT
748
+ :has_postal_code: false
749
+ RE:
750
+ :country_name: Réunion
751
+ :alpha3: REU
752
+ :has_postal_code: true
753
+ RO:
754
+ :country_name: Romania
755
+ :alpha3: ROU
756
+ :has_postal_code: true
757
+ RS:
758
+ :country_name: Serbia
759
+ :alpha3: SRB
760
+ :has_postal_code: true
761
+ RU:
762
+ :country_name: Russia
763
+ :alpha3: RUS
764
+ :has_postal_code: true
765
+ RW:
766
+ :country_name: Rwanda
767
+ :alpha3: RWA
768
+ :has_postal_code: false
769
+ SA:
770
+ :country_name: Saudi Arabia
771
+ :alpha3: SAU
772
+ :has_postal_code: false
773
+ SB:
774
+ :country_name: Solomon Islands
775
+ :alpha3: SLB
776
+ :has_postal_code: false
777
+ SC:
778
+ :country_name: Seychelles
779
+ :alpha3: SYC
780
+ :has_postal_code: false
781
+ SD:
782
+ :country_name: Sudan
783
+ :alpha3: SDN
784
+ :has_postal_code: true
785
+ SE:
786
+ :country_name: Sweden
787
+ :alpha3: SWE
788
+ :has_postal_code: true
789
+ SG:
790
+ :country_name: Singapore
791
+ :alpha3: SGP
792
+ :has_postal_code: true
793
+ SH:
794
+ :country_name: Saint Helena
795
+ :alpha3: SHN
796
+ :has_postal_code: true
797
+ SI:
798
+ :country_name: Slovenia
799
+ :alpha3: SVN
800
+ :has_postal_code: true
801
+ SJ:
802
+ :country_name: Svalbard and Jan Mayen
803
+ :alpha3: SJM
804
+ :has_postal_code: true
805
+ SK:
806
+ :country_name: Slovakia
807
+ :alpha3: SVK
808
+ :has_postal_code: true
809
+ SL:
810
+ :country_name: Sierra Leone
811
+ :alpha3: SLE
812
+ :has_postal_code: false
813
+ SM:
814
+ :country_name: San Marino
815
+ :alpha3: SMR
816
+ :has_postal_code: true
817
+ SN:
818
+ :country_name: Senegal
819
+ :alpha3: SEN
820
+ :has_postal_code: true
821
+ SO:
822
+ :country_name: Somalia
823
+ :alpha3: SOM
824
+ :has_postal_code: false
825
+ SR:
826
+ :country_name: Suriname
827
+ :alpha3: SUR
828
+ :has_postal_code: false
829
+ SS:
830
+ :country_name: South Sudan
831
+ :alpha3: SSD
832
+ :has_postal_code: true
833
+ ST:
834
+ :country_name: São Tomé and Príncipe
835
+ :alpha3: STP
836
+ :has_postal_code: false
837
+ SV:
838
+ :country_name: El Salvador
839
+ :alpha3: SLV
840
+ :has_postal_code: true
841
+ SX:
842
+ :country_name: Sint Maarten
843
+ :alpha3: SXM
844
+ :has_postal_code: true
845
+ SY:
846
+ :country_name: Syria
847
+ :alpha3: SYR
848
+ :has_postal_code: false
849
+ SZ:
850
+ :country_name: Swaziland
851
+ :alpha3: SWZ
852
+ :has_postal_code: true
853
+ TC:
854
+ :country_name: Turks and Caicos Islands
855
+ :alpha3: TCA
856
+ :has_postal_code: true
857
+ TD:
858
+ :country_name: Chad
859
+ :alpha3: TCD
860
+ :has_postal_code: true
861
+ TF:
862
+ :country_name: French Southern Territories
863
+ :alpha3: ATF
864
+ :has_postal_code: false
865
+ TG:
866
+ :country_name: Togo
867
+ :alpha3: TGO
868
+ :has_postal_code: true
869
+ TH:
870
+ :country_name: Thailand
871
+ :alpha3: THA
872
+ :has_postal_code: true
873
+ TJ:
874
+ :country_name: Tajikistan
875
+ :alpha3: TJK
876
+ :has_postal_code: true
877
+ TK:
878
+ :country_name: Tokelau
879
+ :alpha3: TKL
880
+ :has_postal_code: false
881
+ TL:
882
+ :country_name: East Timor
883
+ :alpha3: TLS
884
+ :has_postal_code: false
885
+ TM:
886
+ :country_name: Turkmenistan
887
+ :alpha3: TKM
888
+ :has_postal_code: true
889
+ TN:
890
+ :country_name: Tunisia
891
+ :alpha3: TUN
892
+ :has_postal_code: true
893
+ TO:
894
+ :country_name: Tonga
895
+ :alpha3: TON
896
+ :has_postal_code: false
897
+ TR:
898
+ :country_name: Turkey
899
+ :alpha3: TUR
900
+ :has_postal_code: true
901
+ TT:
902
+ :country_name: Trinidad and Tobago
903
+ :alpha3: TTO
904
+ :has_postal_code: false
905
+ TV:
906
+ :country_name: Tuvalu
907
+ :alpha3: TUV
908
+ :has_postal_code: true
909
+ TW:
910
+ :country_name: Taiwan
911
+ :alpha3: TWN
912
+ :has_postal_code: true
913
+ TZ:
914
+ :country_name: Tanzania
915
+ :alpha3: TZA
916
+ :has_postal_code: false
917
+ UA:
918
+ :country_name: Ukraine
919
+ :alpha3: UKR
920
+ :has_postal_code: true
921
+ UG:
922
+ :country_name: Uganda
923
+ :alpha3: UGA
924
+ :has_postal_code: false
925
+ UM:
926
+ :country_name: U.S. Minor Outlying Islands
927
+ :alpha3: UMI
928
+ :has_postal_code: true
929
+ US:
930
+ :country_name: United States
931
+ :alpha3: USA
932
+ :has_postal_code: true
933
+ UY:
934
+ :country_name: Uruguay
935
+ :alpha3: URY
936
+ :has_postal_code: true
937
+ UZ:
938
+ :country_name: Uzbekistan
939
+ :alpha3: UZB
940
+ :has_postal_code: true
941
+ VA:
942
+ :country_name: Vatican City
943
+ :alpha3: VAT
944
+ :has_postal_code: true
945
+ VC:
946
+ :country_name: Saint Vincent and the Grenadines
947
+ :alpha3: VCT
948
+ :has_postal_code: true
949
+ VE:
950
+ :country_name: Venezuela
951
+ :alpha3: VEN
952
+ :has_postal_code: true
953
+ VG:
954
+ :country_name: British Virgin Islands
955
+ :alpha3: VGB
956
+ :has_postal_code: true
957
+ VI:
958
+ :country_name: U.S. Virgin Islands
959
+ :alpha3: VIR
960
+ :has_postal_code: true
961
+ VN:
962
+ :country_name: Vietnam
963
+ :alpha3: VNM
964
+ :has_postal_code: true
965
+ VU:
966
+ :country_name: Vanuatu
967
+ :alpha3: VUT
968
+ :has_postal_code: false
969
+ WF:
970
+ :country_name: Wallis and Futuna
971
+ :alpha3: WLF
972
+ :has_postal_code: true
973
+ WS:
974
+ :country_name: Samoa
975
+ :alpha3: WSM
976
+ :has_postal_code: true
977
+ XK:
978
+ :country_name: Kosovo
979
+ :alpha3: XKX
980
+ :has_postal_code: true
981
+ YE:
982
+ :country_name: Yemen
983
+ :alpha3: YEM
984
+ :has_postal_code: false
985
+ YT:
986
+ :country_name: Mayotte
987
+ :alpha3: MYT
988
+ :has_postal_code: true
989
+ ZA:
990
+ :country_name: South Africa
991
+ :alpha3: ZAF
992
+ :has_postal_code: false
993
+ ZM:
994
+ :country_name: Zambia
995
+ :alpha3: ZMB
996
+ :has_postal_code: true
997
+ ZW:
998
+ :country_name: Zimbabwe
999
+ :alpha3: ZWE
1000
+ :has_postal_code: false