Sha256: 564f828a5dc31757985f8eac933a0f50ae2b3f7c2dd4b68bf9b061d474969366

Contents?: true

Size: 766 Bytes

Versions: 4

Compression:

Stored size: 766 Bytes

Contents

module Amazon
  module Associates
    class SearchResponse < Response
      attr_accessor :url # TODO would be just a reader if we can figure out xml construction better
      xml_reader :operation_request, :as => OperationRequest, :required => true
      xml_reader :request, :as => Request, :in => 'xmlns:Items'
      delegate :current_page, :to => :request_query

      xml_reader :items, :as => [Item]
      xml_reader :total_results, :in => 'xmlns:Items', :as => Integer
      xml_reader :total_pages, :in => 'xmlns:Items', :as => Integer
    end

    class ItemSearchResponse < SearchResponse
      xml_name 'ItemSearchResponse'

      xml_reader :request_query, :as => ItemSearchRequest, :in => 'xmlns:Items/xmlns:Request', :required => true
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
amazon-associates-0.7.2 lib/amazon-associates/responses/item_search_response.rb
amazon-associates-0.7.1 lib/amazon-associates/responses/item_search_response.rb
amazon-associates-0.7.0 lib/amazon-associates/responses/item_search_response.rb
amazon-associates-0.6.3 lib/amazon-associates/responses/item_search_response.rb