vng 1.4.2 → 1.4.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0781c7c52c5481bf8199382df9e8567571e04e101ebefe00d313827009967954'
4
- data.tar.gz: 9379c31ceff7d05ead68cbcd844c04ef5b44f6543c16852dbf0412f417c46812
3
+ metadata.gz: 83db199a2c7e536117951e992169a587f0244bd142a656d7ff60d37ff95abe11
4
+ data.tar.gz: ac5c90d6f258c1a085d2a00fd6c11c817dd69146fc54d59d368a8d40a8530f97
5
5
  SHA512:
6
- metadata.gz: aa6f6680041cd012ae6c6994c12e4b112ec6263cd3afad29efc64e5df40efa7c64a380ad745a7ec07150b02d7f62786f6ee3548df2ead54d5e9ce60f33024f53
7
- data.tar.gz: 675eec6b8705c5516db5e8c140e5149f233a5114bf19d3639f4f5c3e129ce491b8e68ab80b2605adbed9d7a38806e1654bfa34a957ab817b1f3060c6efa96378
6
+ metadata.gz: f92cfad998340e0e6cf0b8c5e4edf512ffeb0c278c070021faab09d04ff955cab929e7e5b20fb61d0a7b335f59ffd4a3f83a67b9f2813d8b10be203b7cee00ac
7
+ data.tar.gz: bd53c04f51eea6496cd2afeff0f294c11b5fdb534fdb5748ed6d3bc8f52888c1f1fba170b1df2aaea3a0c39d82d265cc1a57fde62498a44d254650c46320c589
data/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
- ## [Unreleased] -
1
+ ## [1.4.4] - 2024-12-20
2
+
3
+ - Filter out ZIP codes with status 'Owned – Deactivated'
4
+ - More breeds returned by MockRequest
5
+
6
+ ## [1.4.3] - 2024-12-16
7
+
8
+ - Fix MockRequest for invalid phone
2
9
 
3
10
  ## [1.4.2] - 2024-12-03
4
11
 
data/README.md CHANGED
@@ -3,10 +3,10 @@ Vng - a Ruby client for the Vonigo API
3
3
 
4
4
  Vng helps you write apps that need to interact with Vonigo.
5
5
 
