1 package FS::part_pkg_vendor;
2 use base qw( FS::Record );
8 FS::part_pkg_vendor - Object methods for part_pkg_vendor records
12 use FS::part_pkg_vendor;
14 $record = new FS::part_pkg_vendor \%hash;
15 $record = new FS::part_pkg_vendor { 'column' => 'value' };
17 $error = $record->insert;
19 $error = $new_record->replace($old_record);
21 $error = $record->delete;
23 $error = $record->check;
27 An FS::part_pkg_vendor object represents a mapping of pkgpart numbers to
28 external package numbers. FS::part_pkg_vendor inherits from FS::Record.
29 The following fields are currently supported:
58 Creates a new example. To add the example to the database, see L<"insert">.
60 Note that this stores the hash reference, not a distinct copy of the hash it
61 points to. You can ask the object for a copy with the I<hash> method.
65 # the new method can be inherited from FS::Record, if a table method is defined
67 sub table { 'part_pkg_vendor'; }
71 Adds this record to the database. If there is an error, returns the error,
72 otherwise returns false.
76 # the insert method can be inherited from FS::Record
80 Delete this record from the database.
84 # the delete method can be inherited from FS::Record
86 =item replace OLD_RECORD
88 Replaces the OLD_RECORD with this one in the database. If there is an error,
89 returns the error, otherwise returns false.
93 # the replace method can be inherited from FS::Record
97 Checks all fields to make sure this is a valid example. If there is
98 an error, returns the error, otherwise returns false. Called by the insert
103 # the check method should currently be supplied - FS::Record contains some
104 # data checking routines
110 $self->ut_numbern('num')
111 || $self->ut_foreign_key('pkgpart', 'part_pkg', 'pkgpart')
112 || $self->ut_foreign_key('exportnum', 'part_export', 'exportnum')
113 || $self->ut_textn('vendor_pkg_id')
115 return $error if $error;
122 Returns the L<FS::part_export> associated with this vendor/external package id.
128 L<FS::part_pkg>, L<FS::Record>, schema.html from the base documentation.