The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Switchvox::API::Response - A response to the Switchvox Extend API.

SYNOPSIS

A Switchvox::API::Response object is returned from the api_request method in the Switchvox::API class.

Note: The Switchvox::API::Response object is a subclass of HTTP::Response so you can use all functionality of HTTP::Response.

You mostly only need to interact with three hash keys in the Switchvox::API::Response object (api_status,api_errors,api_result). If you want to get to the raw xml returned from the API call you can access this through the $response->{_content} field.

$response->{api_status}

Status string that represents the success or failure of the API call. Possible values: success,fault,fault.

success

Everything went great and you should check the {api_result} for the data.

fault

The connection to the API just fine, but the API returned a fault code (probably due to some invalid parameter) and you should check the {api_errors} for a summary of the problem.

failed

There was a problem with the connection to the API. This could because the hostname was incorrect, a bad HTTP response code was returned, etc. You should check the {api_errors} for a summary of the problem.

$response->{api_errors}

Array ref containing any connection errors, xml parsing errors, faults returned, etc during the request.

$response->{api_result}

If the request was successful this is where the data will be.

AUTHOR

Written by David W. Podolsky <api at switchvox dot com>

Copyright (C) 2009 Digium, Inc

SEE ALSO

Switchvox::API::Request, Switchvox::API::Response, http://developers.digium.com/switchvox/