class Rapa::Responses::SearchItemsResponse
Public Instance Methods
error()
click to toggle source
@return [Rapa::Error]
# File lib/rapa/responses/multiple_resources_response/search_items_response.rb, line 5 def error if value = body.dig("ItemSearchResponse", "Items", "Request", "Errors", "Error") ::Rapa::Error.new(value) end end
has_error?()
click to toggle source
@return [Boolean]
# File lib/rapa/responses/multiple_resources_response/search_items_response.rb, line 12 def has_error? !error.nil? end
has_valid_request?()
click to toggle source
@return [Boolean]
# File lib/rapa/responses/multiple_resources_response/search_items_response.rb, line 17 def has_valid_request? body.dig("ItemSearchResponse", "Items", "Request", "IsValid") == "True" end
total_pages()
click to toggle source
@return [Integer, nil]
# File lib/rapa/responses/multiple_resources_response/search_items_response.rb, line 22 def total_pages if value = body.dig("ItemSearchResponse", "Items", "TotalPages") value.to_i end end
total_results()
click to toggle source
@return [Integer, nil]
# File lib/rapa/responses/multiple_resources_response/search_items_response.rb, line 29 def total_results if value = body.dig("ItemSearchResponse", "Items", "TotalResults") value.to_i end end
Private Instance Methods
resource_class()
click to toggle source
@note Override
# File lib/rapa/responses/multiple_resources_response/search_items_response.rb, line 38 def resource_class ::Rapa::Resources::ItemResource end
source_or_sources()
click to toggle source
@note Override
# File lib/rapa/responses/multiple_resources_response/search_items_response.rb, line 43 def source_or_sources body.dig("ItemSearchResponse", "Items", "Item") end