vng 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/vng/availability.rb +1 -1
- data/lib/vng/breed.rb +1 -1
- data/lib/vng/franchise.rb +1 -1
- data/lib/vng/mock_request.rb +5 -1
- data/lib/vng/price_list.rb +1 -1
- data/lib/vng/route.rb +1 -1
- data/lib/vng/version.rb +1 -1
- data/lib/vng/zip.rb +2 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 240226a07b22399db9b611a1651c0ca709b931620ac224e7ac01e2e289e4cd97
|
4
|
+
data.tar.gz: f10775485ccc1b6cdc9a9873a5a9296b4ac4fb2796f4d1a2afadb7eec1165264
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a61c7417e857912b88ef45a013e0567a1f3fdbf6c43b2a2a3cb8d8c390dc2830c590da0c0af7d5b6915a2fd702ce84f30876c042a7571d68ef4b68b11c6313fd
|
7
|
+
data.tar.gz: 31369f5292794ec854e41dc6a40537e9f5a25d3ba4d4e74c1ec02494bf97920a6a9ca82e8c022c0f841d1953fd57a89e2eb3248554f1c156957ac3c8c8219eeb
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## [2.2.1] - 2025-01-02
|
2
|
+
|
3
|
+
- Always return an array for .all methods
|
4
|
+
- Discard ZIP codes 'Owned - Not In Service'
|
5
|
+
|
1
6
|
## [2.2.0] - 2025-01-02
|
2
7
|
|
3
8
|
- Adds Franchise#cell and Franchise#phone
|
@@ -12,7 +17,7 @@
|
|
12
17
|
|
13
18
|
## [2.0.0] - 2024-12-26
|
14
19
|
|
15
|
-
**
|
20
|
+
**Breaking changes**
|
16
21
|
|
17
22
|
- Remove ServiceType.all and ServiceType.where(zip:)
|
18
23
|
|
data/lib/vng/availability.rb
CHANGED
@@ -28,7 +28,7 @@ module Vng
|
|
28
28
|
|
29
29
|
data = request path: PATH, body: body
|
30
30
|
|
31
|
-
data
|
31
|
+
data.fetch('Availability', []).map do |availability|
|
32
32
|
route_id = availability['routeID'].to_i
|
33
33
|
date = Date.strptime availability['dayID'], '%Y%m%d'
|
34
34
|
minutes = availability['startTime'].to_i
|
data/lib/vng/breed.rb
CHANGED
data/lib/vng/franchise.rb
CHANGED
data/lib/vng/mock_request.rb
CHANGED
@@ -54,7 +54,11 @@ module Vng
|
|
54
54
|
{ "Zip"=>{"zipCodeID"=>"1", "zipCode"=>"21765", "zoneName"=>"Brentwood", "defaultCity"=>"Los Angeles", "provinceAbbr"=>"CA", "franchiseID"=>"105"},
|
55
55
|
"ServiceTypes"=>[{"serviceTypeID"=>14, "serviceType"=>"Pet Grooming", "duration" => 45}]}
|
56
56
|
else
|
57
|
-
{ "Zips"=>[
|
57
|
+
{ "Zips"=>[
|
58
|
+
{ "zip"=>"21763", "zoneName"=>"Brentwood", "state"=>"MD", "zipStatus"=>"Owned - Not In Service" },
|
59
|
+
{ "zip"=>"21764", "zoneName"=>"Brentwood", "state"=>"MD", "zipStatus"=>"Owned – Deactivated" },
|
60
|
+
{ "zip"=>"21765", "zoneName"=>"Brentwood", "state"=>"MD", "zipStatus"=>"Owned - Currently Serviced" },
|
61
|
+
] }
|
58
62
|
end
|
59
63
|
when '/api/v1/resources/franchises/'
|
60
64
|
if @body.key?(:objectID)
|
data/lib/vng/price_list.rb
CHANGED
data/lib/vng/route.rb
CHANGED
data/lib/vng/version.rb
CHANGED
data/lib/vng/zip.rb
CHANGED
@@ -19,9 +19,8 @@ module Vng
|
|
19
19
|
def self.all
|
20
20
|
data = request path: PATH
|
21
21
|
|
22
|
-
data
|
23
|
-
|
24
|
-
franchise['zipStatus'].eql? 'Owned – Deactivated'
|
22
|
+
data.fetch('Zips', []).reject do |franchise|
|
23
|
+
['Owned – Deactivated', 'Owned - Not In Service'].include? franchise['zipStatus']
|
25
24
|
end.map do |body|
|
26
25
|
zip = body['zip']
|
27
26
|
state = body['state']
|