use FS::svc_forward;
use FS::svc_www;
use FS::cdr;
+use FS::acct_snarf;
$DEBUG = 0;
$me = '[FS::svc_acct]';
label => 'Archive messages after',
type => 'select',
select_hash => [
- -2 => 'default(730 day(s))',
+ -2 => 'default(730 days)',
0 => 'Never',
- 86400 => '24 hour(s)',
- 172800 => '2 day(s)',
- 259200 => '3 day(s)',
- 432000 => '5 day(s)',
- 604800 => '7 day(s)',
- 1209600 => '2 week(s)',
- 2592000 => '30 day(s)',
- 7776000 => '90 day(s)',
- 15552000 => '180 day(s)',
- 31536000 => '365 day(s)',
- 63072000 => '730 day(s)',
+ 86400 => '24 hours',
+ 172800 => '2 days',
+ 259200 => '3 days',
+ 432000 => '5 days',
+ 604800 => '7 days',
+ 1209600 => '2 weeks',
+ 2592000 => '30 days',
+ 7776000 => '90 days',
+ 15552000 => '180 days',
+ 31536000 => '365 days',
+ 63072000 => '730 days',
],
disable_inventory => 1,
disable_select => 1,
=item acct_snarf
Returns an array of FS::acct_snarf records associated with the account.
-If the acct_snarf table does not exist or there are no associated records,
-an empty list is returned
=cut
sub acct_snarf {
my $self = shift;
- return () unless dbdef->table('acct_snarf');
- eval "use FS::acct_snarf;";
- die $@ if $@;
- qsearch('acct_snarf', { 'svcnum' => $self->svcnum } );
+ qsearch({
+ 'table' => 'acct_snarf',
+ 'hashref' => { 'svcnum' => $self->svcnum },
+ #'order_by' => 'ORDER BY priority ASC',
+ });
+}
+
+=item cgp_rpop_hashref
+
+Returns an arrayref of RPOP data suitable for Communigate Pro API commands.
+
+=cut
+
+sub cgp_rpop_hashref {
+ my $self = shift;
+ { map { $_->snarfname => $_->cgp_hashref } $self->acct_snarf };
}
=item decrement_upbytes OCTETS