local_postal 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +4 -0
  4. data/CODE_OF_CONDUCT.md +26 -0
  5. data/Gemfile +3 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +124 -0
  8. data/Rakefile +13 -0
  9. data/bin/console +7 -0
  10. data/bin/setup +7 -0
  11. data/config/formats/AC.json +13 -0
  12. data/config/formats/AD.json +15 -0
  13. data/config/formats/AE.json +13 -0
  14. data/config/formats/AF.json +13 -0
  15. data/config/formats/AG.json +12 -0
  16. data/config/formats/AI.json +13 -0
  17. data/config/formats/AL.json +15 -0
  18. data/config/formats/AM.json +16 -0
  19. data/config/formats/AR.json +19 -0
  20. data/config/formats/AS.json +23 -0
  21. data/config/formats/AT.json +16 -0
  22. data/config/formats/AU.json +19 -0
  23. data/config/formats/AX.json +17 -0
  24. data/config/formats/AZ.json +16 -0
  25. data/config/formats/BA.json +15 -0
  26. data/config/formats/BB.json +15 -0
  27. data/config/formats/BD.json +15 -0
  28. data/config/formats/BE.json +16 -0
  29. data/config/formats/BF.json +13 -0
  30. data/config/formats/BG.json +15 -0
  31. data/config/formats/BH.json +15 -0
  32. data/config/formats/BJ.json +15 -0
  33. data/config/formats/BL.json +19 -0
  34. data/config/formats/BM.json +15 -0
  35. data/config/formats/BN.json +15 -0
  36. data/config/formats/BO.json +15 -0
  37. data/config/formats/BR.json +20 -0
  38. data/config/formats/BS.json +14 -0
  39. data/config/formats/BT.json +15 -0
  40. data/config/formats/BY.json +16 -0
  41. data/config/formats/CA.json +24 -0
  42. data/config/formats/CC.json +17 -0
  43. data/config/formats/CD.json +13 -0
  44. data/config/formats/CH.json +15 -0
  45. data/config/formats/CI.json +13 -0
  46. data/config/formats/CL.json +17 -0
  47. data/config/formats/CN.json +24 -0
  48. data/config/formats/CO.json +16 -0
  49. data/config/formats/CR.json +15 -0
  50. data/config/formats/CV.json +16 -0
  51. data/config/formats/CX.json +17 -0
  52. data/config/formats/CY.json +15 -0
  53. data/config/formats/CZ.json +15 -0
  54. data/config/formats/DE.json +16 -0
  55. data/config/formats/DK.json +16 -0
  56. data/config/formats/DO.json +15 -0
  57. data/config/formats/DZ.json +15 -0
  58. data/config/formats/EC.json +16 -0
  59. data/config/formats/EE.json +17 -0
  60. data/config/formats/EG.json +16 -0
  61. data/config/formats/EH.json +15 -0
  62. data/config/formats/ES.json +19 -0
  63. data/config/formats/ET.json +15 -0
  64. data/config/formats/FI.json +17 -0
  65. data/config/formats/FK.json +17 -0
  66. data/config/formats/FM.json +23 -0
  67. data/config/formats/FO.json +16 -0
  68. data/config/formats/FR.json +17 -0
  69. data/config/formats/GB.json +18 -0
  70. data/config/formats/GE.json +15 -0
  71. data/config/formats/GF.json +19 -0
  72. data/config/formats/GG.json +17 -0
  73. data/config/formats/GI.json +13 -0
  74. data/config/formats/GL.json +16 -0
  75. data/config/formats/GN.json +15 -0
  76. data/config/formats/GP.json +19 -0
  77. data/config/formats/GR.json +16 -0
  78. data/config/formats/GS.json +17 -0
  79. data/config/formats/GT.json +15 -0
  80. data/config/formats/GU.json +23 -0
  81. data/config/formats/GW.json +15 -0
  82. data/config/formats/HK.json +19 -0
  83. data/config/formats/HN.json +17 -0
  84. data/config/formats/HR.json +16 -0
  85. data/config/formats/HT.json +16 -0
  86. data/config/formats/HU.json +20 -0
  87. data/config/formats/ID.json +16 -0
  88. data/config/formats/IE.json +14 -0
  89. data/config/formats/IL.json +15 -0
  90. data/config/formats/IM.json +17 -0
  91. data/config/formats/IN.json +18 -0
  92. data/config/formats/IO.json +17 -0
  93. data/config/formats/IQ.json +18 -0
  94. data/config/formats/IR.json +17 -0
  95. data/config/formats/IS.json +15 -0
  96. data/config/formats/IT.json +19 -0
  97. data/config/formats/JE.json +17 -0
  98. data/config/formats/JM.json +15 -0
  99. data/config/formats/JO.json +15 -0
  100. data/config/formats/JP.json +23 -0
  101. data/config/formats/KE.json +15 -0
  102. data/config/formats/KG.json +15 -0
  103. data/config/formats/KH.json +15 -0
  104. data/config/formats/KI.json +19 -0
  105. data/config/formats/KM.json +15 -0
  106. data/config/formats/KN.json +15 -0
  107. data/config/formats/KR.json +24 -0
  108. data/config/formats/KW.json +15 -0
  109. data/config/formats/KY.json +15 -0
  110. data/config/formats/KZ.json +16 -0
  111. data/config/formats/LA.json +15 -0
  112. data/config/formats/LB.json +15 -0
  113. data/config/formats/LI.json +17 -0
  114. data/config/formats/LK.json +15 -0
  115. data/config/formats/LR.json +15 -0
  116. data/config/formats/LS.json +15 -0
  117. data/config/formats/LT.json +18 -0
  118. data/config/formats/LU.json +17 -0
  119. data/config/formats/LV.json +16 -0
  120. data/config/formats/MA.json +15 -0
  121. data/config/formats/MC.json +16 -0
  122. data/config/formats/MD.json +16 -0
  123. data/config/formats/ME.json +15 -0
  124. data/config/formats/MF.json +19 -0
  125. data/config/formats/MG.json +15 -0
  126. data/config/formats/MH.json +23 -0
  127. data/config/formats/MK.json +15 -0
  128. data/config/formats/MM.json +15 -0
  129. data/config/formats/MN.json +16 -0
  130. data/config/formats/MO.json +16 -0
  131. data/config/formats/MP.json +23 -0
  132. data/config/formats/MQ.json +19 -0
  133. data/config/formats/MR.json +15 -0
  134. data/config/formats/MT.json +16 -0
  135. data/config/formats/MU.json +16 -0
  136. data/config/formats/MV.json +15 -0
  137. data/config/formats/MW.json +13 -0
  138. data/config/formats/MX.json +20 -0
  139. data/config/formats/MY.json +19 -0
  140. data/config/formats/MZ.json +13 -0
  141. data/config/formats/NC.json +19 -0
  142. data/config/formats/NE.json +15 -0
  143. data/config/formats/NF.json +17 -0
  144. data/config/formats/NG.json +17 -0
  145. data/config/formats/NI.json +17 -0
  146. data/config/formats/NL.json +16 -0
  147. data/config/formats/NO.json +16 -0
  148. data/config/formats/NP.json +15 -0
  149. data/config/formats/NR.json +13 -0
  150. data/config/formats/NZ.json +17 -0
  151. data/config/formats/OM.json +15 -0
  152. data/config/formats/PA.json +15 -0
  153. data/config/formats/PE.json +15 -0
  154. data/config/formats/PF.json +19 -0
  155. data/config/formats/PG.json +17 -0
  156. data/config/formats/PH.json +17 -0
  157. data/config/formats/PK.json +15 -0
  158. data/config/formats/PL.json +16 -0
  159. data/config/formats/PM.json +19 -0
  160. data/config/formats/PN.json +17 -0
  161. data/config/formats/PR.json +21 -0
  162. data/config/formats/PT.json +16 -0
  163. data/config/formats/PW.json +23 -0
  164. data/config/formats/PY.json +15 -0
  165. data/config/formats/QA.json +15 -0
  166. data/config/formats/RE.json +19 -0
  167. data/config/formats/RO.json +17 -0
  168. data/config/formats/RS.json +15 -0
  169. data/config/formats/RU.json +19 -0
  170. data/config/formats/RW.json +15 -0
  171. data/config/formats/SA.json +15 -0
  172. data/config/formats/SC.json +14 -0
  173. data/config/formats/SE.json +17 -0
  174. data/config/formats/SG.json +14 -0
  175. data/config/formats/SH.json +17 -0
  176. data/config/formats/SI.json +16 -0
  177. data/config/formats/SJ.json +16 -0
  178. data/config/formats/SK.json +15 -0
  179. data/config/formats/SM.json +15 -0
  180. data/config/formats/SN.json +15 -0
  181. data/config/formats/SO.json +20 -0
  182. data/config/formats/SR.json +16 -0
  183. data/config/formats/ST.json +13 -0
  184. data/config/formats/SV.json +19 -0
  185. data/config/formats/SZ.json +18 -0
  186. data/config/formats/TA.json +13 -0
  187. data/config/formats/TC.json +17 -0
  188. data/config/formats/TH.json +22 -0
  189. data/config/formats/TJ.json +15 -0
  190. data/config/formats/TM.json +15 -0
  191. data/config/formats/TN.json +15 -0
  192. data/config/formats/TR.json +17 -0
  193. data/config/formats/TV.json +17 -0
  194. data/config/formats/TW.json +23 -0
  195. data/config/formats/TZ.json +15 -0
  196. data/config/formats/UA.json +17 -0
  197. data/config/formats/UM.json +22 -0
  198. data/config/formats/US.json +19 -0
  199. data/config/formats/UY.json +17 -0
  200. data/config/formats/UZ.json +17 -0
  201. data/config/formats/VA.json +15 -0
  202. data/config/formats/VC.json +15 -0
  203. data/config/formats/VE.json +18 -0
  204. data/config/formats/VG.json +14 -0
  205. data/config/formats/VI.json +23 -0
  206. data/config/formats/VN.json +16 -0
  207. data/config/formats/WF.json +19 -0
  208. data/config/formats/XK.json +15 -0
  209. data/config/formats/YT.json +19 -0
  210. data/config/formats/ZA.json +17 -0
  211. data/config/formats/ZM.json +15 -0
  212. data/config/formats/ZZ.json +13 -0
  213. data/lib/local_postal/address.rb +118 -0
  214. data/lib/local_postal/format.rb +79 -0
  215. data/lib/local_postal/version.rb +3 -0
  216. data/lib/local_postal.rb +18 -0
  217. data/lib/tasks/list_supported_countries.rake +21 -0
  218. data/lib/tasks/list_unique_format_variables.rake +12 -0
  219. data/lib/tasks/list_unique_formatting_rules.rake +32 -0
  220. data/local_postal.gemspec +36 -0
  221. metadata +361 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ed2600f0a7379186d3ba0141a63a5b21cd8f13d8
