Class: OFX::MessageSet
- Inherits:
-
Object
show all
- Defined in:
- lib/ofx/message_set.rb,
lib/ofx/1.0.2/message_set.rb
Direct Known Subclasses
BankingMessageSet, CreditCardStatementMessageSet, EmailMessageSet, FinancialInstitutionProfileMessageSet, InterbankFundsTransferMessageSet, InvestmentSecurityListMessageSet, InvestmentStatementMessageSet, PaymentMessageSet, SignonMessageSet, SignupMessageSet, WireFundsTransferMessageSet
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.from_ofx_102_message_set_hash(message_set_name, message_set_hash) ⇒ Object
47
48
49
50
51
52
53
54
55
|
# File 'lib/ofx/1.0.2/message_set.rb', line 47
def self.from_ofx_102_message_set_hash(message_set_name, message_set_hash)
match = /^(\w+)MSGSR([QS])V(\d+)$/.match(message_set_name)
raise NotImplementedError unless match
message_set_class = MESSAGE_SET_NAMES_TO_CLASSES[$1]
raise NotImplementedError unless message_set_class
return message_set_class.from_ofx_102_hash(message_set_hash)
end
|
Instance Method Details
#ofx_102_message_set_name ⇒ Object
43
44
45
|
# File 'lib/ofx/1.0.2/message_set.rb', line 43
def ofx_102_message_set_name
raise NotImplementedError
end
|
#precedence ⇒ Object
21
22
23
|
# File 'lib/ofx/message_set.rb', line 21
def precedence
raise NotImplementedError
end
|
#request_or_response_from_ofx_102_tag_name(response_or_request_name) ⇒ Object
57
58
59
|
# File 'lib/ofx/1.0.2/message_set.rb', line 57
def request_or_response_from_ofx_102_tag_name(response_or_request_name)
raise NotImplementedError
end
|
#requests ⇒ Object
29
30
31
|
# File 'lib/ofx/message_set.rb', line 29
def requests
@requests ||= []
end
|
#responses ⇒ Object
33
34
35
|
# File 'lib/ofx/message_set.rb', line 33
def responses
@responses ||= []
end
|
#to_ofx_102_s ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'lib/ofx/1.0.2/message_set.rb', line 20
def to_ofx_102_s
request_message = requests.length > 0
request_message = responses.length == 0
message = ''
if request_message
message += " <#{ofx_102_message_set_name}MSGSRQV#{version}>\n"
requests.each do |request|
message += request.to_ofx_102_s + "\n"
end
message += " </#{ofx_102_message_set_name}MSGSRQV#{version}>\n"
else
message += " <#{ofx_102_message_set_name}MSGSRSV#{version}>\n"
responses.each do |response|
message += response.to_ofx_102_s + "\n"
end
message += " </#{ofx_102_message_set_name}MSGSRSV#{version}>\n"
end
message
end
|
#version ⇒ Object
25
26
27
|
# File 'lib/ofx/message_set.rb', line 25
def version
raise NotImplementedError
end
|