Logo: Relish

  1. Sign in

Project: Sucker

Seller listing search

As an API consumer

I want to search seller listings

Because that has some business value.

Background
Given
the following:
@request = Sucker.new(
  :key    => amazon_key,
  :secret => amazon_secret,
  :locale => :us)
Scenarios
Browse a seller's listings
Given
the following:
@request << {
  :operation         => 'SellerListingSearch',
  :seller_id         => 'A2XAZ8JI5FY49I' }
When
I tape:
@response = @request.get
Then
I expect:
@response['SellerListing'].size.should eql 10
Large inventories do not return any results
Given
the following:
@request << {
  :operation         => 'SellerListingSearch',
  :seller_id         => 'A2H6NH4SQYFZ4M' }
When
I tape:
@response = @request.get
Then
I expect:
@response['SellerListing'].size.should eql 0
@response.errors.size.should eql 1
error = @response.errors.first
error['Message'].should include 'We did not find any matches'

Last published over 5 years ago by hakanensari.