smartystreets_ruby_sdk 5.14.3 → 5.14.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/international_autocomplete_example.rb +2 -2
- data/examples/us_autocomplete_pro_example.rb +6 -0
- 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/us_street/client.rb +1 -0
- 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: 873e951c272fbdf965b4b20c4148b8412c20a212bd543d76deb3cabac1afe592
|
4
|
+
data.tar.gz: 3173a1541ab695d9e879f5243f1965da4fbab48390c2e7a301deb2e58a7a1ab7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3171793a696794132d862db26c41371746d6993d7642afde67bd2abedecfa179fd06f8b1641c629b69ddaa1fa2cc797df4615c7164c0e7bdcf68af1292d7ff81
|
7
|
+
data.tar.gz: d7532f754ef0efd9aebf64a541ae8f77ea2962682dbca0221a0d9021fc398a54f01406e921fc4a8ac32e5a9e2f2a5d1eaff062207ebb4e7c5e5553cfd230f2f4
|
@@ -3,7 +3,7 @@ require '../lib/smartystreets_ruby_sdk/client_builder'
|
|
3
3
|
require '../lib/smartystreets_ruby_sdk/international_autocomplete/lookup'
|
4
4
|
require '../lib/smartystreets_ruby_sdk/international_autocomplete/client'
|
5
5
|
|
6
|
-
class
|
6
|
+
class InternationalAutocompleteExample
|
7
7
|
Lookup = SmartyStreets::InternationalAutocomplete::Lookup
|
8
8
|
|
9
9
|
def run
|
@@ -42,6 +42,6 @@ class USAutocompleteProExample
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
|
45
|
+
InternationalAutocompleteExample.new.run
|
46
46
|
|
47
47
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'smartystreets_ruby_sdk/shared_credentials'
|
2
|
+
require 'smartystreets_ruby_sdk/static_credentials'
|
2
3
|
require '../lib/smartystreets_ruby_sdk/client_builder'
|
3
4
|
require '../lib/smartystreets_ruby_sdk/us_autocomplete_pro/lookup'
|
4
5
|
|
@@ -15,6 +16,11 @@ class USAutocompleteProExample
|
|
15
16
|
|
16
17
|
credentials = SmartyStreets::SharedCredentials.new(key, referer)
|
17
18
|
|
19
|
+
# auth_id = ENV['SMARTY_AUTH_ID']
|
20
|
+
# auth_token = ENV['SMARTY_AUTH_TOKEN']
|
21
|
+
#
|
22
|
+
# credentials = SmartyStreets::StaticCredentials.new(auth_id, auth_token)
|
23
|
+
|
18
24
|
# The appropriate license values to be used for your subscriptions
|
19
25
|
# can be found on the Subscriptions page of the account dashboard.
|
20
26
|
# https://www.smartystreets.com/docs/cloud/licensing
|
@@ -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}"
|
@@ -47,6 +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 == 1
|
50
51
|
|
51
52
|
converted_lookup['input_id'] = lookup.input_id
|
52
53
|
converted_lookup['street'] = lookup.street
|
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.6
|
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:
|
11
|
+
date: 2022-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|