smartystreets_ruby_sdk 5.14.5 → 5.14.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/us_street_multiple_address_example.rb +1 -1
- data/examples/us_street_single_address_example.rb +1 -1
- data/lib/smartystreets_ruby_sdk/international_autocomplete/client.rb +1 -1
- data/lib/smartystreets_ruby_sdk/us_street/client.rb +1 -1
- data/lib/smartystreets_ruby_sdk/us_street/lookup.rb +1 -1
- data/lib/smartystreets_ruby_sdk/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: 73a74155aa4e6204603c70d7a19f2c4a8a5f25917fcb3228b97f5e8979c2c8de
|
4
|
+
data.tar.gz: 8700baf3f0d0bc16549050120033d39e873894905551c8ef516b7d8648c821aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6f4b0326b89cb89d99349ae6548b9e8d40740b8b6e35867aa2b6bd2d45af124d02309cc62a0fdcc3f3d01fddcb384bc989661c60629f08204e81413a23b86b0
|
7
|
+
data.tar.gz: 3f5042ffd258950f77ff9e52ccaa69b889e54310f9eca155dab8ce2e6e3861515c82e1ac40130152fd61001793f0b4fc30c109e5aacf228e8150157b2342b0e3
|
@@ -64,7 +64,7 @@ class USStreetMultipleAddressExample
|
|
64
64
|
next
|
65
65
|
end
|
66
66
|
|
67
|
-
puts "Address #{i} is
|
67
|
+
puts "Address #{i} has at least one candidate.\n If the match parameter is set to STRICT, the address is valid.\n Otherwise, check the Analysis output fields to see if the address is valid."
|
68
68
|
|
69
69
|
candidates.each do |candidate|
|
70
70
|
components = candidate.components
|
@@ -54,7 +54,7 @@ class USStreetSingleAddressExample
|
|
54
54
|
|
55
55
|
first_candidate = result[0]
|
56
56
|
|
57
|
-
puts "
|
57
|
+
puts "There is at least one candidate.\n If the match parameter is set to STRICT, the address is valid.\n Otherwise, check the Analysis output fields to see if the address is valid.\n"
|
58
58
|
puts "Input ID: #{first_candidate.input_id}"
|
59
59
|
puts "ZIP Code: #{first_candidate.components.zipcode}"
|
60
60
|
puts "County: #{first_candidate.metadata.county_name}"
|
@@ -24,7 +24,7 @@ module SmartyStreets
|
|
24
24
|
raise response.error if response.error
|
25
25
|
|
26
26
|
result = @serializer.deserialize(response.payload)
|
27
|
-
suggestions = convert_suggestions(result)
|
27
|
+
suggestions = convert_suggestions(result.fetch('candidates', []))
|
28
28
|
lookup.result = suggestions
|
29
29
|
end
|
30
30
|
|
@@ -47,7 +47,7 @@ module SmartyStreets
|
|
47
47
|
converted_obj = []
|
48
48
|
obj.each do |lookup|
|
49
49
|
converted_lookup = {}
|
50
|
-
lookup.candidates = 5 if lookup.match == "enhanced" && lookup.candidates ==
|
50
|
+
lookup.candidates = 5 if lookup.match == "enhanced" && lookup.candidates == 0
|
51
51
|
|
52
52
|
converted_lookup['input_id'] = lookup.input_id
|
53
53
|
converted_lookup['street'] = lookup.street
|
@@ -12,7 +12,7 @@ module SmartyStreets
|
|
12
12
|
:match, :candidates, :result
|
13
13
|
|
14
14
|
def initialize(street=nil, street2=nil, secondary=nil, city=nil, state=nil, zipcode=nil, lastline=nil,
|
15
|
-
addressee=nil, urbanization=nil, match=nil, candidates=
|
15
|
+
addressee=nil, urbanization=nil, match=nil, candidates=0, input_id=nil)
|
16
16
|
@input_id = input_id
|
17
17
|
@street = street
|
18
18
|
@street2 = street2
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartystreets_ruby_sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.14.
|
4
|
+
version: 5.14.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SmartyStreets SDK Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|