Sha256: ef1cb680a607ad21d8737a80df7edae120cf58ec8309ec8d0ae49c40a0b33d40
Contents?: true
Size: 806 Bytes
Versions: 10
Compression:
Stored size: 806 Bytes
Contents
# frozen_string_literal: true module EgovUtils module Iszr module LegalPeople class SearchByRemoteId < ActiveInteraction::Base MAPPING_CLASS = EgovUtils::Services::Iszr::LegalPeople string :remote_id def execute find_person end private def find_person initialize_person.find do |person| person.remote_id == remote_id end end def sample_results EgovUtils::Engine.root.join('lib/egov_utils/iszr/lp_results.json') end def initialize_person response = File.read(sample_results) body = JSON.parse(response) body.map do MAPPING_CLASS.new(_1.deep_symbolize_keys!) end end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems