Class: OFX::FinancialInstitutionProfileMessageSet

Inherits:
MessageSet
  • Object
show all
Defined in:
lib/ofx/financial_institution_profile_message_set.rb,
lib/ofx/1.0.2/financial_institution_profile_message_set.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MessageSet

from_ofx_102_message_set_hash, #request_or_response_from_ofx_102_tag_name, #requests, #responses, #to_ofx_102_s

Class Method Details

.from_ofx_102_hash(message_set_hash) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/ofx/1.0.2/financial_institution_profile_message_set.rb', line 26

def self.from_ofx_102_hash(message_set_hash)
    message_set = FinancialInstitutionProfileMessageSet.new
    
    message_set_hash.each_pair() do |transaction_name, transaction_hash|
        case transaction_name
            when "PROFTRNRQ" then   message_set.requests << FinancialInstitutionProfileRequest.from_ofx_102_hash(transaction_hash)
            when "PROFTRNRS" then   message_set.responses << FinancialInstitutionProfileResponse.from_ofx_102_hash(transaction_hash)
            else                    raise NotImplementedError, transaction_name
        end
    end
    
    return message_set
end

Instance Method Details

#ofx_102_message_set_nameObject



22
23
24
# File 'lib/ofx/1.0.2/financial_institution_profile_message_set.rb', line 22

def ofx_102_message_set_name
    'PROF'
end

#precedenceObject



20
21
22
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 20

def precedence
    11
end

#versionObject



23
24
25
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 23

def version
    1
end