Class: MPI::Messages::FindProfileByEdipi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(edipi:, search_type: MPI::Constants::CORRELATION_WITH_RELATIONSHIP_DATA) ⇒ FindProfileByEdipi

Returns a new instance of FindProfileByEdipi.



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

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

Instance Attribute Details

#edipiObject (readonly)

Returns the value of attribute edipi.



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

def edipi
  @edipi
end

#search_typeObject (readonly)

Returns the value of attribute search_type.



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

def search_type
  @search_type
end

Instance Method Details

#performObject



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

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