Class: MPI::Messages::FindProfileByEdipi
- Inherits:
-
Object
- Object
- MPI::Messages::FindProfileByEdipi
- Defined in:
- lib/mpi/messages/find_profile_by_edipi.rb
Instance Attribute Summary collapse
-
#edipi ⇒ Object
readonly
Returns the value of attribute edipi.
-
#search_type ⇒ Object
readonly
Returns the value of attribute search_type.
Instance Method Summary collapse
- #build_body ⇒ Object private
- #build_parameter_list ⇒ Object private
- #edipi_root ⇒ Object private
-
#initialize(edipi:, search_type: MPI::Constants::CORRELATION_WITH_RELATIONSHIP_DATA) ⇒ FindProfileByEdipi
constructor
A new instance of FindProfileByEdipi.
- #perform ⇒ Object
- #query_by_parameter ⇒ Object private
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
#edipi ⇒ Object (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_type ⇒ Object (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
#build_body ⇒ Object (private)
26 27 28 29 30 31 |
# File 'lib/mpi/messages/find_profile_by_edipi.rb', line 26 def build_body body = RequestHelper.build_control_act_process_element body << RequestHelper.build_code(code: MPI::Constants::FIND_PROFILE_CONTROL_ACT_PROCESS) body << query_by_parameter body end |
#build_parameter_list ⇒ Object (private)
38 39 40 41 42 43 |
# File 'lib/mpi/messages/find_profile_by_edipi.rb', line 38 def build_parameter_list element = RequestHelper.build_parameter_list_element element << RequestHelper.build_identifier(identifier: edipi, root: edipi_root) element << RequestHelper.build_vba_orchestration element end |
#edipi_root ⇒ Object (private)
45 46 47 |
# File 'lib/mpi/messages/find_profile_by_edipi.rb', line 45 def edipi_root MPI::Constants::DOD_ROOT_OID end |
#perform ⇒ Object
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.}" raise e end |
#query_by_parameter ⇒ Object (private)
33 34 35 36 |
# File 'lib/mpi/messages/find_profile_by_edipi.rb', line 33 def query_by_parameter query_by_parameter = RequestHelper.build_query_by_parameter(search_type:) query_by_parameter << build_parameter_list end |