4
+ data.tar.gz: 95ef6f15bec1d8447d59eb7a3fa0c1bc14b3f468
5
+ SHA512:
6
+ metadata.gz: b34fde1812178871e094be8e554f5cc809e6bd7524957d6853cc32c17b418382ca8927a84719a7399a8261db922305d81e52395e2d53f6618f4d7ae80df794e2
7
+ data.tar.gz: cb8a5e216beea4d21be8eb0e0751f467c51993d2d19acc2dc41714fd1a724c8b701fce7a13b5c36c06e1b23e25cd7a88b06a41f6c22bcb5b767593d145f5f817
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.2
4
+ before_install: gem install bundler -v 1.10.6
@@ -0,0 +1,26 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people
4
+ who contribute through reporting issues, posting feature requests, updating
5
+ documentation, submitting pull requests or patches, and other activities.
6
+
7
+ We are committed to making participation in this project a harassment-free
8
+ experience for everyone, regardless of level of experience, gender, gender
9
+ identity and expression, sexual orientation, disability, personal appearance,
10
+ body size, race, ethnicity, age, or religion.
11
+
12
+ Examples of unacceptable behavior by participants include the use of sexual
13
+ language or imagery, derogatory comments or personal attacks, trolling, public
14
+ or private harassment, insults, or other unprofessional conduct.
15
+
16
+ Project maintainers have the right and responsibility to remove, edit, or reject
17
+ comments, commits, code, wiki edits, issues, and other contributions that are
18
+ not aligned to this Code of Conduct. Project maintainers who do not follow the
19
+ Code of Conduct may be removed from the project team.
20
+
21
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
22
+ reported by opening an issue or contacting one or more of the project maintainers.
23
+
24
+ This Code of Conduct is adapted from the
25
+ [Contributor Covenant](http://contributor-covenant.org),
26
+ [version 1.0.0](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Travis Haynes
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
13
+ all 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
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,124 @@
1
+ # LocalPostal
2
+
3
+ Formats addresses using the postal rules of the country it belongs to.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'local_postal'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install local_postal
20
+
21
+ ## Usage
22
+
23
+ The best way to describe how to use this gem is by giving a couple of examples.
24
+
25
+ ```ruby
26
+ address = LocalPostal::Address.new(
27
+ name: 'Sherlock Holmes',
28
+ company: '',
29
+ street_address: '221B Baker Street',
30
+ secondary_address: '',
31
+ city: 'London',
32
+ region: 'England',
33
+ postal_code: 'NW1 6XE',
34
+ country: 'United Kingdom'
35
+ )
36
+
37
+ puts address.lines
38
+ ```
39
+
40
+ The above will output the following:
41
+
42
+ Sherlock Holmes
43
+ 221B Baker Street
44
+ LONDON
45
+ England
46
+ NW1 6XE
47
+ UNITED KINGDOM
48
+
49
+
50
+ Here's another example for the US.
51
+
52
+ ```ruby
53
+ address = LocalPostal::Address.new(
54
+ name: 'Elwood Blues',
55
+ company: 'The Blues Brothers',
56
+ street_address: '1060 West Addison Street',
57
+ secondary_address: '',
58
+ city: 'Chicago',
59
+ region: 'IL',
60
+ postal_code: '60620',
61
+ country: 'United States'
62
+ )
63
+
64
+ puts address.lines
65
+ ```
66
+
67
+ Which will output:
68
+
69
+ Elwood Blues
70
+ The Blues Brothers
71
+ 1060 West Addison Street
72
+ CHICAGO, IL 60620
73
+ UNITED STATES
74
+
75
+ `LocalPostal::Address` is an `ActiveModel::Model` and has some field
76
+ validations based on the shipping rules for its country.
77
+
78
+ ```ruby
79
+ address = LocalPostal::Address.new(
80
+ name: nil,
81
+ street_address: nil,
82
+ city: 'Los Angeles',
83
+ region: 'CA',
84
+ postal_code: 'xxx',
85
+ country: 'United States'
86
+ )
87
+
88
+ address.valid? # => false
89
+ puts address.errors.full_messages
90
+ ```
91
+
92
+ Gives you the following errors:
93
+
94
+ Name is required
95
+ Street address is required
96
+ Postal code is invalid
97
+
98
+ **NOTICE:** This does not check that the address is actually deliverable. It
99
+ only checks that all the required fields are present, and that the postal code
100
+ matches a pattern. For example, if the city was `Bevery Hills`, and the postal
101
+ code was `12345` then `address.valid?` would still return `true`, even though
102
+ the address is physically invalid.
103
+
104
+ ## Development
105
+
106
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
107
+ `rake test` to run the tests. You can also run `bin/console` for an interactive
108
+ prompt that will allow you to experiment.
109
+
110
+ To install this gem onto your local machine, run `bundle exec rake install`.
111
+
112
+ ## Contributing
113
+
114
+ Bug reports and pull requests are welcome on GitHub at
115
+ https://github.com/travishaynes/local_postal.
116
+ This project is intended to be a safe, welcoming space for collaboration, and
117
+ contributors are expected to adhere to the
118
+ [Contributor Covenant](contributor-covenant.org) code of conduct.
119
+
120
+
121
+ ## License
122
+
123
+ The gem is available as open source under the terms of the
124
+ [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,13 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << 'test'
6
+ t.libs << 'lib'
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task :default => :test
11
+
12
+ # load Rake tasks
13
+ Dir[File.expand_path('../lib/tasks/**/*.rake', __FILE__)].each {|f| load f }
data/bin/console ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'local_postal'
5
+ require 'irb'
6
+
7
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+
3
+ set -euo pipefail
4
+
5
+ IFS=$'\n\t'
6
+
7
+ bundle install
@@ -0,0 +1,13 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city"
13
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "locale": "ca",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%postalCode %locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city",
13
+ "postal_code_type": "postal",
14
+ "postal_code_pattern": "AD[1-7]0\\d"
15
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "locale": "ar-Latn",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%administrativeArea",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "administrativeArea"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "administrative_area_type": "emirate"
13
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city"
13
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1"
7
+ ],
8
+ "uppercase_fields": [
9
+ "locality"
10
+ ],
11
+ "locality_type": "city"
12
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city"
13
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%postalCode\n%locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city",
13
+ "postal_code_type": "postal",
14
+ "postal_code_pattern": "\\d{4}"
15
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "locale": "hy-Latn",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%postalCode\n%locality\n%administrativeArea",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "administrative_area_type": "province",
13
+ "locality_type": "city",
14
+ "postal_code_type": "postal",
15
+ "postal_code_pattern": "(37)?\\d{4}"
16
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "locale": "es",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%postalCode %locality\n%administrativeArea",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "addressLine1",
11
+ "addressLine2",
12
+ "locality",
13
+ "postalCode"
14
+ ],
15
+ "administrative_area_type": "province",
16
+ "locality_type": "city",
17
+ "postal_code_type": "postal",
18
+ "postal_code_pattern": "((?:[A-HJ-NP-Z])?\\d{4})([A-Z]{3})?"
19
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality %administrativeArea %postalCode",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality",
8
+ "administrativeArea",
9
+ "postalCode"
10
+ ],
11
+ "uppercase_fields": [
12
+ "addressLine1",
13
+ "addressLine2",
14
+ "locality",
15
+ "recipient",
16
+ "organization",
17
+ "administrativeArea"
18
+ ],
19
+ "administrative_area_type": "state",
20
+ "locality_type": "city",
21
+ "postal_code_type": "zip",
22
+ "postal_code_pattern": "(96799)(?:[ \\-](\\d{4}))?"
23
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%organization\n%recipient\n%addressLine1\n%addressLine2\n%postalCode %locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality",
8
+ "postalCode"
9
+ ],
10
+ "uppercase_fields": [
11
+ "locality"
12
+ ],
13
+ "locality_type": "city",
14
+ "postal_code_type": "postal",
15
+ "postal_code_pattern": "\\d{4}"
16
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "locale": "en",
3
+ "format": "%organization\n%recipient\n%addressLine1\n%addressLine2\n%locality %administrativeArea %postalCode",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality",
8
+ "administrativeArea",
9
+ "postalCode"
10
+ ],
11
+ "uppercase_fields": [
12
+ "locality",
13
+ "administrativeArea"
14
+ ],
15
+ "administrative_area_type": "state",
16
+ "locality_type": "city",
17
+ "postal_code_type": "postal",
18
+ "postal_code_pattern": "\\d{4}"
19
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%organization\n%recipient\n%addressLine1\n%addressLine2\n%postalCode %locality\nÅLAND",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality",
8
+ "postalCode"
9
+ ],
10
+ "uppercase_fields": [
11
+ "locality"
12
+ ],
13
+ "locality_type": "city",
14
+ "postal_code_type": "postal",
15
+ "postal_code_pattern": "22\\d{3}",
16
+ "postal_code_prefix": "AX-"
17
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%postalCode %locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city",
13
+ "postal_code_type": "postal",
14
+ "postal_code_pattern": "\\d{4}",
15
+ "postal_code_prefix": "AZ "
16
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%postalCode %locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city",
13
+ "postal_code_type": "postal",
14
+ "postal_code_pattern": "\\d{5}"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality %postalCode",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city",
13
+ "postal_code_type": "postal",
14
+ "postal_code_pattern": "BB\\d{5}"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality - %postalCode",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city",
13
+ "postal_code_type": "postal",
14
+ "postal_code_pattern": "\\d{4}"
15
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%organization\n%recipient\n%addressLine1\n%addressLine2\n%postalCode %locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality",
8
+ "postalCode"
9
+ ],
10
+ "uppercase_fields": [
11
+ "locality"
12
+ ],
13
+ "locality_type": "city",
14
+ "postal_code_type": "postal",
15
+ "postal_code_pattern": "\\d{4}"
16
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality %sortingCode",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city"
13
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%postalCode %locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city",
13
+ "postal_code_type": "postal",
14
+ "postal_code_pattern": "\\d{4}"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality %postalCode",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city",
13
+ "postal_code_type": "postal",
14
+ "postal_code_pattern": "(?:(?:\\d|1[0-2])\\d{2})?"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "addressLine1",
11
+ "addressLine2",
12
+ "locality"
13
+ ],
14
+ "locality_type": "city"
15
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%organization\n%recipient\n%addressLine1\n%addressLine2\n%postalCode %locality %sortingCode",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality",
8
+ "postalCode"
9
+ ],
10
+ "uppercase_fields": [
11
+ "addressLine1",
12
+ "addressLine2",
13
+ "locality",
14
+ "sortingCode"
15
+ ],
16
+ "locality_type": "city",
17
+ "postal_code_type": "postal",
18
+ "postal_code_pattern": "9[78][01]\\d{2}"
19
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality %postalCode",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city",
13
+ "postal_code_type": "postal",
14
+ "postal_code_pattern": "[A-Z]{2}[ ]?[A-Z0-9]{2}"
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "locale": "und",
3
+ "format": "%recipient\n%organization\n%addressLine1\n%addressLine2\n%locality %postalCode",
4
+ "required_fields": [
5
+ "recipient",
6
+ "addressLine1",
7
+ "locality"
8
+ ],
9
+ "uppercase_fields": [
10
+ "locality"
11
+ ],
12
+ "locality_type": "city",
13
+ "postal_code_type": "postal",
14
+ "postal_code_pattern": "[A-Z]{2}[ ]?\\d{4}"
15
+ }