Skip to content

Commit

Permalink
Merge pull request #60 from smartystreets/landon/new-intl-fields
Browse files Browse the repository at this point in the history
Add new international components
  • Loading branch information
RyanLCox1 authored Oct 17, 2024
2 parents 3b0249b + 38b7087 commit af56ea7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions smartystreets_python_sdk/international_street/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,11 @@ def __init__(self, obj):
self.post_box = obj.get("post_box", None)
self.post_box_type = obj.get("post_box_type", None)
self.post_box_number = obj.get("post_box_number", None)
self.additional_content = obj.get("additional_content", None)
self.delivery_installation = obj.get("delivery_installation", None)
self.delivery_installation_type = obj.get("delivery_installation_type", None)
self.delivery_installation_qualifier_name = obj.get("delivery_installation_qualifier_name", None)
self.route = obj.get("route", None)
self.route_number = obj.get("route_number", None)
self.route_type = obj.get("route_type", None)

9 changes: 8 additions & 1 deletion test/international_street/candidate_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_all_fields_filled_correctly(self):
"\"building_leading_type\":\"102\",\"building_name\":\"103\",\"building_trailing_type\":\"104\","\
"\"sub_building_type\":\"105\",\"sub_building_number\":\"106\",\"sub_building_name\":\"107\"," \
"\"sub_building\":\"108\",\"level_type\":\"108.1\",\"level_number\":\"108.2\","\
"\"post_box\":\"109\",\"post_box_type\":\"110\",\"post_box_number\":\"111\"}}}}]"
"\"post_box\":\"109\",\"post_box_type\":\"110\",\"post_box_number\":\"111\",\"additional_content\":\"112\",\"delivery_installation\":\"113\",\"delivery_installation_type\":\"114\",\"delivery_installation_qualifier_name\":\"115\",\"route\":\"116\",\"route_number\":\"117\",\"route_type\":\"118\"}}}}]"

serializer = NativeSerializer()
candidate = Candidate(serializer.deserialize(response_payload)[0])
Expand Down Expand Up @@ -187,3 +187,10 @@ def test_all_fields_filled_correctly(self):
self.assertEqual("109", components.post_box)
self.assertEqual("110", components.post_box_type)
self.assertEqual("111", components.post_box_number)
self.assertEqual("112", components.additional_content)
self.assertEqual("113", components.delivery_installation)
self.assertEqual("114", components.delivery_installation_type)
self.assertEqual("115", components.delivery_installation_qualifier_name)
self.assertEqual("116", components.route)
self.assertEqual("117", components.route_number)
self.assertEqual("118", components.route_type)

0 comments on commit af56ea7

Please sign in to comment.