Class: EgovUtils::Iszr::Addresses::FetchForLegalPerson::FromSampleData

Inherits:
ActiveInteraction::Base
  • Object
show all
Defined in:
app/services/egov_utils/iszr/addresses/fetch_for_legal_person/from_sample_data.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



10
11
12
13
14
15
16
# File 'app/services/egov_utils/iszr/addresses/fetch_for_legal_person/from_sample_data.rb', line 10

def execute
  attrs = sample_results.detect do |address|
    address['remote_id'] == remote_id
  end

  EgovUtils::Address.new(attrs.except('remote_id'))
end