Freeside:1.9:Documentation:Developer/FS/part pkg link
From Freeside
< Freeside:1.9:Documentation:Developer | FS
Revision as of 17:15, 6 February 2009 by Ivan (talk | contribs) (Edit via perl MediaWiki framework (1.13))
Contents
NAME
FS::part_pkg_link - Object methods for part_pkg_link records
SYNOPSIS
use FS::part_pkg_link; $record = new FS::part_pkg_link \%hash; $record = new FS::part_pkg_link { 'column' => 'value' }; $error = $record->insert; $error = $new_record->replace($old_record); $error = $record->delete; $error = $record->check;
DESCRIPTION
An FS::part_pkg_link object represents an link from one package definition to another. FS::part_pkg_link inherits from FS::Record. The following fields are currently supported:
- pkglinknum
- primary key
- src_pkgpart
- Source package (see FS::part_pkg)
- dst_pkgpart
- Destination package (see FS::part_pkg)
- link_type
- Link type - currently, "bill" (source package bills a line item from target package), or "svc" (source package includes services from target package).
METHODS
- new HASHREF
- Creates a new link. To add the link to the database, see "insert".
- Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the hash method.
- insert
- Adds this record to the database. If there is an error, returns the error, otherwise returns false.
- delete
- Delete this record from the database.
- replace OLD_RECORD
- Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
- check
- Checks all fields to make sure this is a valid link. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
- src_pkg
- Returns the source part_pkg object (see FS::part_pkg).
- dst_pkg
- Returns the source part_pkg object (see FS::part_pkg).
BUGS
SEE ALSO
FS::Record, schema.html from the base documentation.