worldwide 1.13.0 → 1.14.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 +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/worldwide/region.rb +12 -0
- data/lib/worldwide/regions_loader.rb +3 -0
- data/lib/worldwide/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f8e1682267c61bc3105042d14c28f05ca21730e15f4da748369a135e30650228
|
|
4
|
+
data.tar.gz: 0b956ea2386d92d289b5c59982aea7f9469ef383fa2d4047ecb91892391493d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 737c81fe51007d97a2d1a6e8641f4b532e92c2039c96814477ad805b5db3619ca9ecfe93c67f5585c316f9740247cbc5698731bcb5f20495fe3cad60acad0318
|
|
7
|
+
data.tar.gz: 5e7c43277a21471884a70def39f0e3a314793587f0542b54906370a95d06cdfbd0ecddc098c191442298aa3d5f065781882ef285b421e22b0a7baca3833cc620
|
data/CHANGELOG.md
CHANGED
|
@@ -30,6 +30,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## [1.14.0] - 2024-11-07
|
|
34
|
+
- Add example_city_zip and priority accessors to Regions [#298](https://github.com/Shopify/worldwide/pull/298)
|
|
35
|
+
- Add tax_type accessor to Regions [#299](https://github.com/Shopify/worldwide/pull/299)
|
|
36
|
+
|
|
33
37
|
## [1.13.0] - 2024-11-06
|
|
34
38
|
- Add `zip_prefixes` for Spain. [#295](https://github.com/Shopify/worldwide/pull/295)
|
|
35
39
|
- Move expensive resource initialization into an explicit `eager_load!` namespace method
|
data/Gemfile.lock
CHANGED
data/lib/worldwide/region.rb
CHANGED
|
@@ -17,6 +17,7 @@ module Worldwide
|
|
|
17
17
|
:building_number_required,
|
|
18
18
|
:currency,
|
|
19
19
|
:example_city,
|
|
20
|
+
:example_city_zip,
|
|
20
21
|
:example_address,
|
|
21
22
|
:flag,
|
|
22
23
|
:format,
|
|
@@ -28,6 +29,7 @@ module Worldwide
|
|
|
28
29
|
:languages,
|
|
29
30
|
:neighbours,
|
|
30
31
|
:numeric_three,
|
|
32
|
+
:priority,
|
|
31
33
|
:week_start_day,
|
|
32
34
|
:unit_system,
|
|
33
35
|
:zip_autofill_enabled,
|
|
@@ -67,6 +69,13 @@ module Worldwide
|
|
|
67
69
|
# A major city in the given region that can be used as an example
|
|
68
70
|
attr_accessor :example_city
|
|
69
71
|
|
|
72
|
+
# A zip code in the given region that can be used as an example; corresponds to example_city
|
|
73
|
+
attr_accessor :example_city_zip
|
|
74
|
+
|
|
75
|
+
# A value that can be used to order zones
|
|
76
|
+
# Some countries, Japan, for example, customarily order zones non-alphabetically.
|
|
77
|
+
attr_accessor :priority
|
|
78
|
+
|
|
70
79
|
# A full address in the given region that can be used as an example
|
|
71
80
|
attr_accessor :example_address
|
|
72
81
|
|
|
@@ -157,6 +166,9 @@ module Worldwide
|
|
|
157
166
|
# "generic" VAT tax rate on "most" goods
|
|
158
167
|
attr_reader :tax_rate
|
|
159
168
|
|
|
169
|
+
# The type of tax for this region, e.g. "harmonized"
|
|
170
|
+
attr_accessor :tax_type
|
|
171
|
+
|
|
160
172
|
# tags that help us group the region, e.g. "EU-member"
|
|
161
173
|
attr_accessor :tags
|
|
162
174
|
|
|
@@ -132,6 +132,9 @@ module Worldwide
|
|
|
132
132
|
region.code_alternates = zone["code_alternates"] || []
|
|
133
133
|
region.name_alternates = zone["name_alternates"] || []
|
|
134
134
|
region.example_city = zone["example_city"]
|
|
135
|
+
region.example_city_zip = zone["example_city_zip"]
|
|
136
|
+
region.priority = zone["priority"]
|
|
137
|
+
region.tax_type = zone["tax_type"] || nil
|
|
135
138
|
region.neighbours = zone["neighboring_zones"]
|
|
136
139
|
region.zip_prefixes = zone["zip_prefixes"] || []
|
|
137
140
|
end
|
data/lib/worldwide/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: worldwide
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.14.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Shopify
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-11-
|
|
11
|
+
date: 2024-11-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|