% include( '/elements/header.html', 'Developer Documentation' ) %> <& /elements/menubar.html, 'Freeside Perl Modules' => $fsurl.'docs/library/FS.html', 'Complete Index' => $fsurl.'docs/library/index.html', &>
Returns the Sipwise customer record that should belong to SERVICE. This is based on the pkgnum field.
Returns the record for the domain object named DOMAIN. If necessary, will create it first.
Returns the subscriber svc_acct linked to SVC_PHONE.
Refreshes the subscriber information for the service the DID was linked to previously, and the one it's linked to now.
Gets the subscriber record for SVC, if there is one.
Retrieves CDRs for calls in the date range from START to END and inserts them as a CDR batch. On success, returns a new cdr_batch object. On failure, returns an error message. If there are no new CDRs, returns nothing.
Makes a GET request to RESOURCE, the name of a resource type (like 'customers'), with query parameters in CONTENT, unpacks the embedded search results, and returns them as a list.
Sipwise ignores invalid query parameters rather than throwing an error, so if the parameters are misspelled or make no sense for this type of query, it will probably return all of the objects.
Makes a POST request to RESOURCE, the name of a resource type (like 'customers'), to create a new object of that type. CONTENT must be a hashref of the object's fields.
On success, will then fetch and return the newly created object. On failure, will throw the "message" parameter from the request as an exception.
Makes a PUT request to ENDPOINT, the name of a specific record (like 'customers/11'), to replace it with the data in CONTENT (a hashref of the object's fields). On failure, will throw an exception. On success, returns nothing.
Makes a DELETE request to ENDPOINT. On failure, will throw an exception.
Makes a REST request with HTTP method METHOD, to path ENDPOINT, with content CONTENT. If METHOD is GET, the content can be an arrayref or hashref to append as the query argument. If it's POST or PUT, the content will be JSON-serialized and sent as the request body. If it's DELETE, content will be ignored.
Hey! The above document had some coding errors, which are explained below:
'=item' outside of any '=over'
=over without closing =back