adds genre to the census api response
This commit is contained in:
@@ -49,6 +49,10 @@ class CensusApi
|
|||||||
data[:datos_vivienda][:item][:codigo_distrito]
|
data[:datos_vivienda][:item][:codigo_distrito]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def genre # "Varón" or "Mujer"
|
||||||
|
data[:datos_habitante][:item][:descripcion_sexo]
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def data
|
def data
|
||||||
@@ -86,7 +90,7 @@ class CensusApi
|
|||||||
end
|
end
|
||||||
|
|
||||||
def stubbed_response_body
|
def stubbed_response_body
|
||||||
{:get_habita_datos_response=>{:get_habita_datos_return=>{:hay_errores=>false, :datos_habitante=>{:item=>{:fecha_nacimiento_string=>"31-12-1980", :identificador_documento=>"12345678Z", }}, :datos_vivienda=>{:item=>{:codigo_postal=>"28013", :codigo_distrito=>"01"}}}}}
|
{get_habita_datos_response: {get_habita_datos_return: {hay_errores: false, datos_habitante: { item: {fecha_nacimiento_string: "31-12-1980", identificador_documento: "12345678Z", description_sexo: "Varón" }}, datos_vivienda: {item: {codigo_postal: "28013", codigo_distrito: "01"}}}}}
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_dni?(document_type)
|
def is_dni?(document_type)
|
||||||
|
|||||||
Reference in New Issue
Block a user