6
- The **source code** is available on [GitHub](https://github.com/HouseAccountEng/vng) and the **documentation** on [RubyDoc](http://www.rubydoc.info/gems/vng/frames).
6
+ The **source code** is available on [GitHub](https://github.com/claudiob/vng) and the **documentation** on [RubyDoc](http://www.rubydoc.info/gems/vng/frames).
7
7
 
8
- [![Code Climate](https://codeclimate.com/github/HouseAccountEng/vng.png)](https://codeclimate.com/github/HouseAccountEng/vng)
9
- [![Code coverage](https://img.shields.io/badge/code_coverage-100%25-44d298)](https://github.com/HouseAccountEng/bookmaker/actions)
8
+ [![Code Climate](https://codeclimate.com/github/claudiob/vng.png)](https://codeclimate.com/github/claudiob/vng)
9
+ [![Code coverage](https://img.shields.io/badge/code_coverage-100%25-44d298)](https://github.com/claudiob/bookmaker/actions)
10
10
  [![Rubygems](https://img.shields.io/gem/v/vng)](https://rubygems.org/gems/vng)
11
11
 
12
12
  After [registering your app](#configuring-your-app), you can run commands like:
@@ -23,7 +23,7 @@ Vng::Location.create address:, city:, zip:, state: state, client_id:
23
23
  Vng::Breed.all
24
24
  Vng::Asset.create name:, weight:, breed_option_id:, client_id:
25
25
  Vng::PriceItem.where location_id:, asset_id:
26
- Vng::Availability.where(location_id:, duration:, from_time:, to_time:
26
+ Vng::Availability.where location_id:, duration:, from_time:, to_time:
27
27
  Vng::Lock.create date:, duration: location_id:
28
28
  Vng::WorkOrder.create lock_id:, client_id:, contact_id:, location_id:, duration:, summary:, line_items:
29
29
  Vng::Case.create client_id:, summary:, comments:
@@ -74,13 +74,39 @@ module Vng
74
74
  ] }
75
75
  end
76
76
  when '/api/v1/resources/breeds/'
77
- { "Breeds"=>[{ "breedID"=>2, "breed"=>"Bulldog", "species"=>"Dog", "optionID"=>303, "breedLowWeight"=>30, "breedHighWeight"=>50 }] }
78
- when '/api/v1/data/Leads/'
79
- { "Client"=>{ "objectID"=>"916347" }, "Fields"=> [
80
- { "fieldID"=>126, "fieldValue"=>"Vng Example" },
81
- { "fieldID"=>238, "fieldValue"=>"vng@example.com" },
82
- { "fieldID"=>1024, "fieldValue"=>"8648648640" },
77
+ { "Breeds"=>[
78
+ { "breedID"=>2, "breed"=>"Bulldog", "species"=>"Dog", "optionID"=>303, "breedLowWeight"=>30, "breedHighWeight"=>50 },
79
+ { "breedID"=>3, "breed"=>"Affenpinscher", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
80
+ { "breedID"=>4, "breed"=>"Afghan", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
81
+ { "breedID"=>5, "breed"=>"Airedale Terrier", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
82
+ { "breedID"=>6, "breed"=>"Akita", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
83
+ { "breedID"=>7, "breed"=>"Alaskan Malamute", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
84
+ { "breedID"=>8, "breed"=>"American Eskimo", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
85
+ { "breedID"=>9, "breed"=>"American Pit Bull Terrier", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
86
+ { "breedID"=>10, "breed"=>"American Staffordshire Terrier", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
87
+ { "breedID"=>11, "breed"=>"American Stratford Terrier", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
88
+ { "breedID"=>12, "breed"=>"Anatolian Shepherd", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
89
+ { "breedID"=>13, "breed"=>"Ausssiedoodle", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
90
+ { "breedID"=>14, "breed"=>"Australian Shepherd", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
91
+ { "breedID"=>15, "breed"=>"Australian Terrier", "species"=>"Dog", "optionID"=>304, "breedLowWeight"=>30, "breedHighWeight"=>50 },
92
+ { "breedID"=>16, "breed"=>"Abyssinian", "species"=>"Cat", "optionID"=>305, "breedLowWeight"=>30, "breedHighWeight"=>50 },
93
+ { "breedID"=>17, "breed"=>"American Bobtail", "species"=>"Cat", "optionID"=>305, "breedLowWeight"=>30, "breedHighWeight"=>50 },
94
+ { "breedID"=>18, "breed"=>"Bengal", "species"=>"Cat", "optionID"=>305, "breedLowWeight"=>30, "breedHighWeight"=>50 },
95
+ { "breedID"=>19, "breed"=>"Birman", "species"=>"Cat", "optionID"=>305, "breedLowWeight"=>30, "breedHighWeight"=>50 },
96
+ { "breedID"=>20, "breed"=>"Bombay", "species"=>"Cat", "optionID"=>305, "breedLowWeight"=>30, "breedHighWeight"=>50 },
97
+ { "breedID"=>21, "breed"=>"Burmese", "species"=>"Cat", "optionID"=>306, "breedLowWeight"=>30, "breedHighWeight"=>50 },
98
+ { "breedID"=>22, "breed"=>"Chartreux", "species"=>"Cat", "optionID"=>306, "breedLowWeight"=>30, "breedHighWeight"=>50 },
83
99
  ] }
100
+ when '/api/v1/data/Leads/'
101
+ if @body[:Fields].find{|field| field[:fieldID] == 1024}[:fieldValue] == 'invalid-phone'
102
+ raise Error.new '[{"fieldID"=>1024, "fieldName"=>"Phone # to Reach You", "errNo"=>-602, "errMsg"=>"Field data is in incorrect format."}]'
103
+ else
104
+ { "Client"=>{ "objectID"=>"916347" }, "Fields"=> [
105
+ { "fieldID"=>126, "fieldValue"=>"Vng Example" },
106
+ { "fieldID"=>238, "fieldValue"=>"vng@example.com" },
107
+ { "fieldID"=>1024, "fieldValue"=>"8648648640" },
108
+ ] }
109
+ end
84
110
  when '/api/v1/data/Contacts/'
85
111
  { "Contact"=>{ "objectID"=>"2201007" }, "Fields"=>[
86
112
  { "fieldID"=>127, "fieldValue"=>"Vng" },
data/lib/vng/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vng
2
- VERSION = '1.4.2'
2
+ VERSION = '1.4.4'
3
3
  end
data/lib/vng/zip.rb CHANGED
@@ -16,7 +16,9 @@ module Vng
16
16
  def self.all
17
17
  data = request path: PATH
18
18
 
19
- data['Zips'].map do |body|
19
+ data['Zips'].reject do |franchise|
20
+ franchise['zipStatus'].eql? 'Owned – Deactivated'
21
+ end.map do |body|
20
22
  zip = body['zip']
21
23
  state = body['state']
22
24
  zone_name = body['zoneName']
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: 1.4.2
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - claudiob
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-03 00:00:00.000000000 Z
11
+ date: 2024-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov
@@ -94,8 +94,8 @@ licenses:
94
94
  - MIT
95
95
  metadata:
96
96
  homepage_uri: https://rubygems.org/gems/vng
97
- source_code_uri: https://github.com/HouseAccountEng/vng
98
- changelog_uri: https://github.com/HouseAccountEng/vng/blob/main/CHANGELOG.md
97
+ source_code_uri: https://github.com/claudiob/vng
98
+ changelog_uri: https://github.com/claudiob/vng/blob/main/CHANGELOG.md
99
99
  post_install_message:
100
100
  rdoc_options: []
101
101
  require_paths: