1 package FS::svc_export_machine;
4 use base qw( FS::Record );
5 use FS::Record; # qw( qsearch qsearchs );
7 use FS::part_export_machine;
11 FS::svc_export_machine - Object methods for svc_export_machine records
15 use FS::svc_export_machine;
17 $record = new FS::svc_export_machine \%hash;
18 $record = new FS::svc_export_machine { 'column' => 'value' };
20 $error = $record->insert;
22 $error = $new_record->replace($old_record);
24 $error = $record->delete;
26 $error = $record->check;
30 An FS::svc_export_machine object represents a customer service export
31 hostname. FS::svc_export_machine inherits from FS::Record. The following
32 fields are currently supported:
36 =item svcexportmachinenum
42 Customer service, see L<FS::cust_svc>
46 Export hostname, see L<FS::part_export_machine>
56 Creates a new record. To add the record to the database, see L<"insert">.
58 Note that this stores the hash reference, not a distinct copy of the hash it
59 points to. You can ask the object for a copy with the I<hash> method.
63 sub table { 'svc_export_machine'; }
67 Adds this record to the database. If there is an error, returns the error,
68 otherwise returns false.
72 Delete this record from the database.
74 =item replace OLD_RECORD
76 Replaces the OLD_RECORD with this one in the database. If there is an error,
77 returns the error, otherwise returns false.
81 Checks all fields to make sure this is a valid record. If there is
82 an error, returns the error, otherwise returns false. Called by the insert
91 $self->ut_numbern('svcexportmachinenum')
92 || $self->ut_foreign_key('svcnum', 'cust_svc', 'svcnum')
93 || $self->ut_foreign_key('machinenum', 'part_export_machine', 'machinenum' )
95 return $error if $error;
106 L<FS::cust_svc>, L<FS::part_export_machine>, L<FS::Record>