% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
FS::did_order - Object methods for did_order records
use FS::did_order;
$record = new FS::did_order \%hash;
$record = new FS::did_order { 'column' => 'value' };
$error = $record->insert;
$error = $new_record->replace($old_record);
$error = $record->delete;
$error = $record->check;
An FS::did_order object represents a bulk DID order. FS::did_order inherits from FS::Record. The following fields are currently supported:
primary key
vendornum
vendor_order_id
submitted
confirmed
received
Creates a new bulk DID order. To add it 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.
Adds this record to the database. If there is an error, returns the error, otherwise returns false.
Delete this record from the database.
Merges the DID order given by SOURCE_ORDER into THIS order.
The following fields from the source order are transferred, only if they aren't set in this order: -vendor order # -confirmed -customer
DID order items are transferred into this order. Per-order customer is cleared if any order items are assigned to a customer.
The source order is deleted.
The operation fails if: -either order has a received time; or -the DID vendors do not match between the orders
Replaces the OLD_RECORD with this one in the database. If there is an error, returns the error, otherwise returns false.
Checks all fields to make sure this is a valid bulk DID order. If there is an error, returns the error, otherwise returns false. Called by the insert and replace methods.
Returns the did_order_items (see FS::did_order_item) associated with this bulk DID order.
Returns all cust_main (see FS::cust_main), if any, associated with this bulk DID order.
Returns true if and only if the order has any stock order items.
Returns the provisioned DIDs, if any, as phone_avail (see FS::phone_avail) objects.
FS::Record, schema.html from the base documentation.