NAME
Marketplace::Rakuten::Response - Class to handle the responses from webservice.rakuten.de
The constructors keys map the HTTP::Tiny keys, so you can feed the constructor straight with the response.
ACCESSORS
success
Boolean indicating whether the operation returned a 2XX status code
url
URL that provided the response. This is the URL of the request unless there were redirections, in which case it is the last URL queried in a redirection chain
status
The HTTP status code of the response
reason
The response phrase returned by the server
content
The body of the response. If the response does not have any content or if a data callback is provided to consume the response body, this will be the empty string
headers
A hashref of header fields. All header field names will be normalized to be lower case. If a header is repeated, the value will be an arrayref; it will otherwise be a scalar string containing the value
data
The parsed data from xml, if any.
METHODS
is_success
Check that the http status is ok and that there are no errors.
errors
Return, if any, a list of hashrefs with errors. The expected keys of each element are: code
message
help
http://webservice.rakuten.de/documentation/howto/error
Return an arrayref of error, if any. If there is no error, return undef.
error_string
The errors returned as a single string.