Class: Flowthings::PlatformResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/flowthings/response/platform_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ PlatformResponse

Returns a new instance of PlatformResponse.



5
6
7
8
9
10
11
12
13
# File 'lib/flowthings/response/platform_response.rb', line 5

def initialize(response)
  @excon_object = response
  @status = response.status
  @response_headers = response.headers
  @full_message = response.body
  @head = @full_message["head"]
  @body = @full_message["body"]
  @errors = @head["errors"]
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



3
4
5
# File 'lib/flowthings/response/platform_response.rb', line 3

def body
  @body
end

#errorsObject (readonly)

Returns the value of attribute errors.



3
4
5
# File 'lib/flowthings/response/platform_response.rb', line 3

def errors
  @errors
end

#excon_objectObject (readonly)

Returns the value of attribute excon_object.



3
4
5
# File 'lib/flowthings/response/platform_response.rb', line 3

def excon_object
  @excon_object
end

#full_messageObject (readonly)

Returns the value of attribute full_message.



3
4
5
# File 'lib/flowthings/response/platform_response.rb', line 3

def full_message
  @full_message
end

#headObject (readonly)

Returns the value of attribute head.



3
4
5
# File 'lib/flowthings/response/platform_response.rb', line 3

def head
  @head
end

#response_headersObject (readonly)

Returns the value of attribute response_headers.



3
4
5
# File 'lib/flowthings/response/platform_response.rb', line 3

def response_headers
  @response_headers
end

#statusObject (readonly)

Returns the value of attribute status.



3
4
5
# File 'lib/flowthings/response/platform_response.rb', line 3

def status
  @status
end