Class: OFX::BankingMessageSetProfile

Inherits:
MessageSetProfile 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 MessageSetProfile

#language, #message_set_class, #message_url, #required_ofx_security, #requires_transport_security, #service_provider_name, #signon_realm, #supports_response_file_error_recovery, #synchronization_mode, #version

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from MessageSetProfile

#from_ofx_102_hash, #requires_transport_security?, #supports_response_file_error_recovery?

Instance Attribute Details

#closing_statement_availableObject

Returns the value of attribute closing_statement_available.



34
35
36
# File 'lib/ofx/banking_message_set.rb', line 34

def closing_statement_available
  @closing_statement_available
end

#email_profileObject

Returns the value of attribute email_profile.



41
42
43
# File 'lib/ofx/banking_message_set.rb', line 41

def email_profile
  @email_profile
end

#intrabank_transfer_profileObject

Returns the value of attribute intrabank_transfer_profile.



39
40
41
# File 'lib/ofx/banking_message_set.rb', line 39

def intrabank_transfer_profile
  @intrabank_transfer_profile
end

#invalid_account_typesObject

Returns the value of attribute invalid_account_types.



33
34
35
# File 'lib/ofx/banking_message_set.rb', line 33

def 
  @invalid_account_types
end

#stop_check_profileObject

Returns the value of attribute stop_check_profile.



40
41
42
# File 'lib/ofx/banking_message_set.rb', line 40

def stop_check_profile
  @stop_check_profile
end

Class Method Details

.from_ofx_102_hash(message_set_description_hash) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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
# File 'lib/ofx/1.0.2/banking_message_set.rb', line 48

def self.from_ofx_102_hash(message_set_description_hash)
    profile = OFX::BankingMessageSetProfile.new
    profile.message_set_class = OFX::BankingMessageSet
    profile.from_ofx_102_hash(message_set_description_hash)
    
    profile. = []
    if message_set_description_hash['INVALIDACCTTYPE']
        message_set_description_hash['INVALIDACCTTYPE'].each do |invalid_acct_type|
            profile. << BankingAccount.(invalid_acct_type)
        end
    end
    
    profile.closing_statement_available = message_set_description_hash['CLOSINGAVAIL'] == 'Y'
    
    intrabank_profile_hash = message_set_description_hash['XFERPROF']
    if (intrabank_profile_hash)
        profile.intrabank_transfer_profile = OFX::IntrabankTransferProfile.new
        
        days_off = intrabank_profile_hash['PROCDAYSOFF']
        profile.intrabank_transfer_profile.processing_days_off = []
        if days_off
            days_off.each { |day| profile.intrabank_transfer_profile.processing_days_off << day }
        end
        profile.intrabank_transfer_profile.processing_end_time_of_day = intrabank_profile_hash['PROCENDTM'].to_time if intrabank_profile_hash['PROCENDTM']
        profile.intrabank_transfer_profile.supports_scheduled_transfers = intrabank_profile_hash['CANSCHED'] == 'Y'
        profile.intrabank_transfer_profile.supports_recurring_transfers = intrabank_profile_hash['CANRECUR'] == 'Y'
        profile.intrabank_transfer_profile.supports_modification_of_transfers = intrabank_profile_hash['CANMODXFERS'] == 'Y'
        profile.intrabank_transfer_profile.supports_modification_of_models = intrabank_profile_hash['CANMODMDLS'] == 'Y'
        profile.intrabank_transfer_profile.model_window = intrabank_profile_hash['MODELWND'].to_i
        profile.intrabank_transfer_profile.number_of_days_early_funds_are_withdrawn = intrabank_profile_hash['DAYSWITH'].to_i
        profile.intrabank_transfer_profile.default_number_of_days_to_pay = intrabank_profile_hash['DFLTDAYSTOPAY'].to_i
    end

    stop_check_profile_hash = message_set_description_hash['STPCHKPROF']
    if (stop_check_profile_hash)
        profile.stop_check_profile = OFX::StopCheckProfile.new
        
        days_off = stop_check_profile_hash['PROCDAYSOFF']
        profile.stop_check_profile.processing_days_off = []
        if days_off
            days_off.each { |day| profile.stop_check_profile.processing_days_off << day }
        end
        profile.stop_check_profile.processing_end_time_of_day = stop_check_profile_hash['PROCENDTM'].to_time if stop_check_profile_hash['PROCENDTM']
        profile.stop_check_profile.can_stop_a_range_of_checks = stop_check_profile_hash['CANUSERANGE'] == 'Y'
        profile.stop_check_profile.can_stop_checks_by_description = stop_check_profile_hash['CANUSEDESC'] == 'Y'
        profile.stop_check_profile.default_stop_check_fee = stop_check_profile_hash['STPCHKFEE']
    end

    email_profile_hash = message_set_description_hash['EMAILPROF']
    if (email_profile_hash)
        profile.email_profile = OFX::BankingEmailProfile.new
        profile.email_profile.supports_banking_email = email_profile_hash['CANEMAIL'] == 'Y'
        profile.email_profile.supports_notifications = email_profile_hash['CANNOTIFY'] == 'Y'
    end
    
    profile
end

.message_set_classObject



29
30
31
# File 'lib/ofx/banking_message_set.rb', line 29

def self.message_set_class
    OFX::BankingMessageSet
end

Instance Method Details

#closing_statement_available?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/ofx/banking_message_set.rb', line 35

def closing_statement_available?
    closing_statement_available
end