Class: MPI::Messages::FindProfileByIdentifier

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(identifier:, identifier_type:, search_type: Constants::CORRELATION_WITH_RELATIONSHIP_DATA) ⇒ FindProfileByIdentifier

Returns a new instance of FindProfileByIdentifier.



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

def initialize(identifier:, identifier_type:, search_type: Constants::CORRELATION_WITH_RELATIONSHIP_DATA)
  @identifier = identifier
  @identifier_type = identifier_type
  @search_type = search_type
end

Instance Attribute Details

#identifierObject (readonly)

Returns the value of attribute identifier.



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

def identifier
  @identifier
end

#identifier_typeObject (readonly)

Returns the value of attribute identifier_type.



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

def identifier_type
  @identifier_type
end

#search_typeObject (readonly)

Returns the value of attribute search_type.



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

def search_type
  @search_type
end

Instance Method Details

#performObject



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

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