smartystreets_ruby_sdk 3.1.0 → 4.0.0

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.
Files changed (65) hide show
  1. data/Makefile +1 -1
  2. data/examples/international_example.rb +3 -3
  3. data/examples/us_autocomplete_example.rb +3 -3
  4. data/examples/us_extract_example.rb +3 -3
  5. data/examples/us_street_multiple_address_example.rb +6 -5
  6. data/examples/us_street_single_address_example.rb +5 -5
  7. data/examples/us_zipcode_multiple_lookup_example.rb +6 -5
  8. data/examples/us_zipcode_single_lookup_example.rb +4 -4
  9. data/lib/smartystreets_ruby_sdk.rb +26 -4
  10. data/lib/smartystreets_ruby_sdk/batch.rb +44 -41
  11. data/lib/smartystreets_ruby_sdk/client_builder.rb +115 -113
  12. data/lib/smartystreets_ruby_sdk/custom_header_sender.rb +10 -8
  13. data/lib/smartystreets_ruby_sdk/errors.rb +13 -11
  14. data/lib/smartystreets_ruby_sdk/exceptions.rb +27 -23
  15. data/lib/smartystreets_ruby_sdk/international_street.rb +3 -1
  16. data/lib/smartystreets_ruby_sdk/international_street/analysis.rb +11 -9
  17. data/lib/smartystreets_ruby_sdk/international_street/candidate.rb +28 -26
  18. data/lib/smartystreets_ruby_sdk/international_street/client.rb +45 -43
  19. data/lib/smartystreets_ruby_sdk/international_street/components.rb +53 -51
  20. data/lib/smartystreets_ruby_sdk/international_street/language_mode.rb +7 -3
  21. data/lib/smartystreets_ruby_sdk/international_street/lookup.rb +63 -61
  22. data/lib/smartystreets_ruby_sdk/international_street/metadata.rb +12 -10
  23. data/lib/smartystreets_ruby_sdk/json_able.rb +13 -11
  24. data/lib/smartystreets_ruby_sdk/logger.rb +2 -2
  25. data/lib/smartystreets_ruby_sdk/native_sender.rb +58 -56
  26. data/lib/smartystreets_ruby_sdk/native_serializer.rb +9 -7
  27. data/lib/smartystreets_ruby_sdk/proxy.rb +2 -2
  28. data/lib/smartystreets_ruby_sdk/request.rb +11 -9
  29. data/lib/smartystreets_ruby_sdk/response.rb +9 -7
  30. data/lib/smartystreets_ruby_sdk/retry_sender.rb +26 -24
  31. data/lib/smartystreets_ruby_sdk/shared_credentials.rb +11 -9
  32. data/lib/smartystreets_ruby_sdk/signing_sender.rb +11 -9
  33. data/lib/smartystreets_ruby_sdk/sleeper.rb +1 -1
  34. data/lib/smartystreets_ruby_sdk/static_credentials.rb +11 -9
  35. data/lib/smartystreets_ruby_sdk/status_code_sender.rb +31 -29
  36. data/lib/smartystreets_ruby_sdk/url_prefix_sender.rb +11 -9
  37. data/lib/smartystreets_ruby_sdk/us_autocomplete.rb +3 -1
  38. data/lib/smartystreets_ruby_sdk/us_autocomplete/client.rb +47 -45
  39. data/lib/smartystreets_ruby_sdk/us_autocomplete/geolocation_type.rb +9 -5
  40. data/lib/smartystreets_ruby_sdk/us_autocomplete/lookup.rb +26 -24
  41. data/lib/smartystreets_ruby_sdk/us_autocomplete/suggestion.rb +11 -9
  42. data/lib/smartystreets_ruby_sdk/us_extract.rb +4 -2
  43. data/lib/smartystreets_ruby_sdk/us_extract/address.rb +18 -16
  44. data/lib/smartystreets_ruby_sdk/us_extract/client.rb +34 -32
  45. data/lib/smartystreets_ruby_sdk/us_extract/lookup.rb +16 -14
  46. data/lib/smartystreets_ruby_sdk/us_extract/metadata.rb +13 -11
  47. data/lib/smartystreets_ruby_sdk/us_extract/result.rb +13 -11
  48. data/lib/smartystreets_ruby_sdk/us_street.rb +4 -2
  49. data/lib/smartystreets_ruby_sdk/us_street/analysis.rb +19 -17
  50. data/lib/smartystreets_ruby_sdk/us_street/candidate.rb +19 -17
  51. data/lib/smartystreets_ruby_sdk/us_street/client.rb +51 -49
  52. data/lib/smartystreets_ruby_sdk/us_street/components.rb +32 -30
  53. data/lib/smartystreets_ruby_sdk/us_street/lookup.rb +27 -26
  54. data/lib/smartystreets_ruby_sdk/us_street/match_type.rb +9 -5
  55. data/lib/smartystreets_ruby_sdk/us_street/metadata.rb +26 -24
  56. data/lib/smartystreets_ruby_sdk/us_zipcode.rb +4 -2
  57. data/lib/smartystreets_ruby_sdk/us_zipcode/alternate_county.rb +12 -10
  58. data/lib/smartystreets_ruby_sdk/us_zipcode/city.rb +13 -11
  59. data/lib/smartystreets_ruby_sdk/us_zipcode/client.rb +46 -44
  60. data/lib/smartystreets_ruby_sdk/us_zipcode/lookup.rb +16 -13
  61. data/lib/smartystreets_ruby_sdk/us_zipcode/result.rb +33 -31
  62. data/lib/smartystreets_ruby_sdk/us_zipcode/zip_code.rb +24 -21
  63. data/lib/smartystreets_ruby_sdk/version.rb +2 -2
  64. data/smartystreets_ruby_sdk.gemspec +1 -1
  65. metadata +2 -2
