Module: DTA::Payment::Sortable

Includes:
Comparable
Included in:
BankChequePayment, DomesticCHFPayment, ESRPayment, FinancialInstitutionPayment, IBANPayment, SpecialFinancialInstitutionPayment
Defined in:
lib/payment_dta/payment_sorting.rb

Instance Method Summary collapse

Instance Method Details

#<=>(other) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/payment_dta/payment_sorting.rb', line 6

def <=>(other)
  if  requested_processing_date == other.requested_processing_date
    if issuer_identification == other.issuer_identification
      return ordering_party_bank_clearing_number <=> other.ordering_party_bank_clearing_number
    else
      return issuer_identification <=> other.issuer_identification
    end
  else
    return requested_processing_date <=> other.requested_processing_date
  end
end