Class: OFX::BankingStatementRequest

Inherits:
TransactionalRequest show all
Defined in:
lib/ofx/banking_message_set.rb,
lib/ofx/1.0.2/banking_message_set.rb

Instance Attribute Summary collapse

Attributes inherited from TransactionalRequest

#client_cookie, #transaction_authorization_number, #transaction_identifier

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TransactionalRequest

#to_ofx_102_s

Methods inherited from Request

#satisfies_requirements?, #to_ofx_102_s

Instance Attribute Details

#accountObject

Returns the value of attribute account.



107
108
109
# File 'lib/ofx/banking_message_set.rb', line 107

def 
  @account
end

#include_transactionsObject

Returns the value of attribute include_transactions.



108
109
110
# File 'lib/ofx/banking_message_set.rb', line 108

def include_transactions
  @include_transactions
end

#included_rangeObject

Returns the value of attribute included_range.



112
113
114
# File 'lib/ofx/banking_message_set.rb', line 112

def included_range
  @included_range
end

Class Method Details

.from_ofx_102_hash(transaction_hash) ⇒ Object

Raises:

  • (NotImplementedError)


176
177
178
# File 'lib/ofx/1.0.2/banking_message_set.rb', line 176

def self.from_ofx_102_hash(transaction_hash)
    raise NotImplementedError
end

Instance Method Details

#include_transactions?Boolean

Returns:

  • (Boolean)


109
110
111
# File 'lib/ofx/banking_message_set.rb', line 109

def include_transactions?
    include_transactions
end

#ofx_102_nameObject



153
154
155
# File 'lib/ofx/1.0.2/banking_message_set.rb', line 153

def ofx_102_name
    'STMT'
end

#ofx_102_request_bodyObject



156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/ofx/1.0.2/banking_message_set.rb', line 156

def ofx_102_request_body
    body = ""
    
    body += .to_ofx_102_request_body
    
    body +=
    "        <INCTRAN>\n"
    
    body +=
    "          <DTSTART>#{included_range.begin.to_ofx_102_s}\n" +
    "          <DTEND>#{included_range.end.to_ofx_102_s}\n" if included_range
    body +=
    "          <INCLUDE>#{include_transactions.to_ofx_102_s}\n" if include_transactions
    
    body +=
    "        </INCTRAN>" if include_transactions
    
    body
end