@@ -1,11 +1,13 @@
1
- class CustomHeaderSender
2
- def initialize(inner, headers)
3
- @inner = inner
4
- @headers = headers
5
- end
1
+ module SmartyStreets
2
+ class CustomHeaderSender
3
+ def initialize(inner, headers)
4
+ @inner = inner
5
+ @headers = headers
6
+ end
6
7
 
7
- def send(request)
8
- request.headers = @headers
9
- @inner.send(request)
8
+ def send(request)
9
+ request.headers = @headers
10
+ @inner.send(request)
11
+ end
10
12
  end
11
13
  end
@@ -1,25 +1,27 @@
1
- BAD_CREDENTIALS = 'Unauthorized: The credentials were provided incorrectly or did not match any existing,
1
+ module SmartyStreets
2
+ BAD_CREDENTIALS = 'Unauthorized: The credentials were provided incorrectly or did not match any existing,
2
3
  active credentials.'.freeze
3
4
 
4
- PAYMENT_REQUIRED = 'Payment Required: There is no active subscription
5
+ PAYMENT_REQUIRED = 'Payment Required: There is no active subscription
5
6
  for the account associated with the credentials submitted with the request.'.freeze
6
7
 
7
- FORBIDDEN = 'Because the international service is currently in a limited release phase, only approved accounts' \
8
+ FORBIDDEN = 'Because the international service is currently in a limited release phase, only approved accounts' \
8
9
  ' may access the service.'.freeze
9
10
 
10
- REQUEST_ENTITY_TOO_LARGE = 'Request Entity Too Large: The request body has exceeded the maximum size.'.freeze
11
+ REQUEST_ENTITY_TOO_LARGE = 'Request Entity Too Large: The request body has exceeded the maximum size.'.freeze
11
12
 
12
- BAD_REQUEST = 'Bad Request (Malformed Payload): A GET request lacked a street field or the request body of a
13
+ BAD_REQUEST = 'Bad Request (Malformed Payload): A GET request lacked a street field or the request body of a
13
14
  POST request contained malformed JSON.'.freeze
14
15
 
15
- UNPROCESSABLE_ENTITY = 'GET request lacked required fields.'.freeze
16
+ UNPROCESSABLE_ENTITY = 'GET request lacked required fields.'.freeze
16
17
 
