Class: Rapa::Responses::ListItemsResponse

Inherits:
MultipleResourcesResponse show all
Defined in:
lib/rapa/responses/multiple_resources_response/list_items_response.rb

Instance Method Summary collapse

Methods inherited from MultipleResourcesResponse

#each, #resources

Methods inherited from BaseResponse

#body, #headers, #initialize, #status

Constructor Details

This class inherits a constructor from Rapa::Responses::BaseResponse

Instance Method Details

#errorRapa::Error

Returns:



5
6
7
8
9
# File 'lib/rapa/responses/multiple_resources_response/list_items_response.rb', line 5

def error
  if value = body.dig("ItemLookupErrorResponse", "Error")
    ::Rapa::Error.new(value)
  end
end

#has_error?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/rapa/responses/multiple_resources_response/list_items_response.rb', line 12

def has_error?
  !error.nil?
end

#has_valid_request?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/rapa/responses/multiple_resources_response/list_items_response.rb', line 17

def has_valid_request?
  body.dig("ItemLookupResponse", "Items", "Request", "IsValid") == "True"
end