1 package FS::svc_acct_pop;
4 use vars qw(@ISA @EXPORT_OK);
6 use FS::Record qw(fields qsearchs);
8 @ISA = qw(FS::Record Exporter);
9 @EXPORT_OK = qw(fields);
13 FS::svc_acct_pop - Object methods for svc_acct_pop records
19 $record = create FS::svc_acct_pop \%hash;
20 $record = create FS::svc_acct_pop { 'column' => 'value' };
22 $error = $record->insert;
24 $error = $new_record->replace($old_record);
26 $error = $record->delete;
28 $error = $record->check;
32 An FS::svc_acct object represents an point of presence. FS::svc_acct_pop
33 inherits from FS::Record. The following fields are currently supported:
37 =item popnum - primary key (assigned automatically for new accounts)
55 Creates a new point of presence (if only it were that easy!). To add the
56 point of presence to the database, see L<"insert">.
61 my($proto,$hashref)=@_;
63 #now in FS::Record::new
65 #foreach $field (fields('svc_acct_pop')) {
66 # $hashref->{$field}='' unless defined $hashref->{$field};
69 $proto->new('svc_acct_pop',$hashref);
74 Adds this point of presence to the databaes. If there is an error, returns the
75 error, otherwise returns false.
88 Currently unimplemented.
94 return "Can't (yet) delete POPs!";
98 =item replace OLD_RECORD
100 Replaces OLD_RECORD with this one in the database. If there is an error,
101 returns the error, otherwise returns false.
107 return "(Old) Not an svc_acct_pop record!"
108 unless $old->table eq "svc_acct_pop";
109 return "Can't change popnum!"
110 unless $old->getfield('popnum') eq $new->getfield('popnum');
117 Checks all fields to make sure this is a valid point of presence. If there is
118 an error, returns the error, otherwise returns false. Called by the insert
125 return "Not a svc_acct_pop record!" unless $self->table eq "svc_acct_pop";
128 $self->ut_numbern('popnum')
129 or $self->ut_text('city')
130 or $self->ut_text('state')
131 or $self->ut_number('ac')
132 or $self->ut_number('exch')
134 return $error if $error;
144 It doesn't properly override FS::Record yet.
146 It should be renamed to part_pop.
150 L<FS::Record>, L<svc_acct>, schema.html from the base documentation.
154 Class dealing with pops
156 ivan@sisd.com 98-mar-8
158 pod ivan@sisd.com 98-sep-23