17
- TOO_MANY_REQUESTS = 'When using public "website key" authentication,
18
+ TOO_MANY_REQUESTS = 'When using public "website key" authentication,
18
19
  we restrict the number of requests coming from a given source over too short of a time.'.freeze
19
20
 
20
- INTERNAL_SERVER_ERROR = 'Internal Server Error.'.freeze
21
+ INTERNAL_SERVER_ERROR = 'Internal Server Error.'.freeze
21
22
 
22
- SERVICE_UNAVAILABLE = 'Service Unavailable. Try again later.'.freeze
23
+ SERVICE_UNAVAILABLE = 'Service Unavailable. Try again later.'.freeze
23
24
 
24
- GATEWAY_TIMEOUT = 'The upstream data provider did not respond in a timely fashion and the request failed. ' \
25
- 'A serious, yet rare occurrence indeed.'.freeze
25
+ GATEWAY_TIMEOUT = 'The upstream data provider did not respond in a timely fashion and the request failed. ' \
26
+ 'A serious, yet rare occurrence indeed.'.freeze
27
+ end
@@ -1,35 +1,39 @@
1
- class SmartyException < Exception
2
- end
1
+ module SmartyStreets
3
2
 
4
- class BadCredentialsError < SmartyException
5
- end
3
+ class SmartyError < StandardError
4
+ end
6
5
 
7
- class ForbiddenError < SmartyException
8
- end
6
+ class BadCredentialsError < SmartyError
7
+ end
9
8
 
10
- class PaymentRequiredError < SmartyException
11
- end
9
+ class ForbiddenError < SmartyError
10
+ end
12
11
 
13
- class RequestEntityTooLargeError < SmartyException
14
- end
12
+ class PaymentRequiredError < SmartyError
13
+ end
15
14
 
16
- class BadRequestError < SmartyException
17
- end
15
+ class RequestEntityTooLargeError < SmartyError
16
+ end
18
17
 
19
- class UnprocessableEntityError < SmartyException
20
- end
18
+ class BadRequestError < SmartyError
19
+ end
21
20
 
22
- class TooManyRequestsError < SmartyException
23
- end
21
+ class UnprocessableEntityError < SmartyError
22
+ end
24
23
 
25
- class InternalServerError < SmartyException
26
- end
24
+ class TooManyRequestsError < SmartyError
25
+ end
27
26
 
28
- class ServiceUnavailableError < SmartyException
29
- end
27
+ class InternalServerError < SmartyError
28
+ end
30
29
 
31
- class GatewayTimeoutError < SmartyException
32
- end
30
+ class ServiceUnavailableError < SmartyError
31
+ end
32
+
33
+ class GatewayTimeoutError < SmartyError
34
+ end
35
+
36
+ class BatchFullError < SmartyError
37
+ end
33
38
 
34
- class BatchFullError < SmartyException
35
39
  end
@@ -6,5 +6,7 @@ require_relative './international_street/candidate'
6
6
  require_relative './international_street/client'
7
7
  require_relative './international_street/language_mode'
8
8
 
9
- module InternationalStreet
9
+ module SmartyStreets
10
+ module InternationalStreet
11
+ end
10
12
  end
@@ -1,13 +1,15 @@
1
- module InternationalStreet
2
- # See "https://smartystreets.com/docs/cloud/international-street-api#analysis"
3
- class Analysis
1
+ module SmartyStreets
2
+ module InternationalStreet
3
+ # See "https://smartystreets.com/docs/cloud/international-street-api#analysis"
4
+ class Analysis
4
5
 
5
- attr_reader :max_address_precision, :verification_status, :address_precision
6
+ attr_reader :max_address_precision, :verification_status, :address_precision
6
7
 
7
- def initialize(obj)
8
- @verification_status = obj.fetch('verification_status', nil)
9
- @address_precision = obj.fetch('address_precision', nil)
10
- @max_address_precision = obj.fetch('max_address_precision', nil)
8
+ def initialize(obj)
9
+ @verification_status = obj.fetch('verification_status', nil)
10
+ @address_precision = obj.fetch('address_precision', nil)
11
+ @max_address_precision = obj.fetch('max_address_precision', nil)
12
+ end
11
13
  end
