Sha256: fe2a8165b5e8b6b56b1ec6e09f91194abb770614f1bf7cdba21500e36ea8e7bc
Contents?: true
Size: 907 Bytes
Versions: 15
Compression:
Stored size: 907 Bytes
Contents
module EgovUtils class IszrController < ApplicationController def search if params.dig(:search, :ico).present? @legal_person = EgovUtils::Iszr::LegalPeople::Search.run(search_params) if @legal_person.valid? render json: @legal_person.result else render json: @legal_person.errors.details, status: :unprocessable_entity end else @natural_person = EgovUtils::Iszr::NaturalPeople::Search.run( search_params ) if @natural_person.valid? render json: @natural_person.result else render json: @natural_person.errors.details, status: :unprocessable_entity end end end private def search_params params.require(:search).permit( :ico, :firstname, :lastname, :birth_date, :birth_place ) end end end
Version data entries
15 entries across 15 versions & 1 rubygems