Class: OFX::FinancialInstitutionProfileResponse
- Inherits:
-
TransactionalResponse
- Object
- Response
- TransactionalResponse
- OFX::FinancialInstitutionProfileResponse
- Defined in:
- lib/ofx/financial_institution_profile_message_set.rb,
lib/ofx/1.0.2/financial_institution_profile_message_set.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#city ⇒ Object
Returns the value of attribute city.
-
#country ⇒ Object
Returns the value of attribute country.
-
#customer_service_telephone ⇒ Object
Returns the value of attribute customer_service_telephone.
-
#date_of_last_profile_update ⇒ Object
Returns the value of attribute date_of_last_profile_update.
-
#email_address ⇒ Object
Returns the value of attribute email_address.
-
#facsimile_telephone ⇒ Object
Returns the value of attribute facsimile_telephone.
-
#financial_institution_name ⇒ Object
Returns the value of attribute financial_institution_name.
-
#message_sets ⇒ Object
Returns the value of attribute message_sets.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#signon_realms ⇒ Object
Returns the value of attribute signon_realms.
-
#state ⇒ Object
Returns the value of attribute state.
-
#technical_support_telephone ⇒ Object
Returns the value of attribute technical_support_telephone.
-
#url ⇒ Object
Returns the value of attribute url.
Attributes inherited from TransactionalResponse
#client_cookie, #transaction_identifier
Attributes inherited from Response
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from TransactionalResponse
Methods inherited from Response
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
56 57 58 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 56 def address @address end |
#city ⇒ Object
Returns the value of attribute city.
57 58 59 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 57 def city @city end |
#country ⇒ Object
Returns the value of attribute country.
60 61 62 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 60 def country @country end |
#customer_service_telephone ⇒ Object
Returns the value of attribute customer_service_telephone.
61 62 63 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 61 def customer_service_telephone @customer_service_telephone end |
#date_of_last_profile_update ⇒ Object
Returns the value of attribute date_of_last_profile_update.
54 55 56 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 54 def date_of_last_profile_update @date_of_last_profile_update end |
#email_address ⇒ Object
Returns the value of attribute email_address.
65 66 67 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 65 def email_address @email_address end |
#facsimile_telephone ⇒ Object
Returns the value of attribute facsimile_telephone.
63 64 65 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 63 def facsimile_telephone @facsimile_telephone end |
#financial_institution_name ⇒ Object
Returns the value of attribute financial_institution_name.
55 56 57 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 55 def financial_institution_name @financial_institution_name end |
#message_sets ⇒ Object
Returns the value of attribute message_sets.
51 52 53 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 51 def @message_sets end |
#postal_code ⇒ Object
Returns the value of attribute postal_code.
59 60 61 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 59 def postal_code @postal_code end |
#signon_realms ⇒ Object
Returns the value of attribute signon_realms.
52 53 54 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 52 def signon_realms @signon_realms end |
#state ⇒ Object
Returns the value of attribute state.
58 59 60 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 58 def state @state end |
#technical_support_telephone ⇒ Object
Returns the value of attribute technical_support_telephone.
62 63 64 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 62 def technical_support_telephone @technical_support_telephone end |
#url ⇒ Object
Returns the value of attribute url.
64 65 66 |
# File 'lib/ofx/financial_institution_profile_message_set.rb', line 64 def url @url end |
Class Method Details
.from_ofx_102_hash(transaction_hash) ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/ofx/1.0.2/financial_institution_profile_message_set.rb', line 74 def self.from_ofx_102_hash(transaction_hash) response = FinancialInstitutionProfileResponse.new response.transaction_identifier = transaction_hash['TRNUID'] response.status = OFX::Status.from_ofx_102_hash(transaction_hash['STATUS']) response. = {} response.signon_realms = [] response_hash = transaction_hash['PROFRS'] if response_hash response.date_of_last_profile_update = response_hash['DTPROFUP'].to_datetime response.financial_institution_name = response_hash['FINAME'] response.address = response_hash['ADDR1'] || "" response.address += "\n" + response_hash['ADDR2'] if response_hash['ADDR2'] response.address += "\n" + response_hash['ADDR3'] if response_hash['ADDR3'] response.city = response_hash['CITY'] response.state = response_hash['STATE'] response.postal_code = response_hash['POSTALCODE'] response.country = response_hash['COUNTRY'] response.customer_service_telephone = response_hash['CSPHONE'] response.technical_support_telephone = response_hash['TSPHONE'] response.facsimile_telephone = response_hash['FAXPHONE'] response.url = URI.parse(response_hash['URL']) if response_hash['URL'] response.email_address = response_hash['EMAIL'] = response_hash['MSGSETLIST'] #require 'pp' #pp message_sets_hash .each_pair do |, | profile_class = MESSAGE_SET_NAMES_TO_PROFILE_CLASSES[] = response.[profile_class.] = {} .each do |, | [OFX::Version.new([-1..-1].to_i)] = profile_class.from_ofx_102_hash() end end signons_hash = response_hash['SIGNONINFOLIST'] #require 'pp' #pp signons_hash signons_hash.each_pair do |aggregate_name, signon_realm_info| signon_realm = SignonRealm.new signon_realm.name = signon_realm_info['SIGNONREALM'] signon_realm.password_length_constraint = signon_realm_info['MIN'].to_i..signon_realm_info['MAX'].to_i signon_realm.password_characters_constraint = case signon_realm_info['CHARTYPE'] when 'ALPHAONLY' then :alphabetic_only when 'NUMERICONLY' then :numeric_only when 'ALPHAORNUMERIC' then :alphabetic_or_numeric when 'ALPHAANDNUMERIC' then :alphabetic_and_numeric end signon_realm.case_sensitive = signon_realm_info['CASESEN'] == 'Y' signon_realm.allows_special_characters = signon_realm_info['SPECIAL'] == 'Y' signon_realm.allows_spaces = signon_realm_info['SPACES'] == 'Y' signon_realm.supports_pin_changes = signon_realm_info['PINCH'] == 'Y' signon_realm.requires_initial_pin_change = signon_realm_info['CHGPINFIRST'] == 'Y' response.signon_realms << signon_realm end end return response end |
Instance Method Details
#ofx_102_name ⇒ Object
66 67 68 |
# File 'lib/ofx/1.0.2/financial_institution_profile_message_set.rb', line 66 def ofx_102_name 'PROF' end |
#ofx_102_response_body ⇒ Object
70 71 72 |
# File 'lib/ofx/1.0.2/financial_institution_profile_message_set.rb', line 70 def ofx_102_response_body raise NotImplementedError end |