Class: Absa::H2h::Transmission::Eft::ContraRecord
- Inherits:
-
Record
- Object
- Record
- Absa::H2h::Transmission::Eft::ContraRecord
show all
- Defined in:
- lib/absa-h2h/eft.rb
Instance Method Summary
collapse
Methods inherited from Record
#initialize
Instance Method Details
#contra_record? ⇒ Boolean
167
168
169
|
# File 'lib/absa-h2h/eft.rb', line 167
def contra_record?
true
end
|
#validate!(options = {}) ⇒ Object
171
172
173
174
175
176
177
|
# File 'lib/absa-h2h/eft.rb', line 171
def validate!(options={})
super(options)
raise "homing_branch: Should match the user branch. Got #{@homing_branch}. Expected #{@user_branch}." unless @homing_branch == @user_branch
raise "homing_account_number: Should match the user nominated account number. Got #{@homing_account_number}. Expected #{@user_nominated_account}." unless @homing_account_number == @user_nominated_account
raise "user_ref: Position 1 - 10 is compulsory. Please provide users abbreviated name." if @user_ref[0..9].blank?
raise "user_ref: Position 11 - 16 is compulsory and must be set to 'CONTRA'. Got #{@user_ref[10..15]}" if @user_ref[10..15] != "CONTRA"
end
|