Created new entry point CensusCaller
Here's a better alternative than the first one. Added a new abstraction level from which are performed both types of census calls, while the logic of those is managed in their own library.
This commit is contained in:
@@ -18,7 +18,7 @@ class Verification::Management::Document
|
||||
end
|
||||
|
||||
def in_census?
|
||||
response = CensusApi.new.call(document_type, document_number)
|
||||
response = CensusCaller.new.call(document_type, document_number)
|
||||
response.valid? && valid_age?(response)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user