Class: OpenFga::ApiExecutorResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/openfga/client/models/api_executor_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data:, status:, headers:) ⇒ ApiExecutorResponse

Returns a new instance of ApiExecutorResponse.



7
8
9
10
11
# File 'lib/openfga/client/models/api_executor_response.rb', line 7

def initialize(data:, status:, headers:)
  @data    = data
  @status  = status
  @headers = headers
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



5
6
7
# File 'lib/openfga/client/models/api_executor_response.rb', line 5

def data
  @data
end

#headersObject (readonly)

Returns the value of attribute headers.



5
6
7
# File 'lib/openfga/client/models/api_executor_response.rb', line 5

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/openfga/client/models/api_executor_response.rb', line 5

def status
  @status
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/openfga/client/models/api_executor_response.rb', line 13

def success?
  !@status.nil? && @status >= 200 && @status < 300
end