12
14
  end
13
- end
15
+ end
@@ -2,32 +2,34 @@ require_relative 'components'
2
2
  require_relative 'metadata'
3
3
  require_relative 'analysis'
4
4
 
5
- module InternationalStreet
6
- # A candidate is a possible match for an address that was submitted. A lookup can have multiple
7
- # candidates if the address was ambiguous.
8
- #
9
- # See "https://smartystreets.com/docs/cloud/international-street-api#root"
10
- class Candidate
11
- attr_reader :metadata, :address3, :address11, :address2, :address12, :address1, :address10,
12
- :address9, :address8, :address7, :organization, :address6, :address5, :address4, :components, :analysis
5
+ module SmartyStreets
6
+ module InternationalStreet
7
+ # A candidate is a possible match for an address that was submitted. A lookup can have multiple
8
+ # candidates if the address was ambiguous.
9
+ #
10
+ # See "https://smartystreets.com/docs/cloud/international-street-api#root"
11
+ class Candidate
12
+ attr_reader :metadata, :address3, :address11, :address2, :address12, :address1, :address10,
13
+ :address9, :address8, :address7, :organization, :address6, :address5, :address4, :components, :analysis
13
14
 
14
- def initialize(obj)
15
- @organization = obj.fetch('organization', nil)
16
- @address1 = obj.fetch('address1', nil)
17
- @address2 = obj.fetch('address2', nil)
18
- @address3 = obj.fetch('address3', nil)
19
- @address4 = obj.fetch('address4', nil)
20
- @address5 = obj.fetch('address5', nil)
21
- @address6 = obj.fetch('address6', nil)
22
- @address7 = obj.fetch('address7', nil)
23
- @address8 = obj.fetch('address8', nil)
24
- @address9 = obj.fetch('address9', nil)
25
- @address10 = obj.fetch('address10', nil)
26
- @address11 = obj.fetch('address11', nil)
27
- @address12 = obj.fetch('address12', nil)
28
- @components = Components.new(obj.fetch('components', {}))
29
- @metadata = Metadata.new(obj.fetch('metadata', {}))
30
- @analysis = Analysis.new(obj.fetch('analysis', {}))
15
+ def initialize(obj)
16
+ @organization = obj.fetch('organization', nil)
17
+ @address1 = obj.fetch('address1', nil)
18
+ @address2 = obj.fetch('address2', nil)
19
+ @address3 = obj.fetch('address3', nil)
20
+ @address4 = obj.fetch('address4', nil)
21
+ @address5 = obj.fetch('address5', nil)
22
+ @address6 = obj.fetch('address6', nil)
23
+ @address7 = obj.fetch('address7', nil)
24
+ @address8 = obj.fetch('address8', nil)
25
+ @address9 = obj.fetch('address9', nil)
26
+ @address10 = obj.fetch('address10', nil)
27
+ @address11 = obj.fetch('address11', nil)
28
+ @address12 = obj.fetch('address12', nil)
29
+ @components = Components.new(obj.fetch('components', {}))
30
+ @metadata = Metadata.new(obj.fetch('metadata', {}))
31
+ @analysis = Analysis.new(obj.fetch('analysis', {}))
32
+ end
31
33
  end
32
34
  end
33
- end
35
+ end
@@ -1,56 +1,58 @@
1
1
  require_relative '../request'
2
2
  require_relative 'candidate'
3
3
 
4
- module InternationalStreet
5
- # It is recommended to instantiate this class using ClientBuilder.build_international_street_api_client()
6
- class Client
7
- def initialize(sender, serializer)
8
- @sender = sender
9
- @serializer = serializer
10
- end
4
+ module SmartyStreets
5
+ module InternationalStreet
6
+ # It is recommended to instantiate this class using ClientBuilder.build_international_street_api_client()
7
+ class Client
8
+ def initialize(sender, serializer)
9
+ @sender = sender
10
+ @serializer = serializer
11
+ end
11
12
 
12
- # Sends a Lookup object to the International Street API and stores the result in the Lookup's result field.
13
- def send(lookup)
14
- lookup.ensure_enough_info
15
- request = build_request(lookup)
13
+ # Sends a Lookup object to the International Street API and stores the result in the Lookup's result field.
14
+ def send(lookup)
15
+ lookup.ensure_enough_info
16
+ request = build_request(lookup)
16
17
 
17
- response = @sender.send(request)
18
+ response = @sender.send(request)
18
19
 
19
- candidates = convert_candidates(@serializer.deserialize(response.payload))
20
- lookup.result = candidates
21
- end
20
+ candidates = convert_candidates(@serializer.deserialize(response.payload))
21
+ lookup.result = candidates
22
+ end
22
23
 
23
- def build_request(lookup)
24
- request = Request.new
25
-
26
- add_parameter(request, 'country', lookup.country)
27
- add_parameter(request, 'geocode', lookup.geocode.to_s)
28
- add_parameter(request, 'language', lookup.language)
29
- add_parameter(request, 'freeform', lookup.freeform)
30
- add_parameter(request, 'address1', lookup.address1)
31
- add_parameter(request, 'address2', lookup.address2)
32
- add_parameter(request, 'address3', lookup.address3)
33
- add_parameter(request, 'address4', lookup.address4)
34
- add_parameter(request, 'organization', lookup.organization)
35
- add_parameter(request, 'locality', lookup.locality)
36
- add_parameter(request, 'administrative_area', lookup.administrative_area)
37
- add_parameter(request, 'postal_code', lookup.postal_code)
38
-
39
- request
40
- end
24
+ def build_request(lookup)
25
+ request = SmartyStreets::Request.new
26
+
27
+ add_parameter(request, 'country', lookup.country)
28
+ add_parameter(request, 'geocode', lookup.geocode.to_s)
29
+ add_parameter(request, 'language', lookup.language)
30
+ add_parameter(request, 'freeform', lookup.freeform)
31
+ add_parameter(request, 'address1', lookup.address1)
32
+ add_parameter(request, 'address2', lookup.address2)
33
+ add_parameter(request, 'address3', lookup.address3)
34
+ add_parameter(request, 'address4', lookup.address4)
35
+ add_parameter(request, 'organization', lookup.organization)
36
+ add_parameter(request, 'locality', lookup.locality)
37
+ add_parameter(request, 'administrative_area', lookup.administrative_area)
38
+ add_parameter(request, 'postal_code', lookup.postal_code)
39
+
40
+ request
41
+ end
41
42
 
42
- def add_parameter(request, key, value)
43
- request.parameters[key] = value unless value.nil? or value.empty?
44
- end
43
+ def add_parameter(request, key, value)
44
+ request.parameters[key] = value unless value.nil? or value.empty?
45
+ end
45
46
 
46
- def convert_candidates(raw_candidates)
47
- candidates = []
47
+ def convert_candidates(raw_candidates)
48
+ candidates = []
48
49
 
49
- raw_candidates.each do |candidate|
50
- candidates.push(Candidate.new(candidate))
51
- end
50
+ raw_candidates.each do |candidate|
51
+ candidates.push(Candidate.new(candidate))
52
+ end
52
53
 
53
- candidates
54
+ candidates
55
+ end
54
56
  end
55
57
  end
