smartystreets_ruby_sdk 5.14.0 → 5.14.5
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 +11 -4
- data/lib/smartystreets_ruby_sdk/native_sender.rb +1 -0
- data/lib/smartystreets_ruby_sdk/us_autocomplete_pro/client.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: 869299472834baa787f6070b26072ed8862a7af006bea1c314237f1eeafcd3fa
|
4
|
+
data.tar.gz: 5262bf0365516fa0bc39f8107248644758ca7c3f2f29066631542478929b4362
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: beef270c8686a33b2f5d74579737fb42cbe82e343172eeab6e92ae94fd691dc907ae9e947ca98c7dd84f05253a69e2e09645bffc5247eb22013cc4b51bc41786
|
7
|
+
data.tar.gz: 0e1885053ff2144b50447e78a066d8b5e2567504a69ae081cdb421c5f6984cb9bfdc42d639ea54bfbd9264fa3ac251aa1866cb435af4f13c33bb99f947f8abcb
|
@@ -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
|
@@ -24,10 +30,11 @@ class USAutocompleteProExample
|
|
24
30
|
# Documentation for input fields can be found at:
|
25
31
|
# https://smartystreets.com/docs/cloud/us-autocomplete-api
|
26
32
|
|
27
|
-
lookup = Lookup.new('
|
28
|
-
lookup.
|
29
|
-
lookup.
|
30
|
-
lookup.
|
33
|
+
lookup = Lookup.new('1042 W Center')
|
34
|
+
lookup.add_state_filter('CO')
|
35
|
+
lookup.add_state_filter('UT')
|
36
|
+
lookup.add_city_filter('Denver')
|
37
|
+
lookup.add_city_filter('Orem')
|
31
38
|
lookup.max_results = 5
|
32
39
|
lookup.prefer_ratio = 3
|
33
40
|
lookup.source = "all"
|
@@ -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.5
|
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-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|