smartystreets_ruby_sdk 5.14.0 → 5.14.5

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: eb354ac31fa7cc2bd045b1bb7877e8a0daf5b491d3863d23ea27ace3f38ed637
4
- data.tar.gz: 86ad9f8c1371467d314f59e0f7f7588e5c66d10fcf4d6ba039cdf7afedfa6295
3
+ metadata.gz: 869299472834baa787f6070b26072ed8862a7af006bea1c314237f1eeafcd3fa
4
+ data.tar.gz: 5262bf0365516fa0bc39f8107248644758ca7c3f2f29066631542478929b4362
5
5
  SHA512:
6
- metadata.gz: 85550fb289d9a64084aaa321f7d71a13f95c6d2bd116e6ac81728c3ad12030182778899a00659124957975875c11b5c5d49b24ffa62feb09b1c712f114f82651
7
- data.tar.gz: e3af8c142b7dbadae883ccb9b3af2e62cf37c242c3fe6dd214df13bfe1f1cbe0d1b993d695bbbb678fdf1a5ce8d529e58c9c8dba8bf15ca35296d8d8927c188a
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 USAutocompleteProExample
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
- USAutocompleteProExample.new.run
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('4770 Lincoln Ave O')
28
- lookup.max_results = 10
29
- lookup.add_city_filter('Ogden')
30
- lookup.add_state_filter('IL')
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"
@@ -17,6 +17,7 @@ module SmartyStreets
17
17
  http = build_http(request)
18
18
  http.use_ssl = true
19
19
  http.ssl_version = :TLSv1_2
20
+ http.open_timeout = @max_timeout
20
21
  http.read_timeout = @max_timeout
21
22
 
22
23
  response = http.request(request)
@@ -55,7 +55,7 @@ module SmartyStreets
55
55
  end
56
56
 
57
57
  def build_filter_string(filter_list)
58
- filter_list ? filter_list.join(',') : nil
58
+ filter_list ? filter_list.join(';') : nil
59
59
  end
60
60
 
61
61
  def convert_suggestions(suggestion_hashes)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module SmartyStreets
2
- VERSION = '5.14.0' # DO NOT EDIT (this is updated by a build job when a new release is published)
2
+ VERSION = '5.14.5' # DO NOT EDIT (this is updated by a build job when a new release is published)
3
3
  end
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.0
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: 2021-10-05 00:00:00.000000000 Z
11
+ date: 2022-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler