vng 2.2.0 → 2.2.2
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 +10 -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 +7 -3
- 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 +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13102c00b9a0cc936d1924e3f9c1d509becb7193507872c91be6b12acb8fb259
|
4
|
+
data.tar.gz: fcaf0e862a7e79726d046578db9527232ca470e1f241f50b5bcb59321b8d61bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 906e8994e2a50ed98daced686ec4f6771c7dffd273c41cbf73162ec345e610f895893eafc14e1fef2c7cc2813134e3afac7847c11b804fb0d7a1fb91d894c722
|
7
|
+
data.tar.gz: d9dbb286a18a733819894f120b5b020854486c747513e7cdf77a1ba2ab75a8db45fcea930d737d176f013311a9f0f559f7b4044d58aeb776a72b02e7cc480689
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## [2.2.2] - 2025-01-03
|
2
|
+
|
3
|
+
- Adjust mocks to only return one 15 Step Spa item
|
4
|
+
|
5
|
+
## [2.2.1] - 2025-01-02
|
6
|
+
|
7
|
+
- Always return an array for .all methods
|
8
|
+
- Discard ZIP codes 'Owned - Not In Service'
|
9
|
+
|
1
10
|
## [2.2.0] - 2025-01-02
|
2
11
|
|
3
12
|
- Adds Franchise#cell and Franchise#phone
|
@@ -12,7 +21,7 @@
|
|
12
21
|
|
13
22
|
## [2.0.0] - 2024-12-26
|
14
23
|
|
15
|
-
**
|
24
|
+
**Breaking changes**
|
16
25
|
|
17
26
|
- Remove ServiceType.all and ServiceType.where(zip:)
|
18
27
|
|
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)
|
@@ -156,7 +160,7 @@ module Vng
|
|
156
160
|
if @body[:pageNo].eql? 1
|
157
161
|
{ "PriceItems"=>[
|
158
162
|
{ "priceItemID"=>275111, "priceBlockID"=>329, "descriptionHelp"=>"A price item", "sequence"=>1, "priceItem"=>"Bulldog American - 15 Step SPA Grooming Service", "value"=>85.0, "taxID"=>256, "durationPerUnit"=>45.0, "serviceBadge"=>"Required", "serviceCategory"=>"15 Step Spa", "isOnline"=>true, "isActive"=>true },
|
159
|
-
{ "priceItemID"=>275112, "priceBlockID"=>329, "descriptionHelp"=>"A price item", "sequence"=>2, "priceItem"=>"Bulldog American - 15 Step SPA Super Grooming Service", "value"=>105.0, "taxID"=>256, "durationPerUnit"=>75.0, "serviceBadge"=>nil, "serviceCategory"=>"15 Step Spa", "isOnline"=>
|
163
|
+
{ "priceItemID"=>275112, "priceBlockID"=>329, "descriptionHelp"=>"A price item", "sequence"=>2, "priceItem"=>"Bulldog American - 15 Step SPA Super Grooming Service", "value"=>105.0, "taxID"=>256, "durationPerUnit"=>75.0, "serviceBadge"=>nil, "serviceCategory"=>"15 Step Spa", "isOnline"=>false, "isActive"=>true },
|
160
164
|
|
161
165
|
{ "priceItemID"=>275300, "priceBlockID"=>329, "descriptionHelp"=>"A price item", "sequence"=>3, "priceItem"=>"Bulldog American - Shave Down", "value"=>40.0, "taxID"=>256, "durationPerUnit"=>30.0, "serviceBadge"=>"Not Recommended", "serviceCategory"=>"Cut", "isOnline"=>true, "isActive"=>true },
|
162
166
|
{ "priceItemID"=>275301, "priceBlockID"=>329, "descriptionHelp"=>"A price item", "sequence"=>4, "priceItem"=>"Bulldog American - Puppy Cut", "value"=>40.0, "taxID"=>256, "durationPerUnit"=>30.0, "serviceBadge"=>"Recommended", "serviceCategory"=>"Cut", "isOnline"=>true, "isActive"=>true },
|
@@ -177,7 +181,7 @@ module Vng
|
|
177
181
|
if @body[:assetID].eql?(2201008)
|
178
182
|
{ "PriceItems"=>[
|
179
183
|
{ "priceItemID"=>275111, "priceBlockID"=>329, "descriptionHelp"=>"A price item", "sequence"=>1, "priceItem"=>"Bulldog American - 15 Step SPA Grooming Service", "value"=>85.0, "taxID"=>256, "durationPerUnit"=>45.0, "serviceBadge"=>"Required", "serviceCategory"=>"15 Step Spa", "isOnline"=>true, "isActive"=>true },
|
180
|
-
{ "priceItemID"=>275112, "priceBlockID"=>329, "descriptionHelp"=>"A price item", "sequence"=>2, "priceItem"=>"Bulldog American - 15 Step SPA Super Grooming Service", "value"=>105.0, "taxID"=>256, "durationPerUnit"=>75.0, "serviceBadge"=>nil, "serviceCategory"=>"15 Step Spa", "isOnline"=>
|
184
|
+
{ "priceItemID"=>275112, "priceBlockID"=>329, "descriptionHelp"=>"A price item", "sequence"=>2, "priceItem"=>"Bulldog American - 15 Step SPA Super Grooming Service", "value"=>105.0, "taxID"=>256, "durationPerUnit"=>75.0, "serviceBadge"=>nil, "serviceCategory"=>"15 Step Spa", "isOnline"=>false, "isActive"=>true },
|
181
185
|
|
182
186
|
{ "priceItemID"=>275300, "priceBlockID"=>329, "descriptionHelp"=>"A price item", "sequence"=>3, "priceItem"=>"Bulldog American - Shave Down", "value"=>40.0, "taxID"=>256, "durationPerUnit"=>30.0, "serviceBadge"=>"Not Recommended", "serviceCategory"=>"Cut", "isOnline"=>true, "isActive"=>true },
|
183
187
|
{ "priceItemID"=>275301, "priceBlockID"=>329, "descriptionHelp"=>"A price item", "sequence"=>4, "priceItem"=>"Bulldog American - Puppy Cut", "value"=>40.0, "taxID"=>256, "durationPerUnit"=>30.0, "serviceBadge"=>"Recommended", "serviceCategory"=>"Cut", "isOnline"=>true, "isActive"=>true },
|
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']
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- claudiob
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simplecov
|