smartystreets_ruby_sdk 5.14.7 → 5.14.10

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: 2a2233d175a8883620b5b47d89b01bdd94421e715575d3c24c9f8609c8c0655d
4
- data.tar.gz: 21553a76e7432999f6e3acdb2c2ab18af972206a9efda2645a210f4dbb6721c4
3
+ metadata.gz: 8f55c63d4a5df31cce7dda50757bec32d0eada825ca3b67d27ff07fdffc8b4e5
4
+ data.tar.gz: 8feab6b4298d1c03cd6f6d3739b06380a940355fbd267910390d4eb6c877f926
5
5
  SHA512:
6
- metadata.gz: fc46e6fdf3c8b3460bb5ef96d117f436bb1a9f14c5a95fcacde330c68cc938e55799e640b093476912793457ba302ab7a380fcbba99c748521686aaa1758dd45
7
- data.tar.gz: '0349cd5baf5fab5b50468f42d2600dc282787c583b1a9151325ac3388bddbc68bbf7c2bc68a9524f787293f0751234975719ae6e0013cfc4777ba0fc114a70d7'
6
+ metadata.gz: cc3ba99958f5c1f5f9b8bc369857970aa661d975f79c4291ac6cbe93de591c0b1ded2839b1424c977e4fbd1033ae382e29cdac329cbd3e709f0756f3872955bf
7
+ data.tar.gz: 896404ecc1af8f123e33a035db4471d625f33b627796dd1c97b5221b508557f56322d1b54dcdd2f7b068aa659a37b08660b53a0384d9d1f10b9951431a1f65c4
@@ -19,7 +19,7 @@ class USStreetMultipleAddressExample
19
19
  # The appropriate license values to be used for your subscriptions
20
20
  # can be found on the Subscriptions page of the account dashboard.
21
21
  # https://www.smartystreets.com/docs/cloud/licensing
22
- client = SmartyStreets::ClientBuilder.new(credentials).with_licenses(['us-rooftop-geocoding-cloud'])
22
+ client = SmartyStreets::ClientBuilder.new(credentials).with_licenses(['us-core-cloud'])
23
23
  .build_us_street_api_client
24
24
  batch = SmartyStreets::Batch.new
25
25
 
@@ -16,7 +16,7 @@ class USStreetSingleAddressExample
16
16
  # The appropriate license values to be used for your subscriptions
17
17
  # can be found on the Subscriptions page of the account dashboard.
18
18
  # https://www.smartystreets.com/docs/cloud/licensing
19
- client = SmartyStreets::ClientBuilder.new(credentials).with_licenses(['us-rooftop-geocoding-cloud'])
19
+ client = SmartyStreets::ClientBuilder.new(credentials).with_licenses(['us-core-cloud'])
20
20
  # with_proxy('localhost', 8080, 'proxyUser', 'proxyPassword'). # Uncomment this line to try it with a proxy
21
21
  build_us_street_api_client
22
22
 
@@ -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
 
@@ -2,6 +2,7 @@ module SmartyStreets
2
2
  class RetrySender
3
3
  MAX_BACKOFF_DURATION = 10
4
4
  STATUS_INTERNAL_SERVER_ERROR = 500
5
+ STATUS_TOO_MANY_REQUESTS = 429
5
6
 
6
7
  def initialize(max_retries, inner, sleeper, logger)
7
8
  @max_retries = max_retries
@@ -14,6 +15,10 @@ module SmartyStreets
14
15
  response = @inner.send(request)
15
16
 
16
17
  (0..@max_retries-1).each do |i|
18
+ if response.status_code.to_i == STATUS_TOO_MANY_REQUESTS
19
+ backoff(5)
20
+ end
21
+
17
22
  break if response.status_code.to_i < STATUS_INTERNAL_SERVER_ERROR
18
23
 
19
24
  backoff(i)
@@ -1,3 +1,3 @@
1
1
  module SmartyStreets
2
- VERSION = '5.14.7' # DO NOT EDIT (this is updated by a build job when a new release is published)
2
+ VERSION = '5.14.10' # 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.7
4
+ version: 5.14.10
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-03-09 00:00:00.000000000 Z
11
+ date: 2022-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler