package FS::rate;
+use base qw(FS::Record);
use strict;
-use vars qw( @ISA $DEBUG );
+use vars qw( $DEBUG );
use FS::Record qw( qsearch qsearchs dbh fields );
use FS::rate_detail;
-@ISA = qw(FS::Record);
-
$DEBUG = 0;
=head1 NAME
=over 4
-=item ratenum - primary key
+=item ratenum
+
+primary key
=item ratename
+Rate name
+
+=item agentnum
+
+Optional agent (see L<FS::agent>) for agent-virtualized rates.
+
=back
=head1 METHODS
=cut
-# the check method should currently be supplied - FS::Record contains some
-# data checking routines
-
sub check {
my $self = shift;
my $error =
$self->ut_numbern('ratenum')
|| $self->ut_text('ratename')
+ #|| $self->ut_foreign_keyn('agentnum', 'agent', 'agentnum')
;
return $error if $error;
Returns all region-specific details (see L<FS::rate_detail>) for this rate.
-=cut
-
-sub rate_detail {
- my $self = shift;
- qsearch( 'rate_detail', { 'ratenum' => $self->ratenum } );
-}
-
-
=back
=head1 SUBROUTINES