adds genre to the census api response

This commit is contained in:
kikito
2016-04-11 18:41:33 +02:00
parent 3b754fd998
commit 9cc831bbc1

View File

@@ -49,6 +49,10 @@ class CensusApi
data[:datos_vivienda][:item][:codigo_distrito]
end
def genre # "Varón" or "Mujer"
data[:datos_habitante][:item][:descripcion_sexo]
end
private
def data
@@ -86,7 +90,7 @@ class CensusApi
end
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
def is_dni?(document_type)