% 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::part_export::portaone
PortaOne integration for Freeside
This export offers basic svc_phone provisioning for PortaOne.
This module also provides generic methods for working through the "PortaOne API".
These methods allow access to the PortaOne API using the credentials set in the export options.
$export->api_login;
die $export->api_error if $export->api_error;
my $customer_info = $export->api_call('Customer','get_customer_info',{
'name' => $export->portaone_customer_name($cust_main),
},'customer_info');
die $export->api_error_logout if $export->api_error;
return $export->api_logout;
Accepts $service, $method, $params hashref and optional $returnfield. Places an api call to the specified service and method with the specified params. Returns the decoded json object returned by the api call. If $returnfield is specified, returns only that field of the decoded object, and errors out if that field does not exist. Returns empty on failure; retrieve error messages using "api_error".
Must run "api_login" first.
Returns the error string set by "PortaOne API" methods, or a blank string if most recent call produced no errors.
Attempts "api_logout", but returns "api_error" message from before logout was attempted. Useful for logging out properly after an error.
Initializes an api session using the credentials for this export. Always returns empty. Retrieve error messages using "api_error".
Ends the current api session established by "api_login".
For convenience, returns "api_error".
Accepts $i_account and $svc_phone. Updates the account specified by $i_account with the current values of $svc_phone (currently only updates account_id.) Always returns empty. Retrieve error messages using "api_error".
Accepts $i_customer and $cust_main. Updates the customer specified by $i_customer with the current values of $cust_main. Always returns empty. Retrieve error messages using "api_error".
Accepts $cust_main and returns customer name with substitutions.
Accepts $svc_phone and returns account id with substitutions.
Jonathan Prykop jonathan@freeside.biz