Difference between revisions of "Freeside:3:Documentation:Developer/FS/part pkg link"

From Freeside
Jump to: navigation, search
m (Edit via perl MediaWiki framework (1.13))
(No difference)

Revision as of 20:05, 27 June 2012

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).
hidden
Flag indicating that this subpackage should be felt, but not seen as an invoice line item when set to 'Y'

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.