Class: ApiService::SuccessfulResult

Inherits:
Object
  • Object
show all
Defined in:
lib/api_service/successful_result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response, state, options = {}) ⇒ SuccessfulResult

Returns a new instance of SuccessfulResult.



5
6
7
8
9
# File 'lib/api_service/successful_result.rb', line 5

def initialize(response, state, options = {})
  @options = default_options.merge(options)
  @response = response
  @state = state
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/api_service/successful_result.rb', line 3

def response
  @response
end

#stateObject (readonly)

Returns the value of attribute state.



3
4
5
# File 'lib/api_service/successful_result.rb', line 3

def state
  @state
end

Instance Method Details

#http_statusObject



11
12
13
# File 'lib/api_service/successful_result.rb', line 11

def http_status
  @options[:http_status]
end