1 package FS::part_pkg::prepaid;
4 use vars qw(@ISA %info %recur_action);
6 use FS::part_pkg::flat;
8 @ISA = qw(FS::part_pkg::flat);
10 tie %recur_action, 'Tie::IxHash',
11 'suspend' => 'suspend',
15 tie my %overlimit_action, 'Tie::IxHash',
16 'overlimit' => 'Default overlimit processing',
21 'name' => 'Prepaid, flat rate',
22 #'name' => 'Prepaid (no automatic recurring)', #maybe use it here too
23 'shortname' => 'Prepaid, no automatic cycle',
24 'inherit_fields' => [ 'usage_Mixin', 'global_Mixin' ],
26 'recur_action' => { 'name' => 'Action to take upon reaching end of prepaid period',
28 'select_options' => \%recur_action,
30 'overlimit_action' => { 'name' => 'Action to take upon reaching a usage limit.',
32 'select_options' => \%overlimit_action,
34 #XXX if you set overlimit_action to 'cancel', should also have the ability
37 # do we need to disable these?
38 map { $_ => { 'disabled' => 1 } } (
39 qw(recharge_amount recharge_seconds recharge_upbytes recharge_downbytes
40 recharge_totalbytes usage_rollover recharge_reset) ),
42 'fieldorder' => [ qw( recur_action overlimit_action ) ],