Class: Amadeus::Response
- Inherits:
-
Object
- Object
- Amadeus::Response
- Defined in:
- lib/amadeus/client/response.rb,
lib/amadeus/client/response/parser.rb
Overview
The response object returned for every API call.
Instance Attribute Summary collapse
-
#body ⇒ String
readonly
The raw body received from the API.
-
#data ⇒ Hash
readonly
The data extracted from the JSON data - if the body contained JSON.
-
#http_response ⇒ Net::HTTPResponse
readonly
The actual HTTPResponse object returned from the Net::HTTP request.
-
#parsed ⇒ Boolean
readonly
Wether the raw body has been parsed into JSON.
-
#request ⇒ Amadeus::Request
readonly
The actual Amadeus::Request object used to make this API call.
-
#result ⇒ Hash
readonly
The parsed JSON received from the API, if the result was JSON.
-
#status_code ⇒ Number
readonly
The HTTP status code for the response, if any.
Instance Attribute Details
#body ⇒ String (readonly)
The raw body received from the API
28 29 30 |
# File 'lib/amadeus/client/response.rb', line 28 def body @body end |
#data ⇒ Hash (readonly)
The data extracted from the JSON data - if the body contained JSON
24 25 26 |
# File 'lib/amadeus/client/response.rb', line 24 def data @data end |
#http_response ⇒ Net::HTTPResponse (readonly)
The actual HTTPResponse object returned from the Net::HTTP request
12 13 14 |
# File 'lib/amadeus/client/response.rb', line 12 def http_response @http_response end |
#parsed ⇒ Boolean (readonly)
Wether the raw body has been parsed into JSON
32 33 34 |
# File 'lib/amadeus/client/response.rb', line 32 def parsed @parsed end |
#request ⇒ Amadeus::Request (readonly)
The actual Amadeus::Request object used to make this API call
16 17 18 |
# File 'lib/amadeus/client/response.rb', line 16 def request @request end |
#result ⇒ Hash (readonly)
The parsed JSON received from the API, if the result was JSON
20 21 22 |
# File 'lib/amadeus/client/response.rb', line 20 def result @result end |
#status_code ⇒ Number (readonly)
The HTTP status code for the response, if any
36 37 38 |
# File 'lib/amadeus/client/response.rb', line 36 def status_code @status_code end |