Class: MPI::Messages::FindProfileByFacility

Inherits:
Object
  • Object
show all
Defined in:
lib/mpi/messages/find_profile_by_facility.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(facility_id:, vista_id:, search_type: MPI::Constants::CORRELATION_WITH_RELATIONSHIP_DATA) ⇒ FindProfileByFacility

Returns a new instance of FindProfileByFacility.



12
13
14
15
16
# File 'lib/mpi/messages/find_profile_by_facility.rb', line 12

def initialize(facility_id:, vista_id:, search_type: MPI::Constants::CORRELATION_WITH_RELATIONSHIP_DATA)
  @facility_id = facility_id
  @vista_id = vista_id
  @search_type = search_type
end

Instance Attribute Details

#facility_idObject (readonly)

Returns the value of attribute facility_id.



10
11
12
# File 'lib/mpi/messages/find_profile_by_facility.rb', line 10

def facility_id
  @facility_id
end

#search_typeObject (readonly)

Returns the value of attribute search_type.



10
11
12
# File 'lib/mpi/messages/find_profile_by_facility.rb', line 10

def search_type
  @search_type
end

#vista_idObject (readonly)

Returns the value of attribute vista_id.



10
11
12
# File 'lib/mpi/messages/find_profile_by_facility.rb', line 10

def vista_id
  @vista_id
end

Instance Method Details

#performObject



18
19
20
21
22
23
# File 'lib/mpi/messages/find_profile_by_facility.rb', line 18

def perform
  MPI::Messages::RequestBuilder.new(extension: MPI::Constants::FIND_PROFILE, body: build_body).perform
rescue => e
  Rails.logger.error "[FindProfileByFacility] Failed to build request: #{e.message}"
  raise e
end