56
- end
58
+ end
@@ -1,55 +1,57 @@
1
- module InternationalStreet
2
- # See "https://smartystreets.com/docs/cloud/international-street-api#components"
3
- class Components
4
- attr_reader :premise, :thoroughfare_trailing_type, :sub_building, :locality, :post_box_number,
5
- :thoroughfare_name, :thoroughfare_postdirection, :dependent_thoroughfare,
6
- :thoroughfare, :dependent_thoroughfare_name, :postal_code_short, :dependent_thoroughfare_trailing_type,
7
- :administrative_area, :post_box, :building_leading_type, :dependent_locality_name, :thoroughfare_type,
8
- :dependent_thoroughfare_postdirection, :double_dependent_locality, :premise_number,
9
- :dependent_thoroughfare_type, :post_box_type, :building, :sub_administrative_area, :postal_code_extra,
10
- :sub_building_name, :postal_code, :dependent_locality, :premise_type, :sub_building_number,
11
- :super_administrative_area, :premise_extra, :dependent_thoroughfare_predirection,
12
- :building_trailing_type, :thoroughfare_predirection, :building_name, :country_iso_3, :sub_building_type
1
+ module SmartyStreets
2
+ module InternationalStreet
3
+ # See "https://smartystreets.com/docs/cloud/international-street-api#components"
4
+ class Components
5
+ attr_reader :premise, :thoroughfare_trailing_type, :sub_building, :locality, :post_box_number,
6
+ :thoroughfare_name, :thoroughfare_postdirection, :dependent_thoroughfare,
7
+ :thoroughfare, :dependent_thoroughfare_name, :postal_code_short, :dependent_thoroughfare_trailing_type,
8
+ :administrative_area, :post_box, :building_leading_type, :dependent_locality_name, :thoroughfare_type,
9
+ :dependent_thoroughfare_postdirection, :double_dependent_locality, :premise_number,
10
+ :dependent_thoroughfare_type, :post_box_type, :building, :sub_administrative_area, :postal_code_extra,
11
+ :sub_building_name, :postal_code, :dependent_locality, :premise_type, :sub_building_number,
12
+ :super_administrative_area, :premise_extra, :dependent_thoroughfare_predirection,
13
+ :building_trailing_type, :thoroughfare_predirection, :building_name, :country_iso_3, :sub_building_type
13
14
 
