smartystreets_ruby_sdk 7.2.1 → 7.2.2

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: 56b7843bee25e0bea8668ed813993642aa247daa98eccd615e6d20d6fab1207b
4
- data.tar.gz: ae6176580f1b7afffe2b94f7e6eb6c31fd539d6c9099177c61dc2fb95cfea3da
3
+ metadata.gz: b7f9ada984ffb0e3e24548b3be6bd6f78cbfad2fdd9779819f1621452eaf6363
4
+ data.tar.gz: de74b85c937140e0da205d110876eba409053e86537308b63ed2dac6744ea37e
5
5
  SHA512:
6
- metadata.gz: 3de4fe9934225c46a7ad970e8062f2e5af69237a7976f15879ffeec9048b60f8a9a3ec31dfcb4cf36799673ce5a5269b135edc7204b8e159d6912f59eb60c80f
7
- data.tar.gz: b6f808ffd6f4a79c0936c3683d94403425fd9232b0f05e00a9843ad2cb61dbe77fdd5411f79d6ad8e0c9c8a69a5c0edba278fb416ed77176dc411be05fda05c7
6
+ metadata.gz: c71926db5331e0680097fa46f8860d919dac69f679fe1815dbe33d1ae7d7674a061675f3549f32b9a9640998428e69aa817b00fdb2b303c49f3a2d5d17a7d6db
7
+ data.tar.gz: 95f228283349c90a727cd177f548e641f5b8df3c3c6163a766a16ba57a6ada57cb8db17caaf3b33d80be5acae0274dfce31a35f1fbf210009f754c1a5332d509
@@ -13,6 +13,7 @@ module SmartyStreets
13
13
  # Sends a Lookup object to the International Street API and stores the result in the Lookup's result field.
14
14
  # Deprecated, please use send_lookup instead.
15
15
  def send(lookup)
16
+ raise ArgumentError, 'lookup cannot be nil' if lookup.nil?
16
17
  lookup.ensure_enough_info
17
18
  request = build_request(lookup)
18
19
 
@@ -26,6 +27,7 @@ module SmartyStreets
26
27
 
27
28
  # Sends a Lookup object to the International Street API and stores the result in the Lookup's result field.
28
29
  def send_lookup(lookup)
30
+ raise ArgumentError, 'lookup cannot be nil' if lookup.nil?
29
31
  lookup.ensure_enough_info
30
32
  request = build_request(lookup)
31
33
 
@@ -71,18 +71,8 @@ module SmartyStreets
71
71
  end
72
72
 
73
73
  def ensure_enough_info
74
- raise UnprocessableEntityError, 'Country field is required.' if missing_country
75
-
76
- return true if has_freeform
77
-
78
- raise UnprocessableEntityError, 'Either freeform or address1 is required.' if missing_address1
79
-
80
- return true if has_postal_code
81
-
82
- if missing_locality_or_administrative_area
83
- raise UnprocessableEntityError, 'Insufficient information:'\
84
- 'One or more required fields were not set on the lookup.'
85
- end
74
+ raise UnprocessableEntityError, 'Country field is required.' if field_is_missing(@country)
75
+ raise UnprocessableEntityError, 'Either freeform or address1 is required.' if field_is_missing(@freeform) && field_is_missing(@address1)
86
76
  end
87
77
  end
88
78
  end
@@ -1,3 +1,3 @@
1
1
  module SmartyStreets
2
- VERSION = '7.2.1' # DO NOT EDIT (this is updated by a build job when a new release is published)
2
+ VERSION = '7.2.2' # 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: 7.2.1
4
+ version: 7.2.2
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: 2026-03-06 00:00:00.000000000 Z
11
+ date: 2026-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler