class Tide::API::Response
Generic response of a request to Tide's API
@api private
Attributes
payload[R]
Hash or array of hashes representing each item in the response body.
@return [Hash|Array<Hash>]
Public Class Methods
new(payload, error)
click to toggle source
Instantiates a new API
response
@param [Hash|Array<Hash>] payload Hash or array of hashes representing each item in the response body. @param [Boolean] error Whether the request failed
# File lib/tide/api/response.rb, line 19 def initialize(payload, error) @payload = payload @error = error end
Public Instance Methods
error?()
click to toggle source
Whether the response contains errors
@return [Boolean] true if the response has errors and false otherwise
# File lib/tide/api/response.rb, line 28 def error? @error end