14
- def initialize(obj)
15
- @country_iso_3 = obj.fetch('country_iso_3', nil)
16
- @super_administrative_area = obj.fetch('super_administrative_area', nil)
17
- @administrative_area = obj.fetch('administrative_area', nil)
18
- @sub_administrative_area = obj.fetch('sub_administrative_area', nil)
19
- @dependent_locality= obj.fetch('dependent_locality', nil)
20
- @dependent_locality_name = obj.fetch('dependent_locality_name', nil)
21
- @double_dependent_locality = obj.fetch('double_dependent_locality', nil)
22
- @locality = obj.fetch('locality', nil)
23
- @postal_code = obj.fetch('postal_code', nil)
24
- @postal_code_short = obj.fetch('postal_code_short', nil)
25
- @postal_code_extra = obj.fetch('postal_code_extra', nil)
26
- @premise = obj.fetch('premise', nil)
27
- @premise_extra = obj.fetch('premise_extra', nil)
28
- @premise_number = obj.fetch('premise_number', nil)
29
- @premise_type = obj.fetch('premise_type', nil)
30
- @thoroughfare = obj.fetch('thoroughfare', nil)
31
- @thoroughfare_predirection = obj.fetch('thoroughfare_predirection', nil)
32
- @thoroughfare_postdirection = obj.fetch('thoroughfare_postdirection', nil)
33
- @thoroughfare_name = obj.fetch('thoroughfare_name', nil)
34
- @thoroughfare_trailing_type = obj.fetch('thoroughfare_trailing_type', nil)
35
- @thoroughfare_type = obj.fetch('thoroughfare_type', nil)
36
- @dependent_thoroughfare = obj.fetch('dependent_thoroughfare', nil)
37
- @dependent_thoroughfare_predirection = obj.fetch('dependent_thoroughfare_predirection', nil)
38
- @dependent_thoroughfare_postdirection = obj.fetch('dependent_thoroughfare_postdirection', nil)
39
- @dependent_thoroughfare_name = obj.fetch('dependent_thoroughfare_name', nil)
40
- @dependent_thoroughfare_trailing_type = obj.fetch('dependent_thoroughfare_trailing_type', nil)
41
- @dependent_thoroughfare_type = obj.fetch('dependent_thoroughfare_type', nil)
42
- @building = obj.fetch('building', nil)
43
- @building_leading_type = obj.fetch('building_leading_type', nil)
44
- @building_name = obj.fetch('building_name', nil)
45
- @building_trailing_type = obj.fetch('building_trailing_type', nil)
46
- @sub_building_type = obj.fetch('sub_building_type', nil)
47
- @sub_building_number = obj.fetch('sub_building_number', nil)
48
- @sub_building_name = obj.fetch('sub_building_name', nil)
49
- @sub_building = obj.fetch('sub_building', nil)
50
- @post_box = obj.fetch('post_box', nil)
51
- @post_box_type = obj.fetch('post_box_type', nil)
52
- @post_box_number = obj.fetch('post_box_number', nil)
15
+ def initialize(obj)
16
+ @country_iso_3 = obj.fetch('country_iso_3', nil)
17
+ @super_administrative_area = obj.fetch('super_administrative_area', nil)
18
+ @administrative_area = obj.fetch('administrative_area', nil)
19
+ @sub_administrative_area = obj.fetch('sub_administrative_area', nil)
20
+ @dependent_locality= obj.fetch('dependent_locality', nil)
21
+ @dependent_locality_name = obj.fetch('dependent_locality_name', nil)
22
+ @double_dependent_locality = obj.fetch('double_dependent_locality', nil)
23
+ @locality = obj.fetch('locality', nil)
24
+ @postal_code = obj.fetch('postal_code', nil)
25
+ @postal_code_short = obj.fetch('postal_code_short', nil)
26
+ @postal_code_extra = obj.fetch('postal_code_extra', nil)
27
+ @premise = obj.fetch('premise', nil)
28
+ @premise_extra = obj.fetch('premise_extra', nil)
29
+ @premise_number = obj.fetch('premise_number', nil)
30
+ @premise_type = obj.fetch('premise_type', nil)
31
+ @thoroughfare = obj.fetch('thoroughfare', nil)
32
+ @thoroughfare_predirection = obj.fetch('thoroughfare_predirection', nil)
33
+ @thoroughfare_postdirection = obj.fetch('thoroughfare_postdirection', nil)
34
+ @thoroughfare_name = obj.fetch('thoroughfare_name', nil)
35
+ @thoroughfare_trailing_type = obj.fetch('thoroughfare_trailing_type', nil)
36
+ @thoroughfare_type = obj.fetch('thoroughfare_type', nil)
37
+ @dependent_thoroughfare = obj.fetch('dependent_thoroughfare', nil)
38
+ @dependent_thoroughfare_predirection = obj.fetch('dependent_thoroughfare_predirection', nil)
39
+ @dependent_thoroughfare_postdirection = obj.fetch('dependent_thoroughfare_postdirection', nil)
40
+ @dependent_thoroughfare_name = obj.fetch('dependent_thoroughfare_name', nil)
41
+ @dependent_thoroughfare_trailing_type = obj.fetch('dependent_thoroughfare_trailing_type', nil)
42
+ @dependent_thoroughfare_type = obj.fetch('dependent_thoroughfare_type', nil)
43
+ @building = obj.fetch('building', nil)
44
+ @building_leading_type = obj.fetch('building_leading_type', nil)
45
+ @building_name = obj.fetch('building_name', nil)
46
+ @building_trailing_type = obj.fetch('building_trailing_type', nil)
47
+ @sub_building_type = obj.fetch('sub_building_type', nil)
48
+ @sub_building_number = obj.fetch('sub_building_number', nil)
49
+ @sub_building_name = obj.fetch('sub_building_name', nil)
50
+ @sub_building = obj.fetch('sub_building', nil)
51
+ @post_box = obj.fetch('post_box', nil)
52
+ @post_box_type = obj.fetch('post_box_type', nil)
53
+ @post_box_number = obj.fetch('post_box_number', nil)
54
+ end
53
55
  end
54
56
  end
55
57
  end
@@ -1,5 +1,9 @@
1
- module LanguageMode
2
- NATIVE = 'native'.freeze
1
+ module SmartyStreets
2
+ module InternationalStreet
3
+ module LanguageMode
4
+ NATIVE = 'native'.freeze
3
5
 
4
- LATIN = 'latin'.freeze
6
+ LATIN = 'latin'.freeze
7
+ end
8
+ end
5
9
  end