NAME

Net::ThreeScale::Response - object encapsulating a response to a 3Scale API v2.0 call

SYNOPSIS

 $response = $client->authorize(app_id=>$app_id, app_key=>$app_key);
 if($response->is_success){ 
	my @usage = @{$response->usage_reports()};
 }else{ 
 	print STDERR "An error occurred with code ", $response->error_code, ":" ,$response->error,"\n";
 }
 

DESCRIPTION

A response object is returned from various calls in the 3Scale API, the following fields are of relevance: Objects are constructed within the API, you should not create them yourself.

$r->is_success

Indicates if the operation which generated the response was successfull. Successful responses will have an associated transaction within the response.

$r->usage_reports

A list of usage reports returned by 3Scale indicating how much of the user's quota has been used.

$r->error_code

Returns the error code (as a string) which was genrerated by this response, these correspond to constants exported by the Net::ThreeScale::Client module. See Net::ThreeScale::Client for a list of available response codes.

$r->error_message

Returns a textual description of the error returned by the server.

SEE ALSO

Net::ThreeScale::Client

AUTHOR

(c) Owen Cliffe 2008, Eugene Oden 2010.

CONTRIBUTORS

  • Dave Lambley

  • Ed Freyfogle

  • Marc Metten