Class: UniqSysOmega::Tariffs::SingleTimeFilterRepository

Inherits:
Object
  • Object
show all
Defined in:
lib/single_time_filter.rb

Class Method Summary collapse

Class Method Details

.had_single_payment?(tarif_id, login_id, period_id) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
# File 'lib/single_time_filter.rb', line 6

def had_single_payment?(tarif_id, , period_id)
  return false unless @payments
  @payments.member? [ tarif_id, , period_id ]
end

.register_single_payment(tarif_id, login_id, period_id, fin_transaction_id) ⇒ Object



11
12
13
14
15
# File 'lib/single_time_filter.rb', line 11

def register_single_payment(tarif_id, , period_id, fin_transaction_id)
  @payments ||= [ ]
  @payments << [ tarif_id, , period_id ] unless had_single_payment?(tarif_id, , period_id)
  true
end