Class: UniqSysOmega::Tariffs::SingleTimeFilterRepository
- Inherits:
-
Object
- Object
- UniqSysOmega::Tariffs::SingleTimeFilterRepository
- Defined in:
- lib/single_time_filter.rb
Class Method Summary collapse
- .had_single_payment?(tarif_id, login_id, period_id) ⇒ Boolean
- .register_single_payment(tarif_id, login_id, period_id, fin_transaction_id) ⇒ Object
Class Method Details
.had_single_payment?(tarif_id, login_id, period_id) ⇒ Boolean
6 7 8 9 |
# File 'lib/single_time_filter.rb', line 6 def had_single_payment?(tarif_id, login_id, period_id) return false unless @payments @payments.member? [ tarif_id, login_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, login_id, period_id, fin_transaction_id) @payments ||= [ ] @payments << [ tarif_id, login_id, period_id ] unless had_single_payment?(tarif_id, login_id, period_id) true end |