Class: Effective::Registrar

Inherits:
Object
  • Object
show all
Includes:
EffectiveMembershipsRegistrar
Defined in:
app/models/effective/registrar.rb

Instance Method Summary collapse

Methods included from EffectiveMembershipsRegistrar

#advance_period, #assign!, #build_reclassify_fees, #build_register_fees, #build_reinstate_fees, #create_all_fees!, #create_early_fees!, #create_fees!, #create_late_fees!, #create_not_in_good_standing!, #create_renewal_fees!, #current_period, #delete_fees!, #destroy_early_fees!, #early_fee_date_range, #fee_payment_purchased!, #fees_paid!, #in_good_standing!, #last_period, #min_late_duration, #min_not_in_good_standing_duration, #next_membership_number, #not_in_good_standing!, #not_in_good_standing_status, #not_in_good_standing_status!, #period, #period_end_on, #periods, #periods_collection, #reclassify!, #register!, #reinstate!, #remove!, #resigned_status, #resigned_status!, #status_add!, #status_assign!, #status_clear!, #status_remove!

Instance Method Details

#early_fee_date(period:) ⇒ Object



18
19
20
# File 'app/models/effective/registrar.rb', line 18

def early_fee_date(period:)
  Time.zone.local(period.year - 1, 12, 1) # Fees roll over every December 1st
end

#early_fee_end_date(period:) ⇒ Object



22
23
24
# File 'app/models/effective/registrar.rb', line 22

def early_fee_end_date(period:)
  Time.zone.local(period.year - 1, 12, 31) # Early fees are destroyed on December 31st
end

#late_fee_date(period:) ⇒ Object



10
11
12
# File 'app/models/effective/registrar.rb', line 10

def late_fee_date(period:)
  Time.zone.local(period.year, 2, 1) # Fees are late after February 1st
end

#not_in_good_standing_date(period:) ⇒ Object



14
15
16
# File 'app/models/effective/registrar.rb', line 14

def not_in_good_standing_date(period:)
  Time.zone.local(period.year, 3, 1) # Membership are Not In Good Standing after March 1st
end

#renewal_fee_date(date:) ⇒ Object



6
7
8
# File 'app/models/effective/registrar.rb', line 6

def renewal_fee_date(date:)
  Time.zone.local(date.year, 12, 1) # Fees roll over every December 1st
end